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

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.
@@ -16,26 +16,26 @@ export declare enum UserOperation {
16
16
  EditComment = 9,
17
17
  DeleteComment = 10,
18
18
  RemoveComment = 11,
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,
19
+ SaveComment = 12,
20
+ CreateCommentLike = 13,
21
+ GetPosts = 14,
22
+ CreatePostLike = 15,
23
+ EditPost = 16,
24
+ DeletePost = 17,
25
+ RemovePost = 18,
26
+ LockPost = 19,
27
+ StickyPost = 20,
28
+ MarkPostAsRead = 21,
29
+ SavePost = 22,
30
+ EditCommunity = 23,
31
+ DeleteCommunity = 24,
32
+ RemoveCommunity = 25,
33
+ FollowCommunity = 26,
34
+ GetPersonDetails = 27,
35
+ GetReplies = 28,
36
+ GetPersonMentions = 29,
37
+ MarkPersonMentionAsRead = 30,
38
+ MarkCommentReplyAsRead = 31,
39
39
  GetModlog = 32,
40
40
  BanFromCommunity = 33,
41
41
  AddModToCommunity = 34,
@@ -70,29 +70,40 @@ export declare enum UserOperation {
70
70
  GetSiteMetadata = 63,
71
71
  BlockCommunity = 64,
72
72
  BlockPerson = 65,
73
- CreateCommentReport = 66,
74
- ResolveCommentReport = 67,
75
- ListCommentReports = 68,
76
- CreatePostReport = 69,
77
- ResolvePostReport = 70,
78
- ListPostReports = 71,
79
- GetReportCount = 72,
80
- GetUnreadCount = 73,
81
- VerifyEmail = 74
73
+ PurgePerson = 66,
74
+ PurgeCommunity = 67,
75
+ PurgePost = 68,
76
+ PurgeComment = 69,
77
+ CreateCommentReport = 70,
78
+ ResolveCommentReport = 71,
79
+ ListCommentReports = 72,
80
+ CreatePostReport = 73,
81
+ ResolvePostReport = 74,
82
+ ListPostReports = 75,
83
+ GetReportCount = 76,
84
+ GetUnreadCount = 77,
85
+ VerifyEmail = 78
82
86
  }
83
87
  /**
84
- * Different sort types used in lemmy.
88
+ * Different post sort types used in lemmy.
85
89
  */
86
90
  export declare enum SortType {
87
91
  /**
88
- * Posts sorted by the most recent comment.
92
+ * Posts sorted by hot, but bumped by new comments up to 2 days
89
93
  */
90
94
  Active = "Active",
91
95
  /**
92
- * Posts sorted by the published time.
96
+ * Posts sorted by a decaying rank.
93
97
  */
94
98
  Hot = "Hot",
99
+ /**
100
+ * Posts sorted by the published time.
101
+ */
95
102
  New = "New",
103
+ /**
104
+ * Posts sorted by the published time ascending
105
+ */
106
+ Old = "Old",
96
107
  /**
97
108
  * The top posts for this last day.
98
109
  */
@@ -122,6 +133,27 @@ export declare enum SortType {
122
133
  */
123
134
  NewComments = "NewComments"
124
135
  }
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
+ }
125
157
  /**
126
158
  * The different listing types for post and comment fetches.
127
159
  */
@@ -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.SortType = exports.UserOperation = exports.VERSION = void 0;
9
+ exports.SiteMetadata = exports.SubscribedType = exports.SearchType = exports.ListingType = exports.CommentSortType = 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["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";
30
+ UserOperation[UserOperation["SaveComment"] = 12] = "SaveComment";
31
+ UserOperation[UserOperation["CreateCommentLike"] = 13] = "CreateCommentLike";
32
+ UserOperation[UserOperation["GetPosts"] = 14] = "GetPosts";
33
+ UserOperation[UserOperation["CreatePostLike"] = 15] = "CreatePostLike";
34
+ UserOperation[UserOperation["EditPost"] = 16] = "EditPost";
35
+ UserOperation[UserOperation["DeletePost"] = 17] = "DeletePost";
36
+ UserOperation[UserOperation["RemovePost"] = 18] = "RemovePost";
37
+ UserOperation[UserOperation["LockPost"] = 19] = "LockPost";
38
+ UserOperation[UserOperation["StickyPost"] = 20] = "StickyPost";
39
+ UserOperation[UserOperation["MarkPostAsRead"] = 21] = "MarkPostAsRead";
40
+ UserOperation[UserOperation["SavePost"] = 22] = "SavePost";
41
+ UserOperation[UserOperation["EditCommunity"] = 23] = "EditCommunity";
42
+ UserOperation[UserOperation["DeleteCommunity"] = 24] = "DeleteCommunity";
43
+ UserOperation[UserOperation["RemoveCommunity"] = 25] = "RemoveCommunity";
44
+ UserOperation[UserOperation["FollowCommunity"] = 26] = "FollowCommunity";
45
+ UserOperation[UserOperation["GetPersonDetails"] = 27] = "GetPersonDetails";
46
+ UserOperation[UserOperation["GetReplies"] = 28] = "GetReplies";
47
+ UserOperation[UserOperation["GetPersonMentions"] = 29] = "GetPersonMentions";
48
+ UserOperation[UserOperation["MarkPersonMentionAsRead"] = 30] = "MarkPersonMentionAsRead";
49
+ UserOperation[UserOperation["MarkCommentReplyAsRead"] = 31] = "MarkCommentReplyAsRead";
50
50
  UserOperation[UserOperation["GetModlog"] = 32] = "GetModlog";
51
51
  UserOperation[UserOperation["BanFromCommunity"] = 33] = "BanFromCommunity";
52
52
  UserOperation[UserOperation["AddModToCommunity"] = 34] = "AddModToCommunity";
@@ -81,30 +81,41 @@ var UserOperation;
81
81
  UserOperation[UserOperation["GetSiteMetadata"] = 63] = "GetSiteMetadata";
82
82
  UserOperation[UserOperation["BlockCommunity"] = 64] = "BlockCommunity";
83
83
  UserOperation[UserOperation["BlockPerson"] = 65] = "BlockPerson";
84
- UserOperation[UserOperation["CreateCommentReport"] = 66] = "CreateCommentReport";
85
- UserOperation[UserOperation["ResolveCommentReport"] = 67] = "ResolveCommentReport";
86
- UserOperation[UserOperation["ListCommentReports"] = 68] = "ListCommentReports";
87
- UserOperation[UserOperation["CreatePostReport"] = 69] = "CreatePostReport";
88
- UserOperation[UserOperation["ResolvePostReport"] = 70] = "ResolvePostReport";
89
- UserOperation[UserOperation["ListPostReports"] = 71] = "ListPostReports";
90
- UserOperation[UserOperation["GetReportCount"] = 72] = "GetReportCount";
91
- UserOperation[UserOperation["GetUnreadCount"] = 73] = "GetUnreadCount";
92
- UserOperation[UserOperation["VerifyEmail"] = 74] = "VerifyEmail";
84
+ UserOperation[UserOperation["PurgePerson"] = 66] = "PurgePerson";
85
+ UserOperation[UserOperation["PurgeCommunity"] = 67] = "PurgeCommunity";
86
+ UserOperation[UserOperation["PurgePost"] = 68] = "PurgePost";
87
+ UserOperation[UserOperation["PurgeComment"] = 69] = "PurgeComment";
88
+ UserOperation[UserOperation["CreateCommentReport"] = 70] = "CreateCommentReport";
89
+ UserOperation[UserOperation["ResolveCommentReport"] = 71] = "ResolveCommentReport";
90
+ UserOperation[UserOperation["ListCommentReports"] = 72] = "ListCommentReports";
91
+ UserOperation[UserOperation["CreatePostReport"] = 73] = "CreatePostReport";
92
+ UserOperation[UserOperation["ResolvePostReport"] = 74] = "ResolvePostReport";
93
+ UserOperation[UserOperation["ListPostReports"] = 75] = "ListPostReports";
94
+ UserOperation[UserOperation["GetReportCount"] = 76] = "GetReportCount";
95
+ UserOperation[UserOperation["GetUnreadCount"] = 77] = "GetUnreadCount";
96
+ UserOperation[UserOperation["VerifyEmail"] = 78] = "VerifyEmail";
93
97
  })(UserOperation = exports.UserOperation || (exports.UserOperation = {}));
