lemmy-js-client 1.0.0-post-notifications.1 → 1.0.0-post-notifications.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/http.d.ts +3 -3
- package/dist/http.js +2 -2
- package/dist/index.d.ts +3 -2
- package/dist/other_types.d.ts +2 -2
- package/dist/types/CommunityNotificationsMode.d.ts +1 -1
- package/dist/types/ExportDataResponse.d.ts +1 -1
- package/dist/types/{ListInbox.d.ts → ListNotifications.d.ts} +3 -3
- package/dist/types/{ListInboxResponse.d.ts → ListNotificationsResponse.d.ts} +2 -2
- package/dist/types/Notification.d.ts +7 -5
- package/dist/types/NotificationData.d.ts +8 -15
- package/dist/types/NotificationDataType.d.ts +4 -0
- package/dist/types/NotificationDataType.js +3 -0
- package/dist/types/NotificationTypes.d.ts +1 -1
- package/dist/types/NotificationView.d.ts +6 -26
- package/dist/types/PostNotificationsMode.d.ts +1 -1
- package/dist/types/UpdateCommunityNotifications.d.ts +1 -1
- package/dist/types/UpdatePostNotifications.d.ts +1 -1
- package/dist/types/VoteView.d.ts +1 -0
- package/package.json +1 -1
- /package/dist/types/{ListInbox.js → ListNotifications.js} +0 -0
- /package/dist/types/{ListInboxResponse.js → ListNotificationsResponse.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, GetCommunityPendingFollowsCountI, GetModlogI, GetMultiCommunityI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI,
|
2
|
+
import { AdminListUsersI, CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetMultiCommunityI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListNotificationsI, ListMediaI, ListMultiCommunitiesI, ListPersonContentI, ListPersonHiddenI, ListPersonLikedI, ListPersonReadI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
|
3
3
|
import { AddAdmin } from "./types/AddAdmin";
|
4
4
|
import { AddAdminResponse } from "./types/AddAdminResponse";
|
5
5
|
import { AddModToCommunity } from "./types/AddModToCommunity";
|
@@ -127,7 +127,6 @@ import { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
|
127
127
|
import { ListPersonContentResponse } from "./types/ListPersonContentResponse";
|
128
128
|
import { ListPersonSavedResponse } from "./types/ListPersonSavedResponse";
|
129
129
|
import { UploadImageResponse } from "./types/UploadImageResponse";
|
130
|
-
import { ListInboxResponse } from "./types/ListInboxResponse";
|
131
130
|
import { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
|
132
131
|
import { Tag } from "./types/Tag";
|
133
132
|
import { ResendVerificationEmail } from "./types/ResendVerificationEmail";
|
@@ -144,6 +143,7 @@ import { FollowMultiCommunity } from "./types/FollowMultiCommunity";
|
|
144
143
|
import { ListLoginsResponse } from "./types/ListLoginsResponse";
|
145
144
|
import { ListPersonLikedResponse } from "./types/ListPersonLikedResponse";
|
146
145
|
import { MarkNotificationAsRead } from "./types/MarkNotificationAsRead";
|
146
|
+
import { ListNotificationsResponse } from "./types/ListNotificationsResponse";
|
147
147
|
type RequestOptions = Pick<RequestInit, "signal">;
|
148
148
|
/**
|
149
149
|
* Helps build lemmy HTTP requests.
|
@@ -534,7 +534,7 @@ export declare class LemmyHttp extends Controller {
|
|
534
534
|
/**
|
535
535
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
536
536
|
*/
|
537
|
-
|
537
|
+
listNotifications(form: ListNotificationsI, options?: RequestOptions): Promise<ListNotificationsResponse>;
|
538
538
|
/**
|
539
539
|
* @summary Verify your email
|
540
540
|
*/
|
package/dist/http.js
CHANGED
@@ -607,7 +607,7 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
607
607
|
/**
|
608
608
|
* @summary Get your inbox (replies, comment mentions, post mentions, and messages)
|
609
609
|
*/
|
610
|
-
async
|
610
|
+
async listNotifications(form, options) {
|
611
611
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/account/inbox", form, options);
|
612
612
|
}
|
613
613
|
/**
|
@@ -1632,7 +1632,7 @@ __decorate([
|
|
1632
1632
|
(0, runtime_1.Tags)("Account"),
|
1633
1633
|
__param(0, (0, runtime_1.Queries)()),
|
1634
1634
|
__param(1, (0, runtime_1.Inject)())
|
1635
|
-
], LemmyHttp.prototype, "
|
1635
|
+
], LemmyHttp.prototype, "listNotifications", null);
|
1636
1636
|
__decorate([
|
1637
1637
|
(0, runtime_1.Post)("/account/auth/verify_email"),
|
1638
1638
|
(0, runtime_1.Tags)("Account"),
|
package/dist/index.d.ts
CHANGED
@@ -171,13 +171,13 @@ export { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows
|
|
171
171
|
export { ListCommunityPendingFollowsResponse } from "./types/ListCommunityPendingFollowsResponse";
|
172
172
|
export { ListCustomEmojis } from "./types/ListCustomEmojis";
|
173
173
|
export { ListCustomEmojisResponse } from "./types/ListCustomEmojisResponse";
|
174
|
-
export { ListInbox } from "./types/ListInbox";
|
175
|
-
export { ListInboxResponse } from "./types/ListInboxResponse";
|
176
174
|
export { ListLoginsResponse } from "./types/ListLoginsResponse";
|
177
175
|
export { ListMedia } from "./types/ListMedia";
|
178
176
|
export { ListMediaResponse } from "./types/ListMediaResponse";
|
179
177
|
export { ListMultiCommunities } from "./types/ListMultiCommunities";
|
180
178
|
export { ListMultiCommunitiesResponse } from "./types/ListMultiCommunitiesResponse";
|
179
|
+
export { ListNotifications } from "./types/ListNotifications";
|
180
|
+
export { ListNotificationsResponse } from "./types/ListNotificationsResponse";
|
181
181
|
export { ListPersonContent } from "./types/ListPersonContent";
|
182
182
|
export { ListPersonContentResponse } from "./types/ListPersonContentResponse";
|
183
183
|
export { ListPersonHidden } from "./types/ListPersonHidden";
|
@@ -257,6 +257,7 @@ export { MyUserInfo } from "./types/MyUserInfo";
|
|
257
257
|
export { NotePerson } from "./types/NotePerson";
|
258
258
|
export { Notification } from "./types/Notification";
|
259
259
|
export { NotificationData } from "./types/NotificationData";
|
260
|
+
export { NotificationDataType } from "./types/NotificationDataType";
|
260
261
|
export { NotificationId } from "./types/NotificationId";
|
261
262
|
export { NotificationTypes } from "./types/NotificationTypes";
|
262
263
|
export { NotificationView } from "./types/NotificationView";
|
package/dist/other_types.d.ts
CHANGED
@@ -18,7 +18,7 @@ import { ListCommentLikes } from "./types/ListCommentLikes";
|
|
18
18
|
import { ListCommunities } from "./types/ListCommunities";
|
19
19
|
import { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows";
|
20
20
|
import { ListCustomEmojis } from "./types/ListCustomEmojis";
|
21
|
-
import {
|
21
|
+
import { ListNotifications } from "./types/ListNotifications";
|
22
22
|
import { ListMedia } from "./types/ListMedia";
|
23
23
|
import { ListMultiCommunities } from "./types/ListMultiCommunities";
|
24
24
|
import { ListPersonContent } from "./types/ListPersonContent";
|
@@ -74,7 +74,7 @@ export interface ListPersonContentI extends ListPersonContent {
|
|
74
74
|
}
|
75
75
|
export interface GetReportCountI extends GetReportCount {
|
76
76
|
}
|
77
|
-
export interface
|
77
|
+
export interface ListNotificationsI extends ListNotifications {
|
78
78
|
}
|
79
79
|
export interface ListPersonSavedI extends ListPersonSaved {
|
80
80
|
}
|
@@ -4,7 +4,7 @@ import type { UserSettingsBackup } from "./UserSettingsBackup";
|
|
4
4
|
* Your exported data.
|
5
5
|
*/
|
6
6
|
export type ExportDataResponse = {
|
7
|
-
|
7
|
+
notifications: Array<PostOrCommentOrPrivateMessage>;
|
8
8
|
content: Array<PostOrCommentOrPrivateMessage>;
|
9
9
|
read_posts: Array<string>;
|
10
10
|
liked: Array<string>;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import type {
|
1
|
+
import type { NotificationDataType } from "./NotificationDataType";
|
2
2
|
import type { PaginationCursor } from "./PaginationCursor";
|
3
3
|
/**
|
4
4
|
* Get your inbox (replies, comment mentions, post mentions, and messages)
|
5
5
|
*/
|
6
|
-
export type
|
7
|
-
type_?:
|
6
|
+
export type ListNotifications = {
|
7
|
+
type_?: NotificationDataType;
|
8
8
|
unread_only?: boolean;
|
9
9
|
page_cursor?: PaginationCursor;
|
10
10
|
page_back?: boolean;
|
@@ -3,8 +3,8 @@ import type { PaginationCursor } from "./PaginationCursor";
|
|
3
3
|
/**
|
4
4
|
* Get your inbox (replies, comment mentions, post mentions, and messages)
|
5
5
|
*/
|
6
|
-
export type
|
7
|
-
|
6
|
+
export type ListNotificationsResponse = {
|
7
|
+
notifications: Array<NotificationView>;
|
8
8
|
/**
|
9
9
|
* the pagination cursor to use to fetch the next page
|
10
10
|
*/
|
@@ -1,14 +1,16 @@
|
|
1
1
|
import type { CommentId } from "./CommentId";
|
2
2
|
import type { NotificationId } from "./NotificationId";
|
3
|
+
import type { NotificationTypes } from "./NotificationTypes";
|
4
|
+
import type { PersonId } from "./PersonId";
|
3
5
|
import type { PostId } from "./PostId";
|
4
6
|
import type { PrivateMessageId } from "./PrivateMessageId";
|
5
|
-
/**
|
6
|
-
* A person mention.
|
7
|
-
*/
|
8
7
|
export type Notification = {
|
9
8
|
id: NotificationId;
|
10
|
-
|
9
|
+
recipient_id: PersonId;
|
11
10
|
comment_id?: CommentId;
|
12
|
-
|
11
|
+
read: boolean;
|
13
12
|
published_at: string;
|
13
|
+
kind: NotificationTypes;
|
14
|
+
post_id?: PostId;
|
15
|
+
private_message_id?: PrivateMessageId;
|
14
16
|
};
|
@@ -1,17 +1,10 @@
|
|
1
|
-
import type {
|
2
|
-
import type {
|
3
|
-
import type {
|
4
|
-
|
5
|
-
export type NotificationData = {
|
6
|
-
type_: "Post";
|
7
|
-
post: Post;
|
8
|
-
community: Community;
|
9
|
-
} | {
|
1
|
+
import type { CommentView } from "./CommentView";
|
2
|
+
import type { PostView } from "./PostView";
|
3
|
+
import type { PrivateMessageView } from "./PrivateMessageView";
|
4
|
+
export type NotificationData = ({
|
10
5
|
type_: "Comment";
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
} | {
|
6
|
+
} & CommentView) | ({
|
7
|
+
type_: "Post";
|
8
|
+
} & PostView) | ({
|
15
9
|
type_: "PrivateMessage";
|
16
|
-
|
17
|
-
};
|
10
|
+
} & PrivateMessageView);
|
@@ -1,30 +1,10 @@
|
|
1
|
-
import type { CommentActions } from "./CommentActions";
|
2
|
-
import type { CommunityActions } from "./CommunityActions";
|
3
|
-
import type { ImageDetails } from "./ImageDetails";
|
4
|
-
import type { InstanceActions } from "./InstanceActions";
|
5
|
-
import type { Notification } from "./Notification";
|
6
1
|
import type { NotificationData } from "./NotificationData";
|
7
|
-
import type {
|
8
|
-
import type {
|
9
|
-
import type {
|
10
|
-
import type { PostActions } from "./PostActions";
|
11
|
-
import type { TagsView } from "./TagsView";
|
2
|
+
import type { NotificationId } from "./NotificationId";
|
3
|
+
import type { NotificationTypes } from "./NotificationTypes";
|
4
|
+
import type { PersonId } from "./PersonId";
|
12
5
|
export type NotificationView = {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
recipient: Person;
|
17
|
-
image_details?: ImageDetails;
|
18
|
-
community_actions?: CommunityActions;
|
19
|
-
instance_actions?: InstanceActions;
|
20
|
-
post_actions?: PostActions;
|
21
|
-
person_actions?: PersonActions;
|
22
|
-
comment_actions?: CommentActions;
|
23
|
-
creator_is_admin: boolean;
|
24
|
-
post_tags: TagsView;
|
25
|
-
can_mod: boolean;
|
26
|
-
creator_banned: boolean;
|
27
|
-
creator_is_moderator: boolean;
|
28
|
-
creator_banned_from_community: boolean;
|
6
|
+
id: NotificationId;
|
7
|
+
kind: NotificationTypes;
|
8
|
+
recipient_id: PersonId;
|
29
9
|
data: NotificationData;
|
30
10
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { CommunityId } from "./CommunityId";
|
2
2
|
import type { CommunityNotificationsMode } from "./CommunityNotificationsMode";
|
3
3
|
/**
|
4
|
-
*
|
4
|
+
* Change notification settings for a community
|
5
5
|
*/
|
6
6
|
export type UpdateCommunityNotifications = {
|
7
7
|
community_id: CommunityId;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { PostId } from "./PostId";
|
2
2
|
import type { PostNotificationsMode } from "./PostNotificationsMode";
|
3
3
|
/**
|
4
|
-
*
|
4
|
+
* Change notification settings for a post
|
5
5
|
*/
|
6
6
|
export type UpdatePostNotifications = {
|
7
7
|
post_id: PostId;
|
package/dist/types/VoteView.d.ts
CHANGED
package/package.json
CHANGED
File without changes
|
File without changes
|