lemmy-js-client 1.0.0-rename-paged-response-data.0 → 1.0.0-rename-update-edit.0
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 +30 -43
- package/dist/http.js +12 -48
- package/dist/index.d.ts +13 -17
- package/dist/other_types.d.ts +0 -3
- package/dist/types/AdminListUsers.d.ts +2 -0
- package/dist/types/{OAuthProvider.d.ts → AdminOAuthProvider.d.ts} +1 -1
- package/dist/types/AllLemmyErrors.js +1 -1
- package/dist/types/Community.d.ts +3 -3
- package/dist/types/CommunityReport.d.ts +1 -1
- package/dist/types/CreateCommunity.d.ts +3 -3
- package/dist/types/CreateSite.d.ts +1 -1
- package/dist/types/EditCommunity.d.ts +3 -3
- package/dist/types/{UpdateCommunityNotifications.d.ts → EditCommunityNotifications.d.ts} +1 -1
- package/dist/types/{UpdateCommunityTag.d.ts → EditCommunityTag.d.ts} +1 -1
- package/dist/types/{UpdateMultiCommunity.d.ts → EditMultiCommunity.d.ts} +1 -1
- package/dist/types/{UpdatePostNotifications.d.ts → EditPostNotifications.d.ts} +1 -1
- package/dist/types/EditSite.d.ts +2 -2
- package/dist/types/{UpdateTagline.d.ts → EditTagline.d.ts} +1 -1
- package/dist/types/{UpdateTotp.d.ts → EditTotp.d.ts} +1 -1
- package/dist/types/EditTotpResponse.d.ts +3 -0
- package/dist/types/GetSiteResponse.d.ts +2 -2
- package/dist/types/LemmyErrorType.d.ts +4 -9
- package/dist/types/LemmyErrorType.js +1 -0
- package/dist/types/LocalUserSortType.d.ts +4 -0
- package/dist/types/{PersonLikedCombinedView.d.ts → PostCommentCombinedView.d.ts} +1 -1
- package/dist/types/PublicOAuthProvider.d.ts +27 -2
- package/dist/types/Site.d.ts +3 -3
- package/dist/types/UnreadCountsResponse.d.ts +11 -0
- package/dist/types/VoteViewComment.d.ts +9 -0
- package/dist/types/VoteViewPost.d.ts +9 -0
- package/package.json +2 -2
- package/dist/types/GetCommunityPendingFollowsCountResponse.d.ts +0 -3
- package/dist/types/GetReportCount.d.ts +0 -7
- package/dist/types/GetReportCountResponse.d.ts +0 -6
- package/dist/types/GetUnreadCountResponse.d.ts +0 -6
- package/dist/types/GetUnreadRegistrationApplicationCountResponse.d.ts +0 -6
- package/dist/types/PersonContentCombinedView.d.ts +0 -7
- package/dist/types/PersonSavedCombinedView.d.ts +0 -7
- package/dist/types/UntranslatedError.d.ts +0 -14
- package/dist/types/UntranslatedError.js +0 -3
- package/dist/types/UpdateTagline.js +0 -2
- package/dist/types/UpdateTotp.js +0 -3
- package/dist/types/UpdateTotpResponse.d.ts +0 -3
- package/dist/types/UpdateTotpResponse.js +0 -3
- /package/dist/types/{GetReportCount.js → AdminOAuthProvider.js} +0 -0
- /package/dist/types/{OAuthProvider.js → EditCommunityNotifications.js} +0 -0
- /package/dist/types/{PersonContentCombinedView.js → EditCommunityTag.js} +0 -0
- /package/dist/types/{PersonLikedCombinedView.js → EditMultiCommunity.js} +0 -0
- /package/dist/types/{PersonSavedCombinedView.js → EditPostNotifications.js} +0 -0
- /package/dist/types/{UpdateCommunityNotifications.js → EditTagline.js} +0 -0
- /package/dist/types/{GetCommunityPendingFollowsCountResponse.js → EditTotp.js} +0 -0
- /package/dist/types/{GetReportCountResponse.js → EditTotpResponse.js} +0 -0
- /package/dist/types/{GetUnreadCountResponse.js → LocalUserSortType.js} +0 -0
- /package/dist/types/{UpdateCommunityTag.js → PostCommentCombinedView.js} +0 -0
- /package/dist/types/{GetUnreadRegistrationApplicationCountResponse.js → UnreadCountsResponse.js} +0 -0
- /package/dist/types/{UpdateMultiCommunity.js → VoteViewComment.js} +0 -0
- /package/dist/types/{UpdatePostNotifications.js → VoteViewPost.js} +0 -0
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, GetModlogI, GetMultiCommunityI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI,
|
|
2
|
+
import { AdminListUsersI, CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetModlogI, GetMultiCommunityI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListNotificationsI, ListMediaI, ListMultiCommunitiesI, ListPersonContentI, ListPersonHiddenI, ListPersonLikedI, ListPersonReadI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage, GetFederatedInstancesI } from "./other_types";
|
|
3
3
|
import { AddAdmin } from "./types/AddAdmin";
|
|
4
4
|
import { AddAdminResponse } from "./types/AddAdminResponse";
|
|
5
5
|
import { AddModToCommunity } from "./types/AddModToCommunity";
|
|
@@ -21,7 +21,7 @@ import { CreateCommentReport } from "./types/CreateCommentReport";
|
|
|
21
21
|
import { CreateCommunity } from "./types/CreateCommunity";
|
|
22
22
|
import { CreateCommunityReport } from "./types/CreateCommunityReport";
|
|
23
23
|
import { CreateCommunityTag } from "./types/CreateCommunityTag";
|
|
24
|
-
import {
|
|
24
|
+
import { EditCommunityTag } from "./types/EditCommunityTag";
|
|
25
25
|
import { CreateCustomEmoji } from "./types/CreateCustomEmoji";
|
|
26
26
|
import { CreateOAuthProvider } from "./types/CreateOAuthProvider";
|
|
27
27
|
import { CreatePost } from "./types/CreatePost";
|
|
@@ -47,18 +47,14 @@ import { EditOAuthProvider } from "./types/EditOAuthProvider";
|
|
|
47
47
|
import { EditPost } from "./types/EditPost";
|
|
48
48
|
import { EditPrivateMessage } from "./types/EditPrivateMessage";
|
|
49
49
|
import { EditSite } from "./types/EditSite";
|
|
50
|
-
import { OAuthProvider } from "./types/OAuthProvider";
|
|
51
50
|
import { FeaturePost } from "./types/FeaturePost";
|
|
52
51
|
import { FollowCommunity } from "./types/FollowCommunity";
|
|
53
52
|
import { GetCaptchaResponse } from "./types/GetCaptchaResponse";
|
|
54
53
|
import { GetCommunityResponse } from "./types/GetCommunityResponse";
|
|
55
54
|
import { GetPersonDetailsResponse } from "./types/GetPersonDetailsResponse";
|
|
56
55
|
import { GetPostResponse } from "./types/GetPostResponse";
|
|
57
|
-
import { GetReportCountResponse } from "./types/GetReportCountResponse";
|
|
58
56
|
import { GetSiteMetadataResponse } from "./types/GetSiteMetadataResponse";
|
|
59
57
|
import { GetSiteResponse } from "./types/GetSiteResponse";
|
|
60
|
-
import { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
|
|
61
|
-
import { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
|
|
62
58
|
import { LockPost } from "./types/LockPost";
|
|
63
59
|
import { LockComment } from "./types/LockComment";
|
|
64
60
|
import { Login } from "./types/Login";
|
|
@@ -92,18 +88,17 @@ import { TransferCommunity } from "./types/TransferCommunity";
|
|
|
92
88
|
import { VerifyEmail } from "./types/VerifyEmail";
|
|
93
89
|
import { HideCommunity } from "./types/HideCommunity";
|
|
94
90
|
import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
|
|
95
|
-
import {
|
|
96
|
-
import {
|
|
91
|
+
import { EditTotp } from "./types/EditTotp";
|
|
92
|
+
import { EditTotpResponse } from "./types/EditTotpResponse";
|
|
97
93
|
import { SuccessResponse } from "./types/SuccessResponse";
|
|
98
94
|
import { HidePost } from "./types/HidePost";
|
|
99
95
|
import { AuthenticateWithOauth } from "./types/AuthenticateWithOauth";
|
|
100
96
|
import { CreateTagline } from "./types/CreateTagline";
|
|
101
97
|
import { TaglineResponse } from "./types/TaglineResponse";
|
|
102
|
-
import {
|
|
98
|
+
import { EditTagline } from "./types/EditTagline";
|
|
103
99
|
import { DeleteTagline } from "./types/DeleteTagline";
|
|
104
100
|
import { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
|
|
105
101
|
import { ApproveCommunityPendingFollower } from "./types/ApproveCommunityPendingFollower";
|
|
106
|
-
import { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPendingFollowsCountResponse";
|
|
107
102
|
import { MyUserInfo } from "./types/MyUserInfo";
|
|
108
103
|
import { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
|
|
109
104
|
import { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
|
@@ -112,7 +107,7 @@ import { Tag } from "./types/Tag";
|
|
|
112
107
|
import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
|
|
113
108
|
import { CommunityIdQuery } from "./types/CommunityIdQuery";
|
|
114
109
|
import { CreateMultiCommunity } from "./types/CreateMultiCommunity";
|
|
115
|
-
import {
|
|
110
|
+
import { EditMultiCommunity } from "./types/EditMultiCommunity";
|
|
116
111
|
import { CreateOrDeleteMultiCommunityEntry } from "./types/CreateOrDeleteMultiCommunityEntry";
|
|
117
112
|
import { GetMultiCommunityResponse } from "./types/GetMultiCommunityResponse";
|
|
118
113
|
import { FollowMultiCommunity } from "./types/FollowMultiCommunity";
|
|
@@ -122,8 +117,8 @@ import { UserBlockInstanceCommunitiesParams } from "./types/UserBlockInstanceCom
|
|
|
122
117
|
import { UserBlockInstancePersonsParams } from "./types/UserBlockInstancePersonsParams";
|
|
123
118
|
import { MarkNotificationAsRead } from "./types/MarkNotificationAsRead";
|
|
124
119
|
import { ModEditPost } from "./types/ModEditPost";
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
120
|
+
import { EditCommunityNotifications } from "./types/EditCommunityNotifications";
|
|
121
|
+
import { EditPostNotifications } from "./types/EditPostNotifications";
|
|
127
122
|
import { MultiCommunityResponse } from "./types/MultiCommunityResponse";
|
|
128
123
|
import { PersonResponse } from "./types/PersonResponse";
|
|
129
124
|
import { LocalImageView } from "./types/LocalImageView";
|
|
@@ -135,16 +130,16 @@ import { PostView } from "./types/PostView";
|
|
|
135
130
|
import { VoteView } from "./types/VoteView";
|
|
136
131
|
import { CommentView } from "./types/CommentView";
|
|
137
132
|
import { CommentSlimView } from "./types/CommentSlimView";
|
|
138
|
-
import { PersonContentCombinedView } from "./types/PersonContentCombinedView";
|
|
139
133
|
import { LocalUserView } from "./types/LocalUserView";
|
|
140
|
-
import { PersonSavedCombinedView } from "./types/PersonSavedCombinedView";
|
|
141
134
|
import { NotificationView } from "./types/NotificationView";
|
|
142
|
-
import { PersonLikedCombinedView } from "./types/PersonLikedCombinedView";
|
|
143
135
|
import { RegistrationApplicationView } from "./types/RegistrationApplicationView";
|
|
144
136
|
import { Tagline } from "./types/Tagline";
|
|
145
137
|
import { ReportCombinedView } from "./types/ReportCombinedView";
|
|
146
138
|
import { FederatedInstanceView } from "./types/FederatedInstanceView";
|
|
147
139
|
import { MultiCommunityView } from "./types/MultiCommunityView";
|
|
140
|
+
import { PostCommentCombinedView } from "./types/PostCommentCombinedView";
|
|
141
|
+
import { UnreadCountsResponse } from "./types/UnreadCountsResponse";
|
|
142
|
+
import { AdminOAuthProvider } from "./types/AdminOAuthProvider";
|
|
148
143
|
type RequestOptions = Pick<RequestInit, "signal">;
|
|
149
144
|
/**
|
|
150
145
|
* Helps build lemmy HTTP requests.
|
|
@@ -231,7 +226,7 @@ export declare class LemmyHttp extends Controller {
|
|
|
231
226
|
*
|
|
232
227
|
* Disabling is only possible if 2FA was previously enabled. Again it is necessary to pass a valid token.
|
|
233
228
|
*/
|
|
234
|
-
updateTotp(form:
|
|
229
|
+
updateTotp(form: EditTotp, options?: RequestOptions): Promise<EditTotpResponse>;
|
|
235
230
|
/**
|
|
236
231
|
* @summary Get the modlog.
|
|
237
232
|
*/
|
|
@@ -265,9 +260,10 @@ export declare class LemmyHttp extends Controller {
|
|
|
265
260
|
*/
|
|
266
261
|
followCommunity(form: FollowCommunity, options?: RequestOptions): Promise<CommunityResponse>;
|
|
267
262
|
/**
|
|
268
|
-
* @summary
|
|
263
|
+
* @summary Returns the amount of unread items of various types. For normal users this means * the number of unread notifications, mods and admins get additional unread counts for
|
|
264
|
+
* reports, registration applications and pending follows to private communities.
|
|
269
265
|
*/
|
|
270
|
-
|
|
266
|
+
getUnreadCounts(options?: RequestOptions): Promise<UnreadCountsResponse>;
|
|
271
267
|
/**
|
|
272
268
|
* @summary Get a community's pending followers.
|
|
273
269
|
*/
|
|
@@ -483,7 +479,7 @@ export declare class LemmyHttp extends Controller {
|
|
|
483
479
|
/**
|
|
484
480
|
* @summary List the content for a person.
|
|
485
481
|
*/
|
|
486
|
-
listPersonContent(form?: ListPersonContentI, options?: RequestOptions): Promise<PagedResponse<
|
|
482
|
+
listPersonContent(form?: ListPersonContentI, options?: RequestOptions): Promise<PagedResponse<PostCommentCombinedView>>;
|
|
487
483
|
/**
|
|
488
484
|
* @summary Make a note for a person.
|
|
489
485
|
*/
|
|
@@ -532,14 +528,6 @@ export declare class LemmyHttp extends Controller {
|
|
|
532
528
|
* @summary Change your user password.
|
|
533
529
|
*/
|
|
534
530
|
changePassword(form: ChangePassword, options?: RequestOptions): Promise<LoginResponse>;
|
|
535
|
-
/**
|
|
536
|
-
* @summary Get counts for your reports.
|
|
537
|
-
*/
|
|
538
|
-
getReportCount(form: GetReportCountI, options?: RequestOptions): Promise<GetReportCountResponse>;
|
|
539
|
-
/**
|
|
540
|
-
* @summary Get your unread counts.
|
|
541
|
-
*/
|
|
542
|
-
getUnreadCount(options?: RequestOptions): Promise<GetUnreadCountResponse>;
|
|
543
531
|
/**
|
|
544
532
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
|
545
533
|
*/
|
|
@@ -555,7 +543,7 @@ export declare class LemmyHttp extends Controller {
|
|
|
555
543
|
/**
|
|
556
544
|
* @summary List your saved content.
|
|
557
545
|
*/
|
|
558
|
-
listPersonSaved(form: ListPersonSavedI, options?: RequestOptions): Promise<PagedResponse<
|
|
546
|
+
listPersonSaved(form: ListPersonSavedI, options?: RequestOptions): Promise<PagedResponse<PostCommentCombinedView>>;
|
|
559
547
|
/**
|
|
560
548
|
* @summary List your read content.
|
|
561
549
|
*/
|
|
@@ -567,15 +555,11 @@ export declare class LemmyHttp extends Controller {
|
|
|
567
555
|
/**
|
|
568
556
|
* @summary List your liked content.
|
|
569
557
|
*/
|
|
570
|
-
listPersonLiked(form: ListPersonLikedI, options?: RequestOptions): Promise<PagedResponse<
|
|
558
|
+
listPersonLiked(form: ListPersonLikedI, options?: RequestOptions): Promise<PagedResponse<PostCommentCombinedView>>;
|
|
571
559
|
/**
|
|
572
560
|
* @summary Add an admin to your site.
|
|
573
561
|
*/
|
|
574
562
|
addAdmin(form: AddAdmin, options?: RequestOptions): Promise<AddAdminResponse>;
|
|
575
|
-
/**
|
|
576
|
-
* @summary Get the unread registration applications count.
|
|
577
|
-
*/
|
|
578
|
-
getUnreadRegistrationApplicationCount(options?: RequestOptions): Promise<GetUnreadRegistrationApplicationCountResponse>;
|
|
579
563
|
/**
|
|
580
564
|
* @summary List the registration applications.
|
|
581
565
|
*/
|
|
@@ -627,7 +611,7 @@ export declare class LemmyHttp extends Controller {
|
|
|
627
611
|
/**
|
|
628
612
|
* @summary Edit an existing tagline
|
|
629
613
|
*/
|
|
630
|
-
editTagline(form:
|
|
614
|
+
editTagline(form: EditTagline, options?: RequestOptions): Promise<TaglineResponse>;
|
|
631
615
|
/**
|
|
632
616
|
* @summary Delete a tagline
|
|
633
617
|
*/
|
|
@@ -643,7 +627,7 @@ export declare class LemmyHttp extends Controller {
|
|
|
643
627
|
/**
|
|
644
628
|
* @summary Edit a community post tag.
|
|
645
629
|
*/
|
|
646
|
-
updateCommunityTag(form:
|
|
630
|
+
updateCommunityTag(form: EditCommunityTag, options?: RequestOptions): Promise<Tag>;
|
|
647
631
|
/**
|
|
648
632
|
* @summary Delete a post tag in a community.
|
|
649
633
|
*/
|
|
@@ -651,11 +635,11 @@ export declare class LemmyHttp extends Controller {
|
|
|
651
635
|
/**
|
|
652
636
|
* @summary Create a new oauth provider method
|
|
653
637
|
*/
|
|
654
|
-
createOAuthProvider(form: CreateOAuthProvider, options?: RequestOptions): Promise<
|
|
638
|
+
createOAuthProvider(form: CreateOAuthProvider, options?: RequestOptions): Promise<AdminOAuthProvider>;
|
|
655
639
|
/**
|
|
656
640
|
* @summary Edit an existing oauth provider method
|
|
657
641
|
*/
|
|
658
|
-
editOAuthProvider(form: EditOAuthProvider, options?: RequestOptions): Promise<
|
|
642
|
+
editOAuthProvider(form: EditOAuthProvider, options?: RequestOptions): Promise<AdminOAuthProvider>;
|
|
659
643
|
/**
|
|
660
644
|
* @summary Delete an oauth provider method
|
|
661
645
|
*/
|
|
@@ -749,7 +733,7 @@ export declare class LemmyHttp extends Controller {
|
|
|
749
733
|
*/
|
|
750
734
|
donationDialogShown(options?: RequestOptions): Promise<SuccessResponse>;
|
|
751
735
|
createMultiCommunity(form: CreateMultiCommunity, options?: RequestOptions): Promise<MultiCommunityResponse>;
|
|
752
|
-
updateMultiCommunity(form:
|
|
736
|
+
updateMultiCommunity(form: EditMultiCommunity, options?: RequestOptions): Promise<MultiCommunityResponse>;
|
|
753
737
|
getMultiCommunity(form: GetMultiCommunityI, options?: RequestOptions): Promise<GetMultiCommunityResponse>;
|
|
754
738
|
createMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<CommunityResponse>;
|
|
755
739
|
deleteMultiCommunityEntry(form: CreateOrDeleteMultiCommunityEntry, options?: RequestOptions): Promise<SuccessResponse>;
|
|
@@ -758,11 +742,11 @@ export declare class LemmyHttp extends Controller {
|
|
|
758
742
|
/**
|
|
759
743
|
* @summary Change notification settings for a community
|
|
760
744
|
*/
|
|
761
|
-
updateCommunityNotifications(form:
|
|
745
|
+
updateCommunityNotifications(form: EditCommunityNotifications, options?: RequestOptions): Promise<SuccessResponse>;
|
|
762
746
|
/**
|
|
763
747
|
* @summary Change notification settings for a post
|
|
764
748
|
*/
|
|
765
|
-
updatePostNotifications(form:
|
|
749
|
+
updatePostNotifications(form: EditPostNotifications, options?: RequestOptions): Promise<SuccessResponse>;
|
|
766
750
|
/**
|
|
767
751
|
* Set the headers (can be used to set the auth header)
|
|
768
752
|
*/
|
|
@@ -774,10 +758,13 @@ export declare class LemmyHttp extends Controller {
|
|
|
774
758
|
* A Lemmy error type.
|
|
775
759
|
*
|
|
776
760
|
* The name is the i18n translatable error code.
|
|
777
|
-
* The
|
|
761
|
+
* The message is either an empty string, or extra non-translatable info.
|
|
778
762
|
*/
|
|
779
763
|
export declare class LemmyError extends Error {
|
|
764
|
+
name: string;
|
|
780
765
|
status: number;
|
|
781
|
-
|
|
766
|
+
message: string;
|
|
767
|
+
cause: any;
|
|
768
|
+
constructor(name: string, status: number, message?: string, cause?: any);
|
|
782
769
|
}
|
|
783
770
|
export {};
|
package/dist/http.js
CHANGED
|
@@ -203,10 +203,11 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
203
203
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/follow", form, options);
|
|
204
204
|
}
|
|
205
205
|
/**
|
|
206
|
-
* @summary
|
|
206
|
+
* @summary Returns the amount of unread items of various types. For normal users this means * the number of unread notifications, mods and admins get additional unread counts for
|
|
207
|
+
* reports, registration applications and pending follows to private communities.
|
|
207
208
|
*/
|
|
208
|
-
async
|
|
209
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/
|
|
209
|
+
async getUnreadCounts(options) {
|
|
210
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/unread_counts", {}, options);
|
|
210
211
|
}
|
|
211
212
|
/**
|
|
212
213
|
* @summary Get a community's pending followers.
|
|
@@ -604,18 +605,6 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
604
605
|
async changePassword(form, options) {
|
|
605
606
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/account/auth/change_password", form, options);
|
|
606
607
|
}
|
|
607
|
-
/**
|
|
608
|
-
* @summary Get counts for your reports.
|
|
609
|
-
*/
|
|
610
|
-
async getReportCount(form, options) {
|
|
611
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/report_count", form, options);
|
|
612
|
-
}
|
|
613
|
-
/**
|
|
614
|
-
* @summary Get your unread counts.
|
|
615
|
-
*/
|
|
616
|
-
async getUnreadCount(options) {
|
|
617
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notification/count", {}, options);
|
|
618
|
-
}
|
|
619
608
|
/**
|
|
620
609
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
|
621
610
|
*/
|
|
@@ -664,12 +653,6 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
664
653
|
async addAdmin(form, options) {
|
|
665
654
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/add", form, options);
|
|
666
655
|
}
|
|
667
|
-
/**
|
|
668
|
-
* @summary Get the unread registration applications count.
|
|
669
|
-
*/
|
|
670
|
-
async getUnreadRegistrationApplicationCount(options) {
|
|
671
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/count", {}, options);
|
|
672
|
-
}
|
|
673
656
|
/**
|
|
674
657
|
* @summary List the registration applications.
|
|
675
658
|
*/
|
|
@@ -1189,10 +1172,10 @@ __decorate([
|
|
|
1189
1172
|
], LemmyHttp.prototype, "followCommunity", null);
|
|
1190
1173
|
__decorate([
|
|
1191
1174
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1192
|
-
(0, runtime_1.Get)("/
|
|
1193
|
-
(0, runtime_1.Tags)("
|
|
1175
|
+
(0, runtime_1.Get)("/account/unread_counts"),
|
|
1176
|
+
(0, runtime_1.Tags)("Account"),
|
|
1194
1177
|
__param(0, (0, runtime_1.Inject)())
|
|
1195
|
-
], LemmyHttp.prototype, "
|
|
1178
|
+
], LemmyHttp.prototype, "getUnreadCounts", null);
|
|
1196
1179
|
__decorate([
|
|
1197
1180
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1198
1181
|
(0, runtime_1.Get)("/community/pending_follows/list"),
|
|
@@ -1657,19 +1640,6 @@ __decorate([
|
|
|
1657
1640
|
__param(0, (0, runtime_1.Body)()),
|
|
1658
1641
|
__param(1, (0, runtime_1.Inject)())
|
|
1659
1642
|
], LemmyHttp.prototype, "changePassword", null);
|
|
1660
|
-
__decorate([
|
|
1661
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1662
|
-
(0, runtime_1.Get)("/account/report_count"),
|
|
1663
|
-
(0, runtime_1.Tags)("Account"),
|
|
1664
|
-
__param(0, (0, runtime_1.Queries)()),
|
|
1665
|
-
__param(1, (0, runtime_1.Inject)())
|
|
1666
|
-
], LemmyHttp.prototype, "getReportCount", null);
|
|
1667
|
-
__decorate([
|
|
1668
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1669
|
-
(0, runtime_1.Get)("/account/notification/count"),
|
|
1670
|
-
(0, runtime_1.Tags)("Account"),
|
|
1671
|
-
__param(0, (0, runtime_1.Inject)())
|
|
1672
|
-
], LemmyHttp.prototype, "getUnreadCount", null);
|
|
1673
1643
|
__decorate([
|
|
1674
1644
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1675
1645
|
(0, runtime_1.Get)("/account/notification/list"),
|
|
@@ -1724,12 +1694,6 @@ __decorate([
|
|
|
1724
1694
|
__param(0, (0, runtime_1.Body)()),
|
|
1725
1695
|
__param(1, (0, runtime_1.Inject)())
|
|
1726
1696
|
], LemmyHttp.prototype, "addAdmin", null);
|
|
1727
|
-
__decorate([
|
|
1728
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1729
|
-
(0, runtime_1.Get)("/admin/registration_application/count"),
|
|
1730
|
-
(0, runtime_1.Tags)("Admin"),
|
|
1731
|
-
__param(0, (0, runtime_1.Inject)())
|
|
1732
|
-
], LemmyHttp.prototype, "getUnreadRegistrationApplicationCount", null);
|
|
1733
1697
|
__decorate([
|
|
1734
1698
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1735
1699
|
(0, runtime_1.Get)("/admin/registration_application/list"),
|
|
@@ -2111,15 +2075,15 @@ function createFormData(image) {
|
|
|
2111
2075
|
* A Lemmy error type.
|
|
2112
2076
|
*
|
|
2113
2077
|
* The name is the i18n translatable error code.
|
|
2114
|
-
* The
|
|
2078
|
+
* The message is either an empty string, or extra non-translatable info.
|
|
2115
2079
|
*/
|
|
2116
2080
|
class LemmyError extends Error {
|
|
2117
|
-
constructor(name, status,
|
|
2118
|
-
super(
|
|
2081
|
+
constructor(name, status, message = "", cause) {
|
|
2082
|
+
super();
|
|
2119
2083
|
this.name = name;
|
|
2084
|
+
this.message = message;
|
|
2120
2085
|
this.status = status;
|
|
2121
|
-
|
|
2122
|
-
Object.setPrototypeOf(this, LemmyError.prototype);
|
|
2086
|
+
this.cause = cause;
|
|
2123
2087
|
}
|
|
2124
2088
|
}
|
|
2125
2089
|
exports.LemmyError = LemmyError;
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
|
|
|
8
8
|
export { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
|
|
9
9
|
export { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
|
10
10
|
export { AdminListUsers } from "./types/AdminListUsers";
|
|
11
|
+
export { AdminOAuthProvider } from "./types/AdminOAuthProvider";
|
|
11
12
|
export { AllLemmyErrors } from "./types/AllLemmyErrors";
|
|
12
13
|
export { ApproveCommunityPendingFollower } from "./types/ApproveCommunityPendingFollower";
|
|
13
14
|
export { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
|
|
@@ -81,11 +82,18 @@ export { DeleteTagline } from "./types/DeleteTagline";
|
|
|
81
82
|
export { DistinguishComment } from "./types/DistinguishComment";
|
|
82
83
|
export { EditComment } from "./types/EditComment";
|
|
83
84
|
export { EditCommunity } from "./types/EditCommunity";
|
|
85
|
+
export { EditCommunityNotifications } from "./types/EditCommunityNotifications";
|
|
86
|
+
export { EditCommunityTag } from "./types/EditCommunityTag";
|
|
84
87
|
export { EditCustomEmoji } from "./types/EditCustomEmoji";
|
|
88
|
+
export { EditMultiCommunity } from "./types/EditMultiCommunity";
|
|
85
89
|
export { EditOAuthProvider } from "./types/EditOAuthProvider";
|
|
86
90
|
export { EditPost } from "./types/EditPost";
|
|
91
|
+
export { EditPostNotifications } from "./types/EditPostNotifications";
|
|
87
92
|
export { EditPrivateMessage } from "./types/EditPrivateMessage";
|
|
88
93
|
export { EditSite } from "./types/EditSite";
|
|
94
|
+
export { EditTagline } from "./types/EditTagline";
|
|
95
|
+
export { EditTotp } from "./types/EditTotp";
|
|
96
|
+
export { EditTotpResponse } from "./types/EditTotpResponse";
|
|
89
97
|
export { ExportDataResponse } from "./types/ExportDataResponse";
|
|
90
98
|
export { FeaturePost } from "./types/FeaturePost";
|
|
91
99
|
export { FederatedInstanceView } from "./types/FederatedInstanceView";
|
|
@@ -100,7 +108,6 @@ export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
|
|
|
100
108
|
export { GetComment } from "./types/GetComment";
|
|
101
109
|
export { GetComments } from "./types/GetComments";
|
|
102
110
|
export { GetCommunity } from "./types/GetCommunity";
|
|
103
|
-
export { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPendingFollowsCountResponse";
|
|
104
111
|
export { GetCommunityResponse } from "./types/GetCommunityResponse";
|
|
105
112
|
export { GetFederatedInstances } from "./types/GetFederatedInstances";
|
|
106
113
|
export { GetFederatedInstancesKind } from "./types/GetFederatedInstancesKind";
|
|
@@ -114,13 +121,9 @@ export { GetPostResponse } from "./types/GetPostResponse";
|
|
|
114
121
|
export { GetPosts } from "./types/GetPosts";
|
|
115
122
|
export { GetRandomCommunity } from "./types/GetRandomCommunity";
|
|
116
123
|
export { GetRegistrationApplication } from "./types/GetRegistrationApplication";
|
|
117
|
-
export { GetReportCount } from "./types/GetReportCount";
|
|
118
|
-
export { GetReportCountResponse } from "./types/GetReportCountResponse";
|
|
119
124
|
export { GetSiteMetadata } from "./types/GetSiteMetadata";
|
|
120
125
|
export { GetSiteMetadataResponse } from "./types/GetSiteMetadataResponse";
|
|
121
126
|
export { GetSiteResponse } from "./types/GetSiteResponse";
|
|
122
|
-
export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
|
|
123
|
-
export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
|
|
124
127
|
export { HideCommunity } from "./types/HideCommunity";
|
|
125
128
|
export { HidePost } from "./types/HidePost";
|
|
126
129
|
export { ImageDetails } from "./types/ImageDetails";
|
|
@@ -162,6 +165,7 @@ export { LocalSiteRateLimit } from "./types/LocalSiteRateLimit";
|
|
|
162
165
|
export { LocalSiteUrlBlocklist } from "./types/LocalSiteUrlBlocklist";
|
|
163
166
|
export { LocalUser } from "./types/LocalUser";
|
|
164
167
|
export { LocalUserId } from "./types/LocalUserId";
|
|
168
|
+
export { LocalUserSortType } from "./types/LocalUserSortType";
|
|
165
169
|
export { LocalUserView } from "./types/LocalUserView";
|
|
166
170
|
export { LockComment } from "./types/LockComment";
|
|
167
171
|
export { LockPost } from "./types/LockPost";
|
|
@@ -193,7 +197,6 @@ export { NotificationId } from "./types/NotificationId";
|
|
|
193
197
|
export { NotificationType } from "./types/NotificationType";
|
|
194
198
|
export { NotificationView } from "./types/NotificationView";
|
|
195
199
|
export { OAuthAccount } from "./types/OAuthAccount";
|
|
196
|
-
export { OAuthProvider } from "./types/OAuthProvider";
|
|
197
200
|
export { OAuthProviderId } from "./types/OAuthProviderId";
|
|
198
201
|
export { OpenGraphData } from "./types/OpenGraphData";
|
|
199
202
|
export { PagedResponse } from "./types/PagedResponse";
|
|
@@ -204,16 +207,14 @@ export { PendingFollow } from "./types/PendingFollow";
|
|
|
204
207
|
export { PendingFollowerView } from "./types/PendingFollowerView";
|
|
205
208
|
export { Person } from "./types/Person";
|
|
206
209
|
export { PersonActions } from "./types/PersonActions";
|
|
207
|
-
export { PersonContentCombinedView } from "./types/PersonContentCombinedView";
|
|
208
210
|
export { PersonContentType } from "./types/PersonContentType";
|
|
209
211
|
export { PersonId } from "./types/PersonId";
|
|
210
|
-
export { PersonLikedCombinedView } from "./types/PersonLikedCombinedView";
|
|
211
212
|
export { PersonResponse } from "./types/PersonResponse";
|
|
212
|
-
export { PersonSavedCombinedView } from "./types/PersonSavedCombinedView";
|
|
213
213
|
export { PersonView } from "./types/PersonView";
|
|
214
214
|
export { PluginMetadata } from "./types/PluginMetadata";
|
|
215
215
|
export { Post } from "./types/Post";
|
|
216
216
|
export { PostActions } from "./types/PostActions";
|
|
217
|
+
export { PostCommentCombinedView } from "./types/PostCommentCombinedView";
|
|
217
218
|
export { PostFeatureType } from "./types/PostFeatureType";
|
|
218
219
|
export { PostId } from "./types/PostId";
|
|
219
220
|
export { PostListingMode } from "./types/PostListingMode";
|
|
@@ -278,14 +279,7 @@ export { TaglineId } from "./types/TaglineId";
|
|
|
278
279
|
export { TaglineResponse } from "./types/TaglineResponse";
|
|
279
280
|
export { TagsView } from "./types/TagsView";
|
|
280
281
|
export { TransferCommunity } from "./types/TransferCommunity";
|
|
281
|
-
export {
|
|
282
|
-
export { UpdateCommunityNotifications } from "./types/UpdateCommunityNotifications";
|
|
283
|
-
export { UpdateCommunityTag } from "./types/UpdateCommunityTag";
|
|
284
|
-
export { UpdateMultiCommunity } from "./types/UpdateMultiCommunity";
|
|
285
|
-
export { UpdatePostNotifications } from "./types/UpdatePostNotifications";
|
|
286
|
-
export { UpdateTagline } from "./types/UpdateTagline";
|
|
287
|
-
export { UpdateTotp } from "./types/UpdateTotp";
|
|
288
|
-
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
|
282
|
+
export { UnreadCountsResponse } from "./types/UnreadCountsResponse";
|
|
289
283
|
export { UploadImageResponse } from "./types/UploadImageResponse";
|
|
290
284
|
export { UserBlockInstanceCommunitiesParams } from "./types/UserBlockInstanceCommunitiesParams";
|
|
291
285
|
export { UserBlockInstancePersonsParams } from "./types/UserBlockInstancePersonsParams";
|
|
@@ -293,3 +287,5 @@ export { UserSettingsBackup } from "./types/UserSettingsBackup";
|
|
|
293
287
|
export { VerifyEmail } from "./types/VerifyEmail";
|
|
294
288
|
export { VoteShow } from "./types/VoteShow";
|
|
295
289
|
export { VoteView } from "./types/VoteView";
|
|
290
|
+
export { VoteViewComment } from "./types/VoteViewComment";
|
|
291
|
+
export { VoteViewPost } from "./types/VoteViewPost";
|
package/dist/other_types.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ import { GetPost } from "./types/GetPost";
|
|
|
11
11
|
import { GetPosts } from "./types/GetPosts";
|
|
12
12
|
import { GetRandomCommunity } from "./types/GetRandomCommunity";
|
|
13
13
|
import { GetRegistrationApplication } from "./types/GetRegistrationApplication";
|
|
14
|
-
import { GetReportCount } from "./types/GetReportCount";
|
|
15
14
|
import { GetSiteMetadata } from "./types/GetSiteMetadata";
|
|
16
15
|
import { ListCommentLikes } from "./types/ListCommentLikes";
|
|
17
16
|
import { ListCommunities } from "./types/ListCommunities";
|
|
@@ -70,8 +69,6 @@ export interface GetPersonDetailsI extends GetPersonDetails {
|
|
|
70
69
|
}
|
|
71
70
|
export interface ListPersonContentI extends ListPersonContent {
|
|
72
71
|
}
|
|
73
|
-
export interface GetReportCountI extends GetReportCount {
|
|
74
|
-
}
|
|
75
72
|
export interface ListNotificationsI extends ListNotifications {
|
|
76
73
|
}
|
|
77
74
|
export interface ListPersonSavedI extends ListPersonSaved {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { LocalUserSortType } from "./LocalUserSortType";
|
|
1
2
|
import type { PaginationCursor } from "./PaginationCursor";
|
|
2
3
|
export type AdminListUsers = {
|
|
3
4
|
banned_only?: boolean;
|
|
4
5
|
page_cursor?: PaginationCursor;
|
|
6
|
+
sort?: LocalUserSortType;
|
|
5
7
|
limit?: number;
|
|
6
8
|
};
|
|
@@ -2,7 +2,7 @@ import type { OAuthProviderId } from "./OAuthProviderId";
|
|
|
2
2
|
/**
|
|
3
3
|
* oauth provider with client_secret - should never be sent to the client
|
|
4
4
|
*/
|
|
5
|
-
export type
|
|
5
|
+
export type AdminOAuthProvider = {
|
|
6
6
|
id: OAuthProviderId;
|
|
7
7
|
/**
|
|
8
8
|
* The OAuth 2.0 provider name displayed to the user on the Login page
|
|
@@ -105,7 +105,6 @@ exports.AllLemmyErrors = [
|
|
|
105
105
|
"post_schedule_time_must_be_in_future",
|
|
106
106
|
"too_many_scheduled_posts",
|
|
107
107
|
"cannot_combine_federation_blocklist_and_allowlist",
|
|
108
|
-
"cannot_combine_federation_blocklist_and_allowlist",
|
|
109
108
|
"couldnt_parse_pagination_token",
|
|
110
109
|
"couldnt_parse_pagination_token",
|
|
111
110
|
"invalid_fetch_limit",
|
|
@@ -114,4 +113,5 @@ exports.AllLemmyErrors = [
|
|
|
114
113
|
"cannot_combine_community_id_and_multi_community_id",
|
|
115
114
|
"multi_community_entry_limit_reached",
|
|
116
115
|
"too_many_requests",
|
|
116
|
+
"too_many_requests",
|
|
117
117
|
];
|
|
@@ -15,7 +15,7 @@ export type Community = {
|
|
|
15
15
|
/**
|
|
16
16
|
* A sidebar for the community in markdown.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
description?: string;
|
|
19
19
|
/**
|
|
20
20
|
* Whether the community is removed by a mod.
|
|
21
21
|
*/
|
|
@@ -53,9 +53,9 @@ export type Community = {
|
|
|
53
53
|
instance_id: InstanceId;
|
|
54
54
|
visibility: CommunityVisibility;
|
|
55
55
|
/**
|
|
56
|
-
* A shorter, one-line
|
|
56
|
+
* A shorter, one-line summary of the site.
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
summary?: string;
|
|
59
59
|
subscribers: number;
|
|
60
60
|
posts: number;
|
|
61
61
|
comments: number;
|
|
@@ -10,8 +10,8 @@ export type CommunityReport = {
|
|
|
10
10
|
community_id: CommunityId;
|
|
11
11
|
original_community_name: string;
|
|
12
12
|
original_community_title: string;
|
|
13
|
+
original_community_summary?: string;
|
|
13
14
|
original_community_description?: string;
|
|
14
|
-
original_community_sidebar?: string;
|
|
15
15
|
original_community_icon?: string;
|
|
16
16
|
original_community_banner?: string;
|
|
17
17
|
reason: string;
|
|
@@ -15,11 +15,11 @@ export type CreateCommunity = {
|
|
|
15
15
|
/**
|
|
16
16
|
* A sidebar for the community in markdown.
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
description?: string;
|
|
19
19
|
/**
|
|
20
|
-
* A shorter, one line
|
|
20
|
+
* A shorter, one line summary of your community.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
summary?: string;
|
|
23
23
|
/**
|
|
24
24
|
* An icon URL.
|
|
25
25
|
*/
|
|
@@ -11,8 +11,8 @@ import type { RegistrationMode } from "./RegistrationMode";
|
|
|
11
11
|
*/
|
|
12
12
|
export type CreateSite = {
|
|
13
13
|
name: string;
|
|
14
|
-
sidebar?: string;
|
|
15
14
|
description?: string;
|
|
15
|
+
summary?: string;
|
|
16
16
|
community_creation_admin_only?: boolean;
|
|
17
17
|
require_email_verification?: boolean;
|
|
18
18
|
application_question?: string;
|
|
@@ -13,11 +13,11 @@ export type EditCommunity = {
|
|
|
13
13
|
/**
|
|
14
14
|
* A sidebar for the community in markdown.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
description?: string;
|
|
17
17
|
/**
|
|
18
|
-
* A shorter, one line
|
|
18
|
+
* A shorter, one line summary of your community.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
summary?: string;
|
|
21
21
|
/**
|
|
22
22
|
* Whether its an NSFW community.
|
|
23
23
|
*/
|
|
@@ -3,7 +3,7 @@ import type { CommunityNotificationsMode } from "./CommunityNotificationsMode";
|
|
|
3
3
|
/**
|
|
4
4
|
* Change notification settings for a community
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type EditCommunityNotifications = {
|
|
7
7
|
community_id: CommunityId;
|
|
8
8
|
mode: CommunityNotificationsMode;
|
|
9
9
|
};
|
package/dist/types/EditSite.d.ts
CHANGED
|
@@ -14,11 +14,11 @@ export type EditSite = {
|
|
|
14
14
|
/**
|
|
15
15
|
* A sidebar for the site, in markdown.
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
description?: string;
|
|
18
18
|
/**
|
|
19
19
|
* A shorter, one line description of your site.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
summary?: string;
|
|
22
22
|
/**
|
|
23
23
|
* Limits community creation to admins only.
|
|
24
24
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import type { AdminOAuthProvider } from "./AdminOAuthProvider";
|
|
1
2
|
import type { Language } from "./Language";
|
|
2
3
|
import type { LanguageId } from "./LanguageId";
|
|
3
4
|
import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
|
|
4
|
-
import type { OAuthProvider } from "./OAuthProvider";
|
|
5
5
|
import type { PersonView } from "./PersonView";
|
|
6
6
|
import type { PluginMetadata } from "./PluginMetadata";
|
|
7
7
|
import type { PublicOAuthProvider } from "./PublicOAuthProvider";
|
|
@@ -24,7 +24,7 @@ export type GetSiteResponse = {
|
|
|
24
24
|
* A list of external auth methods your site supports.
|
|
25
25
|
*/
|
|
26
26
|
oauth_providers: Array<PublicOAuthProvider>;
|
|
27
|
-
admin_oauth_providers: Array<
|
|
27
|
+
admin_oauth_providers: Array<AdminOAuthProvider>;
|
|
28
28
|
blocked_urls: Array<LocalSiteUrlBlocklist>;
|
|
29
29
|
image_upload_disabled: boolean;
|
|
30
30
|
active_plugins: Array<PluginMetadata>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { UntranslatedError } from "./UntranslatedError";
|
|
2
1
|
/**
|
|
3
2
|
* Errors used in the API, all of these are translated in lemmy-ui.
|
|
4
3
|
*/
|
|
@@ -164,9 +163,7 @@ export type LemmyErrorType = {
|
|
|
164
163
|
error: "slurs";
|
|
165
164
|
} | {
|
|
166
165
|
error: "registration_denied";
|
|
167
|
-
message:
|
|
168
|
-
reason?: string;
|
|
169
|
-
};
|
|
166
|
+
message: string;
|
|
170
167
|
} | {
|
|
171
168
|
error: "site_name_required";
|
|
172
169
|
} | {
|
|
@@ -216,11 +213,6 @@ export type LemmyErrorType = {
|
|
|
216
213
|
error: "too_many_scheduled_posts";
|
|
217
214
|
} | {
|
|
218
215
|
error: "cannot_combine_federation_blocklist_and_allowlist";
|
|
219
|
-
} | {
|
|
220
|
-
error: "untranslated_error";
|
|
221
|
-
message: {
|
|
222
|
-
error?: UntranslatedError;
|
|
223
|
-
};
|
|
224
216
|
} | {
|
|
225
217
|
error: "couldnt_parse_pagination_token";
|
|
226
218
|
} | {
|
|
@@ -238,4 +230,7 @@ export type LemmyErrorType = {
|
|
|
238
230
|
error: "multi_community_entry_limit_reached";
|
|
239
231
|
} | {
|
|
240
232
|
error: "too_many_requests";
|
|
233
|
+
} | {
|
|
234
|
+
error: "resolve_object_failed";
|
|
235
|
+
message: string;
|
|
241
236
|
};
|
|
@@ -1,2 +1,27 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type PublicOAuthProvider =
|
|
1
|
+
import type { OAuthProviderId } from "./OAuthProviderId";
|
|
2
|
+
export type PublicOAuthProvider = {
|
|
3
|
+
id: OAuthProviderId;
|
|
4
|
+
/**
|
|
5
|
+
* The OAuth 2.0 provider name displayed to the user on the Login page
|
|
6
|
+
*/
|
|
7
|
+
display_name: string;
|
|
8
|
+
/**
|
|
9
|
+
* The authorization endpoint is used to interact with the resource owner and obtain an
|
|
10
|
+
* authorization grant. This is usually provided by the OAUTH provider.
|
|
11
|
+
*/
|
|
12
|
+
authorization_endpoint: string;
|
|
13
|
+
/**
|
|
14
|
+
* The client_id is provided by the OAuth 2.0 provider and is a unique identifier to this
|
|
15
|
+
* service
|
|
16
|
+
*/
|
|
17
|
+
client_id: string;
|
|
18
|
+
/**
|
|
19
|
+
* Lists the scopes requested from users. Users will have to grant access to the requested scope
|
|
20
|
+
* at sign up.
|
|
21
|
+
*/
|
|
22
|
+
scopes: string;
|
|
23
|
+
/**
|
|
24
|
+
* switch to enable or disable PKCE
|
|
25
|
+
*/
|
|
26
|
+
use_pkce: boolean;
|
|
27
|
+
};
|
package/dist/types/Site.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type Site = {
|
|
|
11
11
|
/**
|
|
12
12
|
* A sidebar for the site in markdown.
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
description?: string;
|
|
15
15
|
published_at: string;
|
|
16
16
|
updated_at?: string;
|
|
17
17
|
/**
|
|
@@ -23,9 +23,9 @@ export type Site = {
|
|
|
23
23
|
*/
|
|
24
24
|
banner?: DbUrl;
|
|
25
25
|
/**
|
|
26
|
-
* A shorter, one-line
|
|
26
|
+
* A shorter, one-line summary of the site.
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
summary?: string;
|
|
29
29
|
/**
|
|
30
30
|
* The federated ap_id.
|
|
31
31
|
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains the amount of unread items of various types. For normal users this means the number of
|
|
3
|
+
* unread notifications, mods and admins get additional unread counts for reports, registration
|
|
4
|
+
* applications and pending follows to private communities.
|
|
5
|
+
*/
|
|
6
|
+
export type UnreadCountsResponse = {
|
|
7
|
+
notification_count: number;
|
|
8
|
+
report_count?: number;
|
|
9
|
+
pending_follow_count?: number;
|
|
10
|
+
registration_application_count?: number;
|
|
11
|
+
};
|
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-rename-
|
|
4
|
+
"version": "1.0.0-rename-update-edit.0",
|
|
5
5
|
"author": "Dessalines",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"typescript": "^5.5.4",
|
|
45
45
|
"typescript-eslint": "^8.7.0"
|
|
46
46
|
},
|
|
47
|
-
"packageManager": "pnpm@10.
|
|
47
|
+
"packageManager": "pnpm@10.28.0",
|
|
48
48
|
"types": "./dist/index.d.ts",
|
|
49
49
|
"lint-staged": {
|
|
50
50
|
"*.{ts,tsx,js}": [
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* These errors are only used for federation or internally and dont need to be translated.
|
|
3
|
-
*/
|
|
4
|
-
export type UntranslatedError = "InvalidCommunity" | "CannotCreatePostOrCommentInDeletedOrRemovedCommunity" | "CannotReceivePage" | "OnlyLocalAdminCanRemoveCommunity" | "OnlyLocalAdminCanRestoreCommunity" | "PostIsLocked" | {
|
|
5
|
-
PersonIsBannedFromSite: string;
|
|
6
|
-
} | "InvalidVoteValue" | "PageDoesNotSpecifyCreator" | "FederationDisabled" | {
|
|
7
|
-
DomainBlocked: string;
|
|
8
|
-
} | {
|
|
9
|
-
DomainNotInAllowList: string;
|
|
10
|
-
} | "FederationDisabledByStrictAllowList" | "ContradictingFilters" | "UrlWithoutDomain" | "InboxTimeout" | "CantDeleteSite" | "ObjectIsNotPublic" | "ObjectIsNotPrivate" | {
|
|
11
|
-
InvalidFollow: string;
|
|
12
|
-
} | "PurgeInvalidImageUrl" | "Unreachable" | "CouldntSendWebmention" | {
|
|
13
|
-
CommunityHasNoFollowers: string;
|
|
14
|
-
};
|
package/dist/types/UpdateTotp.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/{GetUnreadRegistrationApplicationCountResponse.js → UnreadCountsResponse.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|