lemmy-js-client 0.17.0-rc.5 → 0.17.0-rc.50

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./http";
2
2
  export * from "./interfaces";
3
+ export * from "./utils";
3
4
  export * from "./websocket";
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -12,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./http"), exports);
14
18
  __exportStar(require("./interfaces"), exports);
19
+ __exportStar(require("./utils"), exports);
15
20
  __exportStar(require("./websocket"), exports);
@@ -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,65 +1,72 @@
1
+ import { Option } from "@sniptt/monads";
2
+ import "reflect-metadata";
3
+ import { CommentSortType, ListingType } from "../others";
1
4
  import { CommentReportView, CommentView } from "../views";
2
- export interface CreateComment {
5
+ export declare class CreateComment {
3
6
  content: string;
4
- parent_id?: number;
7
+ parent_id: Option<number>;
8
+ language_id: Option<number>;
5
9
  post_id: number;
6
10
  /**
7
11
  * An optional front end ID, to tell which is comment is coming back.
8
12
  */
9
- form_id?: string;
13
+ form_id: Option<string>;
10
14
  auth: string;
15
+ constructor(init: CreateComment);
11
16
  }
12
- export interface EditComment {
13
- content: string;
17
+ export declare class EditComment {
14
18
  comment_id: number;
19
+ content: Option<string>;
20
+ /**
21
+ * "Distinguishes" a comment, or speak officially. Only doable by community mods or admins.
22
+ */
23
+ distinguished: Option<boolean>;
24
+ language_id: Option<number>;
15
25
  /**
16
26
  * An optional front end ID, to tell which is comment is coming back.
17
27
  */
18
- form_id?: string;
28
+ form_id: Option<string>;
19
29
  auth: string;
30
+ constructor(init: EditComment);
20
31
  }
21
32
  /**
22
33
  * Only the creator can delete the comment.
23
34
  */
24
- export interface DeleteComment {
35
+ export declare class DeleteComment {
25
36
  comment_id: number;
26
37
  deleted: boolean;
27
38
  auth: string;
39
+ constructor(init: DeleteComment);
28
40
  }
29
41
  /**
30
42
  * Only a mod or admin can remove the comment.
31
43
  */
32
- export interface RemoveComment {
44
+ export declare class RemoveComment {
33
45
  comment_id: number;
34
46
  removed: boolean;
35
- reason?: string;
36
- auth: string;
37
- }
38
- /**
39
- * Only the recipient can do this.
40
- */
41
- export interface MarkCommentAsRead {
42
- comment_id: number;
43
- read: boolean;
47
+ reason: Option<string>;
44
48
  auth: string;
49
+ constructor(init: RemoveComment);
45
50
  }
46
- export interface SaveComment {
51
+ export declare class SaveComment {
47
52
  comment_id: number;
48
53
  save: boolean;
49
54
  auth: string;
55
+ constructor(init: SaveComment);
50
56
  }
51
- export interface CommentResponse {
57
+ export declare class CommentResponse {
52
58
  comment_view: CommentView;
53
59
  recipient_ids: number[];
54
60
  /**
55
61
  * An optional front end ID, to tell which is comment is coming back.
56
62
  */
57
- form_id?: string;
63
+ form_id: Option<string>;
58
64
  }
59
- export interface CreateCommentLike {
65
+ export declare class CreateCommentLike {
60
66
  comment_id: number;
61
67
  score: number;
62
68
  auth: string;
69
+ constructor(init: CreateCommentLike);
63
70
  }
64
71
  /**
65
72
  * Comment listing types are `All, Subscribed, Community`
@@ -67,54 +74,55 @@ export interface CreateCommentLike {
67
74
  * You can use either `community_id` or `community_name` as an id.
68
75
  * To get posts for a federated community by name, use `name@instance.tld` .
69
76
  */
70
- export interface GetComments {
71
- /**
72
- * The [[ListingType]].
73
- */
74
- type_?: string;
75
- /**
76
- * The [[SortType]].
77
- */
78
- sort?: string;
79
- page?: number;
80
- limit?: number;
81
- community_id?: number;
82
- community_name?: string;
83
- saved_only?: boolean;
84
- auth?: string;
77
+ export declare class GetComments {
78
+ type_: Option<ListingType>;
79
+ sort: Option<CommentSortType>;
80
+ max_depth: Option<number>;
81
+ page: Option<number>;
82
+ limit: Option<number>;
83
+ community_id: Option<number>;
84
+ community_name: Option<string>;
85
+ post_id: Option<number>;
86
+ parent_id: Option<number>;
87
+ saved_only: Option<boolean>;
88
+ auth: Option<string>;
89
+ constructor(init: GetComments);
85
90
  }
86
- export interface GetCommentsResponse {
91
+ export declare class GetCommentsResponse {
87
92
  comments: CommentView[];
88
93
  }
89
- export interface CreateCommentReport {
94
+ export declare class CreateCommentReport {
90
95
  comment_id: number;
91
96
  reason: string;
92
97
  auth: string;
98
+ constructor(init: CreateCommentReport);
93
99
  }
94
- export interface CommentReportResponse {
100
+ export declare class CommentReportResponse {
95
101
  comment_report_view: CommentReportView;
96
102
  }
97
- export interface ResolveCommentReport {
103
+ export declare class ResolveCommentReport {
98
104
  report_id: number;
99
105
  /**
100
106
  * Either resolve or unresolve a report.
101
107
  */
102
108
  resolved: boolean;
103
109
  auth: string;
110
+ constructor(init: ResolveCommentReport);
104
111
  }
105
- export interface ListCommentReports {
106
- page?: number;
107
- limit?: number;
112
+ export declare class ListCommentReports {
113
+ page: Option<number>;
114
+ limit: Option<number>;
108
115
  /**
109
116
  * if no community is given, it returns reports for all communities moderated by the auth user.
110
117
  */
111
- community_id?: number;
118
+ community_id: Option<number>;
112
119
  /**
113
120
  * Only shows the unresolved reports.
114
121
  */
115
- unresolved_only?: boolean;
122
+ unresolved_only: Option<boolean>;
116
123
  auth: string;
124
+ constructor(init: ListCommentReports);
117
125
  }
118
- export interface ListCommentReportsResponse {
126
+ export declare class ListCommentReportsResponse {
119
127
  comment_reports: CommentReportView[];
120
128
  }
@@ -1,2 +1,395 @@
1
1
  "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
2
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.ListCommentReportsResponse = exports.ListCommentReports = exports.ResolveCommentReport = exports.CommentReportResponse = exports.CreateCommentReport = exports.GetCommentsResponse = exports.GetComments = exports.CreateCommentLike = exports.CommentResponse = exports.SaveComment = exports.RemoveComment = exports.DeleteComment = exports.EditComment = exports.CreateComment = void 0;
10
+ var class_transformer_1 = require("class-transformer");
11
+ require("reflect-metadata");
12
+ var utils_1 = require("../../utils");
13
+ var views_1 = require("../views");
14
+ var CreateComment = /** @class */ (function () {
15
+ function CreateComment(init) {
16
+ Object.assign(this, init);
17
+ }
18
+ __decorate([
19
+ (0, class_transformer_1.Transform)(function (_a) {
20
+ var value = _a.value;
21
+ return (0, utils_1.toOption)(value);
22
+ }, { toClassOnly: true }),
23
+ (0, class_transformer_1.Transform)(function (_a) {
24
+ var value = _a.value;
25
+ return (0, utils_1.toUndefined)(value);
26
+ }, { toPlainOnly: true }),
27
+ (0, class_transformer_1.Expose)()
28
+ ], CreateComment.prototype, "parent_id", void 0);
29
+ __decorate([
30
+ (0, class_transformer_1.Transform)(function (_a) {
31
+ var value = _a.value;
32
+ return (0, utils_1.toOption)(value);
33
+ }, { toClassOnly: true }),
34
+ (0, class_transformer_1.Transform)(function (_a) {
35
+ var value = _a.value;
36
+ return (0, utils_1.toUndefined)(value);
37
+ }, { toPlainOnly: true }),
38
+ (0, class_transformer_1.Expose)()
39
+ ], CreateComment.prototype, "language_id", void 0);
40
+ __decorate([
41
+ (0, class_transformer_1.Transform)(function (_a) {
42
+ var value = _a.value;
43
+ return (0, utils_1.toOption)(value);
44
+ }, { toClassOnly: true }),
45
+ (0, class_transformer_1.Transform)(function (_a) {
46
+ var value = _a.value;
47
+ return (0, utils_1.toUndefined)(value);
48
+ }, { toPlainOnly: true }),
49
+ (0, class_transformer_1.Expose)()
50
+ ], CreateComment.prototype, "form_id", void 0);
51
+ return CreateComment;
52
+ }());
53
+ exports.CreateComment = CreateComment;
54
+ var EditComment = /** @class */ (function () {
55
+ function EditComment(init) {
56
+ Object.assign(this, init);
57
+ }
58
+ __decorate([
59
+ (0, class_transformer_1.Transform)(function (_a) {
60
+ var value = _a.value;
61
+ return (0, utils_1.toOption)(value);
62
+ }, { toClassOnly: true }),
63
+ (0, class_transformer_1.Transform)(function (_a) {
64
+ var value = _a.value;
65
+ return (0, utils_1.toUndefined)(value);
66
+ }, { toPlainOnly: true }),
67
+ (0, class_transformer_1.Expose)()
68
+ ], EditComment.prototype, "content", void 0);
69
+ __decorate([
70
+ (0, class_transformer_1.Transform)(function (_a) {
71
+ var value = _a.value;
72
+ return (0, utils_1.toOption)(value);
73
+ }, { toClassOnly: true }),
74
+ (0, class_transformer_1.Transform)(function (_a) {
75
+ var value = _a.value;
76
+ return (0, utils_1.toUndefined)(value);
77
+ }, { toPlainOnly: true }),
78
+ (0, class_transformer_1.Expose)()
79
+ ], EditComment.prototype, "distinguished", void 0);
80
+ __decorate([
81
+ (0, class_transformer_1.Transform)(function (_a) {
82
+ var value = _a.value;
83
+ return (0, utils_1.toOption)(value);
84
+ }, { toClassOnly: true }),
85
+ (0, class_transformer_1.Transform)(function (_a) {
86
+ var value = _a.value;
87
+ return (0, utils_1.toUndefined)(value);
88
+ }, { toPlainOnly: true }),
89
+ (0, class_transformer_1.Expose)()
90
+ ], EditComment.prototype, "language_id", void 0);
91
+ __decorate([
92
+ (0, class_transformer_1.Transform)(function (_a) {
93
+ var value = _a.value;
94
+ return (0, utils_1.toOption)(value);
95
+ }, { toClassOnly: true }),
96
+ (0, class_transformer_1.Transform)(function (_a) {
97
+ var value = _a.value;
98
+ return (0, utils_1.toUndefined)(value);
99
+ }, { toPlainOnly: true }),
100
+ (0, class_transformer_1.Expose)()
101
+ ], EditComment.prototype, "form_id", void 0);
102
+ return EditComment;
103
+ }());
104
+ exports.EditComment = EditComment;
105
+ /**
106
+ * Only the creator can delete the comment.
107
+ */
108
+ var DeleteComment = /** @class */ (function () {
109
+ function DeleteComment(init) {
110
+ Object.assign(this, init);
111
+ }
112
+ return DeleteComment;
113
+ }());
114
+ exports.DeleteComment = DeleteComment;
115
+ /**
116
+ * Only a mod or admin can remove the comment.
117
+ */
118
+ var RemoveComment = /** @class */ (function () {
119
+ function RemoveComment(init) {
120
+ Object.assign(this, init);
121
+ }
122
+ __decorate([
123
+ (0, class_transformer_1.Transform)(function (_a) {
124
+ var value = _a.value;
125
+ return (0, utils_1.toOption)(value);
126
+ }, { toClassOnly: true }),
127
+ (0, class_transformer_1.Transform)(function (_a) {
128
+ var value = _a.value;
129
+ return (0, utils_1.toUndefined)(value);
130
+ }, { toPlainOnly: true }),
131
+ (0, class_transformer_1.Expose)()
132
+ ], RemoveComment.prototype, "reason", void 0);
133
+ return RemoveComment;
134
+ }());
135
+ exports.RemoveComment = RemoveComment;
136
+ var SaveComment = /** @class */ (function () {
137
+ function SaveComment(init) {
138
+ Object.assign(this, init);
139
+ }
140
+ return SaveComment;
141
+ }());
142
+ exports.SaveComment = SaveComment;
143
+ var CommentResponse = /** @class */ (function () {
144
+ function CommentResponse() {
145
+ }
146
+ __decorate([
147
+ (0, class_transformer_1.Type)(function () { return views_1.CommentView; })
148
+ ], CommentResponse.prototype, "comment_view", void 0);
149
+ __decorate([
150
+ (0, class_transformer_1.Transform)(function (_a) {
151
+ var value = _a.value;
152
+ return (0, utils_1.toOption)(value);
153
+ }, { toClassOnly: true }),
154
+ (0, class_transformer_1.Transform)(function (_a) {
155
+ var value = _a.value;
156
+ return (0, utils_1.toUndefined)(value);
157
+ }, { toPlainOnly: true }),
158
+ (0, class_transformer_1.Expose)()
159
+ ], CommentResponse.prototype, "form_id", void 0);
160
+ return CommentResponse;
161
+ }());
162
+ exports.CommentResponse = CommentResponse;
163
+ var CreateCommentLike = /** @class */ (function () {
164
+ function CreateCommentLike(init) {
165
+ Object.assign(this, init);
166
+ }
167
+ return CreateCommentLike;
168
+ }());
169
+ exports.CreateCommentLike = CreateCommentLike;
170
+ /**
171
+ * Comment listing types are `All, Subscribed, Community`
172
+ *
173
+ * You can use either `community_id` or `community_name` as an id.
174
+ * To get posts for a federated community by name, use `name@instance.tld` .
175
+ */
176
+ var GetComments = /** @class */ (function () {
177
+ function GetComments(init) {
178
+ Object.assign(this, init);
179
+ }
180
+ __decorate([
181
+ (0, class_transformer_1.Transform)(function (_a) {
182
+ var value = _a.value;
183
+ return (0, utils_1.toOption)(value);
184
+ }, { toClassOnly: true }),
185
+ (0, class_transformer_1.Transform)(function (_a) {
186
+ var value = _a.value;
187
+ return (0, utils_1.toUndefined)(value);
188
+ }, { toPlainOnly: true }),
189
+ (0, class_transformer_1.Expose)()
190
+ ], GetComments.prototype, "type_", void 0);
191
+ __decorate([
192
+ (0, class_transformer_1.Transform)(function (_a) {
193
+ var value = _a.value;
194
+ return (0, utils_1.toOption)(value);
195
+ }, { toClassOnly: true }),
196
+ (0, class_transformer_1.Transform)(function (_a) {
197
+ var value = _a.value;
198
+ return (0, utils_1.toUndefined)(value);
199
+ }, { toPlainOnly: true }),
200
+ (0, class_transformer_1.Expose)()
201
+ ], GetComments.prototype, "sort", void 0);
202
+ __decorate([
203
+ (0, class_transformer_1.Transform)(function (_a) {
204
+ var value = _a.value;
205
+ return (0, utils_1.toOption)(value);
206
+ }, { toClassOnly: true }),
207
+ (0, class_transformer_1.Transform)(function (_a) {
208
+ var value = _a.value;
209
+ return (0, utils_1.toUndefined)(value);
210
+ }, { toPlainOnly: true }),
211
+ (0, class_transformer_1.Expose)()
212
+ ], GetComments.prototype, "max_depth", 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, "page", 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, "limit", void 0);
235
+ __decorate([
236
+ (0, class_transformer_1.Transform)(function (_a) {
237
+ var value = _a.value;
238
+ return (0, utils_1.toOption)(value);
239
+ }, { toClassOnly: true }),
240
+ (0, class_transformer_1.Transform)(function (_a) {
241
+ var value = _a.value;
242
+ return (0, utils_1.toUndefined)(value);
243
+ }, { toPlainOnly: true }),
244
+ (0, class_transformer_1.Expose)()
245
+ ], GetComments.prototype, "community_id", void 0);
246
+ __decorate([
247
+ (0, class_transformer_1.Transform)(function (_a) {
248
+ var value = _a.value;
249
+ return (0, utils_1.toOption)(value);
250
+ }, { toClassOnly: true }),
251
+ (0, class_transformer_1.Transform)(function (_a) {
252
+ var value = _a.value;
253
+ return (0, utils_1.toUndefined)(value);
254
+ }, { toPlainOnly: true }),
255
+ (0, class_transformer_1.Expose)()
256
+ ], GetComments.prototype, "community_name", void 0);
257
+ __decorate([
258
+ (0, class_transformer_1.Transform)(function (_a) {
259
+ var value = _a.value;
260
+ return (0, utils_1.toOption)(value);
261
+ }, { toClassOnly: true }),
262
+ (0, class_transformer_1.Transform)(function (_a) {
263
+ var value = _a.value;
264
+ return (0, utils_1.toUndefined)(value);
265
+ }, { toPlainOnly: true }),
266
+ (0, class_transformer_1.Expose)()
267
+ ], GetComments.prototype, "post_id", void 0);
268
+ __decorate([
269
+ (0, class_transformer_1.Transform)(function (_a) {
270
+ var value = _a.value;
271
+ return (0, utils_1.toOption)(value);
272
+ }, { toClassOnly: true }),
273
+ (0, class_transformer_1.Transform)(function (_a) {
274
+ var value = _a.value;
275
+ return (0, utils_1.toUndefined)(value);
276
+ }, { toPlainOnly: true }),
277
+ (0, class_transformer_1.Expose)()
278
+ ], GetComments.prototype, "parent_id", void 0);
279
+ __decorate([
280
+ (0, class_transformer_1.Transform)(function (_a) {
281
+ var value = _a.value;
282
+ return (0, utils_1.toOption)(value);
283
+ }, { toClassOnly: true }),
284
+ (0, class_transformer_1.Transform)(function (_a) {
285
+ var value = _a.value;
286
+ return (0, utils_1.toUndefined)(value);
287
+ }, { toPlainOnly: true }),
288
+ (0, class_transformer_1.Expose)()
289
+ ], GetComments.prototype, "saved_only", void 0);
290
+ __decorate([
291
+ (0, class_transformer_1.Transform)(function (_a) {
292
+ var value = _a.value;
293
+ return (0, utils_1.toOption)(value);
294
+ }, { toClassOnly: true }),
295
+ (0, class_transformer_1.Transform)(function (_a) {
296
+ var value = _a.value;
297
+ return (0, utils_1.toUndefined)(value);
298
+ }, { toPlainOnly: true }),
299
+ (0, class_transformer_1.Expose)()
300
+ ], GetComments.prototype, "auth", void 0);
301
+ return GetComments;
302
+ }());
303
+ exports.GetComments = GetComments;
304
+ var GetCommentsResponse = /** @class */ (function () {
305
+ function GetCommentsResponse() {
306
+ }
307
+ __decorate([
308
+ (0, class_transformer_1.Type)(function () { return views_1.CommentView; })
309
+ ], GetCommentsResponse.prototype, "comments", void 0);
310
+ return GetCommentsResponse;
311
+ }());
312
+ exports.GetCommentsResponse = GetCommentsResponse;
313
+ var CreateCommentReport = /** @class */ (function () {
314
+ function CreateCommentReport(init) {
315
+ Object.assign(this, init);
316
+ }
317
+ return CreateCommentReport;
318
+ }());
319
+ exports.CreateCommentReport = CreateCommentReport;
320
+ var CommentReportResponse = /** @class */ (function () {
321
+ function CommentReportResponse() {
322
+ }
323
+ __decorate([
324
+ (0, class_transformer_1.Type)(function () { return views_1.CommentReportView; })
325
+ ], CommentReportResponse.prototype, "comment_report_view", void 0);
326
+ return CommentReportResponse;
327
+ }());
328
+ exports.CommentReportResponse = CommentReportResponse;
329
+ var ResolveCommentReport = /** @class */ (function () {
330
+ function ResolveCommentReport(init) {
331
+ Object.assign(this, init);
332
+ }
333
+ return ResolveCommentReport;
334
+ }());
335
+ exports.ResolveCommentReport = ResolveCommentReport;
336
+ var ListCommentReports = /** @class */ (function () {
337
+ function ListCommentReports(init) {
338
+ Object.assign(this, init);
339
+ }
340
+ __decorate([
341
+ (0, class_transformer_1.Transform)(function (_a) {
342
+ var value = _a.value;
343
+ return (0, utils_1.toOption)(value);
344
+ }, { toClassOnly: true }),
345
+ (0, class_transformer_1.Transform)(function (_a) {
346
+ var value = _a.value;
347
+ return (0, utils_1.toUndefined)(value);
348
+ }, { toPlainOnly: true }),
349
+ (0, class_transformer_1.Expose)()
350
+ ], ListCommentReports.prototype, "page", void 0);
351
+ __decorate([
352
+ (0, class_transformer_1.Transform)(function (_a) {
353
+ var value = _a.value;
354
+ return (0, utils_1.toOption)(value);
355
+ }, { toClassOnly: true }),
356
+ (0, class_transformer_1.Transform)(function (_a) {
357
+ var value = _a.value;
358
+ return (0, utils_1.toUndefined)(value);
359
+ }, { toPlainOnly: true }),
360
+ (0, class_transformer_1.Expose)()
361
+ ], ListCommentReports.prototype, "limit", void 0);
362
+ __decorate([
363
+ (0, class_transformer_1.Transform)(function (_a) {
364
+ var value = _a.value;
365
+ return (0, utils_1.toOption)(value);
366
+ }, { toClassOnly: true }),
367
+ (0, class_transformer_1.Transform)(function (_a) {
368
+ var value = _a.value;
369
+ return (0, utils_1.toUndefined)(value);
370
+ }, { toPlainOnly: true }),
371
+ (0, class_transformer_1.Expose)()
372
+ ], ListCommentReports.prototype, "community_id", void 0);
373
+ __decorate([
374
+ (0, class_transformer_1.Transform)(function (_a) {
375
+ var value = _a.value;
376
+ return (0, utils_1.toOption)(value);
377
+ }, { toClassOnly: true }),
378
+ (0, class_transformer_1.Transform)(function (_a) {
379
+ var value = _a.value;
380
+ return (0, utils_1.toUndefined)(value);
381
+ }, { toPlainOnly: true }),
382
+ (0, class_transformer_1.Expose)()
383
+ ], ListCommentReports.prototype, "unresolved_only", void 0);
384
+ return ListCommentReports;
385
+ }());
386
+ exports.ListCommentReports = ListCommentReports;
387
+ var ListCommentReportsResponse = /** @class */ (function () {
388
+ function ListCommentReportsResponse() {
389
+ }
390
+ __decorate([
391
+ (0, class_transformer_1.Type)(function () { return views_1.CommentReportView; })
392
+ ], ListCommentReportsResponse.prototype, "comment_reports", void 0);
393
+ return ListCommentReportsResponse;
394
+ }());
395
+ exports.ListCommentReportsResponse = ListCommentReportsResponse;