94
98
  /**
95
- * Different sort types used in lemmy.
99
+ * Different post sort types used in lemmy.
96
100
  */
97
101
  var SortType;
98
102
  (function (SortType) {
99
103
  /**
100
- * Posts sorted by the most recent comment.
104
+ * Posts sorted by hot, but bumped by new comments up to 2 days
101
105
  */
102
106
  SortType["Active"] = "Active";
103
107
  /**
104
- * Posts sorted by the published time.
108
+ * Posts sorted by a decaying rank.
105
109
  */
106
110
  SortType["Hot"] = "Hot";
111
+ /**
112
+ * Posts sorted by the published time.
113
+ */
107
114
  SortType["New"] = "New";
115
+ /**
116
+ * Posts sorted by the published time ascending
117
+ */
118
+ SortType["Old"] = "Old";
108
119
  /**
109
120
  * The top posts for this last day.
110
121
  */
@@ -134,6 +145,28 @@ var SortType;
134
145
  */
135
146
  SortType["NewComments"] = "NewComments";
136
147
  })(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 = {}));
137
170
  /**
138
171
  * The different listing types for post and comment fetches.
139
172
  */
@@ -195,6 +195,32 @@ export declare class ModAdd {
195
195
  removed: Option<boolean>;
196
196
  when_: string;
197
197
  }
