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