lemmy-js-client 0.17.0-rc.31 → 0.17.0-rc.35
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +28 -16
- package/dist/http.js +49 -25
- package/dist/interfaces/aggregates.d.ts +1 -0
- package/dist/interfaces/api/comment.d.ts +5 -11
- package/dist/interfaces/api/comment.js +34 -11
- package/dist/interfaces/api/person.d.ts +14 -5
- package/dist/interfaces/api/person.js +18 -2
- package/dist/interfaces/api/post.d.ts +3 -3
- package/dist/interfaces/api/post.js +22 -3
- package/dist/interfaces/api/site.d.ts +32 -13
- package/dist/interfaces/api/site.js +91 -21
- package/dist/interfaces/others.d.ts +76 -40
- package/dist/interfaces/others.js +72 -41
- package/dist/interfaces/source.d.ts +34 -2
- package/dist/interfaces/source.js +75 -12
- package/dist/interfaces/views.d.ts +33 -2
- package/dist/interfaces/views.js +85 -8
- package/dist/websocket.d.ts +20 -12
- package/dist/websocket.js +26 -14
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, GetCommentsResponse, ListCommentReports, ListCommentReportsResponse,
|
1
|
+
import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, GetCommentsResponse, ListCommentReports, ListCommentReportsResponse, 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, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, PasswordResetResponse, PersonMentionResponse, PrivateMessageResponse, PrivateMessagesResponse, Register, SaveUserSettings, VerifyEmail, VerifyEmailResponse } from "./interfaces/api/person";
|
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, MarkCommentReplyAsRead, 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
|
-
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetModlogResponse, GetSite,
|
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
|
/**
|
7
7
|
* Helps build lemmy HTTP requests.
|
8
8
|
*/
|
@@ -41,18 +41,6 @@ export declare class LemmyHttp {
|
|
41
41
|
* `HTTP.POST /user/leave_admin`
|
42
42
|
*/
|
43
43
|
leaveAdmin(form: LeaveAdmin): Promise<GetSiteResponse>;
|
44
|
-
/**
|
45
|
-
* Get your site configuration.
|
46
|
-
*
|
47
|
-
* `HTTP.GET /site/config`
|
48
|
-
*/
|
49
|
-
getSiteConfig(form: GetSiteConfig): Promise<GetSiteConfigResponse>;
|
50
|
-
/**
|
51
|
-
* Save your site config.
|
52
|
-
*
|
53
|
-
* `HTTP.PUT /site/config`
|
54
|
-
*/
|
55
|
-
saveSiteConfig(form: SaveSiteConfig): Promise<GetSiteConfigResponse>;
|
56
44
|
/**
|
57
45
|
* Get the modlog.
|
58
46
|
*
|
@@ -256,7 +244,7 @@ export declare class LemmyHttp {
|
|
256
244
|
*
|
257
245
|
* `HTTP.POST /comment/mark_as_read`
|
258
246
|
*/
|
259
|
-
|
247
|
+
markCommentReplyAsRead(form: MarkCommentReplyAsRead): Promise<CommentResponse>;
|
260
248
|
/**
|
261
249
|
* Like / vote on a comment.
|
262
250
|
*
|
@@ -461,6 +449,30 @@ export declare class LemmyHttp {
|
|
461
449
|
* `HTTP.PUT /admin/registration_application/approve`
|
462
450
|
*/
|
463
451
|
approveRegistrationApplication(form: ApproveRegistrationApplication): Promise<RegistrationApplicationResponse>;
|
452
|
+
/**
|
453
|
+
* Purge / Delete a person from the database.
|
454
|
+
*
|
455
|
+
* `HTTP.POST /admin/purge/person`
|
456
|
+
*/
|
457
|
+
purgePerson(form: PurgePerson): Promise<PurgeItemResponse>;
|
458
|
+
/**
|
459
|
+
* Purge / Delete a community from the database.
|
460
|
+
*
|
461
|
+
* `HTTP.POST /admin/purge/community`
|
462
|
+
*/
|
463
|
+
purgeCommunity(form: PurgeCommunity): Promise<PurgeItemResponse>;
|
464
|
+
/**
|
465
|
+
* Purge / Delete a post from the database.
|
466
|
+
*
|
467
|
+
* `HTTP.POST /admin/purge/post`
|
468
|
+
*/
|
469
|
+
purgePost(form: PurgePost): Promise<PurgeItemResponse>;
|
470
|
+
/**
|
471
|
+
* Purge / Delete a comment from the database.
|
472
|
+
*
|
473
|
+
* `HTTP.POST /admin/purge/comment`
|
474
|
+
*/
|
475
|
+
purgeComment(form: PurgeComment): Promise<PurgeItemResponse>;
|
464
476
|
private buildFullUrl;
|
465
477
|
private wrapper;
|
466
478
|
}
|
package/dist/http.js
CHANGED
@@ -126,30 +126,6 @@ var LemmyHttp = /** @class */ (function () {
|
|
126
126
|
});
|
127
127
|
});
|
128
128
|
};
|
129
|
-
/**
|
130
|
-
* Get your site configuration.
|
131
|
-
*
|
132
|
-
* `HTTP.GET /site/config`
|
133
|
-
*/
|
134
|
-
LemmyHttp.prototype.getSiteConfig = function (form) {
|
135
|
-
return __awaiter(this, void 0, void 0, function () {
|
136
|
-
return __generator(this, function (_a) {
|
137
|
-
return [2 /*return*/, this.wrapper(HttpType.Get, "/site/config", form, site_1.GetSiteConfigResponse)];
|
138
|
-
});
|
139
|
-
});
|
140
|
-
};
|
141
|
-
/**
|
142
|
-
* Save your site config.
|
143
|
-
*
|
144
|
-
* `HTTP.PUT /site/config`
|
145
|
-
*/
|
146
|
-
LemmyHttp.prototype.saveSiteConfig = function (form) {
|
147
|
-
return __awaiter(this, void 0, void 0, function () {
|
148
|
-
return __generator(this, function (_a) {
|
149
|
-
return [2 /*return*/, this.wrapper(HttpType.Put, "/site/config", form, site_1.GetSiteConfigResponse)];
|
150
|
-
});
|
151
|
-
});
|
152
|
-
};
|
153
129
|
/**
|
154
130
|
* Get the modlog.
|
155
131
|
*
|
@@ -551,7 +527,7 @@ var LemmyHttp = /** @class */ (function () {
|
|
551
527
|
*
|
552
528
|
* `HTTP.POST /comment/mark_as_read`
|
553
529
|
*/
|
554
|
-
LemmyHttp.prototype.
|
530
|
+
LemmyHttp.prototype.markCommentReplyAsRead = function (form) {
|
555
531
|
return __awaiter(this, void 0, void 0, function () {
|
556
532
|
return __generator(this, function (_a) {
|
557
533
|
return [2 /*return*/, this.wrapper(HttpType.Post, "/comment/mark_as_read", form, comment_1.CommentResponse)];
|
@@ -966,6 +942,54 @@ var LemmyHttp = /** @class */ (function () {
|
|
966
942
|
});
|
967
943
|
});
|
968
944
|
};
|
945
|
+
/**
|
946
|
+
* Purge / Delete a person from the database.
|
947
|
+
*
|
948
|
+
* `HTTP.POST /admin/purge/person`
|
949
|
+
*/
|
950
|
+
LemmyHttp.prototype.purgePerson = function (form) {
|
951
|
+
return __awaiter(this, void 0, void 0, function () {
|
952
|
+
return __generator(this, function (_a) {
|
953
|
+
return [2 /*return*/, this.wrapper(HttpType.Post, "/admin/purge/person", form, site_1.PurgeItemResponse)];
|
954
|
+
});
|
955
|
+
});
|
956
|
+
};
|
957
|
+
/**
|
958
|
+
* Purge / Delete a community from the database.
|
959
|
+
*
|
960
|
+
* `HTTP.POST /admin/purge/community`
|
961
|
+
*/
|
962
|
+
LemmyHttp.prototype.purgeCommunity = function (form) {
|
963
|
+
return __awaiter(this, void 0, void 0, function () {
|
964
|
+
return __generator(this, function (_a) {
|
965
|
+
return [2 /*return*/, this.wrapper(HttpType.Post, "/admin/purge/community", form, site_1.PurgeItemResponse)];
|
966
|
+
});
|
967
|
+
});
|
968
|
+
};
|
969
|
+
/**
|
970
|
+
* Purge / Delete a post from the database.
|
971
|
+
*
|
972
|
+
* `HTTP.POST /admin/purge/post`
|
973
|
+
*/
|
974
|
+
LemmyHttp.prototype.purgePost = function (form) {
|
975
|
+
return __awaiter(this, void 0, void 0, function () {
|
976
|
+
return __generator(this, function (_a) {
|
977
|
+
return [2 /*return*/, this.wrapper(HttpType.Post, "/admin/purge/post", form, site_1.PurgeItemResponse)];
|
978
|
+
});
|
979
|
+
});
|
980
|
+
};
|
981
|
+
/**
|
982
|
+
* Purge / Delete a comment from the database.
|
983
|
+
*
|
984
|
+
* `HTTP.POST /admin/purge/comment`
|
985
|
+
*/
|
986
|
+
LemmyHttp.prototype.purgeComment = function (form) {
|
987
|
+
return __awaiter(this, void 0, void 0, function () {
|
988
|
+
return __generator(this, function (_a) {
|
989
|
+
return [2 /*return*/, this.wrapper(HttpType.Post, "/admin/purge/comment", form, site_1.PurgeItemResponse)];
|
990
|
+
});
|
991
|
+
});
|
992
|
+
};
|
969
993
|
LemmyHttp.prototype.buildFullUrl = function (endpoint) {
|
970
994
|
return "".concat(this.apiUrl).concat(endpoint);
|
971
995
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Option } from "@sniptt/monads";
|
2
2
|
import "reflect-metadata";
|
3
|
-
import {
|
3
|
+
import { CommentSortType, ListingType } from "../others";
|
4
4
|
import { CommentReportView, CommentView } from "../views";
|
5
5
|
export declare class CreateComment {
|
6
6
|
content: string;
|
@@ -42,15 +42,6 @@ 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
|
-
}
|
54
45
|
export declare class SaveComment {
|
55
46
|
comment_id: number;
|
56
47
|
save: boolean;
|
@@ -79,11 +70,14 @@ export declare class CreateCommentLike {
|
|
79
70
|
*/
|
80
71
|
export declare class GetComments {
|
81
72
|
type_: Option<ListingType>;
|
82
|
-
sort: Option<
|
73
|
+
sort: Option<CommentSortType>;
|
74
|
+
max_depth: Option<number>;
|
83
75
|
page: Option<number>;
|
84
76
|
limit: Option<number>;
|
85
77
|
community_id: Option<number>;
|
86
78
|
community_name: Option<string>;
|
79
|
+
post_id: Option<number>;
|
80
|
+
parent_id: Option<number>;
|
87
81
|
saved_only: Option<boolean>;
|
88
82
|
auth: Option<string>;
|
89
83
|
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.
|
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;
|
10
10
|
var class_transformer_1 = require("class-transformer");
|
11
11
|
require("reflect-metadata");
|
12
12
|
var utils_1 = require("../../utils");
|
@@ -89,16 +89,6 @@ 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;
|
102
92
|
var SaveComment = /** @class */ (function () {
|
103
93
|
function SaveComment(init) {
|
104
94
|
Object.assign(this, init);
|
@@ -165,6 +155,17 @@ var GetComments = /** @class */ (function () {
|
|
165
155
|
}, { toPlainOnly: true }),
|
166
156
|
(0, class_transformer_1.Expose)()
|
167
157
|
], 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);
|
168
169
|
__decorate([
|
169
170
|
(0, class_transformer_1.Transform)(function (_a) {
|
170
171
|
var value = _a.value;
|
@@ -209,6 +210,28 @@ var GetComments = /** @class */ (function () {
|
|
209
210
|
}, { toPlainOnly: true }),
|
210
211
|
(0, class_transformer_1.Expose)()
|
211
212
|
], 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);
|
212
235
|
__decorate([
|
213
236
|
(0, class_transformer_1.Transform)(function (_a) {
|
214
237
|
var value = _a.value;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Option } from "@sniptt/monads";
|
2
2
|
import "reflect-metadata";
|
3
|
-
import { SortType } from "../others";
|
4
|
-
import { CommentView, CommunityModeratorView, PersonMentionView, PersonViewSafe, PostView, PrivateMessageView } from "../views";
|
3
|
+
import { CommentSortType, SortType } from "../others";
|
4
|
+
import { CommentReplyView, 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: CommentReplyView[];
|
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<CommentSortType>;
|
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<CommentSortType>;
|
179
179
|
page: Option<number>;
|
180
180
|
limit: Option<number>;
|
181
181
|
unread_only: Option<boolean>;
|
@@ -191,6 +191,15 @@ 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
|
+
}
|
194
203
|
/**
|
195
204
|
* Permanently deletes your posts and comments
|
196
205
|
*/
|
@@ -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.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;
|
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.CommentReplyResponse = exports.MarkCommentReplyAsRead = 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.CommentReplyView; })
|
479
479
|
], GetRepliesResponse.prototype, "replies", void 0);
|
480
480
|
return GetRepliesResponse;
|
481
481
|
}());
|
@@ -679,6 +679,22 @@ 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;
|
682
698
|
/**
|
683
699
|
* Permanently deletes your posts and comments
|
684
700
|
*/
|
@@ -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 {
|
4
|
+
import { 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: number
|
19
|
+
id: Option<number>;
|
20
|
+
comment_id: Option<number>;
|
20
21
|
auth: Option<string>;
|
21
22
|
constructor(init: GetPost);
|
22
23
|
}
|
23
24
|
export declare class GetPostResponse {
|
24
25
|
post_view: PostView;
|
25
26
|
community_view: CommunityView;
|
26
|
-
comments: CommentView[];
|
27
27
|
moderators: CommunityModeratorView[];
|
28
28
|
online: number;
|
29
29
|
}
|
@@ -76,6 +76,28 @@ 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);
|
79
101
|
__decorate([
|
80
102
|
(0, class_transformer_1.Transform)(function (_a) {
|
81
103
|
var value = _a.value;
|
@@ -99,9 +121,6 @@ var GetPostResponse = /** @class */ (function () {
|
|
99
121
|
__decorate([
|
100
122
|
(0, class_transformer_1.Type)(function () { return views_1.CommunityView; })
|
101
123
|
], 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);
|
105
124
|
__decorate([
|
106
125
|
(0, class_transformer_1.Type)(function () { return views_1.CommunityModeratorView; })
|
107
126
|
], GetPostResponse.prototype, "moderators", void 0);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Option } from "@sniptt/monads";
|
2
2
|
import "reflect-metadata";
|
3
3
|
import { ListingType, SearchType, SortType } from "../others";
|
4
|
-
import { CommentView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, CommunityView, LocalUserSettingsView, ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView, ModRemovePostView, ModStickyPostView, ModTransferCommunityView, PersonBlockView, PersonViewSafe, PostView, RegistrationApplicationView, SiteView } from "../views";
|
4
|
+
import { AdminPurgeCommentView, AdminPurgeCommunityView, AdminPurgePersonView, AdminPurgePostView, CommentView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, CommunityView, LocalUserSettingsView, ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView, ModRemovePostView, ModStickyPostView, ModTransferCommunityView, PersonBlockView, PersonViewSafe, PostView, RegistrationApplicationView, SiteView } from "../views";
|
5
5
|
/**
|
6
6
|
* Search lemmy for different types of data.
|
7
7
|
*/
|
@@ -50,6 +50,10 @@ export declare class GetModlogResponse {
|
|
50
50
|
added_to_community: ModAddCommunityView[];
|
51
51
|
transferred_to_community: ModTransferCommunityView[];
|
52
52
|
added: ModAddView[];
|
53
|
+
admin_purged_persons: AdminPurgePersonView[];
|
54
|
+
admin_purged_communities: AdminPurgeCommunityView[];
|
55
|
+
admin_purged_posts: AdminPurgePostView[];
|
56
|
+
admin_purged_comments: AdminPurgeCommentView[];
|
53
57
|
}
|
54
58
|
export declare class CreateSite {
|
55
59
|
name: string;
|
@@ -125,18 +129,6 @@ export declare class LeaveAdmin {
|
|
125
129
|
auth: string;
|
126
130
|
constructor(init: LeaveAdmin);
|
127
131
|
}
|
128
|
-
export declare class GetSiteConfig {
|
129
|
-
auth: string;
|
130
|
-
constructor(init: GetSiteConfig);
|
131
|
-
}
|
132
|
-
export declare class GetSiteConfigResponse {
|
133
|
-
config_hjson: string;
|
134
|
-
}
|
135
|
-
export declare class SaveSiteConfig {
|
136
|
-
config_hjson: string;
|
137
|
-
auth: string;
|
138
|
-
constructor(init: SaveSiteConfig);
|
139
|
-
}
|
140
132
|
export declare class FederatedInstances {
|
141
133
|
linked: string[];
|
142
134
|
allowed: Option<string[]>;
|
@@ -154,6 +146,33 @@ export declare class ResolveObjectResponse {
|
|
154
146
|
community: Option<CommunityView>;
|
155
147
|
person: Option<PersonViewSafe>;
|
156
148
|
}
|
149
|
+
export declare class PurgePerson {
|
150
|
+
person_id: number;
|
151
|
+
reason: Option<string>;
|
152
|
+
auth: string;
|
153
|
+
constructor(init: PurgePerson);
|
154
|
+
}
|
155
|
+
export declare class PurgeCommunity {
|
156
|
+
community_id: number;
|
157
|
+
reason: Option<string>;
|
158
|
+
auth: string;
|
159
|
+
constructor(init: PurgeCommunity);
|
160
|
+
}
|
161
|
+
export declare class PurgePost {
|
162
|
+
post_id: number;
|
163
|
+
reason: Option<string>;
|
164
|
+
auth: string;
|
165
|
+
constructor(init: PurgePost);
|
166
|
+
}
|
167
|
+
export declare class PurgeComment {
|
168
|
+
comment_id: number;
|
169
|
+
reason: Option<string>;
|
170
|
+
auth: string;
|
171
|
+
constructor(init: PurgeComment);
|
172
|
+
}
|
173
|
+
export declare class PurgeItemResponse {
|
174
|
+
success: boolean;
|
175
|
+
}
|
157
176
|
export declare class ListRegistrationApplications {
|
158
177
|
/**
|
159
178
|
* Only shows the unread applications (IE those without an admin actor)
|
@@ -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.GetUnreadRegistrationApplicationCountResponse = exports.GetUnreadRegistrationApplicationCount = exports.RegistrationApplicationResponse = exports.ApproveRegistrationApplication = exports.ListRegistrationApplicationsResponse = exports.ListRegistrationApplications = exports.
|
9
|
+
exports.GetUnreadRegistrationApplicationCountResponse = exports.GetUnreadRegistrationApplicationCount = exports.RegistrationApplicationResponse = exports.ApproveRegistrationApplication = exports.ListRegistrationApplicationsResponse = exports.ListRegistrationApplications = exports.PurgeItemResponse = exports.PurgeComment = exports.PurgePost = exports.PurgeCommunity = exports.PurgePerson = exports.ResolveObjectResponse = exports.ResolveObject = exports.FederatedInstances = exports.LeaveAdmin = exports.MyUserInfo = exports.GetSiteResponse = exports.SiteResponse = exports.GetSite = exports.EditSite = exports.CreateSite = exports.GetModlogResponse = exports.GetModlog = exports.SearchResponse = exports.Search = void 0;
|
10
10
|
var class_transformer_1 = require("class-transformer");
|
11
11
|
require("reflect-metadata");
|
12
12
|
var utils_1 = require("../../utils");
|
@@ -233,6 +233,18 @@ var GetModlogResponse = /** @class */ (function () {
|
|
233
233
|
__decorate([
|
234
234
|
(0, class_transformer_1.Type)(function () { return views_1.ModAddView; })
|
235
235
|
], GetModlogResponse.prototype, "added", void 0);
|
236
|
+
__decorate([
|
237
|
+
(0, class_transformer_1.Type)(function () { return views_1.AdminPurgePersonView; })
|
238
|
+
], GetModlogResponse.prototype, "admin_purged_persons", void 0);
|
239
|
+
__decorate([
|
240
|
+
(0, class_transformer_1.Type)(function () { return views_1.AdminPurgeCommunityView; })
|
241
|
+
], GetModlogResponse.prototype, "admin_purged_communities", void 0);
|
242
|
+
__decorate([
|
243
|
+
(0, class_transformer_1.Type)(function () { return views_1.AdminPurgePostView; })
|
244
|
+
], GetModlogResponse.prototype, "admin_purged_posts", void 0);
|
245
|
+
__decorate([
|
246
|
+
(0, class_transformer_1.Type)(function () { return views_1.AdminPurgeCommentView; })
|
247
|
+
], GetModlogResponse.prototype, "admin_purged_comments", void 0);
|
236
248
|
return GetModlogResponse;
|
237
249
|
}());
|
238
250
|
exports.GetModlogResponse = GetModlogResponse;
|
@@ -683,26 +695,6 @@ var LeaveAdmin = /** @class */ (function () {
|
|
683
695
|
return LeaveAdmin;
|
684
696
|
}());
|
685
697
|
exports.LeaveAdmin = LeaveAdmin;
|
686
|
-
var GetSiteConfig = /** @class */ (function () {
|
687
|
-
function GetSiteConfig(init) {
|
688
|
-
Object.assign(this, init);
|
689
|
-
}
|
690
|
-
return GetSiteConfig;
|
691
|
-
}());
|
692
|
-
exports.GetSiteConfig = GetSiteConfig;
|
693
|
-
var GetSiteConfigResponse = /** @class */ (function () {
|
694
|
-
function GetSiteConfigResponse() {
|
695
|
-
}
|
696
|
-
return GetSiteConfigResponse;
|
697
|
-
}());
|
698
|
-
exports.GetSiteConfigResponse = GetSiteConfigResponse;
|
699
|
-
var SaveSiteConfig = /** @class */ (function () {
|
700
|
-
function SaveSiteConfig(init) {
|
701
|
-
Object.assign(this, init);
|
702
|
-
}
|
703
|
-
return SaveSiteConfig;
|
704
|
-
}());
|
705
|
-
exports.SaveSiteConfig = SaveSiteConfig;
|
706
698
|
var FederatedInstances = /** @class */ (function () {
|
707
699
|
function FederatedInstances(init) {
|
708
700
|
Object.assign(this, init);
|
@@ -804,6 +796,84 @@ var ResolveObjectResponse = /** @class */ (function () {
|
|
804
796
|
return ResolveObjectResponse;
|
805
797
|
}());
|
806
798
|
exports.ResolveObjectResponse = ResolveObjectResponse;
|
799
|
+
var PurgePerson = /** @class */ (function () {
|
800
|
+
function PurgePerson(init) {
|
801
|
+
Object.assign(this, init);
|
802
|
+
}
|
803
|
+
__decorate([
|
804
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
805
|
+
var value = _a.value;
|
806
|
+
return (0, utils_1.toOption)(value);
|
807
|
+
}, { toClassOnly: true }),
|
808
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
809
|
+
var value = _a.value;
|
810
|
+
return (0, utils_1.toUndefined)(value);
|
811
|
+
}, { toPlainOnly: true }),
|
812
|
+
(0, class_transformer_1.Expose)()
|
813
|
+
], PurgePerson.prototype, "reason", void 0);
|
814
|
+
return PurgePerson;
|
815
|
+
}());
|
816
|
+
exports.PurgePerson = PurgePerson;
|
817
|
+
var PurgeCommunity = /** @class */ (function () {
|
818
|
+
function PurgeCommunity(init) {
|
819
|
+
Object.assign(this, init);
|
820
|
+
}
|
821
|
+
__decorate([
|
822
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
823
|
+
var value = _a.value;
|
824
|
+
return (0, utils_1.toOption)(value);
|
825
|
+
}, { toClassOnly: true }),
|
826
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
827
|
+
var value = _a.value;
|
828
|
+
return (0, utils_1.toUndefined)(value);
|
829
|
+
}, { toPlainOnly: true }),
|
830
|
+
(0, class_transformer_1.Expose)()
|
831
|
+
], PurgeCommunity.prototype, "reason", void 0);
|
832
|
+
return PurgeCommunity;
|
833
|
+
}());
|
834
|
+
exports.PurgeCommunity = PurgeCommunity;
|
835
|
+
var PurgePost = /** @class */ (function () {
|
836
|
+
function PurgePost(init) {
|
837
|
+
Object.assign(this, init);
|
838
|
+
}
|
839
|
+
__decorate([
|
840
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
841
|
+
var value = _a.value;
|
842
|
+
return (0, utils_1.toOption)(value);
|
843
|
+
}, { toClassOnly: true }),
|
844
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
845
|
+
var value = _a.value;
|
846
|
+
return (0, utils_1.toUndefined)(value);
|
847
|
+
}, { toPlainOnly: true }),
|
848
|
+
(0, class_transformer_1.Expose)()
|
849
|
+
], PurgePost.prototype, "reason", void 0);
|
850
|
+
return PurgePost;
|
851
|
+
}());
|
852
|
+
exports.PurgePost = PurgePost;
|
853
|
+
var PurgeComment = /** @class */ (function () {
|
854
|
+
function PurgeComment(init) {
|
855
|
+
Object.assign(this, init);
|
856
|
+
}
|
857
|
+
__decorate([
|
858
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
859
|
+
var value = _a.value;
|
860
|
+
return (0, utils_1.toOption)(value);
|
861
|
+
}, { toClassOnly: true }),
|
862
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
863
|
+
var value = _a.value;
|
864
|
+
return (0, utils_1.toUndefined)(value);
|
865
|
+
}, { toPlainOnly: true }),
|
866
|
+
(0, class_transformer_1.Expose)()
|
867
|
+
], PurgeComment.prototype, "reason", void 0);
|
868
|
+
return PurgeComment;
|
869
|
+
}());
|
870
|
+
exports.PurgeComment = PurgeComment;
|
871
|
+
var PurgeItemResponse = /** @class */ (function () {
|
872
|
+
function PurgeItemResponse() {
|
873
|
+
}
|
874
|
+
return PurgeItemResponse;
|
875
|
+
}());
|
876
|
+
exports.PurgeItemResponse = PurgeItemResponse;
|
807
877
|
var ListRegistrationApplications = /** @class */ (function () {
|
808
878
|
function ListRegistrationApplications(init) {
|
809
879
|
Object.assign(this, init);
|