lemmy-js-client 0.20.0-alpha.7 → 0.20.0-private-community.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +53 -0
- package/dist/http.js +58 -0
- package/dist/index.d.ts +19 -4
- package/dist/types/ApproveCommunityPendingFollows.d.ts +6 -0
- package/dist/types/ApproveCommunityPendingFollows.js +2 -0
- package/dist/types/CommunityFollowerState.d.ts +1 -0
- package/dist/types/CommunityVisibility.d.ts +1 -1
- package/dist/types/CreateOAuthProvider.d.ts +3 -3
- package/dist/types/CreatePost.d.ts +1 -0
- package/dist/types/CreateSite.d.ts +10 -5
- package/dist/types/CreateTagline.d.ts +3 -0
- package/dist/types/CustomEmoji.d.ts +0 -2
- package/dist/types/DeleteTagline.d.ts +4 -0
- package/dist/types/DeleteTagline.js +2 -0
- package/dist/types/EditOAuthProvider.d.ts +10 -10
- package/dist/types/EditPost.d.ts +1 -0
- package/dist/types/EditSite.d.ts +11 -6
- package/dist/types/FederationMode.d.ts +1 -0
- package/dist/types/GetCommunityPendingFollowsCount.d.ts +4 -0
- package/dist/types/GetCommunityPendingFollowsCount.js +2 -0
- package/dist/types/GetCommunityPendingFollowsCountResponse.d.ts +3 -0
- package/dist/types/GetCommunityPendingFollowsCountResponse.js +3 -0
- package/dist/types/GetPersonDetails.d.ts +2 -2
- package/dist/types/GetPosts.d.ts +2 -2
- package/dist/types/GetRandomCommunity.d.ts +4 -0
- package/dist/types/GetRandomCommunity.js +2 -0
- package/dist/types/GetSiteResponse.d.ts +3 -3
- package/dist/types/LemmyErrorType.d.ts +6 -34
- package/dist/types/ListCommunities.d.ts +2 -2
- package/dist/types/ListCommunityPendingFollows.d.ts +7 -0
- package/dist/types/ListCommunityPendingFollows.js +2 -0
- package/dist/types/ListCommunityPendingFollowsResponse.d.ts +4 -0
- package/dist/types/ListCommunityPendingFollowsResponse.js +2 -0
- package/dist/types/ListCustomEmojis.d.ts +6 -0
- package/dist/types/ListCustomEmojis.js +3 -0
- package/dist/types/ListCustomEmojisResponse.d.ts +4 -0
- package/dist/types/ListCustomEmojisResponse.js +2 -0
- package/dist/types/ListTaglines.d.ts +4 -0
- package/dist/types/ListTaglines.js +3 -0
- package/dist/types/ListTaglinesResponse.d.ts +4 -0
- package/dist/types/ListTaglinesResponse.js +2 -0
- package/dist/types/LocalSite.d.ts +9 -3
- package/dist/types/LocalUser.d.ts +4 -3
- package/dist/types/Post.d.ts +1 -0
- package/dist/types/PostSortType.d.ts +1 -0
- package/dist/types/PostSortType.js +3 -0
- package/dist/types/SaveUserSettings.d.ts +5 -4
- package/dist/types/Search.d.ts +7 -3
- package/dist/types/SearchType.d.ts +1 -1
- package/dist/types/SiteResponse.d.ts +1 -2
- package/dist/types/Tagline.d.ts +0 -2
- package/dist/types/Tagline.js +1 -0
- package/dist/types/TaglineId.d.ts +1 -0
- package/dist/types/TaglineId.js +3 -0
- package/dist/types/TaglineResponse.d.ts +4 -0
- package/dist/types/TaglineResponse.js +2 -0
- package/dist/types/UpdateTagline.d.ts +5 -0
- package/dist/types/UpdateTagline.js +2 -0
- package/package.json +7 -7
- package/dist/types/OAuthProviderInsertForm.d.ts +0 -14
- package/dist/types/OAuthProviderUpdateForm.d.ts +0 -13
- package/dist/types/SortType.d.ts +0 -1
- /package/dist/types/{OAuthProviderInsertForm.js → CommunityFollowerState.js} +0 -0
- /package/dist/types/{OAuthProviderUpdateForm.js → CreateTagline.js} +0 -0
- /package/dist/types/{SortType.js → FederationMode.js} +0 -0
package/dist/http.d.ts
CHANGED
@@ -140,6 +140,20 @@ import { ListMedia } from "./types/ListMedia";
|
|
140
140
|
import { ListMediaResponse } from "./types/ListMediaResponse";
|
141
141
|
import { AuthenticateWithOauth } from "./types/AuthenticateWithOauth";
|
142
142
|
import { GetRegistrationApplication } from "./types/GetRegistrationApplication";
|
143
|
+
import { CreateTagline } from "./types/CreateTagline";
|
144
|
+
import { TaglineResponse } from "./types/TaglineResponse";
|
145
|
+
import { UpdateTagline } from "./types/UpdateTagline";
|
146
|
+
import { DeleteTagline } from "./types/DeleteTagline";
|
147
|
+
import { ListTaglines } from "./types/ListTaglines";
|
148
|
+
import { ListTaglinesResponse } from "./types/ListTaglinesResponse";
|
149
|
+
import { ListCustomEmojis } from "./types/ListCustomEmojis";
|
150
|
+
import { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
|
151
|
+
import { GetRandomCommunity } from "./types/GetRandomCommunity";
|
152
|
+
import { ApproveCommunityPendingFollows } from "./types/ApproveCommunityPendingFollows";
|
153
|
+
import { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPendingFollowsCountResponse";
|
154
|
+
import { ListCommunityPendingFollowsResponse } from "./types/ListCommunityPendingFollowsResponse";
|
155
|
+
import { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows";
|
156
|
+
import { CommunityId } from "./types/CommunityId";
|
143
157
|
/**
|
144
158
|
* Helps build lemmy HTTP requests.
|
145
159
|
*/
|
@@ -283,6 +297,9 @@ export declare class LemmyHttp {
|
|
283
297
|
* `HTTP.POST /community/follow`
|
284
298
|
*/
|
285
299
|
followCommunity(form: FollowCommunity): Promise<CommunityResponse>;
|
300
|
+
getCommunityPendingFollowsCount(community_id: CommunityId): Promise<GetCommunityPendingFollowsCountResponse>;
|
301
|
+
listCommunityPendingFollows(form: ListCommunityPendingFollows): Promise<ListCommunityPendingFollowsResponse>;
|
302
|
+
approveCommunityPendingFollow(form: ApproveCommunityPendingFollows): Promise<SuccessResponse>;
|
286
303
|
/**
|
287
304
|
* Block a community.
|
288
305
|
*
|
@@ -325,6 +342,12 @@ export declare class LemmyHttp {
|
|
325
342
|
* `HTTP.POST /community/mod`
|
326
343
|
*/
|
327
344
|
addModToCommunity(form: AddModToCommunity): Promise<AddModToCommunityResponse>;
|
345
|
+
/**
|
346
|
+
* Get a random community.
|
347
|
+
*
|
348
|
+
* `HTTP.GET /community/random`
|
349
|
+
*/
|
350
|
+
getRandomCommunity(form: GetRandomCommunity): Promise<CommunityResponse>;
|
328
351
|
/**
|
329
352
|
* Create a post.
|
330
353
|
*
|
@@ -751,6 +774,36 @@ export declare class LemmyHttp {
|
|
751
774
|
* `HTTP.Post /custom_emoji/delete`
|
752
775
|
*/
|
753
776
|
deleteCustomEmoji(form: DeleteCustomEmoji): Promise<SuccessResponse>;
|
777
|
+
/**
|
778
|
+
* List custom emojis
|
779
|
+
*
|
780
|
+
* `HTTP.GET /custom_emoji/list`
|
781
|
+
*/
|
782
|
+
listCustomEmojis(form: ListCustomEmojis): Promise<ListCustomEmojisResponse>;
|
783
|
+
/**
|
784
|
+
* Create a new tagline
|
785
|
+
*
|
786
|
+
* `HTTP.POST /admin/tagline`
|
787
|
+
*/
|
788
|
+
createTagline(form: CreateTagline): Promise<TaglineResponse>;
|
789
|
+
/**
|
790
|
+
* Edit an existing tagline
|
791
|
+
*
|
792
|
+
* `HTTP.PUT /admin/tagline`
|
793
|
+
*/
|
794
|
+
editTagline(form: UpdateTagline): Promise<TaglineResponse>;
|
795
|
+
/**
|
796
|
+
* Delete a tagline
|
797
|
+
*
|
798
|
+
* `HTTP.Post /admin/tagline/delete`
|
799
|
+
*/
|
800
|
+
deleteTagline(form: DeleteTagline): Promise<SuccessResponse>;
|
801
|
+
/**
|
802
|
+
* List taglines
|
803
|
+
*
|
804
|
+
* `HTTP.GET /admin/tagline/list`
|
805
|
+
*/
|
806
|
+
listTaglines(form: ListTaglines): Promise<ListTaglinesResponse>;
|
754
807
|
/**
|
755
808
|
* Create a new oauth provider method
|
756
809
|
*
|
package/dist/http.js
CHANGED
@@ -220,6 +220,16 @@ class LemmyHttp {
|
|
220
220
|
followCommunity(form) {
|
221
221
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/follow", form);
|
222
222
|
}
|
223
|
+
getCommunityPendingFollowsCount(community_id) {
|
224
|
+
const form = { community_id };
|
225
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count", form);
|
226
|
+
}
|
227
|
+
listCommunityPendingFollows(form) {
|
228
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/list", form);
|
229
|
+
}
|
230
|
+
approveCommunityPendingFollow(form) {
|
231
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/pending_follows/approve", form);
|
232
|
+
}
|
223
233
|
/**
|
224
234
|
* Block a community.
|
225
235
|
*
|
@@ -276,6 +286,14 @@ class LemmyHttp {
|
|
276
286
|
addModToCommunity(form) {
|
277
287
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/mod", form);
|
278
288
|
}
|
289
|
+
/**
|
290
|
+
* Get a random community.
|
291
|
+
*
|
292
|
+
* `HTTP.GET /community/random`
|
293
|
+
*/
|
294
|
+
getRandomCommunity(form) {
|
295
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/random", form);
|
296
|
+
}
|
279
297
|
/**
|
280
298
|
* Create a post.
|
281
299
|
*
|
@@ -844,6 +862,46 @@ class LemmyHttp {
|
|
844
862
|
deleteCustomEmoji(form) {
|
845
863
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/custom_emoji/delete", form);
|
846
864
|
}
|
865
|
+
/**
|
866
|
+
* List custom emojis
|
867
|
+
*
|
868
|
+
* `HTTP.GET /custom_emoji/list`
|
869
|
+
*/
|
870
|
+
listCustomEmojis(form) {
|
871
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/custom_emoji/list", form);
|
872
|
+
}
|
873
|
+
/**
|
874
|
+
* Create a new tagline
|
875
|
+
*
|
876
|
+
* `HTTP.POST /admin/tagline`
|
877
|
+
*/
|
878
|
+
createTagline(form) {
|
879
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline", form);
|
880
|
+
}
|
881
|
+
/**
|
882
|
+
* Edit an existing tagline
|
883
|
+
*
|
884
|
+
* `HTTP.PUT /admin/tagline`
|
885
|
+
*/
|
886
|
+
editTagline(form) {
|
887
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/admin/tagline", form);
|
888
|
+
}
|
889
|
+
/**
|
890
|
+
* Delete a tagline
|
891
|
+
*
|
892
|
+
* `HTTP.Post /admin/tagline/delete`
|
893
|
+
*/
|
894
|
+
deleteTagline(form) {
|
895
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/tagline/delete", form);
|
896
|
+
}
|
897
|
+
/**
|
898
|
+
* List taglines
|
899
|
+
*
|
900
|
+
* `HTTP.GET /admin/tagline/list`
|
901
|
+
*/
|
902
|
+
listTaglines(form) {
|
903
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/tagline/list", form);
|
904
|
+
}
|
847
905
|
/**
|
848
906
|
* Create a new oauth provider method
|
849
907
|
*
|
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export * from "./http";
|
2
|
+
export { UploadImage, UploadImageResponse, ImageFile, DeleteImage, } from "./other_types";
|
2
3
|
export { ActivityId } from "./types/ActivityId";
|
3
4
|
export { AddAdmin } from "./types/AddAdmin";
|
4
5
|
export { AddAdminResponse } from "./types/AddAdminResponse";
|
@@ -12,6 +13,7 @@ export { AdminPurgePerson } from "./types/AdminPurgePerson";
|
|
12
13
|
export { AdminPurgePersonView } from "./types/AdminPurgePersonView";
|
13
14
|
export { AdminPurgePost } from "./types/AdminPurgePost";
|
14
15
|
export { AdminPurgePostView } from "./types/AdminPurgePostView";
|
16
|
+
export { ApproveCommunityPendingFollows } from "./types/ApproveCommunityPendingFollows";
|
15
17
|
export { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
|
16
18
|
export { AuthenticateWithOauth } from "./types/AuthenticateWithOauth";
|
17
19
|
export { BanFromCommunity } from "./types/BanFromCommunity";
|
@@ -43,6 +45,7 @@ export { CommentSortType } from "./types/CommentSortType";
|
|
43
45
|
export { CommentView } from "./types/CommentView";
|
44
46
|
export { Community } from "./types/Community";
|
45
47
|
export { CommunityAggregates } from "./types/CommunityAggregates";
|
48
|
+
export { CommunityFollowerState } from "./types/CommunityFollowerState";
|
46
49
|
export { CommunityFollowerView } from "./types/CommunityFollowerView";
|
47
50
|
export { CommunityId } from "./types/CommunityId";
|
48
51
|
export { CommunityModeratorView } from "./types/CommunityModeratorView";
|
@@ -61,6 +64,7 @@ export { CreatePostReport } from "./types/CreatePostReport";
|
|
61
64
|
export { CreatePrivateMessage } from "./types/CreatePrivateMessage";
|
62
65
|
export { CreatePrivateMessageReport } from "./types/CreatePrivateMessageReport";
|
63
66
|
export { CreateSite } from "./types/CreateSite";
|
67
|
+
export { CreateTagline } from "./types/CreateTagline";
|
64
68
|
export { CustomEmoji } from "./types/CustomEmoji";
|
65
69
|
export { CustomEmojiId } from "./types/CustomEmojiId";
|
66
70
|
export { CustomEmojiKeyword } from "./types/CustomEmojiKeyword";
|
@@ -73,6 +77,7 @@ export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
|
|
73
77
|
export { DeleteOAuthProvider } from "./types/DeleteOAuthProvider";
|
74
78
|
export { DeletePost } from "./types/DeletePost";
|
75
79
|
export { DeletePrivateMessage } from "./types/DeletePrivateMessage";
|
80
|
+
export { DeleteTagline } from "./types/DeleteTagline";
|
76
81
|
export { DistinguishComment } from "./types/DistinguishComment";
|
77
82
|
export { EditComment } from "./types/EditComment";
|
78
83
|
export { EditCommunity } from "./types/EditCommunity";
|
@@ -83,6 +88,7 @@ export { EditPrivateMessage } from "./types/EditPrivateMessage";
|
|
83
88
|
export { EditSite } from "./types/EditSite";
|
84
89
|
export { FeaturePost } from "./types/FeaturePost";
|
85
90
|
export { FederatedInstances } from "./types/FederatedInstances";
|
91
|
+
export { FederationMode } from "./types/FederationMode";
|
86
92
|
export { FollowCommunity } from "./types/FollowCommunity";
|
87
93
|
export { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
|
88
94
|
export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
|
@@ -90,6 +96,8 @@ export { GetComment } from "./types/GetComment";
|
|
90
96
|
export { GetComments } from "./types/GetComments";
|
91
97
|
export { GetCommentsResponse } from "./types/GetCommentsResponse";
|
92
98
|
export { GetCommunity } from "./types/GetCommunity";
|
99
|
+
export { GetCommunityPendingFollowsCount } from "./types/GetCommunityPendingFollowsCount";
|
100
|
+
export { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPendingFollowsCountResponse";
|
93
101
|
export { GetCommunityResponse } from "./types/GetCommunityResponse";
|
94
102
|
export { GetFederatedInstancesResponse } from "./types/GetFederatedInstancesResponse";
|
95
103
|
export { GetModlog } from "./types/GetModlog";
|
@@ -103,6 +111,7 @@ export { GetPostResponse } from "./types/GetPostResponse";
|
|
103
111
|
export { GetPosts } from "./types/GetPosts";
|
104
112
|
export { GetPostsResponse } from "./types/GetPostsResponse";
|
105
113
|
export { GetPrivateMessages } from "./types/GetPrivateMessages";
|
114
|
+
export { GetRandomCommunity } from "./types/GetRandomCommunity";
|
106
115
|
export { GetRegistrationApplication } from "./types/GetRegistrationApplication";
|
107
116
|
export { GetReplies } from "./types/GetReplies";
|
108
117
|
export { GetRepliesResponse } from "./types/GetRepliesResponse";
|
@@ -129,6 +138,10 @@ export { ListCommentReports } from "./types/ListCommentReports";
|
|
129
138
|
export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
|
130
139
|
export { ListCommunities } from "./types/ListCommunities";
|
131
140
|
export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
|
141
|
+
export { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows";
|
142
|
+
export { ListCommunityPendingFollowsResponse } from "./types/ListCommunityPendingFollowsResponse";
|
143
|
+
export { ListCustomEmojis } from "./types/ListCustomEmojis";
|
144
|
+
export { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
|
132
145
|
export { ListLoginsResponse } from "./types/ListLoginsResponse";
|
133
146
|
export { ListMedia } from "./types/ListMedia";
|
134
147
|
export { ListMediaResponse } from "./types/ListMediaResponse";
|
@@ -140,6 +153,8 @@ export { ListPrivateMessageReports } from "./types/ListPrivateMessageReports";
|
|
140
153
|
export { ListPrivateMessageReportsResponse } from "./types/ListPrivateMessageReportsResponse";
|
141
154
|
export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
|
142
155
|
export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
|
156
|
+
export { ListTaglines } from "./types/ListTaglines";
|
157
|
+
export { ListTaglinesResponse } from "./types/ListTaglinesResponse";
|
143
158
|
export { ListingType } from "./types/ListingType";
|
144
159
|
export { LocalImage } from "./types/LocalImage";
|
145
160
|
export { LocalImageView } from "./types/LocalImageView";
|
@@ -187,8 +202,6 @@ export { MyUserInfo } from "./types/MyUserInfo";
|
|
187
202
|
export { OAuthAccount } from "./types/OAuthAccount";
|
188
203
|
export { OAuthProvider } from "./types/OAuthProvider";
|
189
204
|
export { OAuthProviderId } from "./types/OAuthProviderId";
|
190
|
-
export { OAuthProviderInsertForm } from "./types/OAuthProviderInsertForm";
|
191
|
-
export { OAuthProviderUpdateForm } from "./types/OAuthProviderUpdateForm";
|
192
205
|
export { OpenGraphData } from "./types/OpenGraphData";
|
193
206
|
export { PaginationCursor } from "./types/PaginationCursor";
|
194
207
|
export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
|
@@ -211,6 +224,7 @@ export { PostReportId } from "./types/PostReportId";
|
|
211
224
|
export { PostReportResponse } from "./types/PostReportResponse";
|
212
225
|
export { PostReportView } from "./types/PostReportView";
|
213
226
|
export { PostResponse } from "./types/PostResponse";
|
227
|
+
export { PostSortType } from "./types/PostSortType";
|
214
228
|
export { PostView } from "./types/PostView";
|
215
229
|
export { PrivateMessage } from "./types/PrivateMessage";
|
216
230
|
export { PrivateMessageId } from "./types/PrivateMessageId";
|
@@ -252,13 +266,14 @@ export { SiteAggregates } from "./types/SiteAggregates";
|
|
252
266
|
export { SiteId } from "./types/SiteId";
|
253
267
|
export { SiteResponse } from "./types/SiteResponse";
|
254
268
|
export { SiteView } from "./types/SiteView";
|
255
|
-
export { SortType } from "./types/SortType";
|
256
269
|
export { SubscribedType } from "./types/SubscribedType";
|
257
270
|
export { SuccessResponse } from "./types/SuccessResponse";
|
258
271
|
export { Tagline } from "./types/Tagline";
|
272
|
+
export { TaglineId } from "./types/TaglineId";
|
273
|
+
export { TaglineResponse } from "./types/TaglineResponse";
|
259
274
|
export { TransferCommunity } from "./types/TransferCommunity";
|
275
|
+
export { UpdateTagline } from "./types/UpdateTagline";
|
260
276
|
export { UpdateTotp } from "./types/UpdateTotp";
|
261
277
|
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
262
278
|
export { VerifyEmail } from "./types/VerifyEmail";
|
263
279
|
export { VoteView } from "./types/VoteView";
|
264
|
-
export { UploadImage, UploadImageResponse, ImageFile, DeleteImage, } from "./other_types";
|
@@ -0,0 +1 @@
|
|
1
|
+
export type CommunityFollowerState = "Accepted" | "Pending" | "ApprovalRequired";
|
@@ -1 +1 @@
|
|
1
|
-
export type CommunityVisibility = "Public" | "LocalOnly";
|
1
|
+
export type CommunityVisibility = "Public" | "LocalOnly" | "Private";
|
@@ -8,7 +8,7 @@ export interface CreateOAuthProvider {
|
|
8
8
|
client_id: string;
|
9
9
|
client_secret: string;
|
10
10
|
scopes: string;
|
11
|
-
auto_verify_email
|
12
|
-
account_linking_enabled
|
13
|
-
enabled
|
11
|
+
auto_verify_email?: boolean;
|
12
|
+
account_linking_enabled?: boolean;
|
13
|
+
enabled?: boolean;
|
14
14
|
}
|
@@ -1,15 +1,16 @@
|
|
1
|
+
import type { CommentSortType } from "./CommentSortType";
|
2
|
+
import type { FederationMode } from "./FederationMode";
|
1
3
|
import type { LanguageId } from "./LanguageId";
|
2
4
|
import type { ListingType } from "./ListingType";
|
3
5
|
import type { PostListingMode } from "./PostListingMode";
|
6
|
+
import type { PostSortType } from "./PostSortType";
|
4
7
|
import type { RegistrationMode } from "./RegistrationMode";
|
5
|
-
import type { SortType } from "./SortType";
|
6
8
|
export interface CreateSite {
|
7
9
|
name: string;
|
8
10
|
sidebar?: string;
|
9
11
|
description?: string;
|
10
12
|
icon?: string;
|
11
13
|
banner?: string;
|
12
|
-
enable_downvotes?: boolean;
|
13
14
|
enable_nsfw?: boolean;
|
14
15
|
community_creation_admin_only?: boolean;
|
15
16
|
require_email_verification?: boolean;
|
@@ -17,7 +18,9 @@ export interface CreateSite {
|
|
17
18
|
private_instance?: boolean;
|
18
19
|
default_theme?: string;
|
19
20
|
default_post_listing_type?: ListingType;
|
20
|
-
|
21
|
+
default_post_listing_mode?: PostListingMode;
|
22
|
+
default_post_sort_type?: PostSortType;
|
23
|
+
default_comment_sort_type?: CommentSortType;
|
21
24
|
legal_information?: string;
|
22
25
|
application_email_admins?: boolean;
|
23
26
|
hide_modlog_mod_names?: boolean;
|
@@ -42,9 +45,11 @@ export interface CreateSite {
|
|
42
45
|
captcha_difficulty?: string;
|
43
46
|
allowed_instances?: Array<string>;
|
44
47
|
blocked_instances?: Array<string>;
|
45
|
-
taglines?: Array<string>;
|
46
48
|
registration_mode?: RegistrationMode;
|
47
49
|
oauth_registration?: boolean;
|
48
50
|
content_warning?: string;
|
49
|
-
|
51
|
+
post_upvotes?: FederationMode;
|
52
|
+
post_downvotes?: FederationMode;
|
53
|
+
comment_upvotes?: FederationMode;
|
54
|
+
comment_downvotes?: FederationMode;
|
50
55
|
}
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import type { OAuthProviderId } from "./OAuthProviderId";
|
2
2
|
export interface EditOAuthProvider {
|
3
3
|
id: OAuthProviderId;
|
4
|
-
display_name
|
5
|
-
authorization_endpoint
|
6
|
-
token_endpoint
|
7
|
-
userinfo_endpoint
|
8
|
-
id_claim
|
9
|
-
client_secret
|
10
|
-
scopes
|
11
|
-
auto_verify_email
|
12
|
-
account_linking_enabled
|
13
|
-
enabled
|
4
|
+
display_name?: string;
|
5
|
+
authorization_endpoint?: string;
|
6
|
+
token_endpoint?: string;
|
7
|
+
userinfo_endpoint?: string;
|
8
|
+
id_claim?: string;
|
9
|
+
client_secret?: string;
|
10
|
+
scopes?: string;
|
11
|
+
auto_verify_email?: boolean;
|
12
|
+
account_linking_enabled?: boolean;
|
13
|
+
enabled?: boolean;
|
14
14
|
}
|
package/dist/types/EditPost.d.ts
CHANGED
package/dist/types/EditSite.d.ts
CHANGED
@@ -1,15 +1,16 @@
|
|
1
|
+
import type { CommentSortType } from "./CommentSortType";
|
2
|
+
import type { FederationMode } from "./FederationMode";
|
1
3
|
import type { LanguageId } from "./LanguageId";
|
2
4
|
import type { ListingType } from "./ListingType";
|
3
5
|
import type { PostListingMode } from "./PostListingMode";
|
6
|
+
import type { PostSortType } from "./PostSortType";
|
4
7
|
import type { RegistrationMode } from "./RegistrationMode";
|
5
|
-
import type { SortType } from "./SortType";
|
6
8
|
export interface EditSite {
|
7
9
|
name?: string;
|
8
10
|
sidebar?: string;
|
9
11
|
description?: string;
|
10
12
|
icon?: string;
|
11
13
|
banner?: string;
|
12
|
-
enable_downvotes?: boolean;
|
13
14
|
enable_nsfw?: boolean;
|
14
15
|
community_creation_admin_only?: boolean;
|
15
16
|
require_email_verification?: boolean;
|
@@ -17,7 +18,9 @@ export interface EditSite {
|
|
17
18
|
private_instance?: boolean;
|
18
19
|
default_theme?: string;
|
19
20
|
default_post_listing_type?: ListingType;
|
20
|
-
|
21
|
+
default_post_listing_mode?: PostListingMode;
|
22
|
+
default_post_sort_type?: PostSortType;
|
23
|
+
default_comment_sort_type?: CommentSortType;
|
21
24
|
legal_information?: string;
|
22
25
|
application_email_admins?: boolean;
|
23
26
|
hide_modlog_mod_names?: boolean;
|
@@ -43,10 +46,12 @@ export interface EditSite {
|
|
43
46
|
allowed_instances?: Array<string>;
|
44
47
|
blocked_instances?: Array<string>;
|
45
48
|
blocked_urls?: Array<string>;
|
46
|
-
taglines?: Array<string>;
|
47
49
|
registration_mode?: RegistrationMode;
|
48
|
-
oauth_registration?: boolean;
|
49
50
|
reports_email_admins?: boolean;
|
50
51
|
content_warning?: string;
|
51
|
-
|
52
|
+
oauth_registration?: boolean;
|
53
|
+
post_upvotes?: FederationMode;
|
54
|
+
post_downvotes?: FederationMode;
|
55
|
+
comment_upvotes?: FederationMode;
|
56
|
+
comment_downvotes?: FederationMode;
|
52
57
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export type FederationMode = "All" | "Local" | "Disable";
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
2
2
|
import type { PersonId } from "./PersonId";
|
3
|
-
import type {
|
3
|
+
import type { PostSortType } from "./PostSortType";
|
4
4
|
export interface GetPersonDetails {
|
5
5
|
person_id?: PersonId;
|
6
6
|
username?: string;
|
7
|
-
sort?:
|
7
|
+
sort?: PostSortType;
|
8
8
|
page?: number;
|
9
9
|
limit?: number;
|
10
10
|
community_id?: CommunityId;
|
package/dist/types/GetPosts.d.ts
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
2
2
|
import type { ListingType } from "./ListingType";
|
3
3
|
import type { PaginationCursor } from "./PaginationCursor";
|
4
|
-
import type {
|
4
|
+
import type { PostSortType } from "./PostSortType";
|
5
5
|
export interface GetPosts {
|
6
6
|
type_?: ListingType;
|
7
|
-
sort?:
|
7
|
+
sort?: PostSortType;
|
8
8
|
page?: number;
|
9
9
|
limit?: number;
|
10
10
|
community_id?: CommunityId;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import type { CustomEmojiView } from "./CustomEmojiView";
|
2
1
|
import type { Language } from "./Language";
|
3
2
|
import type { LanguageId } from "./LanguageId";
|
4
3
|
import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
|
@@ -15,8 +14,9 @@ export interface GetSiteResponse {
|
|
15
14
|
my_user?: MyUserInfo;
|
16
15
|
all_languages: Array<Language>;
|
17
16
|
discussion_languages: Array<LanguageId>;
|
18
|
-
taglines: Array<
|
19
|
-
custom_emojis: Array<
|
17
|
+
taglines: Array<null>;
|
18
|
+
custom_emojis: Array<null>;
|
19
|
+
tagline?: Tagline;
|
20
20
|
oauth_providers?: Array<PublicOAuthProvider>;
|
21
21
|
admin_oauth_providers?: Array<OAuthProvider>;
|
22
22
|
blocked_urls: Array<LocalSiteUrlBlocklist>;
|
@@ -66,32 +66,6 @@ export type LemmyErrorType = {
|
|
66
66
|
error: "deleted";
|
67
67
|
} | {
|
68
68
|
error: "banned_from_community";
|
69
|
-
} | {
|
70
|
-
error: "couldnt_find_community";
|
71
|
-
} | {
|
72
|
-
error: "couldnt_find_person";
|
73
|
-
} | {
|
74
|
-
error: "couldnt_find_comment";
|
75
|
-
} | {
|
76
|
-
error: "couldnt_find_comment_report";
|
77
|
-
} | {
|
78
|
-
error: "couldnt_find_post_report";
|
79
|
-
} | {
|
80
|
-
error: "couldnt_find_private_message_report";
|
81
|
-
} | {
|
82
|
-
error: "couldnt_find_local_user";
|
83
|
-
} | {
|
84
|
-
error: "couldnt_find_person_mention";
|
85
|
-
} | {
|
86
|
-
error: "couldnt_find_registration_application";
|
87
|
-
} | {
|
88
|
-
error: "couldnt_find_comment_reply";
|
89
|
-
} | {
|
90
|
-
error: "couldnt_find_private_message";
|
91
|
-
} | {
|
92
|
-
error: "couldnt_find_activity";
|
93
|
-
} | {
|
94
|
-
error: "couldnt_find_oauth_provider";
|
95
69
|
} | {
|
96
70
|
error: "person_is_blocked";
|
97
71
|
} | {
|
@@ -99,7 +73,7 @@ export type LemmyErrorType = {
|
|
99
73
|
} | {
|
100
74
|
error: "instance_is_blocked";
|
101
75
|
} | {
|
102
|
-
error: "
|
76
|
+
error: "vote_not_allowed";
|
103
77
|
} | {
|
104
78
|
error: "instance_is_private";
|
105
79
|
} | {
|
@@ -132,8 +106,6 @@ export type LemmyErrorType = {
|
|
132
106
|
error: "couldnt_update_post";
|
133
107
|
} | {
|
134
108
|
error: "no_post_edit_allowed";
|
135
|
-
} | {
|
136
|
-
error: "couldnt_find_post";
|
137
109
|
} | {
|
138
110
|
error: "edit_private_message_not_allowed";
|
139
111
|
} | {
|
@@ -245,8 +217,6 @@ export type LemmyErrorType = {
|
|
245
217
|
error: "person_block_already_exists";
|
246
218
|
} | {
|
247
219
|
error: "user_already_exists";
|
248
|
-
} | {
|
249
|
-
error: "token_not_found";
|
250
220
|
} | {
|
251
221
|
error: "couldnt_like_post";
|
252
222
|
} | {
|
@@ -289,8 +259,6 @@ export type LemmyErrorType = {
|
|
289
259
|
error: "email_send_failed";
|
290
260
|
} | {
|
291
261
|
error: "slurs";
|
292
|
-
} | {
|
293
|
-
error: "couldnt_find_object";
|
294
262
|
} | {
|
295
263
|
error: "registration_denied";
|
296
264
|
message: string | null;
|
@@ -356,5 +324,9 @@ export type LemmyErrorType = {
|
|
356
324
|
} | {
|
357
325
|
error: "url_length_overflow";
|
358
326
|
} | {
|
359
|
-
error: "
|
327
|
+
error: "post_schedule_time_must_be_in_future";
|
328
|
+
} | {
|
329
|
+
error: "too_many_scheduled_posts";
|
330
|
+
} | {
|
331
|
+
error: "not_found";
|
360
332
|
};
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import type { ListingType } from "./ListingType";
|
2
|
-
import type {
|
2
|
+
import type { PostSortType } from "./PostSortType";
|
3
3
|
export interface ListCommunities {
|
4
4
|
type_?: ListingType;
|
5
|
-
sort?:
|
5
|
+
sort?: PostSortType;
|
6
6
|
show_nsfw?: boolean;
|
7
7
|
page?: number;
|
8
8
|
limit?: number;
|
@@ -1,14 +1,15 @@
|
|
1
|
+
import type { CommentSortType } from "./CommentSortType";
|
2
|
+
import type { FederationMode } from "./FederationMode";
|
1
3
|
import type { ListingType } from "./ListingType";
|
2
4
|
import type { LocalSiteId } from "./LocalSiteId";
|
3
5
|
import type { PostListingMode } from "./PostListingMode";
|
6
|
+
import type { PostSortType } from "./PostSortType";
|
4
7
|
import type { RegistrationMode } from "./RegistrationMode";
|
5
8
|
import type { SiteId } from "./SiteId";
|
6
|
-
import type { SortType } from "./SortType";
|
7
9
|
export interface LocalSite {
|
8
10
|
id: LocalSiteId;
|
9
11
|
site_id: SiteId;
|
10
12
|
site_setup: boolean;
|
11
|
-
enable_downvotes: boolean;
|
12
13
|
community_creation_admin_only: boolean;
|
13
14
|
require_email_verification: boolean;
|
14
15
|
application_question?: string;
|
@@ -29,6 +30,11 @@ export interface LocalSite {
|
|
29
30
|
reports_email_admins: boolean;
|
30
31
|
federation_signed_fetch: boolean;
|
31
32
|
default_post_listing_mode: PostListingMode;
|
32
|
-
|
33
|
+
default_post_sort_type: PostSortType;
|
34
|
+
default_comment_sort_type: CommentSortType;
|
33
35
|
oauth_registration: boolean;
|
36
|
+
post_upvotes: FederationMode;
|
37
|
+
post_downvotes: FederationMode;
|
38
|
+
comment_upvotes: FederationMode;
|
39
|
+
comment_downvotes: FederationMode;
|
34
40
|
}
|
@@ -1,15 +1,16 @@
|
|
1
|
+
import type { CommentSortType } from "./CommentSortType";
|
1
2
|
import type { ListingType } from "./ListingType";
|
2
3
|
import type { LocalUserId } from "./LocalUserId";
|
3
4
|
import type { PersonId } from "./PersonId";
|
4
5
|
import type { PostListingMode } from "./PostListingMode";
|
5
|
-
import type {
|
6
|
+
import type { PostSortType } from "./PostSortType";
|
6
7
|
export interface LocalUser {
|
7
8
|
id: LocalUserId;
|
8
9
|
person_id: PersonId;
|
9
10
|
email?: string;
|
10
11
|
show_nsfw: boolean;
|
11
12
|
theme: string;
|
12
|
-
|
13
|
+
default_post_sort_type: PostSortType;
|
13
14
|
default_listing_type: ListingType;
|
14
15
|
interface_language: string;
|
15
16
|
show_avatars: boolean;
|
@@ -20,7 +21,6 @@ export interface LocalUser {
|
|
20
21
|
accepted_application: boolean;
|
21
22
|
open_links_in_new_tab: boolean;
|
22
23
|
blur_nsfw: boolean;
|
23
|
-
auto_expand: boolean;
|
24
24
|
infinite_scroll_enabled: boolean;
|
25
25
|
admin: boolean;
|
26
26
|
post_listing_mode: PostListingMode;
|
@@ -28,4 +28,5 @@ export interface LocalUser {
|
|
28
28
|
enable_keyboard_navigation: boolean;
|
29
29
|
enable_animated_images: boolean;
|
30
30
|
collapse_bot_comments: boolean;
|
31
|
+
default_comment_sort_type: CommentSortType;
|
31
32
|
}
|
package/dist/types/Post.d.ts
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export type PostSortType = "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" | "TopThreeMonths" | "TopSixMonths" | "TopNineMonths" | "Controversial" | "Scaled";
|
@@ -1,14 +1,16 @@
|
|
1
|
+
import type { CommentSortType } from "./CommentSortType";
|
1
2
|
import type { LanguageId } from "./LanguageId";
|
2
3
|
import type { ListingType } from "./ListingType";
|
3
4
|
import type { PostListingMode } from "./PostListingMode";
|
4
|
-
import type {
|
5
|
+
import type { PostSortType } from "./PostSortType";
|
5
6
|
export interface SaveUserSettings {
|
6
7
|
show_nsfw?: boolean;
|
7
8
|
blur_nsfw?: boolean;
|
8
|
-
auto_expand?: boolean;
|
9
9
|
theme?: string;
|
10
|
-
default_sort_type?: SortType;
|
11
10
|
default_listing_type?: ListingType;
|
11
|
+
post_listing_mode?: PostListingMode;
|
12
|
+
default_post_sort_type?: PostSortType;
|
13
|
+
default_comment_sort_type?: CommentSortType;
|
12
14
|
interface_language?: string;
|
13
15
|
avatar?: string;
|
14
16
|
banner?: string;
|
@@ -24,7 +26,6 @@ export interface SaveUserSettings {
|
|
24
26
|
discussion_languages?: Array<LanguageId>;
|
25
27
|
open_links_in_new_tab?: boolean;
|
26
28
|
infinite_scroll_enabled?: boolean;
|
27
|
-
post_listing_mode?: PostListingMode;
|
28
29
|
enable_keyboard_navigation?: boolean;
|
29
30
|
enable_animated_images?: boolean;
|
30
31
|
collapse_bot_comments?: boolean;
|
package/dist/types/Search.d.ts
CHANGED
@@ -1,17 +1,21 @@
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
2
2
|
import type { ListingType } from "./ListingType";
|
3
3
|
import type { PersonId } from "./PersonId";
|
4
|
+
import type { PostSortType } from "./PostSortType";
|
4
5
|
import type { SearchType } from "./SearchType";
|
5
|
-
import type { SortType } from "./SortType";
|
6
6
|
export interface Search {
|
7
7
|
q: string;
|
8
8
|
community_id?: CommunityId;
|
9
9
|
community_name?: string;
|
10
10
|
creator_id?: PersonId;
|
11
11
|
type_?: SearchType;
|
12
|
-
sort?:
|
12
|
+
sort?: PostSortType;
|
13
13
|
listing_type?: ListingType;
|
14
14
|
page?: number;
|
15
15
|
limit?: number;
|
16
|
-
|
16
|
+
title_only?: boolean;
|
17
|
+
post_url_only?: boolean;
|
18
|
+
saved_only?: boolean;
|
19
|
+
liked_only?: boolean;
|
20
|
+
disliked_only?: boolean;
|
17
21
|
}
|
@@ -1 +1 @@
|
|
1
|
-
export type SearchType = "All" | "Comments" | "Posts" | "Communities" | "Users"
|
1
|
+
export type SearchType = "All" | "Comments" | "Posts" | "Communities" | "Users";
|
package/dist/types/Tagline.d.ts
CHANGED
package/dist/types/Tagline.js
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
export type TaglineId = number;
|
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": "0.20.0-
|
4
|
+
"version": "0.20.0-private-community.2",
|
5
5
|
"author": "Dessalines <tyhou13@gmx.com>",
|
6
6
|
"license": "AGPL-3.0",
|
7
7
|
"main": "./dist/index.js",
|
@@ -19,10 +19,10 @@
|
|
19
19
|
"url": "git+https://github.com/LemmyNet/lemmy-js-client.git"
|
20
20
|
},
|
21
21
|
"devDependencies": {
|
22
|
-
"@types/node": "^22.
|
23
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
24
|
-
"@typescript-eslint/parser": "^8.
|
25
|
-
"eslint": "^9.
|
22
|
+
"@types/node": "^22.7.4",
|
23
|
+
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
24
|
+
"@typescript-eslint/parser": "^8.7.0",
|
25
|
+
"eslint": "^9.11.1",
|
26
26
|
"eslint-plugin-prettier": "^5.2.1",
|
27
27
|
"husky": "^9.1.4",
|
28
28
|
"lint-staged": "^15.2.7",
|
@@ -33,9 +33,9 @@
|
|
33
33
|
"sortpack": "^2.4.0",
|
34
34
|
"typedoc": "^0.26.5",
|
35
35
|
"typescript": "^5.5.4",
|
36
|
-
"typescript-eslint": "^8.
|
36
|
+
"typescript-eslint": "^8.7.0"
|
37
37
|
},
|
38
|
-
"packageManager": "pnpm@9.
|
38
|
+
"packageManager": "pnpm@9.12.0",
|
39
39
|
"types": "./dist/index.d.ts",
|
40
40
|
"lint-staged": {
|
41
41
|
"*.{ts,tsx,js}": [
|
@@ -1,14 +0,0 @@
|
|
1
|
-
export interface OAuthProviderInsertForm {
|
2
|
-
display_name: string;
|
3
|
-
issuer: string;
|
4
|
-
authorization_endpoint: string;
|
5
|
-
token_endpoint: string;
|
6
|
-
userinfo_endpoint: string;
|
7
|
-
id_claim: string;
|
8
|
-
client_id: string;
|
9
|
-
client_secret: string;
|
10
|
-
scopes: string;
|
11
|
-
auto_verify_email: boolean;
|
12
|
-
account_linking_enabled: boolean;
|
13
|
-
enabled: boolean;
|
14
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
export interface OAuthProviderUpdateForm {
|
2
|
-
display_name: string | null;
|
3
|
-
authorization_endpoint: string;
|
4
|
-
token_endpoint: string;
|
5
|
-
userinfo_endpoint: string;
|
6
|
-
id_claim: string | null;
|
7
|
-
client_secret: string | null;
|
8
|
-
scopes: string | null;
|
9
|
-
auto_verify_email: boolean | null;
|
10
|
-
account_linking_enabled: boolean | null;
|
11
|
-
enabled: boolean | null;
|
12
|
-
updated: string | null | null;
|
13
|
-
}
|
package/dist/types/SortType.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export type SortType = "Active" | "Hot" | "New" | "Old" | "TopDay" | "TopWeek" | "TopMonth" | "TopYear" | "TopAll" | "MostComments" | "NewComments" | "TopHour" | "TopSixHour" | "TopTwelveHour" | "TopThreeMonths" | "TopSixMonths" | "TopNineMonths" | "Controversial" | "Scaled";
|
File without changes
|
File without changes
|
File without changes
|