lemmy-js-client 1.0.0-multi-community.10 → 1.0.0-multi-community.12

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
@@ -146,6 +146,8 @@ import { ListMultiCommunities } from "./types/ListMultiCommunities";
146
146
  import { ListMultiCommunitiesResponse } from "./types/ListMultiCommunitiesResponse";
147
147
  import { AdminListUsersResponse } from "./types/AdminListUsersResponse";
148
148
  import { CreateOrDeleteMultiCommunityEntry } from "./types/CreateOrDeleteMultiCommunityEntry";
149
+ import { GetMultiCommunity } from "./types/GetMultiCommunity";
150
+ import { GetMultiCommunityResponse } from "./types/GetMultiCommunityResponse";
149
151
  type RequestOptions = Pick<RequestInit, "signal">;
150
152
  /**
151
153
  * Helps build lemmy HTTP requests.
@@ -743,6 +745,7 @@ export declare class LemmyHttp extends Controller {
743
745
  donationDialogShown(options?: RequestOptions): Promise<SuccessResponse>;
744
746
  createMultiCommunity(form: CreateMultiCommunity, options?: RequestOptions): Promise<MultiCommunity>;
745
747
  updateMultiCommunity(form: UpdateMultiCommunity, options?: RequestOptions): Promise<SuccessResponse>;
748
+ getMultiCommunity(form: GetMultiCommunity, options?: RequestOptions): Promise<GetMultiCommunityResponse>;
746
749
  createMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
747
750
  deleteMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
748
751
  listMultiCommunities(form: ListMultiCommunities, options?: RequestOptions): Promise<ListMultiCommunitiesResponse>;
package/dist/http.js CHANGED
@@ -922,6 +922,9 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
922
922
  updateMultiCommunity(form, options) {
923
923
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/multi_community", form, options);
924
924
  }
925
+ getMultiCommunity(form, options) {
926
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community", form, options);
927
+ }
925
928
  createMultiCommunityEntry(form, options) {
926
929
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/entry", form, options);
927
930
  }
@@ -1992,15 +1995,20 @@ __decorate([
1992
1995
  __param(0, (0, runtime_1.Body)()),
1993
1996
  __param(1, (0, runtime_1.Inject)())
1994
1997
  ], LemmyHttp.prototype, "updateMultiCommunity", null);
1998
+ __decorate([
1999
+ (0, runtime_1.Get)("/multi_community"),
2000
+ __param(0, (0, runtime_1.Body)()),
2001
+ __param(1, (0, runtime_1.Inject)())
2002
+ ], LemmyHttp.prototype, "getMultiCommunity", null);
1995
2003
  __decorate([
1996
2004
  (0, runtime_1.Security)("bearerAuth"),
1997
- (0, runtime_1.Put)("/multi_community/entry"),
2005
+ (0, runtime_1.Post)("/multi_community/entry"),
1998
2006
  __param(0, (0, runtime_1.Body)()),
1999
2007
  __param(1, (0, runtime_1.Inject)())
2000
2008
  ], LemmyHttp.prototype, "createMultiCommunityEntry", null);
2001
2009
  __decorate([
2002
2010
  (0, runtime_1.Security)("bearerAuth"),
2003
- (0, runtime_1.Put)("/multi_community/entry"),
2011
+ (0, runtime_1.Delete)("/multi_community/entry"),
2004
2012
  __param(0, (0, runtime_1.Body)()),
2005
2013
  __param(1, (0, runtime_1.Inject)())
2006
2014
  ], LemmyHttp.prototype, "deleteMultiCommunityEntry", null);
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";
@@ -129,6 +130,8 @@ export { GetCommunityResponse } from "./types/GetCommunityResponse";
129
130
  export { GetFederatedInstancesResponse } from "./types/GetFederatedInstancesResponse";
130
131
  export { GetModlog } from "./types/GetModlog";
131
132
  export { GetModlogResponse } from "./types/GetModlogResponse";
133
+ export { GetMultiCommunity } from "./types/GetMultiCommunity";
134
+ export { GetMultiCommunityResponse } from "./types/GetMultiCommunityResponse";
132
135
  export { GetPersonDetails } from "./types/GetPersonDetails";
133
136
  export { GetPersonDetailsResponse } from "./types/GetPersonDetailsResponse";
134
137
  export { GetPost } from "./types/GetPost";
@@ -246,6 +249,7 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
246
249
  export { ModlogActionType } from "./types/ModlogActionType";
247
250
  export { ModlogCombinedView } from "./types/ModlogCombinedView";
248
251
  export { MultiCommunity } from "./types/MultiCommunity";
252
+ export { MultiCommunityFollow } from "./types/MultiCommunityFollow";
249
253
  export { MultiCommunityId } from "./types/MultiCommunityId";
250
254
  export { MultiCommunityView } from "./types/MultiCommunityView";
251
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,4 @@
1
+ import type { MultiCommunityId } from "./MultiCommunityId";
2
+ export type GetMultiCommunity = {
3
+ id: MultiCommunityId;
4
+ };
@@ -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
  };
@@ -5,10 +5,11 @@ export type MultiCommunity = {
5
5
  id: MultiCommunityId;
6
6
  creator_id: PersonId;
7
7
  name: string;
8
- title: string | null;
9
- description: string | null;
8
+ title?: string;
9
+ description?: string;
10
+ local: boolean;
10
11
  deleted: boolean;
11
12
  ap_id: DbUrl;
12
13
  published: string;
13
- updated: string | null;
14
+ updated?: string;
14
15
  };
@@ -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.10",
4
+ "version": "1.0.0-multi-community.12",
5
5
  "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",