lemmy-js-client 0.17.0-rc.37 → 0.17.0-rc.38
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 +13 -12
- package/dist/interfaces/aggregates.d.ts +0 -1
- package/dist/interfaces/api/comment.d.ts +11 -5
- package/dist/interfaces/api/comment.js +11 -34
- package/dist/interfaces/api/person.d.ts +5 -14
- package/dist/interfaces/api/person.js +2 -18
- package/dist/interfaces/api/post.d.ts +3 -3
- package/dist/interfaces/api/post.js +3 -22
- package/dist/interfaces/others.d.ts +24 -53
- package/dist/interfaces/others.js +24 -54
- package/dist/interfaces/source.d.ts +2 -8
- package/dist/interfaces/source.js +12 -7
- package/dist/interfaces/views.d.ts +2 -20
- package/dist/interfaces/views.js +8 -31
- package/dist/websocket.d.ts +3 -3
- package/dist/websocket.js +2 -2
- package/package.json +10 -10
package/dist/http.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, GetCommentsResponse, ListCommentReports, ListCommentReportsResponse, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
1
|
+
import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, GetCommentsResponse, ListCommentReports, ListCommentReportsResponse, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
2
2
|
import { AddModToCommunity, AddModToCommunityResponse, BanFromCommunity, BanFromCommunityResponse, BlockCommunity, BlockCommunityResponse, CommunityResponse, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, GetCommunityResponse, ListCommunities, ListCommunitiesResponse, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
|
3
|
-
import { AddAdmin, AddAdminResponse, BannedPersonsResponse, BanPerson, BanPersonResponse, BlockPerson, BlockPersonResponse, ChangePassword, CreatePrivateMessage, DeleteAccount, DeleteAccountResponse, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, GetCaptchaResponse, GetPersonDetails, GetPersonDetailsResponse, GetPersonMentions, GetPersonMentionsResponse, GetPrivateMessages, GetReplies, GetRepliesResponse, GetReportCount, GetReportCountResponse, GetUnreadCount, GetUnreadCountResponse, Login, LoginResponse, MarkAllAsRead,
|
3
|
+
import { AddAdmin, AddAdminResponse, BannedPersonsResponse, BanPerson, BanPersonResponse, BlockPerson, BlockPersonResponse, ChangePassword, CreatePrivateMessage, DeleteAccount, DeleteAccountResponse, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, GetCaptchaResponse, GetPersonDetails, GetPersonDetailsResponse, GetPersonMentions, GetPersonMentionsResponse, GetPrivateMessages, GetReplies, GetRepliesResponse, GetReportCount, GetReportCountResponse, GetUnreadCount, GetUnreadCountResponse, Login, LoginResponse, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, PasswordResetResponse, PersonMentionResponse, PrivateMessageResponse, PrivateMessagesResponse, Register, SaveUserSettings, VerifyEmail, VerifyEmailResponse } from "./interfaces/api/person";
|
4
4
|
import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPostResponse, GetPosts, GetPostsResponse, GetSiteMetadata, GetSiteMetadataResponse, ListPostReports, ListPostReportsResponse, LockPost, MarkPostAsRead, PostReportResponse, PostResponse, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
|
5
5
|
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetModlogResponse, GetSite, GetSiteResponse, GetUnreadRegistrationApplicationCount, GetUnreadRegistrationApplicationCountResponse, LeaveAdmin, ListRegistrationApplications, ListRegistrationApplicationsResponse, PurgeComment, PurgeCommunity, PurgeItemResponse, PurgePerson, PurgePost, RegistrationApplicationResponse, ResolveObject, ResolveObjectResponse, Search, SearchResponse, SiteResponse } from "./interfaces/api/site";
|
6
6
|
/**
|
@@ -244,7 +244,7 @@ export declare class LemmyHttp {
|
|
244
244
|
*
|
245
245
|
* `HTTP.POST /comment/mark_as_read`
|
246
246
|
*/
|
247
|
-
|
247
|
+
markCommentAsRead(form: MarkCommentAsRead): Promise<CommentResponse>;
|
248
248
|
/**
|
249
249
|
* Like / vote on a comment.
|
250
250
|
*
|
package/dist/http.js
CHANGED
@@ -527,7 +527,7 @@ var LemmyHttp = /** @class */ (function () {
|
|
527
527
|
*
|
528
528
|
* `HTTP.POST /comment/mark_as_read`
|
529
529
|
*/
|
530
|
-
LemmyHttp.prototype.
|
530
|
+
LemmyHttp.prototype.markCommentAsRead = function (form) {
|
531
531
|
return __awaiter(this, void 0, void 0, function () {
|
532
532
|
return __generator(this, function (_a) {
|
533
533
|
return [2 /*return*/, this.wrapper(HttpType.Post, "/comment/mark_as_read", form, comment_1.CommentResponse)];
|
@@ -999,25 +999,25 @@ var LemmyHttp = /** @class */ (function () {
|
|
999
999
|
return __generator(this, function (_a) {
|
1000
1000
|
if (type_ == HttpType.Get) {
|
1001
1001
|
getUrl = "".concat(this.buildFullUrl(endpoint), "?").concat(encodeGetParams(form));
|
1002
|
-
return [2 /*return*/, (0, node_fetch_1.default)(getUrl, {
|
1002
|
+
return [2 /*return*/, ((0, node_fetch_1.default)(getUrl, {
|
1003
1003
|
method: "GET",
|
1004
1004
|
headers: this.headers,
|
1005
|
-
})
|
1005
|
+
})
|
1006
|
+
// TODO test this
|
1007
|
+
.then(function (d) {
|
1006
1008
|
return d
|
1007
1009
|
.text()
|
1008
|
-
.then(function (a) {
|
1009
|
-
|
1010
|
+
.then(function (a) {
|
1011
|
+
return (0, class_transformer_1.deserialize)(responseClass, a);
|
1012
|
+
});
|
1013
|
+
}))];
|
1010
1014
|
}
|
1011
1015
|
else {
|
1012
1016
|
return [2 /*return*/, (0, node_fetch_1.default)(this.buildFullUrl(endpoint), {
|
1013
1017
|
method: type_,
|
1014
1018
|
headers: __assign({ "Content-Type": "application/json" }, this.headers),
|
1015
1019
|
body: (0, class_transformer_1.serialize)(form),
|
1016
|
-
}).then(function (d) {
|
1017
|
-
return d
|
1018
|
-
.text()
|
1019
|
-
.then(function (a) { return (0, class_transformer_1.deserialize)(responseClass, a); });
|
1020
|
-
})];
|
1020
|
+
}).then(function (d) { return d.json(); })];
|
1021
1021
|
}
|
1022
1022
|
return [2 /*return*/];
|
1023
1023
|
});
|
@@ -1029,7 +1029,8 @@ exports.LemmyHttp = LemmyHttp;
|
|
1029
1029
|
function encodeGetParams(p) {
|
1030
1030
|
// Necessary to remove the Options
|
1031
1031
|
var serialized = JSON.parse((0, class_transformer_1.serialize)(p));
|
1032
|
-
return Object.entries(serialized)
|
1032
|
+
return (Object.entries(serialized)
|
1033
|
+
// TODO test this, it might serialize the undefineds
|
1033
1034
|
.map(function (kv) { return kv.map(encodeURIComponent).join("="); })
|
1034
|
-
.join("&");
|
1035
|
+
.join("&"));
|
1035
1036
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Option } from "@sniptt/monads";
|
2
2
|
import "reflect-metadata";
|
3
|
-
import {
|
3
|
+
import { ListingType, SortType } from "../others";
|
4
4
|
import { CommentReportView, CommentView } from "../views";
|
5
5
|
export declare class CreateComment {
|
6
6
|
content: string;
|
@@ -42,6 +42,15 @@ export declare class RemoveComment {
|
|
42
42
|
auth: string;
|
43
43
|
constructor(init: RemoveComment);
|
44
44
|
}
|
45
|
+
/**
|
46
|
+
* Only the recipient can do this.
|
47
|
+
*/
|
48
|
+
export declare class MarkCommentAsRead {
|
49
|
+
comment_id: number;
|
50
|
+
read: boolean;
|
51
|
+
auth: string;
|
52
|
+
constructor(init: MarkCommentAsRead);
|
53
|
+
}
|
45
54
|
export declare class SaveComment {
|
46
55
|
comment_id: number;
|
47
56
|
save: boolean;
|
@@ -70,14 +79,11 @@ export declare class CreateCommentLike {
|
|
70
79
|
*/
|
71
80
|
export declare class GetComments {
|
72
81
|
type_: Option<ListingType>;
|
73
|
-
sort: Option<
|
74
|
-
max_depth: Option<number>;
|
82
|
+
sort: Option<SortType>;
|
75
83
|
page: Option<number>;
|
76
84
|
limit: Option<number>;
|
77
85
|
community_id: Option<number>;
|
78
86
|
community_name: Option<string>;
|
79
|
-
post_id: Option<number>;
|
80
|
-
parent_id: Option<number>;
|
81
87
|
saved_only: Option<boolean>;
|
82
88
|
auth: Option<string>;
|
83
89
|
constructor(init: GetComments);
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
7
|
};
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.ListCommentReportsResponse = exports.ListCommentReports = exports.ResolveCommentReport = exports.CommentReportResponse = exports.CreateCommentReport = exports.GetCommentsResponse = exports.GetComments = exports.CreateCommentLike = exports.CommentResponse = exports.SaveComment = exports.RemoveComment = exports.DeleteComment = exports.EditComment = exports.CreateComment = void 0;
|
9
|
+
exports.ListCommentReportsResponse = exports.ListCommentReports = exports.ResolveCommentReport = exports.CommentReportResponse = exports.CreateCommentReport = exports.GetCommentsResponse = exports.GetComments = exports.CreateCommentLike = exports.CommentResponse = exports.SaveComment = exports.MarkCommentAsRead = exports.RemoveComment = exports.DeleteComment = exports.EditComment = exports.CreateComment = void 0;
|
10
10
|
var class_transformer_1 = require("class-transformer");
|
11
11
|
require("reflect-metadata");
|
12
12
|
var utils_1 = require("../../utils");
|
@@ -89,6 +89,16 @@ var RemoveComment = /** @class */ (function () {
|
|
89
89
|
return RemoveComment;
|
90
90
|
}());
|
91
91
|
exports.RemoveComment = RemoveComment;
|
92
|
+
/**
|
93
|
+
* Only the recipient can do this.
|
94
|
+
*/
|
95
|
+
var MarkCommentAsRead = /** @class */ (function () {
|
96
|
+
function MarkCommentAsRead(init) {
|
97
|
+
Object.assign(this, init);
|
98
|
+
}
|
99
|
+
return MarkCommentAsRead;
|
100
|
+
}());
|
101
|
+
exports.MarkCommentAsRead = MarkCommentAsRead;
|
92
102
|
var SaveComment = /** @class */ (function () {
|
93
103
|
function SaveComment(init) {
|
94
104
|
Object.assign(this, init);
|
@@ -155,17 +165,6 @@ var GetComments = /** @class */ (function () {
|
|
155
165
|
}, { toPlainOnly: true }),
|
156
166
|
(0, class_transformer_1.Expose)()
|
157
167
|
], GetComments.prototype, "sort", void 0);
|
158
|
-
__decorate([
|
159
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
160
|
-
var value = _a.value;
|
161
|
-
return (0, utils_1.toOption)(value);
|
162
|
-
}, { toClassOnly: true }),
|
163
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
164
|
-
var value = _a.value;
|
165
|
-
return (0, utils_1.toUndefined)(value);
|
166
|
-
}, { toPlainOnly: true }),
|
167
|
-
(0, class_transformer_1.Expose)()
|
168
|
-
], GetComments.prototype, "max_depth", void 0);
|
169
168
|
__decorate([
|
170
169
|
(0, class_transformer_1.Transform)(function (_a) {
|
171
170
|
var value = _a.value;
|
@@ -210,28 +209,6 @@ var GetComments = /** @class */ (function () {
|
|
210
209
|
}, { toPlainOnly: true }),
|
211
210
|
(0, class_transformer_1.Expose)()
|
212
211
|
], GetComments.prototype, "community_name", void 0);
|
213
|
-
__decorate([
|
214
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
215
|
-
var value = _a.value;
|
216
|
-
return (0, utils_1.toOption)(value);
|
217
|
-
}, { toClassOnly: true }),
|
218
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
219
|
-
var value = _a.value;
|
220
|
-
return (0, utils_1.toUndefined)(value);
|
221
|
-
}, { toPlainOnly: true }),
|
222
|
-
(0, class_transformer_1.Expose)()
|
223
|
-
], GetComments.prototype, "post_id", void 0);
|
224
|
-
__decorate([
|
225
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
226
|
-
var value = _a.value;
|
227
|
-
return (0, utils_1.toOption)(value);
|
228
|
-
}, { toClassOnly: true }),
|
229
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
230
|
-
var value = _a.value;
|
231
|
-
return (0, utils_1.toUndefined)(value);
|
232
|
-
}, { toPlainOnly: true }),
|
233
|
-
(0, class_transformer_1.Expose)()
|
234
|
-
], GetComments.prototype, "parent_id", void 0);
|
235
212
|
__decorate([
|
236
213
|
(0, class_transformer_1.Transform)(function (_a) {
|
237
214
|
var value = _a.value;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Option } from "@sniptt/monads";
|
2
2
|
import "reflect-metadata";
|
3
|
-
import {
|
4
|
-
import {
|
3
|
+
import { SortType } from "../others";
|
4
|
+
import { CommentView, CommunityModeratorView, PersonMentionView, PersonViewSafe, PostView, PrivateMessageView } from "../views";
|
5
5
|
export declare class Login {
|
6
6
|
username_or_email: string;
|
7
7
|
password: string;
|
@@ -129,7 +129,7 @@ export declare class GetPersonDetailsResponse {
|
|
129
129
|
moderates: CommunityModeratorView[];
|
130
130
|
}
|
131
131
|
export declare class GetRepliesResponse {
|
132
|
-
replies:
|
132
|
+
replies: CommentView[];
|
133
133
|
}
|
134
134
|
export declare class GetPersonMentionsResponse {
|
135
135
|
mentions: PersonMentionView[];
|
@@ -167,7 +167,7 @@ export declare class BanPersonResponse {
|
|
167
167
|
banned: boolean;
|
168
168
|
}
|
169
169
|
export declare class GetReplies {
|
170
|
-
sort: Option<
|
170
|
+
sort: Option<SortType>;
|
171
171
|
page: Option<number>;
|
172
172
|
limit: Option<number>;
|
173
173
|
unread_only: Option<boolean>;
|
@@ -175,7 +175,7 @@ export declare class GetReplies {
|
|
175
175
|
constructor(init: GetReplies);
|
176
176
|
}
|
177
177
|
export declare class GetPersonMentions {
|
178
|
-
sort: Option<
|
178
|
+
sort: Option<SortType>;
|
179
179
|
page: Option<number>;
|
180
180
|
limit: Option<number>;
|
181
181
|
unread_only: Option<boolean>;
|
@@ -191,15 +191,6 @@ export declare class MarkPersonMentionAsRead {
|
|
191
191
|
export declare class PersonMentionResponse {
|
192
192
|
person_mention_view: PersonMentionView;
|
193
193
|
}
|
194
|
-
export declare class MarkCommentReplyAsRead {
|
195
|
-
comment_reply_id: number;
|
196
|
-
read: boolean;
|
197
|
-
auth: string;
|
198
|
-
constructor(init: MarkCommentReplyAsRead);
|
199
|
-
}
|
200
|
-
export declare class CommentReplyResponse {
|
201
|
-
comment_reply_view: CommentReplyView;
|
202
|
-
}
|
203
194
|
/**
|
204
195
|
* Permanently deletes your posts and comments
|
205
196
|
*/
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
7
|
};
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.BannedPersonsResponse = exports.GetBannedPersons = exports.BlockPersonResponse = exports.BlockPerson = exports.VerifyEmailResponse = exports.VerifyEmail = exports.GetUnreadCountResponse = exports.GetUnreadCount = exports.GetReportCountResponse = exports.GetReportCount = exports.PrivateMessageResponse = exports.PrivateMessagesResponse = exports.GetPrivateMessages = exports.MarkPrivateMessageAsRead = exports.DeletePrivateMessage = exports.EditPrivateMessage = exports.CreatePrivateMessage = exports.PasswordChange = exports.PasswordResetResponse = exports.PasswordReset = exports.DeleteAccountResponse = exports.DeleteAccount = exports.
|
9
|
+
exports.BannedPersonsResponse = exports.GetBannedPersons = exports.BlockPersonResponse = exports.BlockPerson = exports.VerifyEmailResponse = exports.VerifyEmail = exports.GetUnreadCountResponse = exports.GetUnreadCount = exports.GetReportCountResponse = exports.GetReportCount = exports.PrivateMessageResponse = exports.PrivateMessagesResponse = exports.GetPrivateMessages = exports.MarkPrivateMessageAsRead = exports.DeletePrivateMessage = exports.EditPrivateMessage = exports.CreatePrivateMessage = exports.PasswordChange = exports.PasswordResetResponse = exports.PasswordReset = exports.DeleteAccountResponse = exports.DeleteAccount = exports.PersonMentionResponse = exports.MarkPersonMentionAsRead = exports.GetPersonMentions = exports.GetReplies = exports.BanPersonResponse = exports.BanPerson = exports.AddAdminResponse = exports.AddAdmin = exports.MarkAllAsRead = exports.GetPersonMentionsResponse = exports.GetRepliesResponse = exports.GetPersonDetailsResponse = exports.GetPersonDetails = exports.LoginResponse = exports.ChangePassword = exports.SaveUserSettings = exports.CaptchaResponse = exports.GetCaptchaResponse = exports.GetCaptcha = exports.Register = exports.Login = void 0;
|
10
10
|
var class_transformer_1 = require("class-transformer");
|
11
11
|
require("reflect-metadata");
|
12
12
|
var utils_1 = require("../../utils");
|
@@ -475,7 +475,7 @@ var GetRepliesResponse = /** @class */ (function () {
|
|
475
475
|
function GetRepliesResponse() {
|
476
476
|
}
|
477
477
|
__decorate([
|
478
|
-
(0, class_transformer_1.Type)(function () { return views_1.
|
478
|
+
(0, class_transformer_1.Type)(function () { return views_1.CommentView; })
|
479
479
|
], GetRepliesResponse.prototype, "replies", void 0);
|
480
480
|
return GetRepliesResponse;
|
481
481
|
}());
|
@@ -679,22 +679,6 @@ var PersonMentionResponse = /** @class */ (function () {
|
|
679
679
|
return PersonMentionResponse;
|
680
680
|
}());
|
681
681
|
exports.PersonMentionResponse = PersonMentionResponse;
|
682
|
-
var MarkCommentReplyAsRead = /** @class */ (function () {
|
683
|
-
function MarkCommentReplyAsRead(init) {
|
684
|
-
Object.assign(this, init);
|
685
|
-
}
|
686
|
-
return MarkCommentReplyAsRead;
|
687
|
-
}());
|
688
|
-
exports.MarkCommentReplyAsRead = MarkCommentReplyAsRead;
|
689
|
-
var CommentReplyResponse = /** @class */ (function () {
|
690
|
-
function CommentReplyResponse() {
|
691
|
-
}
|
692
|
-
__decorate([
|
693
|
-
(0, class_transformer_1.Type)(function () { return views_1.CommentReplyView; })
|
694
|
-
], CommentReplyResponse.prototype, "comment_reply_view", void 0);
|
695
|
-
return CommentReplyResponse;
|
696
|
-
}());
|
697
|
-
exports.CommentReplyResponse = CommentReplyResponse;
|
698
682
|
/**
|
699
683
|
* Permanently deletes your posts and comments
|
700
684
|
*/
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Option } from "@sniptt/monads";
|
2
2
|
import "reflect-metadata";
|
3
3
|
import { ListingType, SiteMetadata, SortType } from "../others";
|
4
|
-
import { CommunityModeratorView, CommunityView, PostReportView, PostView } from "../views";
|
4
|
+
import { CommentView, CommunityModeratorView, CommunityView, PostReportView, PostView } from "../views";
|
5
5
|
export declare class CreatePost {
|
6
6
|
name: string;
|
7
7
|
url: Option<string>;
|
@@ -16,14 +16,14 @@ export declare class PostResponse {
|
|
16
16
|
post_view: PostView;
|
17
17
|
}
|
18
18
|
export declare class GetPost {
|
19
|
-
id:
|
20
|
-
comment_id: Option<number>;
|
19
|
+
id: number;
|
21
20
|
auth: Option<string>;
|
22
21
|
constructor(init: GetPost);
|
23
22
|
}
|
24
23
|
export declare class GetPostResponse {
|
25
24
|
post_view: PostView;
|
26
25
|
community_view: CommunityView;
|
26
|
+
comments: CommentView[];
|
27
27
|
moderators: CommunityModeratorView[];
|
28
28
|
online: number;
|
29
29
|
}
|
@@ -76,28 +76,6 @@ var GetPost = /** @class */ (function () {
|
|
76
76
|
function GetPost(init) {
|
77
77
|
Object.assign(this, init);
|
78
78
|
}
|
79
|
-
__decorate([
|
80
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
81
|
-
var value = _a.value;
|
82
|
-
return (0, utils_1.toOption)(value);
|
83
|
-
}, { toClassOnly: true }),
|
84
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
85
|
-
var value = _a.value;
|
86
|
-
return (0, utils_1.toUndefined)(value);
|
87
|
-
}, { toPlainOnly: true }),
|
88
|
-
(0, class_transformer_1.Expose)()
|
89
|
-
], GetPost.prototype, "id", void 0);
|
90
|
-
__decorate([
|
91
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
92
|
-
var value = _a.value;
|
93
|
-
return (0, utils_1.toOption)(value);
|
94
|
-
}, { toClassOnly: true }),
|
95
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
96
|
-
var value = _a.value;
|
97
|
-
return (0, utils_1.toUndefined)(value);
|
98
|
-
}, { toPlainOnly: true }),
|
99
|
-
(0, class_transformer_1.Expose)()
|
100
|
-
], GetPost.prototype, "comment_id", void 0);
|
101
79
|
__decorate([
|
102
80
|
(0, class_transformer_1.Transform)(function (_a) {
|
103
81
|
var value = _a.value;
|
@@ -121,6 +99,9 @@ var GetPostResponse = /** @class */ (function () {
|
|
121
99
|
__decorate([
|
122
100
|
(0, class_transformer_1.Type)(function () { return views_1.CommunityView; })
|
123
101
|
], GetPostResponse.prototype, "community_view", void 0);
|
102
|
+
__decorate([
|
103
|
+
(0, class_transformer_1.Type)(function () { return views_1.CommentView; })
|
104
|
+
], GetPostResponse.prototype, "comments", void 0);
|
124
105
|
__decorate([
|
125
106
|
(0, class_transformer_1.Type)(function () { return views_1.CommunityModeratorView; })
|
126
107
|
], GetPostResponse.prototype, "moderators", void 0);
|
@@ -16,26 +16,26 @@ export declare enum UserOperation {
|
|
16
16
|
EditComment = 9,
|
17
17
|
DeleteComment = 10,
|
18
18
|
RemoveComment = 11,
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
19
|
+
MarkCommentAsRead = 12,
|
20
|
+
SaveComment = 13,
|
21
|
+
CreateCommentLike = 14,
|
22
|
+
GetPosts = 15,
|
23
|
+
CreatePostLike = 16,
|
24
|
+
EditPost = 17,
|
25
|
+
DeletePost = 18,
|
26
|
+
RemovePost = 19,
|
27
|
+
LockPost = 20,
|
28
|
+
StickyPost = 21,
|
29
|
+
MarkPostAsRead = 22,
|
30
|
+
SavePost = 23,
|
31
|
+
EditCommunity = 24,
|
32
|
+
DeleteCommunity = 25,
|
33
|
+
RemoveCommunity = 26,
|
34
|
+
FollowCommunity = 27,
|
35
|
+
GetPersonDetails = 28,
|
36
|
+
GetReplies = 29,
|
37
|
+
GetPersonMentions = 30,
|
38
|
+
MarkPersonMentionAsRead = 31,
|
39
39
|
GetModlog = 32,
|
40
40
|
BanFromCommunity = 33,
|
41
41
|
AddModToCommunity = 34,
|
@@ -85,25 +85,18 @@ export declare enum UserOperation {
|
|
85
85
|
VerifyEmail = 78
|
86
86
|
}
|
87
87
|
/**
|
88
|
-
* Different
|
88
|
+
* Different sort types used in lemmy.
|
89
89
|
*/
|
90
90
|
export declare enum SortType {
|
91
91
|
/**
|
92
|
-
* Posts sorted by
|
92
|
+
* Posts sorted by the most recent comment.
|
93
93
|
*/
|
94
94
|
Active = "Active",
|
95
|
-
/**
|
96
|
-
* Posts sorted by a decaying rank.
|
97
|
-
*/
|
98
|
-
Hot = "Hot",
|
99
95
|
/**
|
100
96
|
* Posts sorted by the published time.
|
101
97
|
*/
|
98
|
+
Hot = "Hot",
|
102
99
|
New = "New",
|
103
|
-
/**
|
104
|
-
* Posts sorted by the published time ascending
|
105
|
-
*/
|
106
|
-
Old = "Old",
|
107
100
|
/**
|
108
101
|
* The top posts for this last day.
|
109
102
|
*/
|
@@ -133,35 +126,13 @@ export declare enum SortType {
|
|
133
126
|
*/
|
134
127
|
NewComments = "NewComments"
|
135
128
|
}
|
136
|
-
/**
|
137
|
-
* Different comment sort types used in lemmy.
|
138
|
-
*/
|
139
|
-
export declare enum CommentSortType {
|
140
|
-
/**
|
141
|
-
* Comments sorted by a decaying rank.
|
142
|
-
*/
|
143
|
-
Hot = "Hot",
|
144
|
-
/**
|
145
|
-
* Comments sorted by top score.
|
146
|
-
*/
|
147
|
-
Top = "Top",
|
148
|
-
/**
|
149
|
-
* Comments sorted by new.
|
150
|
-
*/
|
151
|
-
New = "New",
|
152
|
-
/**
|
153
|
-
* Comments sorted by old.
|
154
|
-
*/
|
155
|
-
Old = "Old"
|
156
|
-
}
|
157
129
|
/**
|
158
130
|
* The different listing types for post and comment fetches.
|
159
131
|
*/
|
160
132
|
export declare enum ListingType {
|
161
133
|
All = "All",
|
162
134
|
Local = "Local",
|
163
|
-
Subscribed = "Subscribed"
|
164
|
-
Community = "Community"
|
135
|
+
Subscribed = "Subscribed"
|
165
136
|
}
|
166
137
|
/**
|
167
138
|
* Search types for lemmy's search.
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
7
|
};
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.SiteMetadata = exports.SubscribedType = exports.SearchType = exports.ListingType = exports.
|
9
|
+
exports.SiteMetadata = exports.SubscribedType = exports.SearchType = exports.ListingType = exports.SortType = exports.UserOperation = exports.VERSION = void 0;
|
10
10
|
var class_transformer_1 = require("class-transformer");
|
11
11
|
var utils_1 = require("../utils");
|
12
12
|
exports.VERSION = "v3";
|
@@ -27,26 +27,26 @@ var UserOperation;
|
|
27
27
|
UserOperation[UserOperation["EditComment"] = 9] = "EditComment";
|
28
28
|
UserOperation[UserOperation["DeleteComment"] = 10] = "DeleteComment";
|
29
29
|
UserOperation[UserOperation["RemoveComment"] = 11] = "RemoveComment";
|
30
|
-
UserOperation[UserOperation["
|
31
|
-
UserOperation[UserOperation["
|
32
|
-
UserOperation[UserOperation["
|
33
|
-
UserOperation[UserOperation["
|
34
|
-
UserOperation[UserOperation["
|
35
|
-
UserOperation[UserOperation["
|
36
|
-
UserOperation[UserOperation["
|
37
|
-
UserOperation[UserOperation["
|
38
|
-
UserOperation[UserOperation["
|
39
|
-
UserOperation[UserOperation["
|
40
|
-
UserOperation[UserOperation["
|
41
|
-
UserOperation[UserOperation["
|
42
|
-
UserOperation[UserOperation["
|
43
|
-
UserOperation[UserOperation["
|
44
|
-
UserOperation[UserOperation["
|
45
|
-
UserOperation[UserOperation["
|
46
|
-
UserOperation[UserOperation["
|
47
|
-
UserOperation[UserOperation["
|
48
|
-
UserOperation[UserOperation["
|
49
|
-
UserOperation[UserOperation["
|
30
|
+
UserOperation[UserOperation["MarkCommentAsRead"] = 12] = "MarkCommentAsRead";
|
31
|
+
UserOperation[UserOperation["SaveComment"] = 13] = "SaveComment";
|
32
|
+
UserOperation[UserOperation["CreateCommentLike"] = 14] = "CreateCommentLike";
|
33
|
+
UserOperation[UserOperation["GetPosts"] = 15] = "GetPosts";
|
34
|
+
UserOperation[UserOperation["CreatePostLike"] = 16] = "CreatePostLike";
|
35
|
+
UserOperation[UserOperation["EditPost"] = 17] = "EditPost";
|
36
|
+
UserOperation[UserOperation["DeletePost"] = 18] = "DeletePost";
|
37
|
+
UserOperation[UserOperation["RemovePost"] = 19] = "RemovePost";
|
38
|
+
UserOperation[UserOperation["LockPost"] = 20] = "LockPost";
|
39
|
+
UserOperation[UserOperation["StickyPost"] = 21] = "StickyPost";
|
40
|
+
UserOperation[UserOperation["MarkPostAsRead"] = 22] = "MarkPostAsRead";
|
41
|
+
UserOperation[UserOperation["SavePost"] = 23] = "SavePost";
|
42
|
+
UserOperation[UserOperation["EditCommunity"] = 24] = "EditCommunity";
|
43
|
+
UserOperation[UserOperation["DeleteCommunity"] = 25] = "DeleteCommunity";
|
44
|
+
UserOperation[UserOperation["RemoveCommunity"] = 26] = "RemoveCommunity";
|
45
|
+
UserOperation[UserOperation["FollowCommunity"] = 27] = "FollowCommunity";
|
46
|
+
UserOperation[UserOperation["GetPersonDetails"] = 28] = "GetPersonDetails";
|
47
|
+
UserOperation[UserOperation["GetReplies"] = 29] = "GetReplies";
|
48
|
+
UserOperation[UserOperation["GetPersonMentions"] = 30] = "GetPersonMentions";
|
49
|
+
UserOperation[UserOperation["MarkPersonMentionAsRead"] = 31] = "MarkPersonMentionAsRead";
|
50
50
|
UserOperation[UserOperation["GetModlog"] = 32] = "GetModlog";
|
51
51
|
UserOperation[UserOperation["BanFromCommunity"] = 33] = "BanFromCommunity";
|
52
52
|
UserOperation[UserOperation["AddModToCommunity"] = 34] = "AddModToCommunity";
|
@@ -96,26 +96,19 @@ var UserOperation;
|
|
96
96
|
UserOperation[UserOperation["VerifyEmail"] = 78] = "VerifyEmail";
|
97
97
|
})(UserOperation = exports.UserOperation || (exports.UserOperation = {}));
|
98
98
|
/**
|
99
|
-
* Different
|
99
|
+
* Different sort types used in lemmy.
|
100
100
|
*/
|
101
101
|
var SortType;
|
102
102
|
(function (SortType) {
|
103
103
|
/**
|
104
|
-
* Posts sorted by
|
104
|
+
* Posts sorted by the most recent comment.
|
105
105
|
*/
|
106
106
|
SortType["Active"] = "Active";
|
107
|
-
/**
|
108
|
-
* Posts sorted by a decaying rank.
|
109
|
-
*/
|
110
|
-
SortType["Hot"] = "Hot";
|
111
107
|
/**
|
112
108
|
* Posts sorted by the published time.
|
113
109
|
*/
|
110
|
+
SortType["Hot"] = "Hot";
|
114
111
|
SortType["New"] = "New";
|
115
|
-
/**
|
116
|
-
* Posts sorted by the published time ascending
|
117
|
-
*/
|
118
|
-
SortType["Old"] = "Old";
|
119
112
|
/**
|
120
113
|
* The top posts for this last day.
|
121
114
|
*/
|
@@ -145,28 +138,6 @@ var SortType;
|
|
145
138
|
*/
|
146
139
|
SortType["NewComments"] = "NewComments";
|
147
140
|
})(SortType = exports.SortType || (exports.SortType = {}));
|
148
|
-
/**
|
149
|
-
* Different comment sort types used in lemmy.
|
150
|
-
*/
|
151
|
-
var CommentSortType;
|
152
|
-
(function (CommentSortType) {
|
153
|
-
/**
|
154
|
-
* Comments sorted by a decaying rank.
|
155
|
-
*/
|
156
|
-
CommentSortType["Hot"] = "Hot";
|
157
|
-
/**
|
158
|
-
* Comments sorted by top score.
|
159
|
-
*/
|
160
|
-
CommentSortType["Top"] = "Top";
|
161
|
-
/**
|
162
|
-
* Comments sorted by new.
|
163
|
-
*/
|
164
|
-
CommentSortType["New"] = "New";
|
165
|
-
/**
|
166
|
-
* Comments sorted by old.
|
167
|
-
*/
|
168
|
-
CommentSortType["Old"] = "Old";
|
169
|
-
})(CommentSortType = exports.CommentSortType || (exports.CommentSortType = {}));
|
170
141
|
/**
|
171
142
|
* The different listing types for post and comment fetches.
|
172
143
|
*/
|
@@ -175,7 +146,6 @@ var ListingType;
|
|
175
146
|
ListingType["All"] = "All";
|
176
147
|
ListingType["Local"] = "Local";
|
177
148
|
ListingType["Subscribed"] = "Subscribed";
|
178
|
-
ListingType["Community"] = "Community";
|
179
149
|
})(ListingType = exports.ListingType || (exports.ListingType = {}));
|
180
150
|
/**
|
181
151
|
* Search types for lemmy's search.
|
@@ -252,14 +252,15 @@ export declare class Comment {
|
|
252
252
|
id: number;
|
253
253
|
creator_id: number;
|
254
254
|
post_id: number;
|
255
|
+
parent_id: Option<number>;
|
255
256
|
content: string;
|
256
257
|
removed: boolean;
|
258
|
+
read: boolean;
|
257
259
|
published: string;
|
258
260
|
updated: Option<string>;
|
259
261
|
deleted: boolean;
|
260
262
|
ap_id: string;
|
261
263
|
local: boolean;
|
262
|
-
path: string;
|
263
264
|
}
|
264
265
|
export declare class PersonMention {
|
265
266
|
id: number;
|
@@ -268,13 +269,6 @@ export declare class PersonMention {
|
|
268
269
|
read: boolean;
|
269
270
|
published: string;
|
270
271
|
}
|
271
|
-
export declare class CommentReply {
|
272
|
-
id: number;
|
273
|
-
recipient_id: number;
|
274
|
-
comment_id: number;
|
275
|
-
read: boolean;
|
276
|
-
published: string;
|
277
|
-
}
|
278
272
|
export declare class RegistrationApplication {
|
279
273
|
id: number;
|
280
274
|
local_user_id: number;
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
7
|
};
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.RegistrationApplication = exports.
|
9
|
+
exports.RegistrationApplication = exports.PersonMention = exports.Comment = exports.CommentReport = exports.CommunitySafe = exports.AdminPurgeComment = exports.AdminPurgePost = exports.AdminPurgeCommunity = exports.AdminPurgePerson = exports.ModAdd = exports.ModTransferCommunity = exports.ModAddCommunity = exports.ModBan = exports.ModBanFromCommunity = exports.ModRemoveCommunity = exports.ModRemoveComment = exports.ModStickyPost = exports.ModLockPost = exports.ModRemovePost = exports.PasswordResetRequest = exports.Post = exports.PostReport = exports.PrivateMessage = exports.Site = exports.PersonSafe = exports.LocalUserSettings = void 0;
|
10
10
|
var class_transformer_1 = require("class-transformer");
|
11
11
|
var utils_1 = require("../utils");
|
12
12
|
var LocalUserSettings = /** @class */ (function () {
|
@@ -755,6 +755,17 @@ exports.CommentReport = CommentReport;
|
|
755
755
|
var Comment = /** @class */ (function () {
|
756
756
|
function Comment() {
|
757
757
|
}
|
758
|
+
__decorate([
|
759
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
760
|
+
var value = _a.value;
|
761
|
+
return (0, utils_1.toOption)(value);
|
762
|
+
}, { toClassOnly: true }),
|
763
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
764
|
+
var value = _a.value;
|
765
|
+
return (0, utils_1.toUndefined)(value);
|
766
|
+
}, { toPlainOnly: true }),
|
767
|
+
(0, class_transformer_1.Expose)()
|
768
|
+
], Comment.prototype, "parent_id", void 0);
|
758
769
|
__decorate([
|
759
770
|
(0, class_transformer_1.Transform)(function (_a) {
|
760
771
|
var value = _a.value;
|
@@ -775,12 +786,6 @@ var PersonMention = /** @class */ (function () {
|
|
775
786
|
return PersonMention;
|
776
787
|
}());
|
777
788
|
exports.PersonMention = PersonMention;
|
778
|
-
var CommentReply = /** @class */ (function () {
|
779
|
-
function CommentReply() {
|
780
|
-
}
|
781
|
-
return CommentReply;
|
782
|
-
}());
|
783
|
-
exports.CommentReply = CommentReply;
|
784
789
|
var RegistrationApplication = /** @class */ (function () {
|
785
790
|
function RegistrationApplication() {
|
786
791
|
}
|
@@ -2,7 +2,7 @@ import { Option } from "@sniptt/monads";
|
|
2
2
|
import "reflect-metadata";
|
3
3
|
import { CommentAggregates, CommunityAggregates, PersonAggregates, PostAggregates, SiteAggregates } from "./aggregates";
|
4
4
|
import { SubscribedType } from "./others";
|
5
|
-
import { AdminPurgeComment, AdminPurgeCommunity, AdminPurgePerson, AdminPurgePost, Comment,
|
5
|
+
import { AdminPurgeComment, AdminPurgeCommunity, AdminPurgePerson, AdminPurgePost, Comment, CommentReport, CommunitySafe, LocalUserSettings, ModAdd, ModAddCommunity, ModBan, ModBanFromCommunity, ModLockPost, ModRemoveComment, ModRemoveCommunity, ModRemovePost, ModStickyPost, ModTransferCommunity, PersonMention, PersonSafe, Post, PostReport, PrivateMessage, RegistrationApplication, Site } from "./source";
|
6
6
|
export declare class PersonViewSafe {
|
7
7
|
person: PersonSafe;
|
8
8
|
counts: PersonAggregates;
|
@@ -61,6 +61,7 @@ export declare class PostReportView {
|
|
61
61
|
export declare class CommentView {
|
62
62
|
comment: Comment;
|
63
63
|
creator: PersonSafe;
|
64
|
+
recipient: Option<PersonSafe>;
|
64
65
|
post: Post;
|
65
66
|
community: CommunitySafe;
|
66
67
|
counts: CommentAggregates;
|
@@ -70,20 +71,6 @@ export declare class CommentView {
|
|
70
71
|
creator_blocked: boolean;
|
71
72
|
my_vote: Option<number>;
|
72
73
|
}
|
73
|
-
export declare class CommentReplyView {
|
74
|
-
comment_reply: CommentReply;
|
75
|
-
comment: Comment;
|
76
|
-
creator: PersonSafe;
|
77
|
-
post: Post;
|
78
|
-
community: CommunitySafe;
|
79
|
-
recipient: PersonSafe;
|
80
|
-
counts: CommentAggregates;
|
81
|
-
creator_banned_from_community: boolean;
|
82
|
-
subscribed: SubscribedType;
|
83
|
-
saved: boolean;
|
84
|
-
creator_blocked: boolean;
|
85
|
-
my_vote: Option<number>;
|
86
|
-
}
|
87
74
|
export declare class CommentReportView {
|
88
75
|
comment_report: CommentReport;
|
89
76
|
comment: Comment;
|
@@ -205,8 +192,3 @@ export declare class RegistrationApplicationView {
|
|
205
192
|
creator: PersonSafe;
|
206
193
|
admin: Option<PersonSafe>;
|
207
194
|
}
|
208
|
-
export interface CommentNode {
|
209
|
-
comment_view: CommentView | PersonMentionView | CommentReplyView;
|
210
|
-
children: CommentNode[];
|
211
|
-
depth: number;
|
212
|
-
}
|
package/dist/interfaces/views.js
CHANGED
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
7
|
};
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.RegistrationApplicationView = exports.CommunityView = exports.PersonBlockView = exports.CommunityPersonBanView = exports.CommunityModeratorView = exports.CommunityBlockView = exports.CommunityFollowerView = exports.AdminPurgeCommentView = exports.AdminPurgePostView = exports.AdminPurgePersonView = exports.AdminPurgeCommunityView = exports.ModStickyPostView = exports.ModRemovePostView = exports.ModRemoveCommunityView = exports.ModRemoveCommentView = exports.ModLockPostView = exports.ModBanView = exports.ModBanFromCommunityView = exports.ModAddView = exports.ModTransferCommunityView = exports.ModAddCommunityView = exports.CommentReportView = exports.
|
9
|
+
exports.RegistrationApplicationView = exports.CommunityView = exports.PersonBlockView = exports.CommunityPersonBanView = exports.CommunityModeratorView = exports.CommunityBlockView = exports.CommunityFollowerView = exports.AdminPurgeCommentView = exports.AdminPurgePostView = exports.AdminPurgePersonView = exports.AdminPurgeCommunityView = exports.ModStickyPostView = exports.ModRemovePostView = exports.ModRemoveCommunityView = exports.ModRemoveCommentView = exports.ModLockPostView = exports.ModBanView = exports.ModBanFromCommunityView = exports.ModAddView = exports.ModTransferCommunityView = exports.ModAddCommunityView = exports.CommentReportView = exports.CommentView = exports.PostReportView = exports.PostView = exports.PrivateMessageView = exports.SiteView = exports.LocalUserSettingsView = exports.PersonMentionView = exports.PersonViewSafe = void 0;
|
10
10
|
var class_transformer_1 = require("class-transformer");
|
11
11
|
require("reflect-metadata");
|
12
12
|
var utils_1 = require("../utils");
|
@@ -170,12 +170,6 @@ var CommentView = /** @class */ (function () {
|
|
170
170
|
__decorate([
|
171
171
|
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
172
172
|
], CommentView.prototype, "creator", void 0);
|
173
|
-
__decorate([
|
174
|
-
(0, class_transformer_1.Type)(function () { return source_1.Post; })
|
175
|
-
], CommentView.prototype, "post", void 0);
|
176
|
-
__decorate([
|
177
|
-
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
178
|
-
], CommentView.prototype, "community", void 0);
|
179
173
|
__decorate([
|
180
174
|
(0, class_transformer_1.Transform)(function (_a) {
|
181
175
|
var value = _a.value;
|
@@ -185,32 +179,15 @@ var CommentView = /** @class */ (function () {
|
|
185
179
|
var value = _a.value;
|
186
180
|
return (0, utils_1.toUndefined)(value);
|
187
181
|
}, { toPlainOnly: true }),
|
188
|
-
(0, class_transformer_1.Expose)()
|
189
|
-
], CommentView.prototype, "my_vote", void 0);
|
190
|
-
return CommentView;
|
191
|
-
}());
|
192
|
-
exports.CommentView = CommentView;
|
193
|
-
var CommentReplyView = /** @class */ (function () {
|
194
|
-
function CommentReplyView() {
|
195
|
-
}
|
196
|
-
__decorate([
|
197
|
-
(0, class_transformer_1.Type)(function () { return source_1.CommentReply; })
|
198
|
-
], CommentReplyView.prototype, "comment_reply", void 0);
|
199
|
-
__decorate([
|
200
|
-
(0, class_transformer_1.Type)(function () { return source_1.Comment; })
|
201
|
-
], CommentReplyView.prototype, "comment", void 0);
|
202
|
-
__decorate([
|
182
|
+
(0, class_transformer_1.Expose)(),
|
203
183
|
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
204
|
-
],
|
184
|
+
], CommentView.prototype, "recipient", void 0);
|
205
185
|
__decorate([
|
206
186
|
(0, class_transformer_1.Type)(function () { return source_1.Post; })
|
207
|
-
],
|
187
|
+
], CommentView.prototype, "post", void 0);
|
208
188
|
__decorate([
|
209
189
|
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
210
|
-
],
|
211
|
-
__decorate([
|
212
|
-
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
213
|
-
], CommentReplyView.prototype, "recipient", void 0);
|
190
|
+
], CommentView.prototype, "community", void 0);
|
214
191
|
__decorate([
|
215
192
|
(0, class_transformer_1.Transform)(function (_a) {
|
216
193
|
var value = _a.value;
|
@@ -221,10 +198,10 @@ var CommentReplyView = /** @class */ (function () {
|
|
221
198
|
return (0, utils_1.toUndefined)(value);
|
222
199
|
}, { toPlainOnly: true }),
|
223
200
|
(0, class_transformer_1.Expose)()
|
224
|
-
],
|
225
|
-
return
|
201
|
+
], CommentView.prototype, "my_vote", void 0);
|
202
|
+
return CommentView;
|
226
203
|
}());
|
227
|
-
exports.
|
204
|
+
exports.CommentView = CommentView;
|
228
205
|
var CommentReportView = /** @class */ (function () {
|
229
206
|
function CommentReportView() {
|
230
207
|
}
|
package/dist/websocket.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ClassConstructor } from "class-transformer";
|
2
|
-
import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
2
|
+
import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
3
3
|
import { AddModToCommunity, BanFromCommunity, BlockCommunity, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, ListCommunities, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
|
4
|
-
import { AddAdmin, BanPerson, BlockPerson, ChangePassword, CreatePrivateMessage, DeleteAccount, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, GetPersonDetails, GetPersonMentions, GetPrivateMessages, GetReplies, GetReportCount, GetUnreadCount, Login, MarkAllAsRead,
|
4
|
+
import { AddAdmin, BanPerson, BlockPerson, ChangePassword, CreatePrivateMessage, DeleteAccount, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, GetPersonDetails, GetPersonMentions, GetPrivateMessages, GetReplies, GetReportCount, GetUnreadCount, Login, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, Register, SaveUserSettings, VerifyEmail } from "./interfaces/api/person";
|
5
5
|
import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPosts, GetSiteMetadata, ListPostReports, LockPost, MarkPostAsRead, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
|
6
6
|
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetSite, GetUnreadRegistrationApplicationCount, LeaveAdmin, ListRegistrationApplications, PurgeComment, PurgeCommunity, PurgePerson, PurgePost, ResolveObject, Search } from "./interfaces/api/site";
|
7
7
|
import { CommunityJoin, PostJoin, UserJoin } from "./interfaces/api/websocket";
|
@@ -102,7 +102,7 @@ export declare class LemmyWebsocket {
|
|
102
102
|
/**
|
103
103
|
* Mark a comment as read.
|
104
104
|
*/
|
105
|
-
|
105
|
+
markCommentAsRead(form: MarkCommentAsRead): string;
|
106
106
|
/**
|
107
107
|
* Like / vote on a comment.
|
108
108
|
*/
|
package/dist/websocket.js
CHANGED
@@ -138,8 +138,8 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
138
138
|
/**
|
139
139
|
* Mark a comment as read.
|
140
140
|
*/
|
141
|
-
LemmyWebsocket.prototype.
|
142
|
-
return wrapper(others_1.UserOperation.
|
141
|
+
LemmyWebsocket.prototype.markCommentAsRead = function (form) {
|
142
|
+
return wrapper(others_1.UserOperation.MarkCommentAsRead, form);
|
143
143
|
};
|
144
144
|
/**
|
145
145
|
* Like / vote on a comment.
|
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.17.0-rc.
|
4
|
+
"version": "0.17.0-rc.38",
|
5
5
|
"author": "Dessalines <tyhou13@gmx.com>",
|
6
6
|
"license": "AGPL-3.0",
|
7
7
|
"main": "./dist/index.js",
|
@@ -19,23 +19,23 @@
|
|
19
19
|
"@sniptt/monads": "^0.5.10",
|
20
20
|
"@types/node": "^17.0.33",
|
21
21
|
"@types/node-fetch": "^3.0.3",
|
22
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
23
|
-
"@typescript-eslint/parser": "^5.
|
22
|
+
"@typescript-eslint/eslint-plugin": "^5.23.0",
|
23
|
+
"@typescript-eslint/parser": "^5.23.0",
|
24
24
|
"class-transformer": "^0.5.1",
|
25
|
-
"eslint": "^8.
|
26
|
-
"eslint-plugin-prettier": "^4.
|
25
|
+
"eslint": "^8.15.0",
|
26
|
+
"eslint-plugin-prettier": "^4.0.0",
|
27
27
|
"husky": "^8.0.1",
|
28
28
|
"lint-staged": "^12.4.1",
|
29
|
-
"node-fetch": "^3.2.
|
30
|
-
"prettier": "^2.
|
29
|
+
"node-fetch": "^3.2.4",
|
30
|
+
"prettier": "^2.6.2",
|
31
31
|
"prettier-plugin-import-sort": "^0.0.7",
|
32
|
-
"prettier-plugin-organize-imports": "^3.
|
32
|
+
"prettier-plugin-organize-imports": "^2.3.4",
|
33
33
|
"prettier-plugin-packagejson": "^2.2.18",
|
34
34
|
"reflect-metadata": "^0.1.13",
|
35
|
-
"sortpack": "^2.
|
35
|
+
"sortpack": "^2.2.0",
|
36
36
|
"typedoc": "^0.21.6",
|
37
37
|
"typedoc-plugin-sourcefile-url": "^1.0.6",
|
38
|
-
"typescript": "^4.
|
38
|
+
"typescript": "^4.6.4"
|
39
39
|
},
|
40
40
|
"types": "./dist/index.d.ts",
|
41
41
|
"lint-staged": {
|