lemmy-js-client 1.0.0-multi-community.7 → 1.0.0-multi-community.9

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.
Files changed (40) hide show
  1. package/dist/http.d.ts +17 -4
  2. package/dist/http.js +49 -5
  3. package/dist/index.d.ts +15 -8
  4. package/dist/other_types.d.ts +8 -2
  5. package/dist/types/AdminListUsers.d.ts +7 -0
  6. package/dist/types/AdminListUsersResponse.d.ts +10 -0
  7. package/dist/types/CreateMultiCommunity.d.ts +2 -0
  8. package/dist/types/CreateOrDeleteMultiCommunityEntry.d.ts +6 -0
  9. package/dist/types/CreateOrDeleteMultiCommunityEntry.js +2 -0
  10. package/dist/types/CreateSite.d.ts +2 -0
  11. package/dist/types/EditSite.d.ts +5 -0
  12. package/dist/types/GetPosts.d.ts +2 -1
  13. package/dist/types/Instance.d.ts +2 -1
  14. package/dist/types/LemmyErrorType.d.ts +4 -0
  15. package/dist/types/{ListBannedPersons.d.ts → ListPersonHidden.d.ts} +2 -2
  16. package/dist/types/ListPersonHidden.js +2 -0
  17. package/dist/types/{BannedPersonsResponse.d.ts → ListPersonHiddenResponse.d.ts} +4 -4
  18. package/dist/types/ListPersonHiddenResponse.js +2 -0
  19. package/dist/types/ListPersonRead.d.ts +9 -0
  20. package/dist/types/ListPersonRead.js +2 -0
  21. package/dist/types/ListPersonReadResponse.d.ts +13 -0
  22. package/dist/types/ListPersonReadResponse.js +2 -0
  23. package/dist/types/ListingType.d.ts +1 -1
  24. package/dist/types/LocalImage.d.ts +7 -2
  25. package/dist/types/LocalImageView.d.ts +2 -0
  26. package/dist/types/LocalSite.d.ts +2 -0
  27. package/dist/types/LocalUser.d.ts +2 -1
  28. package/dist/types/LockPost.d.ts +1 -0
  29. package/dist/types/Login.d.ts +3 -0
  30. package/dist/types/ModLockPost.d.ts +1 -0
  31. package/dist/types/MultiCommunity.d.ts +6 -1
  32. package/dist/types/ResolveObjectResponse.d.ts +1 -1
  33. package/dist/types/SaveUserSettings.d.ts +2 -1
  34. package/dist/types/Site.d.ts +2 -1
  35. package/dist/types/UpdateMultiCommunity.d.ts +3 -2
  36. package/dist/types/VoteShow.d.ts +4 -0
  37. package/dist/types/VoteShow.js +3 -0
  38. package/package.json +3 -3
  39. /package/dist/types/{BannedPersonsResponse.js → AdminListUsers.js} +0 -0
  40. /package/dist/types/{ListBannedPersons.js → AdminListUsersResponse.js} +0 -0
