lemmy-js-client 1.0.0-multi-community.8 → 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.
- package/dist/http.d.ts +3 -0
- package/dist/http.js +18 -0
- package/dist/index.d.ts +8 -6
- package/dist/types/CreateMultiCommunity.d.ts +2 -0
- package/dist/types/CreateOrDeleteMultiCommunityEntry.d.ts +6 -0
- package/dist/types/CreateOrDeleteMultiCommunityEntry.js +2 -0
- package/dist/types/CreateSite.d.ts +2 -0
- package/dist/types/EditSite.d.ts +5 -0
- package/dist/types/GetPosts.d.ts +2 -1
- package/dist/types/LemmyErrorType.d.ts +4 -0
- package/dist/types/ListingType.d.ts +1 -1
- package/dist/types/LocalImage.d.ts +7 -2
- package/dist/types/LocalImageView.d.ts +2 -0
- package/dist/types/LocalSite.d.ts +2 -0
- package/dist/types/MultiCommunity.d.ts +6 -1
- package/dist/types/ResolveObjectResponse.d.ts +1 -1
- package/dist/types/UpdateMultiCommunity.d.ts +3 -2
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -145,6 +145,7 @@ import { UpdateMultiCommunity } from "./types/UpdateMultiCommunity";
|
|
145
145
|
import { ListMultiCommunities } from "./types/ListMultiCommunities";
|
146
146
|
import { ListMultiCommunitiesResponse } from "./types/ListMultiCommunitiesResponse";
|
147
147
|
import { AdminListUsersResponse } from "./types/AdminListUsersResponse";
|
148
|
+
import { CreateOrDeleteMultiCommunityEntry } from "./types/CreateOrDeleteMultiCommunityEntry";
|
148
149
|
type RequestOptions = Pick<RequestInit, "signal">;
|
149
150
|
/**
|
150
151
|
* Helps build lemmy HTTP requests.
|
@@ -742,6 +743,8 @@ export declare class LemmyHttp extends Controller {
|
|
742
743
|
donationDialogShown(options?: RequestOptions): Promise<SuccessResponse>;
|
743
744
|
createMultiCommunity(form: CreateMultiCommunity, options?: RequestOptions): Promise<MultiCommunity>;
|
744
745
|
updateMultiCommunity(form: UpdateMultiCommunity, options?: RequestOptions): Promise<SuccessResponse>;
|
746
|
+
createMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
|
747
|
+
deleteMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
|
745
748
|
listMultiCommunities(form: ListMultiCommunities, options?: RequestOptions): Promise<ListMultiCommunitiesResponse>;
|
746
749
|
/**
|
747
750
|
* Set the headers (can be used to set the auth header)
|
package/dist/http.js
CHANGED
@@ -922,6 +922,12 @@ 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
|
+
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
|
+
}
|
925
931
|
listMultiCommunities(form, options) {
|
926
932
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community/list", form, options);
|
927
933
|
}
|
@@ -1986,6 +1992,18 @@ __decorate([
|
|
1986
1992
|
__param(0, (0, runtime_1.Body)()),
|
1987
1993
|
__param(1, (0, runtime_1.Inject)())
|
1988
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);
|
1989
2007
|
__decorate([
|
1990
2008
|
(0, runtime_1.Get)("/multi_community/list"),
|
1991
2009
|
__param(0, (0, runtime_1.Body)()),
|
package/dist/index.d.ts
CHANGED
@@ -76,7 +76,9 @@ export { CreateCommunity } from "./types/CreateCommunity";
|
|
76
76
|
export { CreateCommunityReport } from "./types/CreateCommunityReport";
|
77
77
|
export { CreateCommunityTag } from "./types/CreateCommunityTag";
|
78
78
|
export { CreateCustomEmoji } from "./types/CreateCustomEmoji";
|
79
|
+
export { CreateMultiCommunity } from "./types/CreateMultiCommunity";
|
79
80
|
export { CreateOAuthProvider } from "./types/CreateOAuthProvider";
|
81
|
+
export { CreateOrDeleteMultiCommunityEntry } from "./types/CreateOrDeleteMultiCommunityEntry";
|
80
82
|
export { CreatePost } from "./types/CreatePost";
|
81
83
|
export { CreatePostLike } from "./types/CreatePostLike";
|
82
84
|
export { CreatePostReport } from "./types/CreatePostReport";
|
@@ -170,6 +172,8 @@ 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";
|
175
179
|
export { ListPersonHidden } from "./types/ListPersonHidden";
|
@@ -241,6 +245,9 @@ export { ModTransferCommunityId } from "./types/ModTransferCommunityId";
|
|
241
245
|
export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
|
242
246
|
export { ModlogActionType } from "./types/ModlogActionType";
|
243
247
|
export { ModlogCombinedView } from "./types/ModlogCombinedView";
|
248
|
+
export { MultiCommunity } from "./types/MultiCommunity";
|
249
|
+
export { MultiCommunityId } from "./types/MultiCommunityId";
|
250
|
+
export { MultiCommunityView } from "./types/MultiCommunityView";
|
244
251
|
export { MyUserInfo } from "./types/MyUserInfo";
|
245
252
|
export { OAuthAccount } from "./types/OAuthAccount";
|
246
253
|
export { OAuthProvider } from "./types/OAuthProvider";
|
@@ -330,6 +337,7 @@ export { TaglineResponse } from "./types/TaglineResponse";
|
|
330
337
|
export { TagsView } from "./types/TagsView";
|
331
338
|
export { TransferCommunity } from "./types/TransferCommunity";
|
332
339
|
export { UpdateCommunityTag } from "./types/UpdateCommunityTag";
|
340
|
+
export { UpdateMultiCommunity } from "./types/UpdateMultiCommunity";
|
333
341
|
export { UpdateTagline } from "./types/UpdateTagline";
|
334
342
|
export { UpdateTotp } from "./types/UpdateTotp";
|
335
343
|
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
@@ -338,9 +346,3 @@ export { UserBlockInstanceParams } from "./types/UserBlockInstanceParams";
|
|
338
346
|
export { VerifyEmail } from "./types/VerifyEmail";
|
339
347
|
export { VoteShow } from "./types/VoteShow";
|
340
348
|
export { VoteView } from "./types/VoteView";
|
341
|
-
export { CreateMultiCommunity } from "./types/CreateMultiCommunity";
|
342
|
-
export { UpdateMultiCommunity } from "./types/UpdateMultiCommunity";
|
343
|
-
export { ListMultiCommunities } from "./types/ListMultiCommunities";
|
344
|
-
export { MultiCommunity } from "./types/MultiCommunity";
|
345
|
-
export { MultiCommunityId } from "./types/MultiCommunityId";
|
346
|
-
export { MultiCommunityView } from "./types/MultiCommunityView";
|
@@ -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
|
};
|
package/dist/types/EditSite.d.ts
CHANGED
@@ -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
|
};
|
package/dist/types/GetPosts.d.ts
CHANGED
@@ -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,11 @@
|
|
1
|
-
import type {
|
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
|
};
|
@@ -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
|
-
|
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
|
/**
|
@@ -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
|
-
|
4
|
+
title: string | null;
|
5
|
+
description: string | null;
|
6
|
+
deleted: boolean | null;
|
6
7
|
};
|
package/package.json
CHANGED