198
+ export declare class AdminPurgePerson {
199
+ id: number;
200
+ admin_person_id: number;
201
+ reason: Option<string>;
202
+ when_: string;
203
+ }
204
+ export declare class AdminPurgeCommunity {
205
+ id: number;
206
+ admin_person_id: number;
207
+ reason: Option<string>;
208
+ when_: string;
209
+ }
210
+ export declare class AdminPurgePost {
211
+ id: number;
212
+ admin_person_id: number;
213
+ community_id: number;
214
+ reason: Option<string>;
215
+ when_: string;
216
+ }
217
+ export declare class AdminPurgeComment {
218
+ id: number;
219
+ admin_person_id: number;
220
+ post_id: number;
221
+ reason: Option<string>;
222
+ when_: string;
223
+ }
198
224
  export declare class CommunitySafe {
199
225
  id: number;
200
226
  name: string;
@@ -226,15 +252,14 @@ export declare class Comment {
226
252
  id: number;
227
253
  creator_id: number;
228
254
  post_id: number;
229
- parent_id: Option<number>;
230
255
  content: string;
231
256
  removed: boolean;
232
- read: boolean;
233
257
  published: string;
234
258
  updated: Option<string>;
235
259
  deleted: boolean;
236
260
  ap_id: string;
237
261
  local: boolean;
262
+ path: string;
238
263
  }
239
264
  export declare class PersonMention {
240
265
  id: number;
@@ -243,6 +268,13 @@ export declare class PersonMention {
243
268
  read: boolean;
244
269
  published: string;
245
270
  }
271
+ export declare class CommentReply {
272
+ id: number;
273
+ recipient_id: number;
274
+ comment_id: number;
275
+ read: boolean;
276
+ published: string;
277
+ }
246
278
  export declare class RegistrationApplication {
247
279
  id: number;
248
280
  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.PersonMention = exports.Comment = exports.CommentReport = exports.CommunitySafe = 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;
9
+ exports.RegistrationApplication = exports.CommentReply = 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 () {
@@ -606,6 +606,74 @@ var ModAdd = /** @class */ (function () {
606
606
  return ModAdd;
607
607
  }());
608
608
  exports.ModAdd = ModAdd;
609
+ var AdminPurgePerson = /** @class */ (function () {
610
+ function AdminPurgePerson() {
611
+ }
612
+ __decorate([
613
+ (0, class_transformer_1.Transform)(function (_a) {
614
+ var value = _a.value;
615
+ return (0, utils_1.toOption)(value);
616
+ }, { toClassOnly: true }),
617
+ (0, class_transformer_1.Transform)(function (_a) {
618
+ var value = _a.value;
619
+ return (0, utils_1.toUndefined)(value);
620
+ }, { toPlainOnly: true }),
621
+ (0, class_transformer_1.Expose)()
622
+ ], AdminPurgePerson.prototype, "reason", void 0);
623
+ return AdminPurgePerson;
624
+ }());
625
+ exports.AdminPurgePerson = AdminPurgePerson;
626
+ var AdminPurgeCommunity = /** @class */ (function () {
627
+ function AdminPurgeCommunity() {
628
+ }
629
+ __decorate([
630
+ (0, class_transformer_1.Transform)(function (_a) {
631
+ var value = _a.value;
632
+ return (0, utils_1.toOption)(value);
633
+ }, { toClassOnly: true }),
634
+ (0, class_transformer_1.Transform)(function (_a) {
635
+ var value = _a.value;
636
+ return (0, utils_1.toUndefined)(value);
637
+ }, { toPlainOnly: true }),
638
+ (0, class_transformer_1.Expose)()
639
+ ], AdminPurgeCommunity.prototype, "reason", void 0);
640
+ return AdminPurgeCommunity;
641
+ }());
642
+ exports.AdminPurgeCommunity = AdminPurgeCommunity;
643
+ var AdminPurgePost = /** @class */ (function () {
644
+ function AdminPurgePost() {
645
+ }
646
+ __decorate([
647
+ (0, class_transformer_1.Transform)(function (_a) {
648
+ var value = _a.value;
649
+ return (0, utils_1.toOption)(value);
650
+ }, { toClassOnly: true }),
651
+ (0, class_transformer_1.Transform)(function (_a) {
652
+ var value = _a.value;
653
+ return (0, utils_1.toUndefined)(value);
654
+ }, { toPlainOnly: true }),
655
+ (0, class_transformer_1.Expose)()
656
+ ], AdminPurgePost.prototype, "reason", void 0);
657
+ return AdminPurgePost;
658
+ }());
659
+ exports.AdminPurgePost = AdminPurgePost;
660
+ var AdminPurgeComment = /** @class */ (function () {
661
+ function AdminPurgeComment() {
662
+ }
663
+ __decorate([
664
+ (0, class_transformer_1.Transform)(function (_a) {
665
+ var value = _a.value;
666
+ return (0, utils_1.toOption)(value);
667
+ }, { toClassOnly: true }),
668
+ (0, class_transformer_1.Transform)(function (_a) {
669
+ var value = _a.value;
670
+ return (0, utils_1.toUndefined)(value);
671
+ }, { toPlainOnly: true }),
672
+ (0, class_transformer_1.Expose)()
673
+ ], AdminPurgeComment.prototype, "reason", void 0);
674
+ return AdminPurgeComment;
675
+ }());
676
+ exports.AdminPurgeComment = AdminPurgeComment;
609
677
  var CommunitySafe = /** @class */ (function () {
610
678
  function CommunitySafe() {
611
679
  }
@@ -687,17 +755,6 @@ exports.CommentReport = CommentReport;
687
755
  var Comment = /** @class */ (function () {
688
756
  function Comment() {
689
757
  }
690
- __decorate([
691
- (0, class_transformer_1.Transform)(function (_a) {
692
- var value = _a.value;
693
- return (0, utils_1.toOption)(value);
694
- }, { toClassOnly: true }),
695
- (0, class_transformer_1.Transform)(function (_a) {
696
- var value = _a.value;
697
- return (0, utils_1.toUndefined)(value);
698
- }, { toPlainOnly: true }),
699
- (0, class_transformer_1.Expose)()
700
- ], Comment.prototype, "parent_id", void 0);
701
758
  __decorate([
702
759
  (0, class_transformer_1.Transform)(function (_a) {
703
760
  var value = _a.value;
@@ -718,6 +775,12 @@ var PersonMention = /** @class */ (function () {
718
775
  return PersonMention;
719
776
  }());
720
777
  exports.PersonMention = PersonMention;
778
+ var CommentReply = /** @class */ (function () {
779
+ function CommentReply() {
780
+ }
781
+ return CommentReply;
782
+ }());
783
+ exports.CommentReply = CommentReply;
721
784
  var RegistrationApplication = /** @class */ (function () {
722
785
  function RegistrationApplication() {
723
786
  }
@@ -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 { Comment, CommentReport, CommunitySafe, LocalUserSettings, ModAdd, ModAddCommunity, ModBan, ModBanFromCommunity, ModLockPost, ModRemoveComment, ModRemoveCommunity, ModRemovePost, ModStickyPost, ModTransferCommunity, PersonMention, PersonSafe, Post, PostReport, PrivateMessage, RegistrationApplication, Site } from "./source";
5
+ import { AdminPurgeComment, AdminPurgeCommunity, AdminPurgePerson, AdminPurgePost, Comment, CommentReply, 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,7 +61,6 @@ export declare class PostReportView {
61
61
  export declare class CommentView {
62
62
  comment: Comment;
63
63
  creator: PersonSafe;
64
- recipient: Option<PersonSafe>;
65
64
  post: Post;
66
65
  community: CommunitySafe;
67
66
  counts: CommentAggregates;
@@ -71,6 +70,20 @@ export declare class CommentView {
71
70
  creator_blocked: boolean;
72
71
  my_vote: Option<number>;
73
72
  }
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
+ }
74
87
  export declare class CommentReportView {
75
88
  comment_report: CommentReport;
76
89
  comment: Comment;
@@ -142,6 +155,24 @@ export declare class ModStickyPostView {
142
155
  post: Post;
143
156
  community: CommunitySafe;
144
157
  }
158
+ export declare class AdminPurgeCommunityView {
159
+ admin_purge_community: AdminPurgeCommunity;
160
+ admin: PersonSafe;
161
+ }
162
+ export declare class AdminPurgePersonView {
163
+ admin_purge_person: AdminPurgePerson;
164
+ admin: PersonSafe;
165
+ }
166
+ export declare class AdminPurgePostView {
167
+ admin_purge_post: AdminPurgePost;
168
+ admin: PersonSafe;
169
+ community: CommunitySafe;
170
+ }
171
+ export declare class AdminPurgeCommentView {
172
+ admin_purge_comment: AdminPurgeComment;
173
+ admin: PersonSafe;
174
+ post: Post;
175
+ }
145
176
  export declare class CommunityFollowerView {
146
177
  community: CommunitySafe;
147
178
  follower: PersonSafe;
@@ -174,3 +205,8 @@ export declare class RegistrationApplicationView {
174
205
  creator: PersonSafe;
175
206
  admin: Option<PersonSafe>;
176
207
  }
208
+ export interface CommentNode {
209
+ comment_view: CommentView | PersonMentionView | CommentReplyView;
210
+ children: CommentNode[];
211
+ depth: number;
212
+ }
@@ -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.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;
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.CommentReplyView = 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,6 +170,12 @@ 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);
173
179
  __decorate([
174
180
  (0, class_transformer_1.Transform)(function (_a) {
175
181
  var value = _a.value;
@@ -179,15 +185,32 @@ var CommentView = /** @class */ (function () {
179
185
  var value = _a.value;
180
186
  return (0, utils_1.toUndefined)(value);
181
187
  }, { toPlainOnly: true }),
182
- (0, class_transformer_1.Expose)(),
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([
183
203
  (0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
184
- ], CommentView.prototype, "recipient", void 0);
204
+ ], CommentReplyView.prototype, "creator", void 0);
185
205
  __decorate([
186
206
  (0, class_transformer_1.Type)(function () { return source_1.Post; })
187
- ], CommentView.prototype, "post", void 0);
207
+ ], CommentReplyView.prototype, "post", void 0);
188
208
  __decorate([
189
209
  (0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
190
- ], CommentView.prototype, "community", void 0);
210
+ ], CommentReplyView.prototype, "community", void 0);
211
+ __decorate([
212
+ (0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
213
+ ], CommentReplyView.prototype, "recipient", void 0);
191
214
  __decorate([
192
215
  (0, class_transformer_1.Transform)(function (_a) {
193
216
  var value = _a.value;
@@ -198,10 +221,10 @@ var CommentView = /** @class */ (function () {
198
221
  return (0, utils_1.toUndefined)(value);
199
222
  }, { toPlainOnly: true }),
200
223
  (0, class_transformer_1.Expose)()
201
- ], CommentView.prototype, "my_vote", void 0);
202
- return CommentView;
224
+ ], CommentReplyView.prototype, "my_vote", void 0);
225
+ return CommentReplyView;
203
226
  }());
204
- exports.CommentView = CommentView;
227
+ exports.CommentReplyView = CommentReplyView;
205
228
  var CommentReportView = /** @class */ (function () {
206
229
  function CommentReportView() {
207
230
  }
@@ -426,6 +449,60 @@ var ModStickyPostView = /** @class */ (function () {
426
449
  return ModStickyPostView;
427
450
  }());
428
451
  exports.ModStickyPostView = ModStickyPostView;
452
+ var AdminPurgeCommunityView = /** @class */ (function () {
453
+ function AdminPurgeCommunityView() {
454
+ }
455
+ __decorate([
456
+ (0, class_transformer_1.Type)(function () { return source_1.AdminPurgeCommunity; })
457
+ ], AdminPurgeCommunityView.prototype, "admin_purge_community", void 0);
458
+ __decorate([
459
+ (0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
460
+ ], AdminPurgeCommunityView.prototype, "admin", void 0);
461
+ return AdminPurgeCommunityView;
462
+ }());
463
+ exports.AdminPurgeCommunityView = AdminPurgeCommunityView;
464
+ var AdminPurgePersonView = /** @class */ (function () {
465
+ function AdminPurgePersonView() {
466
+ }
467
+ __decorate([
468
+ (0, class_transformer_1.Type)(function () { return source_1.AdminPurgePerson; })
469
+ ], AdminPurgePersonView.prototype, "admin_purge_person", void 0);
470
+ __decorate([
471
+ (0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
472
+ ], AdminPurgePersonView.prototype, "admin", void 0);
473
+ return AdminPurgePersonView;
474
+ }());
475
+ exports.AdminPurgePersonView = AdminPurgePersonView;
476
+ var AdminPurgePostView = /** @class */ (function () {
477
+ function AdminPurgePostView() {
478
+ }
479
+ __decorate([
480
+ (0, class_transformer_1.Type)(function () { return source_1.AdminPurgePost; })
481
+ ], AdminPurgePostView.prototype, "admin_purge_post", void 0);
482
+ __decorate([
483
+ (0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
484
+ ], AdminPurgePostView.prototype, "admin", void 0);
485
+ __decorate([
486
+ (0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
487
+ ], AdminPurgePostView.prototype, "community", void 0);
488
+ return AdminPurgePostView;
489
+ }());
490
+ exports.AdminPurgePostView = AdminPurgePostView;
491
+ var AdminPurgeCommentView = /** @class */ (function () {
492
+ function AdminPurgeCommentView() {
493
+ }
494
+ __decorate([
495
+ (0, class_transformer_1.Type)(function () { return source_1.AdminPurgeComment; })
496
+ ], AdminPurgeCommentView.prototype, "admin_purge_comment", void 0);
497
+ __decorate([
498
+ (0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
499
+ ], AdminPurgeCommentView.prototype, "admin", void 0);
500
+ __decorate([
501
+ (0, class_transformer_1.Type)(function () { return source_1.Post; })
502
+ ], AdminPurgeCommentView.prototype, "post", void 0);
503
+ return AdminPurgeCommentView;
504
+ }());
505
+ exports.AdminPurgeCommentView = AdminPurgeCommentView;
429
506
  var CommunityFollowerView = /** @class */ (function () {
430
507
  function CommunityFollowerView() {
431
508
  }