lemmy-js-client 1.0.0-instance-user-blocking.0 → 1.0.0-instance-user-blocking.2
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/README.md +6 -0
- package/dist/http.d.ts +15 -4
- package/dist/http.js +64 -4
- package/dist/index.d.ts +12 -0
- package/dist/other_types.d.ts +6 -0
- package/dist/types/CreateMultiCommunity.d.ts +5 -0
- package/dist/types/CreateMultiCommunity.js +3 -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/FollowMultiCommunity.d.ts +5 -0
- package/dist/types/FollowMultiCommunity.js +2 -0
- package/dist/types/GetMultiCommunity.d.ts +4 -0
- package/dist/types/GetMultiCommunity.js +2 -0
- package/dist/types/GetMultiCommunityResponse.d.ts +6 -0
- package/dist/types/GetMultiCommunityResponse.js +2 -0
- package/dist/types/GetPosts.d.ts +2 -0
- package/dist/types/LemmyErrorType.d.ts +6 -0
- package/dist/types/ListMultiCommunities.d.ts +5 -0
- package/dist/types/ListMultiCommunities.js +2 -0
- package/dist/types/ListMultiCommunitiesResponse.d.ts +4 -0
- package/dist/types/ListMultiCommunitiesResponse.js +2 -0
- package/dist/types/ListingType.d.ts +1 -1
- package/dist/types/LocalSite.d.ts +4 -0
- package/dist/types/MultiCommunity.d.ts +17 -0
- package/dist/types/MultiCommunity.js +2 -0
- package/dist/types/MultiCommunityFollow.d.ts +8 -0
- package/dist/types/MultiCommunityFollow.js +2 -0
- package/dist/types/MultiCommunityId.d.ts +1 -0
- package/dist/types/MultiCommunityId.js +3 -0
- package/dist/types/MultiCommunityView.d.ts +6 -0
- package/dist/types/MultiCommunityView.js +2 -0
- package/dist/types/SearchCombinedView.d.ts +4 -1
- package/dist/types/SearchType.d.ts +1 -1
- package/dist/types/UpdateMultiCommunity.d.ts +7 -0
- package/dist/types/UpdateMultiCommunity.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
@@ -52,6 +52,12 @@ Use `pnpm add` to develop and test changes locally:
|
|
52
52
|
|
53
53
|
`pnpm add path/to/lemmy-js-client`
|
54
54
|
|
55
|
+
Alternatively, use `yalc publish` and `yalc add lemmy-js-client`
|
56
|
+
|
57
|
+
## Generating typescript types from lemmy structs
|
58
|
+
|
59
|
+
Run `./scripts/copy_generated_types_from_lemmy.sh`
|
60
|
+
|
55
61
|
## OpenAPI
|
56
62
|
|
57
63
|
To generate OpenAPI docs, run `pnpm tsoa`
|
package/dist/http.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Controller } from "@tsoa/runtime";
|
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, ListPersonLikedI, ListPersonReadI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
|
2
|
+
import { AdminListUsersI, CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetMultiCommunityI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListInboxI, ListMediaI, ListMultiCommunitiesI, ListPersonContentI, ListPersonHiddenI, ListPersonLikedI, 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";
|
@@ -136,7 +136,13 @@ import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
|
|
136
136
|
import { ListPersonReadResponse } from "./types/ListPersonReadResponse";
|
137
137
|
import { ListPersonHiddenResponse } from "./types/ListPersonHiddenResponse";
|
138
138
|
import { CommunityIdQuery } from "./types/CommunityIdQuery";
|
139
|
+
import { CreateMultiCommunity } from "./types/CreateMultiCommunity";
|
140
|
+
import { UpdateMultiCommunity } from "./types/UpdateMultiCommunity";
|
141
|
+
import { ListMultiCommunitiesResponse } from "./types/ListMultiCommunitiesResponse";
|
139
142
|
import { AdminListUsersResponse } from "./types/AdminListUsersResponse";
|
143
|
+
import { CreateOrDeleteMultiCommunityEntry } from "./types/CreateOrDeleteMultiCommunityEntry";
|
144
|
+
import { GetMultiCommunityResponse } from "./types/GetMultiCommunityResponse";
|
145
|
+
import { FollowMultiCommunity } from "./types/FollowMultiCommunity";
|
140
146
|
import { ListLoginsResponse } from "./types/ListLoginsResponse";
|
141
147
|
import { ListPersonLikedResponse } from "./types/ListPersonLikedResponse";
|
142
148
|
import { NotePerson } from "./types/NotePerson";
|
@@ -747,10 +753,15 @@ export declare class LemmyHttp extends Controller {
|
|
747
753
|
imageHealth(options?: RequestOptions): Promise<SuccessResponse>;
|
748
754
|
/**
|
749
755
|
* Mark donation dialog as shown, so it isn't displayed anymore.
|
750
|
-
*
|
751
|
-
* `HTTP.POST /user/donation_dialog_shown`
|
752
756
|
*/
|
753
|
-
|
757
|
+
donationDialogShown(options?: RequestOptions): Promise<SuccessResponse>;
|
758
|
+
createMultiCommunity(form: CreateMultiCommunity, options?: RequestOptions): Promise<GetMultiCommunityResponse>;
|
759
|
+
updateMultiCommunity(form: UpdateMultiCommunity, options?: RequestOptions): Promise<SuccessResponse>;
|
760
|
+
getMultiCommunity(form: GetMultiCommunityI, options?: RequestOptions): Promise<GetMultiCommunityResponse>;
|
761
|
+
createMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
|
762
|
+
deleteMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
|
763
|
+
listMultiCommunities(form: ListMultiCommunitiesI, options?: RequestOptions): Promise<ListMultiCommunitiesResponse>;
|
764
|
+
followMultiCommunity(form: FollowMultiCommunity, options?: RequestOptions): Promise<SuccessResponse>;
|
754
765
|
/**
|
755
766
|
* Set the headers (can be used to set the auth header)
|
756
767
|
*/
|
package/dist/http.js
CHANGED
@@ -930,12 +930,31 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
930
930
|
}
|
931
931
|
/**
|
932
932
|
* Mark donation dialog as shown, so it isn't displayed anymore.
|
933
|
-
*
|
934
|
-
* `HTTP.POST /user/donation_dialog_shown`
|
935
933
|
*/
|
936
|
-
|
934
|
+
donationDialogShown(options) {
|
937
935
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/donation_dialog_shown", {}, options);
|
938
936
|
}
|
937
|
+
createMultiCommunity(form, options) {
|
938
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community", form, options);
|
939
|
+
}
|
940
|
+
updateMultiCommunity(form, options) {
|
941
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/multi_community", form, options);
|
942
|
+
}
|
943
|
+
getMultiCommunity(form, options) {
|
944
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community", form, options);
|
945
|
+
}
|
946
|
+
createMultiCommunityEntry(form, options) {
|
947
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/entry", form, options);
|
948
|
+
}
|
949
|
+
deleteMultiCommunityEntry(form, options) {
|
950
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Delete, "/multi_community/entry", form, options);
|
951
|
+
}
|
952
|
+
listMultiCommunities(form, options) {
|
953
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/multi_community/list", form, options);
|
954
|
+
}
|
955
|
+
followMultiCommunity(form, options) {
|
956
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/multi_community/follow", form, options);
|
957
|
+
}
|
939
958
|
/**
|
940
959
|
* Set the headers (can be used to set the auth header)
|
941
960
|
*/
|
@@ -2003,8 +2022,49 @@ __decorate([
|
|
2003
2022
|
__param(0, (0, runtime_1.Inject)())
|
2004
2023
|
], LemmyHttp.prototype, "imageHealth", null);
|
2005
2024
|
__decorate([
|
2025
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2026
|
+
(0, runtime_1.Post)("/user/donation_dialog_shown"),
|
2006
2027
|
__param(0, (0, runtime_1.Inject)())
|
2007
|
-
], LemmyHttp.prototype, "
|
2028
|
+
], LemmyHttp.prototype, "donationDialogShown", null);
|
2029
|
+
__decorate([
|
2030
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2031
|
+
(0, runtime_1.Post)("/multi_community"),
|
2032
|
+
__param(0, (0, runtime_1.Body)()),
|
2033
|
+
__param(1, (0, runtime_1.Inject)())
|
2034
|
+
], LemmyHttp.prototype, "createMultiCommunity", null);
|
2035
|
+
__decorate([
|
2036
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2037
|
+
(0, runtime_1.Put)("/multi_community"),
|
2038
|
+
__param(0, (0, runtime_1.Body)()),
|
2039
|
+
__param(1, (0, runtime_1.Inject)())
|
2040
|
+
], LemmyHttp.prototype, "updateMultiCommunity", null);
|
2041
|
+
__decorate([
|
2042
|
+
(0, runtime_1.Get)("/multi_community"),
|
2043
|
+
__param(0, (0, runtime_1.Queries)()),
|
2044
|
+
__param(1, (0, runtime_1.Inject)())
|
2045
|
+
], LemmyHttp.prototype, "getMultiCommunity", null);
|
2046
|
+
__decorate([
|
2047
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2048
|
+
(0, runtime_1.Post)("/multi_community/entry"),
|
2049
|
+
__param(0, (0, runtime_1.Body)()),
|
2050
|
+
__param(1, (0, runtime_1.Inject)())
|
2051
|
+
], LemmyHttp.prototype, "createMultiCommunityEntry", null);
|
2052
|
+
__decorate([
|
2053
|
+
(0, runtime_1.Security)("bearerAuth"),
|
2054
|
+
(0, runtime_1.Delete)("/multi_community/entry"),
|
2055
|
+
__param(0, (0, runtime_1.Body)()),
|
2056
|
+
__param(1, (0, runtime_1.Inject)())
|
2057
|
+
], LemmyHttp.prototype, "deleteMultiCommunityEntry", null);
|
2058
|
+
__decorate([
|
2059
|
+
(0, runtime_1.Get)("/multi_community/list"),
|
2060
|
+
__param(0, (0, runtime_1.Queries)()),
|
2061
|
+
__param(1, (0, runtime_1.Inject)())
|
2062
|
+
], LemmyHttp.prototype, "listMultiCommunities", null);
|
2063
|
+
__decorate([
|
2064
|
+
(0, runtime_1.Post)("/multi_community/follow"),
|
2065
|
+
__param(0, (0, runtime_1.Body)()),
|
2066
|
+
__param(1, (0, runtime_1.Inject)())
|
2067
|
+
], LemmyHttp.prototype, "followMultiCommunity", null);
|
2008
2068
|
exports.LemmyHttp = LemmyHttp = __decorate([
|
2009
2069
|
(0, runtime_1.Route)("api/v4")
|
2010
2070
|
], LemmyHttp);
|
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";
|
@@ -114,6 +116,7 @@ export { FederationBlockList } from "./types/FederationBlockList";
|
|
114
116
|
export { FederationError } from "./types/FederationError";
|
115
117
|
export { FederationMode } from "./types/FederationMode";
|
116
118
|
export { FollowCommunity } from "./types/FollowCommunity";
|
119
|
+
export { FollowMultiCommunity } from "./types/FollowMultiCommunity";
|
117
120
|
export { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
|
118
121
|
export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
|
119
122
|
export { GetComment } from "./types/GetComment";
|
@@ -127,6 +130,8 @@ export { GetCommunityResponse } from "./types/GetCommunityResponse";
|
|
127
130
|
export { GetFederatedInstancesResponse } from "./types/GetFederatedInstancesResponse";
|
128
131
|
export { GetModlog } from "./types/GetModlog";
|
129
132
|
export { GetModlogResponse } from "./types/GetModlogResponse";
|
133
|
+
export { GetMultiCommunity } from "./types/GetMultiCommunity";
|
134
|
+
export { GetMultiCommunityResponse } from "./types/GetMultiCommunityResponse";
|
130
135
|
export { GetPersonDetails } from "./types/GetPersonDetails";
|
131
136
|
export { GetPersonDetailsResponse } from "./types/GetPersonDetailsResponse";
|
132
137
|
export { GetPost } from "./types/GetPost";
|
@@ -171,6 +176,8 @@ export { ListInboxResponse } from "./types/ListInboxResponse";
|
|
171
176
|
export { ListLoginsResponse } from "./types/ListLoginsResponse";
|
172
177
|
export { ListMedia } from "./types/ListMedia";
|
173
178
|
export { ListMediaResponse } from "./types/ListMediaResponse";
|
179
|
+
export { ListMultiCommunities } from "./types/ListMultiCommunities";
|
180
|
+
export { ListMultiCommunitiesResponse } from "./types/ListMultiCommunitiesResponse";
|
174
181
|
export { ListPersonContent } from "./types/ListPersonContent";
|
175
182
|
export { ListPersonContentResponse } from "./types/ListPersonContentResponse";
|
176
183
|
export { ListPersonHidden } from "./types/ListPersonHidden";
|
@@ -244,6 +251,10 @@ export { ModTransferCommunityId } from "./types/ModTransferCommunityId";
|
|
244
251
|
export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
|
245
252
|
export { ModlogActionType } from "./types/ModlogActionType";
|
246
253
|
export { ModlogCombinedView } from "./types/ModlogCombinedView";
|
254
|
+
export { MultiCommunity } from "./types/MultiCommunity";
|
255
|
+
export { MultiCommunityFollow } from "./types/MultiCommunityFollow";
|
256
|
+
export { MultiCommunityId } from "./types/MultiCommunityId";
|
257
|
+
export { MultiCommunityView } from "./types/MultiCommunityView";
|
247
258
|
export { MyUserInfo } from "./types/MyUserInfo";
|
248
259
|
export { NotePerson } from "./types/NotePerson";
|
249
260
|
export { OAuthAccount } from "./types/OAuthAccount";
|
@@ -334,6 +345,7 @@ export { TaglineResponse } from "./types/TaglineResponse";
|
|
334
345
|
export { TagsView } from "./types/TagsView";
|
335
346
|
export { TransferCommunity } from "./types/TransferCommunity";
|
336
347
|
export { UpdateCommunityTag } from "./types/UpdateCommunityTag";
|
348
|
+
export { UpdateMultiCommunity } from "./types/UpdateMultiCommunity";
|
337
349
|
export { UpdateTagline } from "./types/UpdateTagline";
|
338
350
|
export { UpdateTotp } from "./types/UpdateTotp";
|
339
351
|
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
package/dist/other_types.d.ts
CHANGED
@@ -6,6 +6,7 @@ import { GetComments } from "./types/GetComments";
|
|
6
6
|
import { GetCommunity } from "./types/GetCommunity";
|
7
7
|
import { GetCommunityPendingFollowsCount } from "./types/GetCommunityPendingFollowsCount";
|
8
8
|
import { GetModlog } from "./types/GetModlog";
|
9
|
+
import { GetMultiCommunity } from "./types/GetMultiCommunity";
|
9
10
|
import { GetPersonDetails } from "./types/GetPersonDetails";
|
10
11
|
import { GetPost } from "./types/GetPost";
|
11
12
|
import { GetPosts } from "./types/GetPosts";
|
@@ -19,6 +20,7 @@ import { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows
|
|
19
20
|
import { ListCustomEmojis } from "./types/ListCustomEmojis";
|
20
21
|
import { ListInbox } from "./types/ListInbox";
|
21
22
|
import { ListMedia } from "./types/ListMedia";
|
23
|
+
import { ListMultiCommunities } from "./types/ListMultiCommunities";
|
22
24
|
import { ListPersonContent } from "./types/ListPersonContent";
|
23
25
|
import { ListPersonHidden } from "./types/ListPersonHidden";
|
24
26
|
import { ListPersonLiked } from "./types/ListPersonLiked";
|
@@ -98,3 +100,7 @@ export interface AdminListUsersI extends AdminListUsers {
|
|
98
100
|
}
|
99
101
|
export interface CommunityIdQueryI extends CommunityIdQuery {
|
100
102
|
}
|
103
|
+
export interface ListMultiCommunitiesI extends ListMultiCommunities {
|
104
|
+
}
|
105
|
+
export interface GetMultiCommunityI extends GetMultiCommunity {
|
106
|
+
}
|
@@ -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";
|
@@ -51,4 +52,5 @@ export type CreateSite = {
|
|
51
52
|
comment_downvotes?: FederationMode;
|
52
53
|
disallow_nsfw_content?: boolean;
|
53
54
|
disable_email_notifications?: boolean;
|
55
|
+
suggested_communities?: MultiCommunityId;
|
54
56
|
};
|
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";
|
@@ -162,4 +163,8 @@ export type EditSite = {
|
|
162
163
|
* Dont send email notifications to users for new replies, mentions etc
|
163
164
|
*/
|
164
165
|
disable_email_notifications?: boolean;
|
166
|
+
/**
|
167
|
+
* A multicommunity with suggested communities which is shown on the homepage
|
168
|
+
*/
|
169
|
+
suggested_communities?: MultiCommunityId;
|
165
170
|
};
|
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
|
show_hidden?: boolean;
|
20
22
|
/**
|
21
23
|
* If true, then show the read posts (even if your user setting is to hide them)
|
@@ -360,4 +360,10 @@ export type LemmyErrorType = {
|
|
360
360
|
error: "couldnt_create_email_verification";
|
361
361
|
} | {
|
362
362
|
error: "email_notifications_disabled";
|
363
|
+
} | {
|
364
|
+
error: "multi_community_update_wrong_user";
|
365
|
+
} | {
|
366
|
+
error: "cannot_combine_community_id_and_multi_community_id";
|
367
|
+
} | {
|
368
|
+
error: "multi_community_entry_limit_reached";
|
363
369
|
};
|
@@ -2,6 +2,8 @@ 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";
|
6
|
+
import type { PersonId } from "./PersonId";
|
5
7
|
import type { PostListingMode } from "./PostListingMode";
|
6
8
|
import type { PostSortType } from "./PostSortType";
|
7
9
|
import type { RegistrationMode } from "./RegistrationMode";
|
@@ -141,4 +143,6 @@ export type LocalSite = {
|
|
141
143
|
* Dont send email notifications to users for new replies, mentions etc
|
142
144
|
*/
|
143
145
|
disable_email_notifications: boolean;
|
146
|
+
suggested_communities?: MultiCommunityId;
|
147
|
+
multi_comm_follower: PersonId;
|
144
148
|
};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import type { DbUrl } from "./DbUrl";
|
2
|
+
import type { InstanceId } from "./InstanceId";
|
3
|
+
import type { MultiCommunityId } from "./MultiCommunityId";
|
4
|
+
import type { PersonId } from "./PersonId";
|
5
|
+
export type MultiCommunity = {
|
6
|
+
id: MultiCommunityId;
|
7
|
+
creator_id: PersonId;
|
8
|
+
instance_id: InstanceId;
|
9
|
+
name: string;
|
10
|
+
title?: string;
|
11
|
+
description?: string;
|
12
|
+
local: boolean;
|
13
|
+
deleted: boolean;
|
14
|
+
ap_id: DbUrl;
|
15
|
+
published_at: string;
|
16
|
+
updated_at?: string;
|
17
|
+
};
|
@@ -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 @@
|
|
1
|
+
export type MultiCommunityId = number;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { CommentView } from "./CommentView";
|
2
2
|
import type { CommunityView } from "./CommunityView";
|
3
|
+
import type { MultiCommunityView } from "./MultiCommunityView";
|
3
4
|
import type { PersonView } from "./PersonView";
|
4
5
|
import type { PostView } from "./PostView";
|
5
6
|
export type SearchCombinedView = ({
|
@@ -10,4 +11,6 @@ export type SearchCombinedView = ({
|
|
10
11
|
type_: "Community";
|
11
12
|
} & CommunityView) | ({
|
12
13
|
type_: "Person";
|
13
|
-
} & PersonView)
|
14
|
+
} & PersonView) | ({
|
15
|
+
type_: "MultiCommunity";
|
16
|
+
} & MultiCommunityView);
|
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-instance-user-blocking.
|
4
|
+
"version": "1.0.0-instance-user-blocking.2",
|
5
5
|
"author": "Dessalines",
|
6
6
|
"license": "AGPL-3.0",
|
7
7
|
"main": "./dist/index.js",
|