package/dist/http.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Controller } from "@tsoa/runtime";
2
- import { CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListBannedPersonsI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
2
+ import { AdminListUsersI, CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListPersonContentI, ListPersonHiddenI, ListPersonReadI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
3
3
  import { AddAdmin } from "./types/AddAdmin";
4
4
  import { AddAdminResponse } from "./types/AddAdminResponse";
5
5
  import { AddModToCommunity } from "./types/AddModToCommunity";
@@ -10,7 +10,6 @@ import { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
10
10
  import { MarkManyPostsAsRead } from "./types/MarkManyPostsAsRead";
11
11
  import { BanPerson } from "./types/BanPerson";
12
12
  import { BanPersonResponse } from "./types/BanPersonResponse";
13
- import { BannedPersonsResponse } from "./types/BannedPersonsResponse";
14
13
  import { BlockCommunity } from "./types/BlockCommunity";
15
14
  import { BlockCommunityResponse } from "./types/BlockCommunityResponse";
16
15
  import { BlockPerson } from "./types/BlockPerson";
@@ -137,12 +136,16 @@ import { MarkPersonPostMentionAsRead } from "./types/MarkPersonPostMentionAsRead
137
136
  import { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
138
137
  import { Tag } from "./types/Tag";
139
138
  import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
139
+ import { ListPersonReadResponse } from "./types/ListPersonReadResponse";
140
+ import { ListPersonHiddenResponse } from "./types/ListPersonHiddenResponse";
140
141
  import { CommunityIdQuery } from "./types/CommunityIdQuery";
141
142
  import { CreateMultiCommunity } from "./types/CreateMultiCommunity";
142
143
  import { MultiCommunity } from "./types/MultiCommunity";
143
144
  import { UpdateMultiCommunity } from "./types/UpdateMultiCommunity";
144
145
  import { ListMultiCommunities } from "./types/ListMultiCommunities";
145
146
  import { ListMultiCommunitiesResponse } from "./types/ListMultiCommunitiesResponse";
147
+ import { AdminListUsersResponse } from "./types/AdminListUsersResponse";
148
+ import { CreateOrDeleteMultiCommunityEntry } from "./types/CreateOrDeleteMultiCommunityEntry";
146
149
  type RequestOptions = Pick<RequestInit, "signal">;
147
150
  /**
148
151
  * Helps build lemmy HTTP requests.
@@ -495,9 +498,9 @@ export declare class LemmyHttp extends Controller {
495
498
  */
496
499
  banPerson(form: BanPerson, options?: RequestOptions): Promise<BanPersonResponse>;
497
500
  /**
498
- * @summary Get a list of banned users.
501
+ * @summary Get a list of users.
499
502
  */
500
- listBannedPersons(form?: ListBannedPersonsI, options?: RequestOptions): Promise<BannedPersonsResponse>;
503
+ listUsers(form?: AdminListUsersI, options?: RequestOptions): Promise<AdminListUsersResponse>;
501
504
  /**
502
505
  * @summary Block a person.
503
506
  */
@@ -554,6 +557,14 @@ export declare class LemmyHttp extends Controller {
554
557
  * @summary List your saved content.
555
558
  */
556
559
  listPersonSaved(form: ListPersonSavedI, options?: RequestOptions): Promise<ListPersonSavedResponse>;
560
+ /**
561
+ * @summary List your read content.
562
+ */
563
+ listPersonRead(form: ListPersonReadI, options?: RequestOptions): Promise<ListPersonReadResponse>;
564
+ /**
565
+ * @summary List your hidden content.
566
+ */
567
+ listPersonHidden(form: ListPersonHiddenI, options?: RequestOptions): Promise<ListPersonHiddenResponse>;
557
568
  /**
558
569
  * @summary Add an admin to your site.
559
570
  */
@@ -732,6 +743,8 @@ export declare class LemmyHttp extends Controller {
732
743
  donationDialogShown(options?: RequestOptions): Promise<SuccessResponse>;
733
744
  createMultiCommunity(form: CreateMultiCommunity, options?: RequestOptions): Promise<MultiCommunity>;
734
745
  updateMultiCommunity(form: UpdateMultiCommunity, options?: RequestOptions): Promise<SuccessResponse>;
746
+ createMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
747
+ deleteMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
735
748
  listMultiCommunities(form: ListMultiCommunities, options?: RequestOptions): Promise<ListMultiCommunitiesResponse>;
736
749
  /**
737
750
  * Set the headers (can be used to set the auth header)
package/dist/http.js CHANGED
@@ -551,10 +551,10 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
551
551
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/ban", form, options);
552
552
  }
553
553
  /**
554
- * @summary Get a list of banned users.
554
+ * @summary Get a list of users.
555
555
  */
556
- async listBannedPersons(form = {}, options) {
557
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/banned", form, options);
556
+ async listUsers(form = {}, options) {
557
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/users", form, options);
558
558
  }
559
559
  /**
560
560
  * @summary Block a person.
@@ -640,6 +640,18 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
640
640
  async listPersonSaved(form, options) {
641
641
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/saved", form, options);
642
642
  }
643
+ /**
644
+ * @summary List your read content.
645
+ */
646
+ async listPersonRead(form, options) {
647
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/read", form, options);
648
+ }
649
+ /**
650
+ * @summary List your hidden content.
651
+ */
652
+ async listPersonHidden(form, options) {
653
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/hidden", form, options);
654
+ }
643
655
  /**
644
656
  * @summary Add an admin to your site.
645
657
  */
@@ -910,6 +922,12 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
910
922
  updateMultiCommunity(form, options) {
911
923
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/multi_community", form, options);
912
924
  }
925
+ createMultiCommunityEntry(form, options) {
926
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/entry", form, options);
927
+ }
928
+ deleteMultiCommunityEntry(form, options) {
929
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/multi_community/entry", form, options);
930
+ }
913
931
  listMultiCommunities(form, options) {
914
932
  return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community/list", form, options);
915
933
  }
@@ -1550,11 +1568,11 @@ __decorate([
1550
1568
  ], LemmyHttp.prototype, "banPerson", null);
1551
1569
  __decorate([
1552
1570
  (0, runtime_1.Security)("bearerAuth"),
1553
- (0, runtime_1.Get)("/admin/banned"),
1571
+ (0, runtime_1.Get)("/admin/users"),
1554
1572
  (0, runtime_1.Tags)("Admin", "Miscellaneous"),
1555
1573
  __param(0, (0, runtime_1.Queries)()),
1556
1574
  __param(1, (0, runtime_1.Inject)())
1557
- ], LemmyHttp.prototype, "listBannedPersons", null);
1575
+ ], LemmyHttp.prototype, "listUsers", null);
1558
1576
  __decorate([
1559
1577
  (0, runtime_1.Security)("bearerAuth"),
1560
1578
  (0, runtime_1.Post)("/account/block/person"),
@@ -1647,6 +1665,20 @@ __decorate([
1647
1665
  __param(0, (0, runtime_1.Queries)()),
1648
1666
  __param(1, (0, runtime_1.Inject)())
1649
1667
  ], LemmyHttp.prototype, "listPersonSaved", null);
1668
+ __decorate([
1669
+ (0, runtime_1.Security)("bearerAuth"),
1670
+ (0, runtime_1.Get)("/account/read"),
1671
+ (0, runtime_1.Tags)("Account"),
1672
+ __param(0, (0, runtime_1.Queries)()),
1673
+ __param(1, (0, runtime_1.Inject)())
1674
+ ], LemmyHttp.prototype, "listPersonRead", null);
1675
+ __decorate([
1676
+ (0, runtime_1.Security)("bearerAuth"),
1677
+ (0, runtime_1.Get)("/account/hidden"),
1678
+ (0, runtime_1.Tags)("Account"),
1679
+ __param(0, (0, runtime_1.Queries)()),
1680
+ __param(1, (0, runtime_1.Inject)())
1681
+ ], LemmyHttp.prototype, "listPersonHidden", null);
1650
1682
  __decorate([
1651
1683
  (0, runtime_1.Security)("bearerAuth"),
1652
1684
  (0, runtime_1.Post)("/admin/add"),
@@ -1960,6 +1992,18 @@ __decorate([
1960
1992
  __param(0, (0, runtime_1.Body)()),
1961
1993
  __param(1, (0, runtime_1.Inject)())
1962
1994
  ], LemmyHttp.prototype, "updateMultiCommunity", null);
1995
+ __decorate([
1996
+ (0, runtime_1.Security)("bearerAuth"),
1997
+ (0, runtime_1.Put)("/multi_community/entry"),
1998
+ __param(0, (0, runtime_1.Body)()),
1999
+ __param(1, (0, runtime_1.Inject)())
2000
+ ], LemmyHttp.prototype, "createMultiCommunityEntry", null);
2001
+ __decorate([
2002
+ (0, runtime_1.Security)("bearerAuth"),
2003
+ (0, runtime_1.Put)("/multi_community/entry"),
2004
+ __param(0, (0, runtime_1.Body)()),
2005
+ __param(1, (0, runtime_1.Inject)())
2006
+ ], LemmyHttp.prototype, "deleteMultiCommunityEntry", null);
1963
2007
  __decorate([
1964
2008
  (0, runtime_1.Get)("/multi_community/list"),
1965
2009
  __param(0, (0, runtime_1.Body)()),
package/dist/index.d.ts CHANGED
@@ -13,6 +13,8 @@ export { AdminBlockInstance } from "./types/AdminBlockInstance";
13
13
  export { AdminBlockInstanceId } from "./types/AdminBlockInstanceId";
14
14
  export { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
15
15
  export { AdminBlockInstanceView } from "./types/AdminBlockInstanceView";
16
+ export { AdminListUsers } from "./types/AdminListUsers";
17
+ export { AdminListUsersResponse } from "./types/AdminListUsersResponse";
16
18
  export { AdminPurgeComment } from "./types/AdminPurgeComment";
17
19
  export { AdminPurgeCommentId } from "./types/AdminPurgeCommentId";
18
20
  export { AdminPurgeCommentView } from "./types/AdminPurgeCommentView";
@@ -32,7 +34,6 @@ export { BanFromCommunity } from "./types/BanFromCommunity";
32
34
  export { BanFromCommunityResponse } from "./types/BanFromCommunityResponse";
33
35
  export { BanPerson } from "./types/BanPerson";
34
36
  export { BanPersonResponse } from "./types/BanPersonResponse";
35
- export { BannedPersonsResponse } from "./types/BannedPersonsResponse";
36
37
  export { BlockCommunity } from "./types/BlockCommunity";
37
38
  export { BlockCommunityResponse } from "./types/BlockCommunityResponse";
38
39
  export { BlockPerson } from "./types/BlockPerson";
@@ -75,7 +76,9 @@ export { CreateCommunity } from "./types/CreateCommunity";
75
76
  export { CreateCommunityReport } from "./types/CreateCommunityReport";
76
77
  export { CreateCommunityTag } from "./types/CreateCommunityTag";
77
78
  export { CreateCustomEmoji } from "./types/CreateCustomEmoji";
79
+ export { CreateMultiCommunity } from "./types/CreateMultiCommunity";
78
80
  export { CreateOAuthProvider } from "./types/CreateOAuthProvider";
81
+ export { CreateOrDeleteMultiCommunityEntry } from "./types/CreateOrDeleteMultiCommunityEntry";
79
82
  export { CreatePost } from "./types/CreatePost";
80
83
  export { CreatePostLike } from "./types/CreatePostLike";
81
84
  export { CreatePostReport } from "./types/CreatePostReport";
@@ -156,7 +159,6 @@ export { Language } from "./types/Language";
156
159
  export { LanguageId } from "./types/LanguageId";
157
160
  export { LemmyErrorType } from "./types/LemmyErrorType";
158
161
  export { LinkMetadata } from "./types/LinkMetadata";
159
- export { ListBannedPersons } from "./types/ListBannedPersons";
160
162
  export { ListCommentLikes } from "./types/ListCommentLikes";
161
163
  export { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
162
164
  export { ListCommunities } from "./types/ListCommunities";
@@ -170,8 +172,14 @@ export { ListInboxResponse } from "./types/ListInboxResponse";
170
172
  export { ListLoginsResponse } from "./types/ListLoginsResponse";
171
173
  export { ListMedia } from "./types/ListMedia";
172
174
  export { ListMediaResponse } from "./types/ListMediaResponse";
175
+ export { ListMultiCommunities } from "./types/ListMultiCommunities";
176
+ export { ListMultiCommunitiesResponse } from "./types/ListMultiCommunitiesResponse";
173
177
  export { ListPersonContent } from "./types/ListPersonContent";
174
178
  export { ListPersonContentResponse } from "./types/ListPersonContentResponse";
179
+ export { ListPersonHidden } from "./types/ListPersonHidden";
180
+ export { ListPersonHiddenResponse } from "./types/ListPersonHiddenResponse";
181
+ export { ListPersonRead } from "./types/ListPersonRead";
182
+ export { ListPersonReadResponse } from "./types/ListPersonReadResponse";
175
183
  export { ListPersonSaved } from "./types/ListPersonSaved";
176
184
  export { ListPersonSavedResponse } from "./types/ListPersonSavedResponse";
177
185
  export { ListPostLikes } from "./types/ListPostLikes";
@@ -237,6 +245,9 @@ export { ModTransferCommunityId } from "./types/ModTransferCommunityId";
237
245
  export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
238
246
  export { ModlogActionType } from "./types/ModlogActionType";
239
247
  export { ModlogCombinedView } from "./types/ModlogCombinedView";
248
+ export { MultiCommunity } from "./types/MultiCommunity";
249
+ export { MultiCommunityId } from "./types/MultiCommunityId";
250
+ export { MultiCommunityView } from "./types/MultiCommunityView";
240
251
  export { MyUserInfo } from "./types/MyUserInfo";
241
252
  export { OAuthAccount } from "./types/OAuthAccount";
242
253
  export { OAuthProvider } from "./types/OAuthProvider";
@@ -326,16 +337,12 @@ export { TaglineResponse } from "./types/TaglineResponse";
326
337
  export { TagsView } from "./types/TagsView";
327
338
  export { TransferCommunity } from "./types/TransferCommunity";
328
339
  export { UpdateCommunityTag } from "./types/UpdateCommunityTag";
340
+ export { UpdateMultiCommunity } from "./types/UpdateMultiCommunity";
329
341
  export { UpdateTagline } from "./types/UpdateTagline";
330
342
  export { UpdateTotp } from "./types/UpdateTotp";
331
343
  export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
332
344
  export { UploadImageResponse } from "./types/UploadImageResponse";
333
345
  export { UserBlockInstanceParams } from "./types/UserBlockInstanceParams";
334
346
  export { VerifyEmail } from "./types/VerifyEmail";
347
+ export { VoteShow } from "./types/VoteShow";
335
348
  export { VoteView } from "./types/VoteView";
336
- export { CreateMultiCommunity } from "./types/CreateMultiCommunity";
337
- export { UpdateMultiCommunity } from "./types/UpdateMultiCommunity";
338
- export { ListMultiCommunities } from "./types/ListMultiCommunities";
339
- export { MultiCommunity } from "./types/MultiCommunity";
340
- export { MultiCommunityId } from "./types/MultiCommunityId";
341
- export { MultiCommunityView } from "./types/MultiCommunityView";
@@ -1,3 +1,4 @@
1
+ import { AdminListUsers } from "./types/AdminListUsers";
1
2
  import { CommunityIdQuery } from "./types/CommunityIdQuery";
2
3
  import { DeleteImageParams } from "./types/DeleteImageParams";
3
4
  import { GetComment } from "./types/GetComment";
@@ -12,7 +13,6 @@ import { GetRandomCommunity } from "./types/GetRandomCommunity";
12
13
  import { GetRegistrationApplication } from "./types/GetRegistrationApplication";
13
14
  import { GetReportCount } from "./types/GetReportCount";
14
15
  import { GetSiteMetadata } from "./types/GetSiteMetadata";
15
- import { ListBannedPersons } from "./types/ListBannedPersons";
16
16
  import { ListCommentLikes } from "./types/ListCommentLikes";
17
17
  import { ListCommunities } from "./types/ListCommunities";
18
18
  import { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows";
@@ -20,6 +20,8 @@ import { ListCustomEmojis } from "./types/ListCustomEmojis";
20
20
  import { ListInbox } from "./types/ListInbox";
21
21
  import { ListMedia } from "./types/ListMedia";
22
22
  import { ListPersonContent } from "./types/ListPersonContent";
23
+ import { ListPersonHidden } from "./types/ListPersonHidden";
24
+ import { ListPersonRead } from "./types/ListPersonRead";
23
25
  import { ListPersonSaved } from "./types/ListPersonSaved";
24
26
  import { ListPostLikes } from "./types/ListPostLikes";
25
27
  import { ListRegistrationApplications } from "./types/ListRegistrationApplications";
@@ -73,6 +75,10 @@ export interface ListInboxI extends ListInbox {
73
75
  }
74
76
  export interface ListPersonSavedI extends ListPersonSaved {
75
77
  }
78
+ export interface ListPersonReadI extends ListPersonRead {
79
+ }
80
+ export interface ListPersonHiddenI extends ListPersonHidden {
81
+ }
76
82
  export interface ListRegistrationApplicationsI extends ListRegistrationApplications {
77
83
  }
78
84
  export interface GetRegistrationApplicationI extends GetRegistrationApplication {
@@ -85,7 +91,7 @@ export interface ListReportsI extends ListReports {
85
91
  }
86
92
  export interface DeleteImageParamsI extends DeleteImageParams {
87
93
  }
88
- export interface ListBannedPersonsI extends ListBannedPersons {
94
+ export interface AdminListUsersI extends AdminListUsers {
89
95
  }
90
96
  export interface CommunityIdQueryI extends CommunityIdQuery {
91
97
  }
@@ -0,0 +1,7 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
2
+ export type AdminListUsers = {
3
+ banned_only?: boolean;
4
+ page_cursor?: PaginationCursor;
5
+ page_back?: boolean;
6
+ limit?: number;
7
+ };
@@ -0,0 +1,10 @@
1
+ import type { LocalUserView } from "./LocalUserView";
2
+ import type { PaginationCursor } from "./PaginationCursor";
3
+ export type AdminListUsersResponse = {
4
+ users: Array<LocalUserView>;
5
+ /**
6
+ * the pagination cursor to use to fetch the next page
7
+ */
8
+ next_page?: PaginationCursor;
9
+ prev_page?: PaginationCursor;
10
+ };
@@ -1,3 +1,5 @@
1
1
  export type CreateMultiCommunity = {
2
2
  name: string;
3
+ title: string | null;
4
+ description: string | null;
3
5
  };
@@ -0,0 +1,6 @@
1
+ import type { CommunityId } from "./CommunityId";
2
+ import type { MultiCommunityId } from "./MultiCommunityId";
3
+ export type CreateOrDeleteMultiCommunityEntry = {
4
+ id: MultiCommunityId;
5
+ community_id: CommunityId;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,6 +2,7 @@ import type { CommentSortType } from "./CommentSortType";
2
2
  import type { FederationMode } from "./FederationMode";
3
3
  import type { LanguageId } from "./LanguageId";
4
4
  import type { ListingType } from "./ListingType";
5
+ import type { MultiCommunityId } from "./MultiCommunityId";
5
6
  import type { PostListingMode } from "./PostListingMode";
6
7
  import type { PostSortType } from "./PostSortType";
7
8
  import type { RegistrationMode } from "./RegistrationMode";
@@ -52,4 +53,5 @@ export type CreateSite = {
52
53
  comment_downvotes?: FederationMode;
53
54
  disallow_nsfw_content?: boolean;
54
55
  disable_email_notifications?: boolean;
56
+ suggested_communities?: MultiCommunityId;
55
57
  };
@@ -2,6 +2,7 @@ import type { CommentSortType } from "./CommentSortType";
2
2
  import type { FederationMode } from "./FederationMode";
3
3
  import type { LanguageId } from "./LanguageId";
4
4
  import type { ListingType } from "./ListingType";
5
+ import type { MultiCommunityId } from "./MultiCommunityId";
5
6
  import type { PostListingMode } from "./PostListingMode";
6
7
  import type { PostSortType } from "./PostSortType";
7
8
  import type { RegistrationMode } from "./RegistrationMode";
@@ -166,4 +167,8 @@ export type EditSite = {
166
167
  * Dont send email notifications to users for new replies, mentions etc
167
168
  */
168
169
  disable_email_notifications?: boolean;
170
+ /**
171
+ * A multicommunity with suggested communities which is shown on the homepage
172
+ */
173
+ suggested_communities?: MultiCommunityId;
169
174
  };
@@ -1,5 +1,6 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
2
  import type { ListingType } from "./ListingType";
3
+ import type { MultiCommunityId } from "./MultiCommunityId";
3
4
  import type { PaginationCursor } from "./PaginationCursor";
4
5
  import type { PostSortType } from "./PostSortType";
5
6
  /**
@@ -16,6 +17,7 @@ export type GetPosts = {
16
17
  time_range_seconds?: number;
17
18
  community_id?: CommunityId;
18
19
  community_name?: string;
20
+ multi_community_id?: MultiCommunityId;
19
21
  liked_only?: boolean;
20
22
  disliked_only?: boolean;
21
23
  show_hidden?: boolean;
@@ -42,5 +44,4 @@ export type GetPosts = {
42
44
  page_cursor?: PaginationCursor;
43
45
  page_back?: boolean;
44
46
  limit?: number;
45
- multi_community_id?: number;
46
47
  };
@@ -1,6 +1,7 @@
1
1
  import type { InstanceId } from "./InstanceId";
2
2
  /**
3
- * A federated instance / site.
3
+ * Basic data about a Fediverse instance which is available for every known domain. Additional
4
+ * data may be available in [[Site]].
4
5
  */
5
6
  export type Instance = {
6
7
  id: InstanceId;
@@ -356,4 +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
+ } | {
362
+ error: "multi_community_update_wrong_user";
359
363
  };
@@ -1,8 +1,8 @@
1
1
  import type { PaginationCursor } from "./PaginationCursor";
2
2
  /**
3
- * List the banned persons.
3
+ * Gets your hidden posts.
4
4
  */
5
- export type ListBannedPersons = {
5
+ export type ListPersonHidden = {
6
6
  page_cursor?: PaginationCursor;
7
7
  page_back?: boolean;
8
8
  limit?: number;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +1,10 @@
1
1
  import type { PaginationCursor } from "./PaginationCursor";
2
- import type { PersonView } from "./PersonView";
2
+ import type { PostView } from "./PostView";
3
3
  /**
4
- * The list of banned persons.
4
+ * You hidden posts response.
5
5
  */
6
- export type BannedPersonsResponse = {
7
- banned: Array<PersonView>;
6
+ export type ListPersonHiddenResponse = {
7
+ hidden: Array<PostView>;
8
8
  /**
9
9
  * the pagination cursor to use to fetch the next page
10
10
  */
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
2
+ /**
3
+ * Gets your read posts.
4
+ */
5
+ export type ListPersonRead = {
6
+ page_cursor?: PaginationCursor;
7
+ page_back?: boolean;
8
+ limit?: number;
9
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import type { PaginationCursor } from "./PaginationCursor";
2
+ import type { PostView } from "./PostView";
3
+ /**
4
+ * You read posts response.
5
+ */
6
+ export type ListPersonReadResponse = {
7
+ read: Array<PostView>;
8
+ /**
9
+ * the pagination cursor to use to fetch the next page
10
+ */
11
+ next_page?: PaginationCursor;
12
+ prev_page?: PaginationCursor;
13
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A listing type for post and comment list fetches.
3
3
  */
4
- export type ListingType = "All" | "Local" | "Subscribed" | "ModeratorView";
4
+ export type ListingType = "All" | "Local" | "Subscribed" | "ModeratorView" | "Suggested";
@@ -1,6 +1,11 @@
1
- import type { LocalUserId } from "./LocalUserId";
1
+ import type { PersonId } from "./PersonId";
2
+ import type { PostId } from "./PostId";
2
3
  export type LocalImage = {
3
- local_user_id?: LocalUserId;
4
4
  pictrs_alias: string;
5
5
  published: string;
6
+ person_id: PersonId;
7
+ /**
8
+ * This means the image is an auto-generated thumbnail, for a post.
9
+ */
10
+ thumbnail_for_post_id?: PostId;
6
11
  };
@@ -1,9 +1,11 @@
1
1
  import type { LocalImage } from "./LocalImage";
2
2
  import type { Person } from "./Person";
3
+ import type { Post } from "./Post";
3
4
  /**
4
5
  * A local image view.
5
6
  */
6
7
  export type LocalImageView = {
7
8
  local_image: LocalImage;
8
9
  person: Person;
10
+ post?: Post;
9
11
  };
@@ -2,6 +2,7 @@ import type { CommentSortType } from "./CommentSortType";
2
2
  import type { FederationMode } from "./FederationMode";
3
3
  import type { ListingType } from "./ListingType";
4
4
  import type { LocalSiteId } from "./LocalSiteId";
5
+ import type { MultiCommunityId } from "./MultiCommunityId";
5
6
  import type { PostListingMode } from "./PostListingMode";
6
7
  import type { PostSortType } from "./PostSortType";
7
8
  import type { RegistrationMode } from "./RegistrationMode";
@@ -145,4 +146,5 @@ export type LocalSite = {
145
146
  * Dont send email notifications to users for new replies, mentions etc
146
147
  */
147
148
  disable_email_notifications: boolean;
149
+ suggested_communities?: MultiCommunityId;
148
150
  };
@@ -5,6 +5,7 @@ import type { PersonId } from "./PersonId";
5
5
  import type { PostListingMode } from "./PostListingMode";
6
6
  import type { PostSortType } from "./PostSortType";
7
7
  import type { SensitiveString } from "./SensitiveString";
8
+ import type { VoteShow } from "./VoteShow";
8
9
  /**
9
10
  * A local user.
10
11
  */
@@ -99,6 +100,6 @@ export type LocalUser = {
99
100
  default_post_time_range_seconds?: number;
100
101
  show_score: boolean;
101
102
  show_upvotes: boolean;
102
- show_downvotes: boolean;
103
+ show_downvotes: VoteShow;
103
104
  show_upvote_percentage: boolean;
104
105
  };
@@ -5,4 +5,5 @@ import type { PostId } from "./PostId";
5
5
  export type LockPost = {
6
6
  post_id: PostId;
7
7
  locked: boolean;
8
+ reason?: string;
8
9
  };
@@ -1,6 +1,9 @@
1
1
  import type { SensitiveString } from "./SensitiveString";
2
2
  /**
3
3
  * Logging into lemmy.
4
+ *
5
+ * Note: Banned users can still log in, to be able to do certain things like delete
6
+ * their account.
4
7
  */
5
8
  export type Login = {
6
9
  username_or_email: SensitiveString;
@@ -10,4 +10,5 @@ export type ModLockPost = {
10
10
  post_id: PostId;
11
11
  locked: boolean;
12
12
  published: string;
13
+ reason?: string;
13
14
  };
@@ -3,7 +3,12 @@ import type { MultiCommunityId } from "./MultiCommunityId";
3
3
  import type { PersonId } from "./PersonId";
4
4
  export type MultiCommunity = {
5
5
  id: MultiCommunityId;
6
- owner_id: PersonId;
6
+ creator_id: PersonId;
7
7
  name: string;
8
+ title: string | null;
9
+ description: string | null;
10
+ deleted: boolean;
8
11
  ap_id: DbUrl;
12
+ published: string;
13
+ updated: string | null;
9
14
  };
@@ -1,6 +1,6 @@
1
1
  import type { CommentView } from "./CommentView";
2
2
  import type { CommunityView } from "./CommunityView";
3
- import { MultiCommunityView } from "./MultiCommunityView";
3
+ import type { MultiCommunityView } from "./MultiCommunityView";
4
4
  import type { PersonView } from "./PersonView";
5
5
  import type { PostView } from "./PostView";
6
6
  /**
@@ -4,6 +4,7 @@ import type { ListingType } from "./ListingType";
4
4
  import type { PostListingMode } from "./PostListingMode";
5
5
  import type { PostSortType } from "./PostSortType";
6
6
  import type { SensitiveString } from "./SensitiveString";
7
+ import type { VoteShow } from "./VoteShow";
7
8
  /**
8
9
  * Saves settings for your user.
9
10
  */
@@ -115,7 +116,7 @@ export type SaveUserSettings = {
115
116
  */
116
117
  show_scores?: boolean;
117
118
  show_upvotes?: boolean;
118
- show_downvotes?: boolean;
119
+ show_downvotes?: VoteShow;
119
120
  show_upvote_percentage?: boolean;
120
121
  /**
121
122
  * Whether to automatically mark fetched posts as read.
@@ -2,7 +2,8 @@ import type { DbUrl } from "./DbUrl";
2
2
  import type { InstanceId } from "./InstanceId";
3
3
  import type { SiteId } from "./SiteId";
4
4
  /**
5
- * The site.
5
+ * Additional data for federated instances. This may be missing for other platforms which are not
6
+ * fully compatible. Basic data is guaranteed to be available via [[Instance]].
6
7
  */
7
8
  export type Site = {
8
9
  id: SiteId;
@@ -1,6 +1,7 @@
1
- import type { CommunityId } from "./CommunityId";
2
1
  import type { MultiCommunityId } from "./MultiCommunityId";
3
2
  export type UpdateMultiCommunity = {
4
3
  id: MultiCommunityId;
5
- communities: Array<CommunityId>;
4
+ title: string | null;
5
+ description: string | null;
6
+ deleted: boolean | null;
6
7
  };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Lets you show votes for others only, show all votes, or hide all votes.
3
+ */
4
+ export type VoteShow = "Show" | "ShowForOthers" | "Hide";
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
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.7",
4
+ "version": "1.0.0-multi-community.9",
5
5
  "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -25,13 +25,13 @@
25
25
  "devDependencies": {
26
26
  "@eslint/js": "^9.20.0",
27
27
  "@redocly/cli": "^1.27.2",
28
- "@types/joi": "^17.2.3",
29
28
  "@types/node": "^22.7.4",
30
29
  "@typescript-eslint/eslint-plugin": "^8.7.0",
31
30
  "@typescript-eslint/parser": "^8.7.0",
32
31
  "eslint": "^9.11.1",
33
32
  "eslint-plugin-prettier": "^5.2.1",
34
33
  "husky": "^9.1.4",
34
+ "joi": "^17.13.3",
35
35
  "lint-staged": "^16.0.0",
36
36
  "prettier": "^3.3.3",
37
37
  "prettier-plugin-import-sort": "^0.0.7",
@@ -43,7 +43,7 @@
43
43
  "typescript": "^5.5.4",
44
44
  "typescript-eslint": "^8.7.0"
45
45
  },
46
- "packageManager": "pnpm@10.10.0",
46
+ "packageManager": "pnpm@10.11.0",
47
47
  "types": "./dist/index.d.ts",
48
48
  "lint-staged": {
49
49
  "*.{ts,tsx,js}": [