lemmy-js-client 1.0.0-merge-count-endpoints.1 → 1.0.0-merge-count-endpoints.4
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 +4 -13
- package/dist/http.js +7 -30
- package/dist/index.d.ts +1 -3
- package/dist/types/UnreadCountsResponse.d.ts +11 -0
- package/package.json +1 -1
- package/dist/types/CountsResponse.d.ts +0 -6
- 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/{CountsResponse.js → UnreadCountsResponse.js} +0 -0
package/dist/http.d.ts
CHANGED
|
@@ -56,8 +56,6 @@ import { GetPersonDetailsResponse } from "./types/GetPersonDetailsResponse";
|
|
|
56
56
|
import { GetPostResponse } from "./types/GetPostResponse";
|
|
57
57
|
import { GetSiteMetadataResponse } from "./types/GetSiteMetadataResponse";
|
|
58
58
|
import { GetSiteResponse } from "./types/GetSiteResponse";
|
|
59
|
-
import { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
|
|
60
|
-
import { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
|
|
61
59
|
import { LockPost } from "./types/LockPost";
|
|
62
60
|
import { LockComment } from "./types/LockComment";
|
|
63
61
|
import { Login } from "./types/Login";
|
|
@@ -102,7 +100,6 @@ import { UpdateTagline } from "./types/UpdateTagline";
|
|
|
102
100
|
import { DeleteTagline } from "./types/DeleteTagline";
|
|
103
101
|
import { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
|
|
104
102
|
import { ApproveCommunityPendingFollower } from "./types/ApproveCommunityPendingFollower";
|
|
105
|
-
import { CountsResponse } from "./types/CountsResponse";
|
|
106
103
|
import { MyUserInfo } from "./types/MyUserInfo";
|
|
107
104
|
import { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
|
|
108
105
|
import { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
|
@@ -142,6 +139,7 @@ import { ReportCombinedView } from "./types/ReportCombinedView";
|
|
|
142
139
|
import { FederatedInstanceView } from "./types/FederatedInstanceView";
|
|
143
140
|
import { MultiCommunityView } from "./types/MultiCommunityView";
|
|
144
141
|
import { PostCommentCombinedView } from "./types/PostCommentCombinedView";
|
|
142
|
+
import { UnreadCountsResponse } from "./types/UnreadCountsResponse";
|
|
145
143
|
type RequestOptions = Pick<RequestInit, "signal">;
|
|
146
144
|
/**
|
|
147
145
|
* Helps build lemmy HTTP requests.
|
|
@@ -262,9 +260,10 @@ export declare class LemmyHttp extends Controller {
|
|
|
262
260
|
*/
|
|
263
261
|
followCommunity(form: FollowCommunity, options?: RequestOptions): Promise<CommunityResponse>;
|
|
264
262
|
/**
|
|
265
|
-
* @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.
|
|
266
265
|
*/
|
|
267
|
-
|
|
266
|
+
getUnreadCounts(options?: RequestOptions): Promise<UnreadCountsResponse>;
|
|
268
267
|
/**
|
|
269
268
|
* @summary Get a community's pending followers.
|
|
270
269
|
*/
|
|
@@ -529,10 +528,6 @@ export declare class LemmyHttp extends Controller {
|
|
|
529
528
|
* @summary Change your user password.
|
|
530
529
|
*/
|
|
531
530
|
changePassword(form: ChangePassword, options?: RequestOptions): Promise<LoginResponse>;
|
|
532
|
-
/**
|
|
533
|
-
* @summary Get your unread counts.
|
|
534
|
-
*/
|
|
535
|
-
getUnreadCount(options?: RequestOptions): Promise<GetUnreadCountResponse>;
|
|
536
531
|
/**
|
|
537
532
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
|
538
533
|
*/
|
|
@@ -565,10 +560,6 @@ export declare class LemmyHttp extends Controller {
|
|
|
565
560
|
* @summary Add an admin to your site.
|
|
566
561
|
*/
|
|
567
562
|
addAdmin(form: AddAdmin, options?: RequestOptions): Promise<AddAdminResponse>;
|
|
568
|
-
/**
|
|
569
|
-
* @summary Get the unread registration applications count.
|
|
570
|
-
*/
|
|
571
|
-
getUnreadRegistrationApplicationCount(options?: RequestOptions): Promise<GetUnreadRegistrationApplicationCountResponse>;
|
|
572
563
|
/**
|
|
573
564
|
* @summary List the registration applications.
|
|
574
565
|
*/
|
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, "/account/
|
|
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,12 +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 your unread counts.
|
|
609
|
-
*/
|
|
610
|
-
async getUnreadCount(options) {
|
|
611
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/notification/count", {}, options);
|
|
612
|
-
}
|
|
613
608
|
/**
|
|
614
609
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
|
615
610
|
*/
|
|
@@ -658,12 +653,6 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
|
658
653
|
async addAdmin(form, options) {
|
|
659
654
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/add", form, options);
|
|
660
655
|
}
|
|
661
|
-
/**
|
|
662
|
-
* @summary Get the unread registration applications count.
|
|
663
|
-
*/
|
|
664
|
-
async getUnreadRegistrationApplicationCount(options) {
|
|
665
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/admin/registration_application/count", {}, options);
|
|
666
|
-
}
|
|
667
656
|
/**
|
|
668
657
|
* @summary List the registration applications.
|
|
669
658
|
*/
|
|
@@ -1183,10 +1172,10 @@ __decorate([
|
|
|
1183
1172
|
], LemmyHttp.prototype, "followCommunity", null);
|
|
1184
1173
|
__decorate([
|
|
1185
1174
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1186
|
-
(0, runtime_1.Get)("/account/
|
|
1187
|
-
(0, runtime_1.Tags)("
|
|
1175
|
+
(0, runtime_1.Get)("/account/unread_counts"),
|
|
1176
|
+
(0, runtime_1.Tags)("Account"),
|
|
1188
1177
|
__param(0, (0, runtime_1.Inject)())
|
|
1189
|
-
], LemmyHttp.prototype, "
|
|
1178
|
+
], LemmyHttp.prototype, "getUnreadCounts", null);
|
|
1190
1179
|
__decorate([
|
|
1191
1180
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1192
1181
|
(0, runtime_1.Get)("/community/pending_follows/list"),
|
|
@@ -1651,12 +1640,6 @@ __decorate([
|
|
|
1651
1640
|
__param(0, (0, runtime_1.Body)()),
|
|
1652
1641
|
__param(1, (0, runtime_1.Inject)())
|
|
1653
1642
|
], LemmyHttp.prototype, "changePassword", null);
|
|
1654
|
-
__decorate([
|
|
1655
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1656
|
-
(0, runtime_1.Get)("/account/notification/count"),
|
|
1657
|
-
(0, runtime_1.Tags)("Account"),
|
|
1658
|
-
__param(0, (0, runtime_1.Inject)())
|
|
1659
|
-
], LemmyHttp.prototype, "getUnreadCount", null);
|
|
1660
1643
|
__decorate([
|
|
1661
1644
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1662
1645
|
(0, runtime_1.Get)("/account/notification/list"),
|
|
@@ -1711,12 +1694,6 @@ __decorate([
|
|
|
1711
1694
|
__param(0, (0, runtime_1.Body)()),
|
|
1712
1695
|
__param(1, (0, runtime_1.Inject)())
|
|
1713
1696
|
], LemmyHttp.prototype, "addAdmin", null);
|
|
1714
|
-
__decorate([
|
|
1715
|
-
(0, runtime_1.Security)("bearerAuth"),
|
|
1716
|
-
(0, runtime_1.Get)("/admin/registration_application/count"),
|
|
1717
|
-
(0, runtime_1.Tags)("Admin"),
|
|
1718
|
-
__param(0, (0, runtime_1.Inject)())
|
|
1719
|
-
], LemmyHttp.prototype, "getUnreadRegistrationApplicationCount", null);
|
|
1720
1697
|
__decorate([
|
|
1721
1698
|
(0, runtime_1.Security)("bearerAuth"),
|
|
1722
1699
|
(0, runtime_1.Get)("/admin/registration_application/list"),
|
package/dist/index.d.ts
CHANGED
|
@@ -45,7 +45,6 @@ export { CommunityResponse } from "./types/CommunityResponse";
|
|
|
45
45
|
export { CommunitySortType } from "./types/CommunitySortType";
|
|
46
46
|
export { CommunityView } from "./types/CommunityView";
|
|
47
47
|
export { CommunityVisibility } from "./types/CommunityVisibility";
|
|
48
|
-
export { CountsResponse } from "./types/CountsResponse";
|
|
49
48
|
export { CreateComment } from "./types/CreateComment";
|
|
50
49
|
export { CreateCommentLike } from "./types/CreateCommentLike";
|
|
51
50
|
export { CreateCommentReport } from "./types/CreateCommentReport";
|
|
@@ -117,8 +116,6 @@ export { GetRegistrationApplication } from "./types/GetRegistrationApplication";
|
|
|
117
116
|
export { GetSiteMetadata } from "./types/GetSiteMetadata";
|
|
118
117
|
export { GetSiteMetadataResponse } from "./types/GetSiteMetadataResponse";
|
|
119
118
|
export { GetSiteResponse } from "./types/GetSiteResponse";
|
|
120
|
-
export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
|
|
121
|
-
export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
|
|
122
119
|
export { HideCommunity } from "./types/HideCommunity";
|
|
123
120
|
export { HidePost } from "./types/HidePost";
|
|
124
121
|
export { ImageDetails } from "./types/ImageDetails";
|
|
@@ -274,6 +271,7 @@ export { TaglineId } from "./types/TaglineId";
|
|
|
274
271
|
export { TaglineResponse } from "./types/TaglineResponse";
|
|
275
272
|
export { TagsView } from "./types/TagsView";
|
|
276
273
|
export { TransferCommunity } from "./types/TransferCommunity";
|
|
274
|
+
export { UnreadCountsResponse } from "./types/UnreadCountsResponse";
|
|
277
275
|
export { UntranslatedError } from "./types/UntranslatedError";
|
|
278
276
|
export { UpdateCommunityNotifications } from "./types/UpdateCommunityNotifications";
|
|
279
277
|
export { UpdateCommunityTag } from "./types/UpdateCommunityTag";
|
|
@@ -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
|
File without changes
|