lemmy-js-client 0.17.0-rc.22 → 0.17.0-rc.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/interfaces/api/comment.d.ts +1 -0
- package/dist/interfaces/api/comment.js +31 -18
- package/dist/interfaces/api/community.js +44 -26
- package/dist/interfaces/api/person.js +92 -53
- package/dist/interfaces/api/post.d.ts +1 -0
- package/dist/interfaces/api/post.js +52 -23
- package/dist/interfaces/api/site.js +125 -60
- package/dist/interfaces/others.js +4 -5
- package/dist/interfaces/source.js +55 -56
- package/dist/interfaces/views.js +258 -10
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +6 -1
- package/dist/websocket.js +1 -1
- package/package.json +1 -1
package/dist/interfaces/views.js
CHANGED
@@ -7,7 +7,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
7
7
|
};
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
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;
|
10
|
-
var monads_1 = require("@sniptt/monads");
|
11
10
|
var class_transformer_1 = require("class-transformer");
|
12
11
|
require("reflect-metadata");
|
13
12
|
var utils_1 = require("../utils");
|
@@ -15,16 +14,37 @@ var source_1 = require("./source");
|
|
15
14
|
var PersonViewSafe = /** @class */ (function () {
|
16
15
|
function PersonViewSafe() {
|
17
16
|
}
|
17
|
+
__decorate([
|
18
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
19
|
+
], PersonViewSafe.prototype, "person", void 0);
|
18
20
|
return PersonViewSafe;
|
19
21
|
}());
|
20
22
|
exports.PersonViewSafe = PersonViewSafe;
|
21
23
|
var PersonMentionView = /** @class */ (function () {
|
22
24
|
function PersonMentionView() {
|
23
25
|
}
|
26
|
+
__decorate([
|
27
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonMention; })
|
28
|
+
], PersonMentionView.prototype, "person_mention", void 0);
|
29
|
+
__decorate([
|
30
|
+
(0, class_transformer_1.Type)(function () { return source_1.Comment; })
|
31
|
+
], PersonMentionView.prototype, "comment", void 0);
|
32
|
+
__decorate([
|
33
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
34
|
+
], PersonMentionView.prototype, "creator", void 0);
|
35
|
+
__decorate([
|
36
|
+
(0, class_transformer_1.Type)(function () { return source_1.Post; })
|
37
|
+
], PersonMentionView.prototype, "post", void 0);
|
38
|
+
__decorate([
|
39
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
40
|
+
], PersonMentionView.prototype, "community", void 0);
|
41
|
+
__decorate([
|
42
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
43
|
+
], PersonMentionView.prototype, "recipient", void 0);
|
24
44
|
__decorate([
|
25
45
|
(0, class_transformer_1.Transform)(function (_a) {
|
26
46
|
var value = _a.value;
|
27
|
-
return (0,
|
47
|
+
return (0, utils_1.toOption)(value);
|
28
48
|
}, { toClassOnly: true }),
|
29
49
|
(0, class_transformer_1.Transform)(function (_a) {
|
30
50
|
var value = _a.value;
|
@@ -38,6 +58,12 @@ exports.PersonMentionView = PersonMentionView;
|
|
38
58
|
var LocalUserSettingsView = /** @class */ (function () {
|
39
59
|
function LocalUserSettingsView() {
|
40
60
|
}
|
61
|
+
__decorate([
|
62
|
+
(0, class_transformer_1.Type)(function () { return source_1.LocalUserSettings; })
|
63
|
+
], LocalUserSettingsView.prototype, "local_user", void 0);
|
64
|
+
__decorate([
|
65
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
66
|
+
], LocalUserSettingsView.prototype, "person", void 0);
|
41
67
|
return LocalUserSettingsView;
|
42
68
|
}());
|
43
69
|
exports.LocalUserSettingsView = LocalUserSettingsView;
|
@@ -53,16 +79,34 @@ exports.SiteView = SiteView;
|
|
53
79
|
var PrivateMessageView = /** @class */ (function () {
|
54
80
|
function PrivateMessageView() {
|
55
81
|
}
|
82
|
+
__decorate([
|
83
|
+
(0, class_transformer_1.Type)(function () { return source_1.PrivateMessage; })
|
84
|
+
], PrivateMessageView.prototype, "private_message", void 0);
|
85
|
+
__decorate([
|
86
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
87
|
+
], PrivateMessageView.prototype, "creator", void 0);
|
88
|
+
__decorate([
|
89
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
90
|
+
], PrivateMessageView.prototype, "recipient", void 0);
|
56
91
|
return PrivateMessageView;
|
57
92
|
}());
|
58
93
|
exports.PrivateMessageView = PrivateMessageView;
|
59
94
|
var PostView = /** @class */ (function () {
|
60
95
|
function PostView() {
|
61
96
|
}
|
97
|
+
__decorate([
|
98
|
+
(0, class_transformer_1.Type)(function () { return source_1.Post; })
|
99
|
+
], PostView.prototype, "post", void 0);
|
100
|
+
__decorate([
|
101
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
102
|
+
], PostView.prototype, "creator", void 0);
|
103
|
+
__decorate([
|
104
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
105
|
+
], PostView.prototype, "community", void 0);
|
62
106
|
__decorate([
|
63
107
|
(0, class_transformer_1.Transform)(function (_a) {
|
64
108
|
var value = _a.value;
|
65
|
-
return (0,
|
109
|
+
return (0, utils_1.toOption)(value);
|
66
110
|
}, { toClassOnly: true }),
|
67
111
|
(0, class_transformer_1.Transform)(function (_a) {
|
68
112
|
var value = _a.value;
|
@@ -76,10 +120,25 @@ exports.PostView = PostView;
|
|
76
120
|
var PostReportView = /** @class */ (function () {
|
77
121
|
function PostReportView() {
|
78
122
|
}
|
123
|
+
__decorate([
|
124
|
+
(0, class_transformer_1.Type)(function () { return source_1.PostReport; })
|
125
|
+
], PostReportView.prototype, "post_report", void 0);
|
126
|
+
__decorate([
|
127
|
+
(0, class_transformer_1.Type)(function () { return source_1.Post; })
|
128
|
+
], PostReportView.prototype, "post", void 0);
|
129
|
+
__decorate([
|
130
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
131
|
+
], PostReportView.prototype, "community", void 0);
|
132
|
+
__decorate([
|
133
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
134
|
+
], PostReportView.prototype, "creator", void 0);
|
135
|
+
__decorate([
|
136
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
137
|
+
], PostReportView.prototype, "post_creator", void 0);
|
79
138
|
__decorate([
|
80
139
|
(0, class_transformer_1.Transform)(function (_a) {
|
81
140
|
var value = _a.value;
|
82
|
-
return (0,
|
141
|
+
return (0, utils_1.toOption)(value);
|
83
142
|
}, { toClassOnly: true }),
|
84
143
|
(0, class_transformer_1.Transform)(function (_a) {
|
85
144
|
var value = _a.value;
|
@@ -90,7 +149,7 @@ var PostReportView = /** @class */ (function () {
|
|
90
149
|
__decorate([
|
91
150
|
(0, class_transformer_1.Transform)(function (_a) {
|
92
151
|
var value = _a.value;
|
93
|
-
return (0,
|
152
|
+
return (0, utils_1.toOption)(value);
|
94
153
|
}, { toClassOnly: true }),
|
95
154
|
(0, class_transformer_1.Transform)(function (_a) {
|
96
155
|
var value = _a.value;
|
@@ -105,10 +164,16 @@ exports.PostReportView = PostReportView;
|
|
105
164
|
var CommentView = /** @class */ (function () {
|
106
165
|
function CommentView() {
|
107
166
|
}
|
167
|
+
__decorate([
|
168
|
+
(0, class_transformer_1.Type)(function () { return source_1.Comment; })
|
169
|
+
], CommentView.prototype, "comment", void 0);
|
170
|
+
__decorate([
|
171
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
172
|
+
], CommentView.prototype, "creator", void 0);
|
108
173
|
__decorate([
|
109
174
|
(0, class_transformer_1.Transform)(function (_a) {
|
110
175
|
var value = _a.value;
|
111
|
-
return (0,
|
176
|
+
return (0, utils_1.toOption)(value);
|
112
177
|
}, { toClassOnly: true }),
|
113
178
|
(0, class_transformer_1.Transform)(function (_a) {
|
114
179
|
var value = _a.value;
|
@@ -117,10 +182,16 @@ var CommentView = /** @class */ (function () {
|
|
117
182
|
(0, class_transformer_1.Expose)(),
|
118
183
|
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
119
184
|
], CommentView.prototype, "recipient", void 0);
|
185
|
+
__decorate([
|
186
|
+
(0, class_transformer_1.Type)(function () { return source_1.Post; })
|
187
|
+
], CommentView.prototype, "post", void 0);
|
188
|
+
__decorate([
|
189
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
190
|
+
], CommentView.prototype, "community", void 0);
|
120
191
|
__decorate([
|
121
192
|
(0, class_transformer_1.Transform)(function (_a) {
|
122
193
|
var value = _a.value;
|
123
|
-
return (0,
|
194
|
+
return (0, utils_1.toOption)(value);
|
124
195
|
}, { toClassOnly: true }),
|
125
196
|
(0, class_transformer_1.Transform)(function (_a) {
|
126
197
|
var value = _a.value;
|
@@ -134,10 +205,28 @@ exports.CommentView = CommentView;
|
|
134
205
|
var CommentReportView = /** @class */ (function () {
|
135
206
|
function CommentReportView() {
|
136
207
|
}
|
208
|
+
__decorate([
|
209
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommentReport; })
|
210
|
+
], CommentReportView.prototype, "comment_report", void 0);
|
211
|
+
__decorate([
|
212
|
+
(0, class_transformer_1.Type)(function () { return source_1.Comment; })
|
213
|
+
], CommentReportView.prototype, "comment", void 0);
|
214
|
+
__decorate([
|
215
|
+
(0, class_transformer_1.Type)(function () { return source_1.Post; })
|
216
|
+
], CommentReportView.prototype, "post", void 0);
|
217
|
+
__decorate([
|
218
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
219
|
+
], CommentReportView.prototype, "community", void 0);
|
220
|
+
__decorate([
|
221
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
222
|
+
], CommentReportView.prototype, "creator", void 0);
|
223
|
+
__decorate([
|
224
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
225
|
+
], CommentReportView.prototype, "comment_creator", void 0);
|
137
226
|
__decorate([
|
138
227
|
(0, class_transformer_1.Transform)(function (_a) {
|
139
228
|
var value = _a.value;
|
140
|
-
return (0,
|
229
|
+
return (0, utils_1.toOption)(value);
|
141
230
|
}, { toClassOnly: true }),
|
142
231
|
(0, class_transformer_1.Transform)(function (_a) {
|
143
232
|
var value = _a.value;
|
@@ -148,7 +237,7 @@ var CommentReportView = /** @class */ (function () {
|
|
148
237
|
__decorate([
|
149
238
|
(0, class_transformer_1.Transform)(function (_a) {
|
150
239
|
var value = _a.value;
|
151
|
-
return (0,
|
240
|
+
return (0, utils_1.toOption)(value);
|
152
241
|
}, { toClassOnly: true }),
|
153
242
|
(0, class_transformer_1.Transform)(function (_a) {
|
154
243
|
var value = _a.value;
|
@@ -163,106 +252,265 @@ exports.CommentReportView = CommentReportView;
|
|
163
252
|
var ModAddCommunityView = /** @class */ (function () {
|
164
253
|
function ModAddCommunityView() {
|
165
254
|
}
|
255
|
+
__decorate([
|
256
|
+
(0, class_transformer_1.Type)(function () { return source_1.ModAddCommunity; })
|
257
|
+
], ModAddCommunityView.prototype, "mod_add_community", void 0);
|
258
|
+
__decorate([
|
259
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
260
|
+
], ModAddCommunityView.prototype, "moderator", void 0);
|
261
|
+
__decorate([
|
262
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
263
|
+
], ModAddCommunityView.prototype, "community", void 0);
|
264
|
+
__decorate([
|
265
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
266
|
+
], ModAddCommunityView.prototype, "modded_person", void 0);
|
166
267
|
return ModAddCommunityView;
|
167
268
|
}());
|
168
269
|
exports.ModAddCommunityView = ModAddCommunityView;
|
169
270
|
var ModTransferCommunityView = /** @class */ (function () {
|
170
271
|
function ModTransferCommunityView() {
|
171
272
|
}
|
273
|
+
__decorate([
|
274
|
+
(0, class_transformer_1.Type)(function () { return source_1.ModTransferCommunity; })
|
275
|
+
], ModTransferCommunityView.prototype, "mod_transfer_community", void 0);
|
276
|
+
__decorate([
|
277
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
278
|
+
], ModTransferCommunityView.prototype, "moderator", void 0);
|
279
|
+
__decorate([
|
280
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
281
|
+
], ModTransferCommunityView.prototype, "community", void 0);
|
282
|
+
__decorate([
|
283
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
284
|
+
], ModTransferCommunityView.prototype, "modded_person", void 0);
|
172
285
|
return ModTransferCommunityView;
|
173
286
|
}());
|
174
287
|
exports.ModTransferCommunityView = ModTransferCommunityView;
|
175
288
|
var ModAddView = /** @class */ (function () {
|
176
289
|
function ModAddView() {
|
177
290
|
}
|
291
|
+
__decorate([
|
292
|
+
(0, class_transformer_1.Type)(function () { return source_1.ModAdd; })
|
293
|
+
], ModAddView.prototype, "mod_add", void 0);
|
294
|
+
__decorate([
|
295
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
296
|
+
], ModAddView.prototype, "moderator", void 0);
|
297
|
+
__decorate([
|
298
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
299
|
+
], ModAddView.prototype, "modded_person", void 0);
|
178
300
|
return ModAddView;
|
179
301
|
}());
|
180
302
|
exports.ModAddView = ModAddView;
|
181
303
|
var ModBanFromCommunityView = /** @class */ (function () {
|
182
304
|
function ModBanFromCommunityView() {
|
183
305
|
}
|
306
|
+
__decorate([
|
307
|
+
(0, class_transformer_1.Type)(function () { return source_1.ModBanFromCommunity; })
|
308
|
+
], ModBanFromCommunityView.prototype, "mod_ban_from_community", void 0);
|
309
|
+
__decorate([
|
310
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
311
|
+
], ModBanFromCommunityView.prototype, "moderator", void 0);
|
312
|
+
__decorate([
|
313
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
314
|
+
], ModBanFromCommunityView.prototype, "community", void 0);
|
315
|
+
__decorate([
|
316
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
317
|
+
], ModBanFromCommunityView.prototype, "banned_person", void 0);
|
184
318
|
return ModBanFromCommunityView;
|
185
319
|
}());
|
186
320
|
exports.ModBanFromCommunityView = ModBanFromCommunityView;
|
187
321
|
var ModBanView = /** @class */ (function () {
|
188
322
|
function ModBanView() {
|
189
323
|
}
|
324
|
+
__decorate([
|
325
|
+
(0, class_transformer_1.Type)(function () { return source_1.ModBan; })
|
326
|
+
], ModBanView.prototype, "mod_ban", void 0);
|
327
|
+
__decorate([
|
328
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
329
|
+
], ModBanView.prototype, "moderator", void 0);
|
330
|
+
__decorate([
|
331
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
332
|
+
], ModBanView.prototype, "banned_person", void 0);
|
190
333
|
return ModBanView;
|
191
334
|
}());
|
192
335
|
exports.ModBanView = ModBanView;
|
193
336
|
var ModLockPostView = /** @class */ (function () {
|
194
337
|
function ModLockPostView() {
|
195
338
|
}
|
339
|
+
__decorate([
|
340
|
+
(0, class_transformer_1.Type)(function () { return source_1.ModLockPost; })
|
341
|
+
], ModLockPostView.prototype, "mod_lock_post", void 0);
|
342
|
+
__decorate([
|
343
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
344
|
+
], ModLockPostView.prototype, "moderator", void 0);
|
345
|
+
__decorate([
|
346
|
+
(0, class_transformer_1.Type)(function () { return source_1.Post; })
|
347
|
+
], ModLockPostView.prototype, "post", void 0);
|
348
|
+
__decorate([
|
349
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
350
|
+
], ModLockPostView.prototype, "community", void 0);
|
196
351
|
return ModLockPostView;
|
197
352
|
}());
|
198
353
|
exports.ModLockPostView = ModLockPostView;
|
199
354
|
var ModRemoveCommentView = /** @class */ (function () {
|
200
355
|
function ModRemoveCommentView() {
|
201
356
|
}
|
357
|
+
__decorate([
|
358
|
+
(0, class_transformer_1.Type)(function () { return source_1.ModRemoveComment; })
|
359
|
+
], ModRemoveCommentView.prototype, "mod_remove_comment", void 0);
|
360
|
+
__decorate([
|
361
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
362
|
+
], ModRemoveCommentView.prototype, "moderator", void 0);
|
363
|
+
__decorate([
|
364
|
+
(0, class_transformer_1.Type)(function () { return source_1.Comment; })
|
365
|
+
], ModRemoveCommentView.prototype, "comment", void 0);
|
366
|
+
__decorate([
|
367
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
368
|
+
], ModRemoveCommentView.prototype, "commenter", void 0);
|
369
|
+
__decorate([
|
370
|
+
(0, class_transformer_1.Type)(function () { return source_1.Post; })
|
371
|
+
], ModRemoveCommentView.prototype, "post", void 0);
|
372
|
+
__decorate([
|
373
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
374
|
+
], ModRemoveCommentView.prototype, "community", void 0);
|
202
375
|
return ModRemoveCommentView;
|
203
376
|
}());
|
204
377
|
exports.ModRemoveCommentView = ModRemoveCommentView;
|
205
378
|
var ModRemoveCommunityView = /** @class */ (function () {
|
206
379
|
function ModRemoveCommunityView() {
|
207
380
|
}
|
381
|
+
__decorate([
|
382
|
+
(0, class_transformer_1.Type)(function () { return source_1.ModRemoveCommunity; })
|
383
|
+
], ModRemoveCommunityView.prototype, "mod_remove_community", void 0);
|
384
|
+
__decorate([
|
385
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
386
|
+
], ModRemoveCommunityView.prototype, "moderator", void 0);
|
387
|
+
__decorate([
|
388
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
389
|
+
], ModRemoveCommunityView.prototype, "community", void 0);
|
208
390
|
return ModRemoveCommunityView;
|
209
391
|
}());
|
210
392
|
exports.ModRemoveCommunityView = ModRemoveCommunityView;
|
211
393
|
var ModRemovePostView = /** @class */ (function () {
|
212
394
|
function ModRemovePostView() {
|
213
395
|
}
|
396
|
+
__decorate([
|
397
|
+
(0, class_transformer_1.Type)(function () { return source_1.ModRemovePost; })
|
398
|
+
], ModRemovePostView.prototype, "mod_remove_post", void 0);
|
399
|
+
__decorate([
|
400
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
401
|
+
], ModRemovePostView.prototype, "moderator", void 0);
|
402
|
+
__decorate([
|
403
|
+
(0, class_transformer_1.Type)(function () { return source_1.Post; })
|
404
|
+
], ModRemovePostView.prototype, "post", void 0);
|
405
|
+
__decorate([
|
406
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
407
|
+
], ModRemovePostView.prototype, "community", void 0);
|
214
408
|
return ModRemovePostView;
|
215
409
|
}());
|
216
410
|
exports.ModRemovePostView = ModRemovePostView;
|
217
411
|
var ModStickyPostView = /** @class */ (function () {
|
218
412
|
function ModStickyPostView() {
|
219
413
|
}
|
414
|
+
__decorate([
|
415
|
+
(0, class_transformer_1.Type)(function () { return source_1.ModStickyPost; })
|
416
|
+
], ModStickyPostView.prototype, "mod_sticky_post", void 0);
|
417
|
+
__decorate([
|
418
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
419
|
+
], ModStickyPostView.prototype, "moderator", void 0);
|
420
|
+
__decorate([
|
421
|
+
(0, class_transformer_1.Type)(function () { return source_1.Post; })
|
422
|
+
], ModStickyPostView.prototype, "post", void 0);
|
423
|
+
__decorate([
|
424
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
425
|
+
], ModStickyPostView.prototype, "community", void 0);
|
220
426
|
return ModStickyPostView;
|
221
427
|
}());
|
222
428
|
exports.ModStickyPostView = ModStickyPostView;
|
223
429
|
var CommunityFollowerView = /** @class */ (function () {
|
224
430
|
function CommunityFollowerView() {
|
225
431
|
}
|
432
|
+
__decorate([
|
433
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
434
|
+
], CommunityFollowerView.prototype, "community", void 0);
|
435
|
+
__decorate([
|
436
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
437
|
+
], CommunityFollowerView.prototype, "follower", void 0);
|
226
438
|
return CommunityFollowerView;
|
227
439
|
}());
|
228
440
|
exports.CommunityFollowerView = CommunityFollowerView;
|
229
441
|
var CommunityBlockView = /** @class */ (function () {
|
230
442
|
function CommunityBlockView() {
|
231
443
|
}
|
444
|
+
__decorate([
|
445
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
446
|
+
], CommunityBlockView.prototype, "person", void 0);
|
447
|
+
__decorate([
|
448
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
449
|
+
], CommunityBlockView.prototype, "community", void 0);
|
232
450
|
return CommunityBlockView;
|
233
451
|
}());
|
234
452
|
exports.CommunityBlockView = CommunityBlockView;
|
235
453
|
var CommunityModeratorView = /** @class */ (function () {
|
236
454
|
function CommunityModeratorView() {
|
237
455
|
}
|
456
|
+
__decorate([
|
457
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
458
|
+
], CommunityModeratorView.prototype, "community", void 0);
|
459
|
+
__decorate([
|
460
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
461
|
+
], CommunityModeratorView.prototype, "moderator", void 0);
|
238
462
|
return CommunityModeratorView;
|
239
463
|
}());
|
240
464
|
exports.CommunityModeratorView = CommunityModeratorView;
|
241
465
|
var CommunityPersonBanView = /** @class */ (function () {
|
242
466
|
function CommunityPersonBanView() {
|
243
467
|
}
|
468
|
+
__decorate([
|
469
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
470
|
+
], CommunityPersonBanView.prototype, "community", void 0);
|
471
|
+
__decorate([
|
472
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
473
|
+
], CommunityPersonBanView.prototype, "person", void 0);
|
244
474
|
return CommunityPersonBanView;
|
245
475
|
}());
|
246
476
|
exports.CommunityPersonBanView = CommunityPersonBanView;
|
247
477
|
var PersonBlockView = /** @class */ (function () {
|
248
478
|
function PersonBlockView() {
|
249
479
|
}
|
480
|
+
__decorate([
|
481
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
482
|
+
], PersonBlockView.prototype, "person", void 0);
|
483
|
+
__decorate([
|
484
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
485
|
+
], PersonBlockView.prototype, "target", void 0);
|
250
486
|
return PersonBlockView;
|
251
487
|
}());
|
252
488
|
exports.PersonBlockView = PersonBlockView;
|
253
489
|
var CommunityView = /** @class */ (function () {
|
254
490
|
function CommunityView() {
|
255
491
|
}
|
492
|
+
__decorate([
|
493
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
494
|
+
], CommunityView.prototype, "community", void 0);
|
256
495
|
return CommunityView;
|
257
496
|
}());
|
258
497
|
exports.CommunityView = CommunityView;
|
259
498
|
var RegistrationApplicationView = /** @class */ (function () {
|
260
499
|
function RegistrationApplicationView() {
|
261
500
|
}
|
501
|
+
__decorate([
|
502
|
+
(0, class_transformer_1.Type)(function () { return source_1.RegistrationApplication; })
|
503
|
+
], RegistrationApplicationView.prototype, "registration_application", void 0);
|
504
|
+
__decorate([
|
505
|
+
(0, class_transformer_1.Type)(function () { return source_1.LocalUserSettings; })
|
506
|
+
], RegistrationApplicationView.prototype, "creator_local_user", void 0);
|
507
|
+
__decorate([
|
508
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
509
|
+
], RegistrationApplicationView.prototype, "creator", void 0);
|
262
510
|
__decorate([
|
263
511
|
(0, class_transformer_1.Transform)(function (_a) {
|
264
512
|
var value = _a.value;
|
265
|
-
return (0,
|
513
|
+
return (0, utils_1.toOption)(value);
|
266
514
|
}, { toClassOnly: true }),
|
267
515
|
(0, class_transformer_1.Transform)(function (_a) {
|
268
516
|
var value = _a.value;
|
package/dist/utils.d.ts
CHANGED
package/dist/utils.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.toUndefined = void 0;
|
3
|
+
exports.toOption = exports.toUndefined = void 0;
|
4
|
+
var monads_1 = require("@sniptt/monads");
|
4
5
|
/**
|
5
6
|
* Converts an option to an undefined. Necessary for API requests.
|
6
7
|
*/
|
@@ -8,3 +9,7 @@ function toUndefined(opt) {
|
|
8
9
|
return opt.isSome() ? opt.unwrap() : undefined;
|
9
10
|
}
|
10
11
|
exports.toUndefined = toUndefined;
|
12
|
+
function toOption(val) {
|
13
|
+
return (0, monads_1.Some)(val || undefined);
|
14
|
+
}
|
15
|
+
exports.toOption = toOption;
|
package/dist/websocket.js
CHANGED
@@ -487,7 +487,7 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
487
487
|
}());
|
488
488
|
exports.LemmyWebsocket = LemmyWebsocket;
|
489
489
|
function wrapper(op, data) {
|
490
|
-
var send = { op: others_1.UserOperation[op], data:
|
490
|
+
var send = { op: others_1.UserOperation[op], data: data };
|
491
491
|
console.log(send);
|
492
492
|
return JSON.stringify(send);
|
493
493
|
}
|
package/package.json
CHANGED