lemmy-js-client 0.17.0-rc.59 → 0.17.0-rc.60
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/http.js +85 -100
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/interfaces/api/comment.d.ts +38 -50
- package/dist/interfaces/api/comment.js +0 -393
- package/dist/interfaces/api/community.d.ts +45 -58
- package/dist/interfaces/api/community.js +0 -466
- package/dist/interfaces/api/person.d.ts +106 -136
- package/dist/interfaces/api/person.js +0 -1004
- package/dist/interfaces/api/post.d.ts +47 -64
- package/dist/interfaces/api/post.js +0 -475
- package/dist/interfaces/api/site.d.ts +142 -157
- package/dist/interfaces/api/site.js +0 -1520
- package/dist/interfaces/others.d.ts +5 -7
- package/dist/interfaces/others.js +1 -63
- package/dist/interfaces/source.d.ts +97 -98
- package/dist/interfaces/source.js +1 -905
- package/dist/interfaces/views.d.ts +57 -59
- package/dist/interfaces/views.js +0 -772
- package/dist/utils.d.ts +0 -9
- package/dist/utils.js +0 -18
- package/dist/websocket.d.ts +1 -2
- package/dist/websocket.js +4 -4
- package/package.json +2 -5
@@ -1,5 +1,3 @@
|
|
1
|
-
import { Option } from "@sniptt/monads";
|
2
|
-
import "reflect-metadata";
|
3
1
|
import { ListingType, SortType } from "../others";
|
4
2
|
import { Site } from "../source";
|
5
3
|
import { CommunityModeratorView, CommunityView, PersonViewSafe } from "../views";
|
@@ -8,131 +6,120 @@ import { CommunityModeratorView, CommunityView, PersonViewSafe } from "../views"
|
|
8
6
|
*
|
9
7
|
* To get a federated community by name, use `name@instance.tld` .
|
10
8
|
*/
|
11
|
-
export
|
12
|
-
id
|
13
|
-
name
|
14
|
-
auth
|
15
|
-
constructor(init: GetCommunity);
|
9
|
+
export interface GetCommunity {
|
10
|
+
id?: number;
|
11
|
+
name?: string;
|
12
|
+
auth?: string;
|
16
13
|
}
|
17
|
-
export
|
14
|
+
export interface GetCommunityResponse {
|
18
15
|
community_view: CommunityView;
|
19
|
-
site
|
16
|
+
site?: Site;
|
20
17
|
moderators: CommunityModeratorView[];
|
21
18
|
online: number;
|
22
19
|
discussion_languages: number[];
|
23
|
-
default_post_language
|
20
|
+
default_post_language?: number;
|
24
21
|
}
|
25
|
-
export
|
22
|
+
export interface CreateCommunity {
|
26
23
|
name: string;
|
27
24
|
title: string;
|
28
|
-
description
|
29
|
-
icon
|
30
|
-
banner
|
31
|
-
nsfw
|
32
|
-
posting_restricted_to_mods
|
33
|
-
discussion_languages
|
25
|
+
description?: string;
|
26
|
+
icon?: string;
|
27
|
+
banner?: string;
|
28
|
+
nsfw?: boolean;
|
29
|
+
posting_restricted_to_mods?: boolean;
|
30
|
+
discussion_languages?: number[];
|
34
31
|
auth: string;
|
35
|
-
constructor(init: CreateCommunity);
|
36
32
|
}
|
37
|
-
export
|
33
|
+
export interface CommunityResponse {
|
38
34
|
community_view: CommunityView;
|
39
35
|
discussion_languages: number[];
|
40
36
|
}
|
41
|
-
export
|
42
|
-
type_
|
43
|
-
sort
|
44
|
-
page
|
45
|
-
limit
|
46
|
-
auth
|
47
|
-
constructor(init: ListCommunities);
|
37
|
+
export interface ListCommunities {
|
38
|
+
type_?: ListingType;
|
39
|
+
sort?: SortType;
|
40
|
+
page?: number;
|
41
|
+
limit?: number;
|
42
|
+
auth?: string;
|
48
43
|
}
|
49
|
-
export
|
44
|
+
export interface ListCommunitiesResponse {
|
50
45
|
communities: CommunityView[];
|
51
46
|
}
|
52
|
-
export
|
47
|
+
export interface BanFromCommunity {
|
53
48
|
community_id: number;
|
54
49
|
person_id: number;
|
55
50
|
ban: boolean;
|
56
51
|
/**
|
57
52
|
* Removes/Restores their comments and posts for that community.
|
58
53
|
*/
|
59
|
-
remove_data
|
60
|
-
reason
|
54
|
+
remove_data?: boolean;
|
55
|
+
reason?: string;
|
61
56
|
/**
|
62
57
|
* The expire time in Unix seconds
|
63
58
|
*/
|
64
|
-
expires
|
59
|
+
expires?: number;
|
65
60
|
auth: string;
|
66
|
-
constructor(init: BanFromCommunity);
|
67
61
|
}
|
68
|
-
export
|
62
|
+
export interface BanFromCommunityResponse {
|
69
63
|
person_view: PersonViewSafe;
|
70
64
|
banned: boolean;
|
71
65
|
}
|
72
|
-
export
|
66
|
+
export interface AddModToCommunity {
|
73
67
|
community_id: number;
|
74
68
|
person_id: number;
|
75
69
|
added: boolean;
|
76
70
|
auth: string;
|
77
|
-
constructor(init: AddModToCommunity);
|
78
71
|
}
|
79
|
-
export
|
72
|
+
export interface AddModToCommunityResponse {
|
80
73
|
moderators: CommunityModeratorView[];
|
81
74
|
}
|
82
75
|
/**
|
83
76
|
* Only mods can edit a community.
|
84
77
|
*/
|
85
|
-
export
|
78
|
+
export interface EditCommunity {
|
86
79
|
community_id: number;
|
87
|
-
title
|
88
|
-
description
|
89
|
-
icon
|
90
|
-
banner
|
91
|
-
nsfw
|
92
|
-
posting_restricted_to_mods
|
93
|
-
discussion_languages
|
80
|
+
title?: string;
|
81
|
+
description?: string;
|
82
|
+
icon?: string;
|
83
|
+
banner?: string;
|
84
|
+
nsfw?: boolean;
|
85
|
+
posting_restricted_to_mods?: boolean;
|
86
|
+
discussion_languages?: number[];
|
94
87
|
auth: string;
|
95
|
-
constructor(init: EditCommunity);
|
96
88
|
}
|
97
|
-
export
|
89
|
+
export interface DeleteCommunity {
|
98
90
|
community_id: number;
|
99
91
|
deleted: boolean;
|
100
92
|
auth: string;
|
101
|
-
constructor(init: DeleteCommunity);
|
102
93
|
}
|
103
94
|
/**
|
104
95
|
* Only admins can remove a community.
|
105
96
|
*/
|
106
|
-
export
|
97
|
+
export interface RemoveCommunity {
|
107
98
|
community_id: number;
|
108
99
|
removed: boolean;
|
109
|
-
reason
|
100
|
+
reason?: string;
|
110
101
|
/**
|
111
102
|
* The expire time in Unix seconds
|
112
103
|
*/
|
113
|
-
expires
|
104
|
+
expires?: number;
|
114
105
|
auth: string;
|
115
|
-
constructor(init: RemoveCommunity);
|
116
106
|
}
|
117
|
-
export
|
107
|
+
export interface FollowCommunity {
|
118
108
|
community_id: number;
|
119
109
|
follow: boolean;
|
120
110
|
auth: string;
|
121
|
-
constructor(init: FollowCommunity);
|
122
111
|
}
|
123
|
-
export
|
112
|
+
export interface TransferCommunity {
|
124
113
|
community_id: number;
|
125
114
|
person_id: number;
|
126
115
|
auth: string;
|
127
|
-
constructor(init: TransferCommunity);
|
128
116
|
}
|
129
|
-
export
|
117
|
+
export interface BlockCommunity {
|
130
118
|
community_id: number;
|
131
119
|
block: boolean;
|
132
120
|
auth: string;
|
133
|
-
constructor(init: BlockCommunity);
|
134
121
|
}
|
135
|
-
export
|
122
|
+
export interface BlockCommunityResponse {
|
136
123
|
community_view: CommunityView;
|
137
124
|
blocked: boolean;
|
138
125
|
}
|
@@ -1,468 +1,2 @@
|
|
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
|
-
};
|
8
2
|
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
|
-
__decorate([
|
82
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
83
|
-
var value = _a.value;
|
84
|
-
return (0, utils_1.toOption)(value);
|
85
|
-
}, { toClassOnly: true }),
|
86
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
87
|
-
var value = _a.value;
|
88
|
-
return (0, utils_1.toUndefined)(value);
|
89
|
-
}, { toPlainOnly: true }),
|
90
|
-
(0, class_transformer_1.Expose)()
|
91
|
-
], GetCommunityResponse.prototype, "default_post_language", void 0);
|
92
|
-
return GetCommunityResponse;
|
93
|
-
}());
|
94
|
-
exports.GetCommunityResponse = GetCommunityResponse;
|
95
|
-
var CreateCommunity = /** @class */ (function () {
|
96
|
-
function CreateCommunity(init) {
|
97
|
-
Object.assign(this, init);
|
98
|
-
}
|
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, "description", 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, "icon", 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, "banner", 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, "nsfw", void 0);
|
143
|
-
__decorate([
|
144
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
145
|
-
var value = _a.value;
|
146
|
-
return (0, utils_1.toOption)(value);
|
147
|
-
}, { toClassOnly: true }),
|
148
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
149
|
-
var value = _a.value;
|
150
|
-
return (0, utils_1.toUndefined)(value);
|
151
|
-
}, { toPlainOnly: true }),
|
152
|
-
(0, class_transformer_1.Expose)()
|
153
|
-
], CreateCommunity.prototype, "posting_restricted_to_mods", void 0);
|
154
|
-
__decorate([
|
155
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
156
|
-
var value = _a.value;
|
157
|
-
return (0, utils_1.toOption)(value);
|
158
|
-
}, { toClassOnly: true }),
|
159
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
160
|
-
var value = _a.value;
|
161
|
-
return (0, utils_1.toUndefined)(value);
|
162
|
-
}, { toPlainOnly: true }),
|
163
|
-
(0, class_transformer_1.Expose)()
|
164
|
-
], CreateCommunity.prototype, "discussion_languages", void 0);
|
165
|
-
return CreateCommunity;
|
166
|
-
}());
|
167
|
-
exports.CreateCommunity = CreateCommunity;
|
168
|
-
var CommunityResponse = /** @class */ (function () {
|
169
|
-
function CommunityResponse() {
|
170
|
-
}
|
171
|
-
__decorate([
|
172
|
-
(0, class_transformer_1.Type)(function () { return views_1.CommunityView; })
|
173
|
-
], CommunityResponse.prototype, "community_view", void 0);
|
174
|
-
return CommunityResponse;
|
175
|
-
}());
|
176
|
-
exports.CommunityResponse = CommunityResponse;
|
177
|
-
var ListCommunities = /** @class */ (function () {
|
178
|
-
function ListCommunities(init) {
|
179
|
-
Object.assign(this, init);
|
180
|
-
}
|
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, "type_", 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, "sort", 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, "page", void 0);
|
214
|
-
__decorate([
|
215
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
216
|
-
var value = _a.value;
|
217
|
-
return (0, utils_1.toOption)(value);
|
218
|
-
}, { toClassOnly: true }),
|
219
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
220
|
-
var value = _a.value;
|
221
|
-
return (0, utils_1.toUndefined)(value);
|
222
|
-
}, { toPlainOnly: true }),
|
223
|
-
(0, class_transformer_1.Expose)()
|
224
|
-
], ListCommunities.prototype, "limit", void 0);
|
225
|
-
__decorate([
|
226
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
227
|
-
var value = _a.value;
|
228
|
-
return (0, utils_1.toOption)(value);
|
229
|
-
}, { toClassOnly: true }),
|
230
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
231
|
-
var value = _a.value;
|
232
|
-
return (0, utils_1.toUndefined)(value);
|
233
|
-
}, { toPlainOnly: true }),
|
234
|
-
(0, class_transformer_1.Expose)()
|
235
|
-
], ListCommunities.prototype, "auth", void 0);
|
236
|
-
return ListCommunities;
|
237
|
-
}());
|
238
|
-
exports.ListCommunities = ListCommunities;
|
239
|
-
var ListCommunitiesResponse = /** @class */ (function () {
|
240
|
-
function ListCommunitiesResponse() {
|
241
|
-
}
|
242
|
-
__decorate([
|
243
|
-
(0, class_transformer_1.Type)(function () { return views_1.CommunityView; })
|
244
|
-
], ListCommunitiesResponse.prototype, "communities", void 0);
|
245
|
-
return ListCommunitiesResponse;
|
246
|
-
}());
|
247
|
-
exports.ListCommunitiesResponse = ListCommunitiesResponse;
|
248
|
-
var BanFromCommunity = /** @class */ (function () {
|
249
|
-
function BanFromCommunity(init) {
|
250
|
-
Object.assign(this, init);
|
251
|
-
}
|
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, "remove_data", void 0);
|
263
|
-
__decorate([
|
264
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
265
|
-
var value = _a.value;
|
266
|
-
return (0, utils_1.toOption)(value);
|
267
|
-
}, { toClassOnly: true }),
|
268
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
269
|
-
var value = _a.value;
|
270
|
-
return (0, utils_1.toUndefined)(value);
|
271
|
-
}, { toPlainOnly: true }),
|
272
|
-
(0, class_transformer_1.Expose)()
|
273
|
-
], BanFromCommunity.prototype, "reason", void 0);
|
274
|
-
__decorate([
|
275
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
276
|
-
var value = _a.value;
|
277
|
-
return (0, utils_1.toOption)(value);
|
278
|
-
}, { toClassOnly: true }),
|
279
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
280
|
-
var value = _a.value;
|
281
|
-
return (0, utils_1.toUndefined)(value);
|
282
|
-
}, { toPlainOnly: true }),
|
283
|
-
(0, class_transformer_1.Expose)()
|
284
|
-
], BanFromCommunity.prototype, "expires", void 0);
|
285
|
-
return BanFromCommunity;
|
286
|
-
}());
|
287
|
-
exports.BanFromCommunity = BanFromCommunity;
|
288
|
-
var BanFromCommunityResponse = /** @class */ (function () {
|
289
|
-
function BanFromCommunityResponse() {
|
290
|
-
}
|
291
|
-
__decorate([
|
292
|
-
(0, class_transformer_1.Type)(function () { return views_1.PersonViewSafe; })
|
293
|
-
], BanFromCommunityResponse.prototype, "person_view", void 0);
|
294
|
-
return BanFromCommunityResponse;
|
295
|
-
}());
|
296
|
-
exports.BanFromCommunityResponse = BanFromCommunityResponse;
|
297
|
-
var AddModToCommunity = /** @class */ (function () {
|
298
|
-
function AddModToCommunity(init) {
|
299
|
-
Object.assign(this, init);
|
300
|
-
}
|
301
|
-
return AddModToCommunity;
|
302
|
-
}());
|
303
|
-
exports.AddModToCommunity = AddModToCommunity;
|
304
|
-
var AddModToCommunityResponse = /** @class */ (function () {
|
305
|
-
function AddModToCommunityResponse() {
|
306
|
-
}
|
307
|
-
__decorate([
|
308
|
-
(0, class_transformer_1.Type)(function () { return views_1.CommunityModeratorView; })
|
309
|
-
], AddModToCommunityResponse.prototype, "moderators", void 0);
|
310
|
-
return AddModToCommunityResponse;
|
311
|
-
}());
|
312
|
-
exports.AddModToCommunityResponse = AddModToCommunityResponse;
|
313
|
-
/**
|
314
|
-
* Only mods can edit a community.
|
315
|
-
*/
|
316
|
-
var EditCommunity = /** @class */ (function () {
|
317
|
-
function EditCommunity(init) {
|
318
|
-
Object.assign(this, init);
|
319
|
-
}
|
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, "title", 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, "description", 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, "icon", 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, "banner", void 0);
|
364
|
-
__decorate([
|
365
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
366
|
-
var value = _a.value;
|
367
|
-
return (0, utils_1.toOption)(value);
|
368
|
-
}, { toClassOnly: true }),
|
369
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
370
|
-
var value = _a.value;
|
371
|
-
return (0, utils_1.toUndefined)(value);
|
372
|
-
}, { toPlainOnly: true }),
|
373
|
-
(0, class_transformer_1.Expose)()
|
374
|
-
], EditCommunity.prototype, "nsfw", void 0);
|
375
|
-
__decorate([
|
376
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
377
|
-
var value = _a.value;
|
378
|
-
return (0, utils_1.toOption)(value);
|
379
|
-
}, { toClassOnly: true }),
|
380
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
381
|
-
var value = _a.value;
|
382
|
-
return (0, utils_1.toUndefined)(value);
|
383
|
-
}, { toPlainOnly: true }),
|
384
|
-
(0, class_transformer_1.Expose)()
|
385
|
-
], EditCommunity.prototype, "posting_restricted_to_mods", void 0);
|
386
|
-
__decorate([
|
387
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
388
|
-
var value = _a.value;
|
389
|
-
return (0, utils_1.toOption)(value);
|
390
|
-
}, { toClassOnly: true }),
|
391
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
392
|
-
var value = _a.value;
|
393
|
-
return (0, utils_1.toUndefined)(value);
|
394
|
-
}, { toPlainOnly: true }),
|
395
|
-
(0, class_transformer_1.Expose)()
|
396
|
-
], EditCommunity.prototype, "discussion_languages", void 0);
|
397
|
-
return EditCommunity;
|
398
|
-
}());
|
399
|
-
exports.EditCommunity = EditCommunity;
|
400
|
-
var DeleteCommunity = /** @class */ (function () {
|
401
|
-
function DeleteCommunity(init) {
|
402
|
-
Object.assign(this, init);
|
403
|
-
}
|
404
|
-
return DeleteCommunity;
|
405
|
-
}());
|
406
|
-
exports.DeleteCommunity = DeleteCommunity;
|
407
|
-
/**
|
408
|
-
* Only admins can remove a community.
|
409
|
-
*/
|
410
|
-
var RemoveCommunity = /** @class */ (function () {
|
411
|
-
function RemoveCommunity(init) {
|
412
|
-
Object.assign(this, init);
|
413
|
-
}
|
414
|
-
__decorate([
|
415
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
416
|
-
var value = _a.value;
|
417
|
-
return (0, utils_1.toOption)(value);
|
418
|
-
}, { toClassOnly: true }),
|
419
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
420
|
-
var value = _a.value;
|
421
|
-
return (0, utils_1.toUndefined)(value);
|
422
|
-
}, { toPlainOnly: true }),
|
423
|
-
(0, class_transformer_1.Expose)()
|
424
|
-
], RemoveCommunity.prototype, "reason", void 0);
|
425
|
-
__decorate([
|
426
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
427
|
-
var value = _a.value;
|
428
|
-
return (0, utils_1.toOption)(value);
|
429
|
-
}, { toClassOnly: true }),
|
430
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
431
|
-
var value = _a.value;
|
432
|
-
return (0, utils_1.toUndefined)(value);
|
433
|
-
}, { toPlainOnly: true }),
|
434
|
-
(0, class_transformer_1.Expose)()
|
435
|
-
], RemoveCommunity.prototype, "expires", void 0);
|
436
|
-
return RemoveCommunity;
|
437
|
-
}());
|
438
|
-
exports.RemoveCommunity = RemoveCommunity;
|
439
|
-
var FollowCommunity = /** @class */ (function () {
|
440
|
-
function FollowCommunity(init) {
|
441
|
-
Object.assign(this, init);
|
442
|
-
}
|
443
|
-
return FollowCommunity;
|
444
|
-
}());
|
445
|
-
exports.FollowCommunity = FollowCommunity;
|
446
|
-
var TransferCommunity = /** @class */ (function () {
|
447
|
-
function TransferCommunity(init) {
|
448
|
-
Object.assign(this, init);
|
449
|
-
}
|
450
|
-
return TransferCommunity;
|
451
|
-
}());
|
452
|
-
exports.TransferCommunity = TransferCommunity;
|
453
|
-
var BlockCommunity = /** @class */ (function () {
|
454
|
-
function BlockCommunity(init) {
|
455
|
-
Object.assign(this, init);
|
456
|
-
}
|
457
|
-
return BlockCommunity;
|
458
|
-
}());
|
459
|
-
exports.BlockCommunity = BlockCommunity;
|
460
|
-
var BlockCommunityResponse = /** @class */ (function () {
|
461
|
-
function BlockCommunityResponse() {
|
462
|
-
}
|
463
|
-
__decorate([
|
464
|
-
(0, class_transformer_1.Type)(function () { return views_1.CommunityView; })
|
465
|
-
], BlockCommunityResponse.prototype, "community_view", void 0);
|
466
|
-
return BlockCommunityResponse;
|
467
|
-
}());
|
468
|
-
exports.BlockCommunityResponse = BlockCommunityResponse;
|