lemmy-js-client 0.17.0-rc.32 → 0.17.0-rc.36

Sign up to get free protection for your applications and to get access to all the features.
package/dist/http.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, GetCommentsResponse, ListCommentReports, ListCommentReportsResponse, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
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, GetSiteResponse, GetUnreadRegistrationApplicationCount, GetUnreadRegistrationApplicationCountResponse, LeaveAdmin, ListRegistrationApplications, ListRegistrationApplicationsResponse, RegistrationApplicationResponse, ResolveObject, ResolveObjectResponse, Search, SearchResponse, SiteResponse } from "./interfaces/api/site";
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
  */
@@ -244,7 +244,7 @@ export declare class LemmyHttp {
244
244
  *
245
245
  * `HTTP.POST /comment/mark_as_read`
246
246
  */
247
- markCommentAsRead(form: MarkCommentAsRead): Promise<CommentResponse>;
247
+ markCommentReplyAsRead(form: MarkCommentReplyAsRead): Promise<CommentResponse>;
248
248
  /**
249
249
  * Like / vote on a comment.
250
250
  *
@@ -449,6 +449,30 @@ export declare class LemmyHttp {
449
449
  * `HTTP.PUT /admin/registration_application/approve`
450
450
  */
451
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>;
452
476
  private buildFullUrl;
453
477
  private wrapper;
454
478
  }
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.markCommentAsRead = function (form) {
530
+ LemmyHttp.prototype.markCommentReplyAsRead = 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)];
@@ -942,6 +942,54 @@ var LemmyHttp = /** @class */ (function () {
942
942
  });
943
943
  });
944
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
+ };
945
993
  LemmyHttp.prototype.buildFullUrl = function (endpoint) {
946
994
  return "".concat(this.apiUrl).concat(endpoint);
947
995
  };
@@ -87,4 +87,5 @@ export interface CommentAggregates {
87
87
  score: number;
88
88
  upvotes: number;
89
89
  downvotes: number;
90
+ child_count: number;
90
91
  }
@@ -1,6 +1,6 @@
1
1
  import { Option } from "@sniptt/monads";
2
2
  import "reflect-metadata";
3
- import { ListingType, SortType } from "../others";
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<SortType>;
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.MarkCommentAsRead = 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.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: CommentView[];
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<SortType>;
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<SortType>;
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.CommentView; })
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 { CommentView, CommunityModeratorView, CommunityView, PostReportView, PostView } from "../views";
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;
@@ -142,6 +146,33 @@ export declare class ResolveObjectResponse {
142
146
  community: Option<CommunityView>;
143
147
  person: Option<PersonViewSafe>;
144
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
+ }
145
176
  export declare class ListRegistrationApplications {
146
177
  /**
147
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.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;
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;
@@ -784,6 +796,84 @@ var ResolveObjectResponse = /** @class */ (function () {
784
796
  return ResolveObjectResponse;
785
797
  }());
786
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;
787
877
  var ListRegistrationApplications = /** @class */ (function () {
788
878
  function ListRegistrationApplications(init) {
789
879
  Object.assign(this, init);