lemmy-js-client 1.0.0-test-npm-token-fix.0 → 1.0.0-test-fix-errors-1.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 +10 -21
- package/dist/http.js +12 -48
- package/dist/index.d.ts +1 -5
- package/dist/other_types.d.ts +0 -3
- package/dist/types/UnreadCountsResponse.d.ts +11 -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/GetReportCount.js +0 -2
- package/dist/types/GetReportCountResponse.d.ts +0 -6
- package/dist/types/GetReportCountResponse.js +0 -3
- package/dist/types/GetUnreadCountResponse.d.ts +0 -6
- package/dist/types/GetUnreadCountResponse.js +0 -3
- package/dist/types/GetUnreadRegistrationApplicationCountResponse.d.ts +0 -6
- package/dist/types/GetUnreadRegistrationApplicationCountResponse.js +0 -3
- /package/dist/types/{GetCommunityPendingFollowsCountResponse.js → UnreadCountsResponse.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";
|
|
@@ -54,11 +54,8 @@ import { GetCaptchaResponse } from "./types/GetCaptchaResponse";
|
|
|
54
54
|
import { GetCommunityResponse } from "./types/GetCommunityResponse";
|
|
55
55
|
import { GetPersonDetailsResponse } from "./types/GetPersonDetailsResponse";
|
|
56
56
|
import { GetPostResponse } from "./types/GetPostResponse";
|
|
57
|
-
import { GetReportCountResponse } from "./types/GetReportCountResponse";
|
|
58
57
|
import { GetSiteMetadataResponse } from "./types/GetSiteMetadataResponse";
|
|
59
58
|
import { GetSiteResponse } from "./types/GetSiteResponse";
|
|
60
|
-
import { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
|
|
61
|
-
import { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
|
|
62
59
|
import { LockPost } from "./types/LockPost";
|
|
63
60
|
import { LockComment } from "./types/LockComment";
|
|
64
61
|
import { Login } from "./types/Login";
|
|
@@ -103,7 +100,6 @@ import { UpdateTagline } from "./types/UpdateTagline";
|
|
|
103
100
|
import { DeleteTagline } from "./types/DeleteTagline";
|
|
104
101
|
import { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
|
|
105
102
|
import { ApproveCommunityPendingFollower } from "./types/ApproveCommunityPendingFollower";
|
|
106
|
-
import { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPendingFollowsCountResponse";
|
|
107
103
|
import { MyUserInfo } from "./types/MyUserInfo";
|
|
108
104
|
import { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
|
|
109
105
|
import { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
|
@@ -143,6 +139,7 @@ import { ReportCombinedView } from "./types/ReportCombinedView";
|
|
|
143
139
|
import { FederatedInstanceView } from "./types/FederatedInstanceView";
|
|
144
140
|
import { MultiCommunityView } from "./types/MultiCommunityView";
|
|
145
141
|
import { PostCommentCombinedView } from "./types/PostCommentCombinedView";
|
|
142
|
+
import { UnreadCountsResponse } from "./types/UnreadCountsResponse";
|
|
146
143
|
type RequestOptions = Pick<RequestInit, "signal">;
|
|
147
144
|
/**
|
|
148
145
|
* Helps build lemmy HTTP requests.
|
|
@@ -263,9 +260,10 @@ export declare class LemmyHttp extends Controller {
|
|
|
263
260
|
*/
|
|
264
261
|
followCommunity(form: FollowCommunity, options?: RequestOptions): Promise<CommunityResponse>;
|
|
265
262
|
/**
|
|
266
|
-
* @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.
|
|
267
265
|
*/
|
|
268
|
-
|
|
266
|
+
getUnreadCounts(options?: RequestOptions): Promise<UnreadCountsResponse>;
|
|
269
267
|
/**
|
|
270
268
|
* @summary Get a community's pending followers.
|
|
271
269
|
*/
|
|
@@ -530,14 +528,6 @@ export declare class LemmyHttp extends Controller {
|
|
|
530
528
|
* @summary Change your user password.
|
|
531
529
|
*/
|
|
532
530
|
changePassword(form: ChangePassword, options?: RequestOptions): Promise<LoginResponse>;
|
|
533
|
-
/**
|
|
534
|
-
* @summary Get counts for your reports.
|
|
535
|
-
*/
|
|
536
|
-
getReportCount(form: GetReportCountI, options?: RequestOptions): Promise<GetReportCountResponse>;
|
|
537
|
-
/**
|
|
538
|
-
* @summary Get your unread counts.
|
|
539
|
-
*/
|
|
540
|
-
getUnreadCount(options?: RequestOptions): Promise<GetUnreadCountResponse>;
|
|
541
531
|
/**
|
|
542
532
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
|
543
533
|
*/
|
|
@@ -570,10 +560,6 @@ export declare class LemmyHttp extends Controller {
|
|
|
570
560
|
* @summary Add an admin to your site.
|
|
571
561
|
*/
|
|
572
562
|
addAdmin(form: AddAdmin, options?: RequestOptions): Promise<AddAdminResponse>;
|
|
573
|
-
/**
|
|
574
|
-
* @summary Get the unread registration applications count.
|
|
575
|
-
*/
|
|
576
|
-
getUnreadRegistrationApplicationCount(options?: RequestOptions): Promise<GetUnreadRegistrationApplicationCountResponse>;
|
|
577
563
|
/**
|
|
578
564
|
* @summary List the registration applications.
|
|
579
565
|
*/
|
|
@@ -772,10 +758,13 @@ export declare class LemmyHttp extends Controller {
|
|
|
772
758
|
* A Lemmy error type.
|
|
773
759
|
*
|
|
774
760
|
* The name is the i18n translatable error code.
|
|
775
|
-
* The
|
|
761
|
+
* The message is either an empty string, or extra non-translatable info.
|
|
776
762
|
*/
|
|
777
763
|
export declare class LemmyError extends Error {
|
|
764
|
+
name: string;
|
|
778
765
|
status: number;
|
|
779
|
-
|
|
766
|
+
message: string;
|
|
767
|
+
cause: any;
|
|
768
|
+
constructor(name: string, status: number, message?: string, cause?: any);
|
|
780
769
|
}
|
|
781
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, "/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)("/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
|
@@ -100,7 +100,6 @@ export { GetCaptchaResponse } from "./types/GetCaptchaResponse";
|
|
|
100
100
|
export { GetComment } from "./types/GetComment";
|
|
101
101
|
export { GetComments } from "./types/GetComments";
|
|
102
102
|
export { GetCommunity } from "./types/GetCommunity";
|
|
103
|
-
export { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPendingFollowsCountResponse";
|
|
104
103
|
export { GetCommunityResponse } from "./types/GetCommunityResponse";
|
|
105
104
|
export { GetFederatedInstances } from "./types/GetFederatedInstances";
|
|
106
105
|
export { GetFederatedInstancesKind } from "./types/GetFederatedInstancesKind";
|
|
@@ -114,13 +113,9 @@ export { GetPostResponse } from "./types/GetPostResponse";
|
|
|
114
113
|
export { GetPosts } from "./types/GetPosts";
|
|
115
114
|
export { GetRandomCommunity } from "./types/GetRandomCommunity";
|
|
116
115
|
export { GetRegistrationApplication } from "./types/GetRegistrationApplication";
|
|
117
|
-
export { GetReportCount } from "./types/GetReportCount";
|
|
118
|
-
export { GetReportCountResponse } from "./types/GetReportCountResponse";
|
|
119
116
|
export { GetSiteMetadata } from "./types/GetSiteMetadata";
|
|
120
117
|
export { GetSiteMetadataResponse } from "./types/GetSiteMetadataResponse";
|
|
121
118
|
export { GetSiteResponse } from "./types/GetSiteResponse";
|
|
122
|
-
export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
|
|
123
|
-
export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
|
|
124
119
|
export { HideCommunity } from "./types/HideCommunity";
|
|
125
120
|
export { HidePost } from "./types/HidePost";
|
|
126
121
|
export { ImageDetails } from "./types/ImageDetails";
|
|
@@ -276,6 +271,7 @@ export { TaglineId } from "./types/TaglineId";
|
|
|
276
271
|
export { TaglineResponse } from "./types/TaglineResponse";
|
|
277
272
|
export { TagsView } from "./types/TagsView";
|
|
278
273
|
export { TransferCommunity } from "./types/TransferCommunity";
|
|
274
|
+
export { UnreadCountsResponse } from "./types/UnreadCountsResponse";
|
|
279
275
|
export { UntranslatedError } from "./types/UntranslatedError";
|
|
280
276
|
export { UpdateCommunityNotifications } from "./types/UpdateCommunityNotifications";
|
|
281
277
|
export { UpdateCommunityTag } from "./types/UpdateCommunityTag";
|
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 {
|
|
@@ -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-test-
|
|
4
|
+
"version": "1.0.0-test-fix-errors-1.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.27.0",
|
|
48
48
|
"types": "./dist/index.d.ts",
|
|
49
49
|
"lint-staged": {
|
|
50
50
|
"*.{ts,tsx,js}": [
|
|
File without changes
|