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.
@@ -1,3 +1,6 @@
1
+ import { Option } from "@sniptt/monads";
2
+ import "reflect-metadata";
3
+ import { ListingType, SortType } from "../others";
1
4
  import { Site } from "../source";
2
5
  import { CommunityModeratorView, CommunityView, PersonViewSafe } from "../views";
3
6
  /**
@@ -5,121 +8,126 @@ import { CommunityModeratorView, CommunityView, PersonViewSafe } from "../views"
5
8
  *
6
9
  * To get a federated community by name, use `name@instance.tld` .
7
10
  */
8
- export interface GetCommunity {
9
- id?: number;
10
- name?: string;
11
- auth?: string;
11
+ export declare class GetCommunity {
12
+ id: Option<number>;
13
+ name: Option<string>;
14
+ auth: Option<string>;
15
+ constructor(init: GetCommunity);
12
16
  }
13
- export interface GetCommunityResponse {
17
+ export declare class GetCommunityResponse {
14
18
  community_view: CommunityView;
15
- site?: Site;
19
+ site: Option<Site>;
16
20
  moderators: CommunityModeratorView[];
17
21
  online: number;
18
22
  }
19
- export interface CreateCommunity {
23
+ export declare class CreateCommunity {
20
24
  name: string;
21
25
  title: string;
22
- description?: string;
23
- icon?: string;
24
- banner?: string;
25
- nsfw?: boolean;
26
- posting_restricted_to_mods?: boolean;
26
+ description: Option<string>;
27
+ icon: Option<string>;
28
+ banner: Option<string>;
29
+ nsfw: Option<boolean>;
30
+ posting_restricted_to_mods: Option<boolean>;
27
31
  auth: string;
32
+ constructor(init: CreateCommunity);
28
33
  }
29
- export interface CommunityResponse {
34
+ export declare class CommunityResponse {
30
35
  community_view: CommunityView;
31
36
  }
32
- export interface ListCommunities {
33
- /**
34
- * The [[ListingType]].
35
- */
36
- type_?: string;
37
- /**
38
- * The [[SortType]].
39
- */
40
- sort?: string;
41
- page?: number;
42
- limit?: number;
43
- auth?: string;
37
+ export declare class ListCommunities {
38
+ type_: Option<ListingType>;
39
+ sort: Option<SortType>;
40
+ page: Option<number>;
41
+ limit: Option<number>;
42
+ auth: Option<string>;
43
+ constructor(init: ListCommunities);
44
44
  }
45
- export interface ListCommunitiesResponse {
45
+ export declare class ListCommunitiesResponse {
46
46
  communities: CommunityView[];
47
47
  }
48
- export interface BanFromCommunity {
48
+ export declare class BanFromCommunity {
49
49
  community_id: number;
50
50
  person_id: number;
51
51
  ban: boolean;
52
52
  /**
53
53
  * Removes/Restores their comments and posts for that community.
54
54
  */
55
- remove_data?: boolean;
56
- reason?: string;
55
+ remove_data: Option<boolean>;
56
+ reason: Option<string>;
57
57
  /**
58
58
  * The expire time in Unix seconds
59
59
  */
60
- expires?: number;
60
+ expires: Option<number>;
61
61
  auth: string;
62
+ constructor(init: BanFromCommunity);
62
63
  }
63
- export interface BanFromCommunityResponse {
64
+ export declare class BanFromCommunityResponse {
64
65
  person_view: PersonViewSafe;
65
66
  banned: boolean;
66
67
  }
67
- export interface AddModToCommunity {
68
+ export declare class AddModToCommunity {
68
69
  community_id: number;
69
70
  person_id: number;
70
71
  added: boolean;
71
72
  auth: string;
73
+ constructor(init: AddModToCommunity);
72
74
  }
73
- export interface AddModToCommunityResponse {
75
+ export declare class AddModToCommunityResponse {
74
76
  moderators: CommunityModeratorView[];
75
77
  }
76
78
  /**
77
79
  * Only mods can edit a community.
78
80
  */
79
- export interface EditCommunity {
81
+ export declare class EditCommunity {
80
82
  community_id: number;
81
- title?: string;
82
- description?: string;
83
- icon?: string;
84
- banner?: string;
85
- nsfw?: boolean;
86
- posting_restricted_to_mods?: boolean;
83
+ title: Option<string>;
84
+ description: Option<string>;
85
+ icon: Option<string>;
86
+ banner: Option<string>;
87
+ nsfw: Option<boolean>;
88
+ posting_restricted_to_mods: Option<boolean>;
87
89
  auth: string;
90
+ constructor(init: EditCommunity);
88
91
  }
89
- export interface DeleteCommunity {
92
+ export declare class DeleteCommunity {
90
93
  community_id: number;
91
94
  deleted: boolean;
92
95
  auth: string;
96
+ constructor(init: DeleteCommunity);
93
97
  }
94
98
  /**
95
99
  * Only admins can remove a community.
96
100
  */
97
- export interface RemoveCommunity {
101
+ export declare class RemoveCommunity {
98
102
  community_id: number;
99
103
  removed: boolean;
100
- reason?: string;
104
+ reason: Option<string>;
101
105
  /**
102
106
  * The expire time in Unix seconds
103
107
  */
104
- expires?: number;
108
+ expires: Option<number>;
105
109
  auth: string;
110
+ constructor(init: RemoveCommunity);
106
111
  }
107
- export interface FollowCommunity {
112
+ export declare class FollowCommunity {
108
113
  community_id: number;
109
114
  follow: boolean;
110
115
  auth: string;
116
+ constructor(init: FollowCommunity);
111
117
  }
112
- export interface TransferCommunity {
118
+ export declare class TransferCommunity {
113
119
  community_id: number;
114
120
  person_id: number;
115
121
  auth: string;
122
+ constructor(init: TransferCommunity);
116
123
  }
117
- export interface BlockCommunity {
124
+ export declare class BlockCommunity {
118
125
  community_id: number;
119
126
  block: boolean;
120
127
  auth: string;
128
+ constructor(init: BlockCommunity);
121
129
  }
122
- export interface BlockCommunityResponse {
130
+ export declare class BlockCommunityResponse {
123
131
  community_view: CommunityView;
124
132
  blocked: boolean;
125
133
  }
@@ -1,2 +1,435 @@
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.BlockCommunityResponse = exports.BlockCommunity = exports.TransferCommunity = exports.FollowCommunity = exports.RemoveCommunity = exports.DeleteCommunity = exports.EditCommunity = exports.AddModToCommunityResponse = exports.AddModToCommunity = exports.BanFromCommunityResponse = exports.BanFromCommunity = exports.ListCommunitiesResponse = exports.ListCommunities = exports.CommunityResponse = exports.CreateCommunity = exports.GetCommunityResponse = exports.GetCommunity = void 0;
10
+ var class_transformer_1 = require("class-transformer");
11
+ require("reflect-metadata");
12
+ var utils_1 = require("../../utils");
13
+ var source_1 = require("../source");
14
+ var views_1 = require("../views");
15
+ /**
16
+ * You can use either `id` or `name` as an id.
17
+ *
18
+ * To get a federated community by name, use `name@instance.tld` .
19
+ */
20
+ var GetCommunity = /** @class */ (function () {
21
+ function GetCommunity(init) {
22
+ Object.assign(this, init);
23
+ }
24
+ __decorate([
25
+ (0, class_transformer_1.Transform)(function (_a) {
26
+ var value = _a.value;
27
+ return (0, utils_1.toOption)(value);
28
+ }, { toClassOnly: true }),
29
+ (0, class_transformer_1.Transform)(function (_a) {
30
+ var value = _a.value;
31
+ return (0, utils_1.toUndefined)(value);
32
+ }, { toPlainOnly: true }),
33
+ (0, class_transformer_1.Expose)()
34
+ ], GetCommunity.prototype, "id", void 0);
35
+ __decorate([
36
+ (0, class_transformer_1.Transform)(function (_a) {
37
+ var value = _a.value;
38
+ return (0, utils_1.toOption)(value);
39
+ }, { toClassOnly: true }),
40
+ (0, class_transformer_1.Transform)(function (_a) {
41
+ var value = _a.value;
42
+ return (0, utils_1.toUndefined)(value);
43
+ }, { toPlainOnly: true }),
44
+ (0, class_transformer_1.Expose)()
45
+ ], GetCommunity.prototype, "name", void 0);
46
+ __decorate([
47
+ (0, class_transformer_1.Transform)(function (_a) {
48
+ var value = _a.value;
49
+ return (0, utils_1.toOption)(value);
50
+ }, { toClassOnly: true }),
51
+ (0, class_transformer_1.Transform)(function (_a) {
52
+ var value = _a.value;
53
+ return (0, utils_1.toUndefined)(value);
54
+ }, { toPlainOnly: true }),
55
+ (0, class_transformer_1.Expose)()
56
+ ], GetCommunity.prototype, "auth", void 0);
57
+ return GetCommunity;
58
+ }());
59
+ exports.GetCommunity = GetCommunity;
60
+ var GetCommunityResponse = /** @class */ (function () {
61
+ function GetCommunityResponse() {
62
+ }
63
+ __decorate([
64
+ (0, class_transformer_1.Type)(function () { return views_1.CommunityView; })
65
+ ], GetCommunityResponse.prototype, "community_view", void 0);
66
+ __decorate([
67
+ (0, class_transformer_1.Transform)(function (_a) {
68
+ var value = _a.value;
69
+ return (0, utils_1.toOption)(value);
70
+ }, { toClassOnly: true }),
71
+ (0, class_transformer_1.Transform)(function (_a) {
72
+ var value = _a.value;
73
+ return (0, utils_1.toUndefined)(value);
74
+ }, { toPlainOnly: true }),
75
+ (0, class_transformer_1.Expose)(),
76
+ (0, class_transformer_1.Type)(function () { return source_1.Site; })
77
+ ], GetCommunityResponse.prototype, "site", void 0);
78
+ __decorate([
79
+ (0, class_transformer_1.Type)(function () { return views_1.CommunityModeratorView; })
80
+ ], GetCommunityResponse.prototype, "moderators", void 0);
81
+ return GetCommunityResponse;
82
+ }());
83
+ exports.GetCommunityResponse = GetCommunityResponse;
84
+ var CreateCommunity = /** @class */ (function () {
85
+ function CreateCommunity(init) {
86
+ Object.assign(this, init);
87
+ }
88
+ __decorate([
89
+ (0, class_transformer_1.Transform)(function (_a) {
90
+ var value = _a.value;
91
+ return (0, utils_1.toOption)(value);
92
+ }, { toClassOnly: true }),
93
+ (0, class_transformer_1.Transform)(function (_a) {
94
+ var value = _a.value;
95
+ return (0, utils_1.toUndefined)(value);
96
+ }, { toPlainOnly: true }),
97
+ (0, class_transformer_1.Expose)()
98
+ ], CreateCommunity.prototype, "description", void 0);
99
+ __decorate([
100
+ (0, class_transformer_1.Transform)(function (_a) {
101
+ var value = _a.value;
102
+ return (0, utils_1.toOption)(value);
103
+ }, { toClassOnly: true }),
104
+ (0, class_transformer_1.Transform)(function (_a) {
105
+ var value = _a.value;
106
+ return (0, utils_1.toUndefined)(value);
107
+ }, { toPlainOnly: true }),
108
+ (0, class_transformer_1.Expose)()
109
+ ], CreateCommunity.prototype, "icon", void 0);
110
+ __decorate([
111
+ (0, class_transformer_1.Transform)(function (_a) {
112
+ var value = _a.value;
113
+ return (0, utils_1.toOption)(value);
114
+ }, { toClassOnly: true }),
115
+ (0, class_transformer_1.Transform)(function (_a) {
116
+ var value = _a.value;
117
+ return (0, utils_1.toUndefined)(value);
118
+ }, { toPlainOnly: true }),
119
+ (0, class_transformer_1.Expose)()
120
+ ], CreateCommunity.prototype, "banner", void 0);
121
+ __decorate([
122
+ (0, class_transformer_1.Transform)(function (_a) {
123
+ var value = _a.value;
124
+ return (0, utils_1.toOption)(value);
125
+ }, { toClassOnly: true }),
126
+ (0, class_transformer_1.Transform)(function (_a) {
127
+ var value = _a.value;
128
+ return (0, utils_1.toUndefined)(value);
129
+ }, { toPlainOnly: true }),
130
+ (0, class_transformer_1.Expose)()
131
+ ], CreateCommunity.prototype, "nsfw", void 0);
132
+ __decorate([
133
+ (0, class_transformer_1.Transform)(function (_a) {
134
+ var value = _a.value;
135
+ return (0, utils_1.toOption)(value);
136
+ }, { toClassOnly: true }),
137
+ (0, class_transformer_1.Transform)(function (_a) {
138
+ var value = _a.value;
139
+ return (0, utils_1.toUndefined)(value);
140
+ }, { toPlainOnly: true }),
141
+ (0, class_transformer_1.Expose)()
142
+ ], CreateCommunity.prototype, "posting_restricted_to_mods", void 0);
143
+ return CreateCommunity;
144
+ }());
145
+ exports.CreateCommunity = CreateCommunity;
146
+ var CommunityResponse = /** @class */ (function () {
147
+ function CommunityResponse() {
148
+ }
149
+ __decorate([
150
+ (0, class_transformer_1.Type)(function () { return views_1.CommunityView; })
151
+ ], CommunityResponse.prototype, "community_view", void 0);
152
+ return CommunityResponse;
153
+ }());
154
+ exports.CommunityResponse = CommunityResponse;
155
+ var ListCommunities = /** @class */ (function () {
156
+ function ListCommunities(init) {
157
+ Object.assign(this, init);
158
+ }
159
+ __decorate([
160
+ (0, class_transformer_1.Transform)(function (_a) {
161
+ var value = _a.value;
162
+ return (0, utils_1.toOption)(value);
163
+ }, { toClassOnly: true }),
164
+ (0, class_transformer_1.Transform)(function (_a) {
165
+ var value = _a.value;
166
+ return (0, utils_1.toUndefined)(value);
167
+ }, { toPlainOnly: true }),
168
+ (0, class_transformer_1.Expose)()
169
+ ], ListCommunities.prototype, "type_", void 0);
170
+ __decorate([
171
+ (0, class_transformer_1.Transform)(function (_a) {
172
+ var value = _a.value;
173
+ return (0, utils_1.toOption)(value);
174
+ }, { toClassOnly: true }),
175
+ (0, class_transformer_1.Transform)(function (_a) {
176
+ var value = _a.value;
177
+ return (0, utils_1.toUndefined)(value);
178
+ }, { toPlainOnly: true }),
179
+ (0, class_transformer_1.Expose)()
180
+ ], ListCommunities.prototype, "sort", void 0);
181
+ __decorate([
182
+ (0, class_transformer_1.Transform)(function (_a) {
183
+ var value = _a.value;
184
+ return (0, utils_1.toOption)(value);
185
+ }, { toClassOnly: true }),
186
+ (0, class_transformer_1.Transform)(function (_a) {
187
+ var value = _a.value;
188
+ return (0, utils_1.toUndefined)(value);
189
+ }, { toPlainOnly: true }),
190
+ (0, class_transformer_1.Expose)()
191
+ ], ListCommunities.prototype, "page", void 0);
192
+ __decorate([
193
+ (0, class_transformer_1.Transform)(function (_a) {
194
+ var value = _a.value;
195
+ return (0, utils_1.toOption)(value);
196
+ }, { toClassOnly: true }),
197
+ (0, class_transformer_1.Transform)(function (_a) {
198
+ var value = _a.value;
199
+ return (0, utils_1.toUndefined)(value);
200
+ }, { toPlainOnly: true }),
201
+ (0, class_transformer_1.Expose)()
202
+ ], ListCommunities.prototype, "limit", void 0);
203
+ __decorate([
204
+ (0, class_transformer_1.Transform)(function (_a) {
205
+ var value = _a.value;
206
+ return (0, utils_1.toOption)(value);
207
+ }, { toClassOnly: true }),
208
+ (0, class_transformer_1.Transform)(function (_a) {
209
+ var value = _a.value;
210
+ return (0, utils_1.toUndefined)(value);
211
+ }, { toPlainOnly: true }),
212
+ (0, class_transformer_1.Expose)()
213
+ ], ListCommunities.prototype, "auth", void 0);
214
+ return ListCommunities;
215
+ }());
216
+ exports.ListCommunities = ListCommunities;
217
+ var ListCommunitiesResponse = /** @class */ (function () {
218
+ function ListCommunitiesResponse() {
219
+ }
220
+ __decorate([
221
+ (0, class_transformer_1.Type)(function () { return views_1.CommunityView; })
222
+ ], ListCommunitiesResponse.prototype, "communities", void 0);
223
+ return ListCommunitiesResponse;
224
+ }());
225
+ exports.ListCommunitiesResponse = ListCommunitiesResponse;
226
+ var BanFromCommunity = /** @class */ (function () {
227
+ function BanFromCommunity(init) {
228
+ Object.assign(this, init);
229
+ }
230
+ __decorate([
231
+ (0, class_transformer_1.Transform)(function (_a) {
232
+ var value = _a.value;
233
+ return (0, utils_1.toOption)(value);
234
+ }, { toClassOnly: true }),
235
+ (0, class_transformer_1.Transform)(function (_a) {
236
+ var value = _a.value;
237
+ return (0, utils_1.toUndefined)(value);
238
+ }, { toPlainOnly: true }),
239
+ (0, class_transformer_1.Expose)()
240
+ ], BanFromCommunity.prototype, "remove_data", void 0);
241
+ __decorate([
242
+ (0, class_transformer_1.Transform)(function (_a) {
243
+ var value = _a.value;
244
+ return (0, utils_1.toOption)(value);
245
+ }, { toClassOnly: true }),
246
+ (0, class_transformer_1.Transform)(function (_a) {
247
+ var value = _a.value;
248
+ return (0, utils_1.toUndefined)(value);
249
+ }, { toPlainOnly: true }),
250
+ (0, class_transformer_1.Expose)()
251
+ ], BanFromCommunity.prototype, "reason", void 0);
252
+ __decorate([
253
+ (0, class_transformer_1.Transform)(function (_a) {
254
+ var value = _a.value;
255
+ return (0, utils_1.toOption)(value);
256
+ }, { toClassOnly: true }),
257
+ (0, class_transformer_1.Transform)(function (_a) {
258
+ var value = _a.value;
259
+ return (0, utils_1.toUndefined)(value);
260
+ }, { toPlainOnly: true }),
261
+ (0, class_transformer_1.Expose)()
262
+ ], BanFromCommunity.prototype, "expires", void 0);
263
+ return BanFromCommunity;
264
+ }());
265
+ exports.BanFromCommunity = BanFromCommunity;
266
+ var BanFromCommunityResponse = /** @class */ (function () {
267
+ function BanFromCommunityResponse() {
268
+ }
269
+ __decorate([
270
+ (0, class_transformer_1.Type)(function () { return views_1.PersonViewSafe; })
271
+ ], BanFromCommunityResponse.prototype, "person_view", void 0);
272
+ return BanFromCommunityResponse;
273
+ }());
274
+ exports.BanFromCommunityResponse = BanFromCommunityResponse;
275
+ var AddModToCommunity = /** @class */ (function () {
276
+ function AddModToCommunity(init) {
277
+ Object.assign(this, init);
278
+ }
279
+ return AddModToCommunity;
280
+ }());
281
+ exports.AddModToCommunity = AddModToCommunity;
282
+ var AddModToCommunityResponse = /** @class */ (function () {
283
+ function AddModToCommunityResponse() {
284
+ }
285
+ __decorate([
286
+ (0, class_transformer_1.Type)(function () { return views_1.CommunityModeratorView; })
287
+ ], AddModToCommunityResponse.prototype, "moderators", void 0);
288
+ return AddModToCommunityResponse;
289
+ }());
290
+ exports.AddModToCommunityResponse = AddModToCommunityResponse;
291
+ /**
292
+ * Only mods can edit a community.
293
+ */
294
+ var EditCommunity = /** @class */ (function () {
295
+ function EditCommunity(init) {
296
+ Object.assign(this, init);
297
+ }
298
+ __decorate([
299
+ (0, class_transformer_1.Transform)(function (_a) {
300
+ var value = _a.value;
301
+ return (0, utils_1.toOption)(value);
302
+ }, { toClassOnly: true }),
303
+ (0, class_transformer_1.Transform)(function (_a) {
304
+ var value = _a.value;
305
+ return (0, utils_1.toUndefined)(value);
306
+ }, { toPlainOnly: true }),
307
+ (0, class_transformer_1.Expose)()
308
+ ], EditCommunity.prototype, "title", void 0);
309
+ __decorate([
310
+ (0, class_transformer_1.Transform)(function (_a) {
311
+ var value = _a.value;
312
+ return (0, utils_1.toOption)(value);
313
+ }, { toClassOnly: true }),
314
+ (0, class_transformer_1.Transform)(function (_a) {
315
+ var value = _a.value;
316
+ return (0, utils_1.toUndefined)(value);
317
+ }, { toPlainOnly: true }),
318
+ (0, class_transformer_1.Expose)()
319
+ ], EditCommunity.prototype, "description", void 0);
320
+ __decorate([
321
+ (0, class_transformer_1.Transform)(function (_a) {
322
+ var value = _a.value;
323
+ return (0, utils_1.toOption)(value);
324
+ }, { toClassOnly: true }),
325
+ (0, class_transformer_1.Transform)(function (_a) {
326
+ var value = _a.value;
327
+ return (0, utils_1.toUndefined)(value);
328
+ }, { toPlainOnly: true }),
329
+ (0, class_transformer_1.Expose)()
330
+ ], EditCommunity.prototype, "icon", void 0);
331
+ __decorate([
332
+ (0, class_transformer_1.Transform)(function (_a) {
333
+ var value = _a.value;
334
+ return (0, utils_1.toOption)(value);
335
+ }, { toClassOnly: true }),
336
+ (0, class_transformer_1.Transform)(function (_a) {
337
+ var value = _a.value;
338
+ return (0, utils_1.toUndefined)(value);
339
+ }, { toPlainOnly: true }),
340
+ (0, class_transformer_1.Expose)()
341
+ ], EditCommunity.prototype, "banner", void 0);
342
+ __decorate([
343
+ (0, class_transformer_1.Transform)(function (_a) {
344
+ var value = _a.value;
345
+ return (0, utils_1.toOption)(value);
346
+ }, { toClassOnly: true }),
347
+ (0, class_transformer_1.Transform)(function (_a) {
348
+ var value = _a.value;
349
+ return (0, utils_1.toUndefined)(value);
350
+ }, { toPlainOnly: true }),
351
+ (0, class_transformer_1.Expose)()
352
+ ], EditCommunity.prototype, "nsfw", void 0);
353
+ __decorate([
354
+ (0, class_transformer_1.Transform)(function (_a) {
355
+ var value = _a.value;
356
+ return (0, utils_1.toOption)(value);
357
+ }, { toClassOnly: true }),
358
+ (0, class_transformer_1.Transform)(function (_a) {
359
+ var value = _a.value;
360
+ return (0, utils_1.toUndefined)(value);
361
+ }, { toPlainOnly: true }),
362
+ (0, class_transformer_1.Expose)()
363
+ ], EditCommunity.prototype, "posting_restricted_to_mods", void 0);
364
+ return EditCommunity;
365
+ }());
366
+ exports.EditCommunity = EditCommunity;
367
+ var DeleteCommunity = /** @class */ (function () {
368
+ function DeleteCommunity(init) {
369
+ Object.assign(this, init);
370
+ }
371
+ return DeleteCommunity;
372
+ }());
373
+ exports.DeleteCommunity = DeleteCommunity;
374
+ /**
375
+ * Only admins can remove a community.
376
+ */
377
+ var RemoveCommunity = /** @class */ (function () {
378
+ function RemoveCommunity(init) {
379
+ Object.assign(this, init);
380
+ }
381
+ __decorate([
382
+ (0, class_transformer_1.Transform)(function (_a) {
383
+ var value = _a.value;
384
+ return (0, utils_1.toOption)(value);
385
+ }, { toClassOnly: true }),
386
+ (0, class_transformer_1.Transform)(function (_a) {
387
+ var value = _a.value;
388
+ return (0, utils_1.toUndefined)(value);
389
+ }, { toPlainOnly: true }),
390
+ (0, class_transformer_1.Expose)()
391
+ ], RemoveCommunity.prototype, "reason", void 0);
392
+ __decorate([
393
+ (0, class_transformer_1.Transform)(function (_a) {
394
+ var value = _a.value;
395
+ return (0, utils_1.toOption)(value);
396
+ }, { toClassOnly: true }),
397
+ (0, class_transformer_1.Transform)(function (_a) {
398
+ var value = _a.value;
399
+ return (0, utils_1.toUndefined)(value);
400
+ }, { toPlainOnly: true }),
401
+ (0, class_transformer_1.Expose)()
402
+ ], RemoveCommunity.prototype, "expires", void 0);
403
+ return RemoveCommunity;
404
+ }());
405
+ exports.RemoveCommunity = RemoveCommunity;
406
+ var FollowCommunity = /** @class */ (function () {
407
+ function FollowCommunity(init) {
408
+ Object.assign(this, init);
409
+ }
410
+ return FollowCommunity;
411
+ }());
412
+ exports.FollowCommunity = FollowCommunity;
413
+ var TransferCommunity = /** @class */ (function () {
414
+ function TransferCommunity(init) {
415
+ Object.assign(this, init);
416
+ }
417
+ return TransferCommunity;
418
+ }());
419
+ exports.TransferCommunity = TransferCommunity;
420
+ var BlockCommunity = /** @class */ (function () {
421
+ function BlockCommunity(init) {
422
+ Object.assign(this, init);
423
+ }
424
+ return BlockCommunity;
425
+ }());
426
+ exports.BlockCommunity = BlockCommunity;
427
+ var BlockCommunityResponse = /** @class */ (function () {
428
+ function BlockCommunityResponse() {
429
+ }
430
+ __decorate([
431
+ (0, class_transformer_1.Type)(function () { return views_1.CommunityView; })
432
+ ], BlockCommunityResponse.prototype, "community_view", void 0);
433
+ return BlockCommunityResponse;
434
+ }());
435
+ exports.BlockCommunityResponse = BlockCommunityResponse;
@@ -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];