lemmy-js-client 0.17.0-rc.59 → 0.17.0-rc.60
Sign up to get free protection for your applications and to get access to all the features.
- 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,158 +1,141 @@
|
|
1
|
-
import { Option } from "@sniptt/monads";
|
2
|
-
import "reflect-metadata";
|
3
1
|
import { ListingType, PostFeatureType, SiteMetadata, SortType } from "../others";
|
4
2
|
import { CommunityModeratorView, CommunityView, PostReportView, PostView } from "../views";
|
5
|
-
export
|
3
|
+
export interface CreatePost {
|
6
4
|
name: string;
|
7
|
-
url
|
8
|
-
body
|
9
|
-
nsfw
|
10
|
-
language_id
|
5
|
+
url?: string;
|
6
|
+
body?: string;
|
7
|
+
nsfw?: boolean;
|
8
|
+
language_id?: number;
|
11
9
|
community_id: number;
|
12
|
-
honeypot
|
10
|
+
honeypot?: string;
|
13
11
|
auth: string;
|
14
|
-
constructor(init: CreatePost);
|
15
12
|
}
|
16
|
-
export
|
13
|
+
export interface PostResponse {
|
17
14
|
post_view: PostView;
|
18
15
|
}
|
19
|
-
export
|
20
|
-
id
|
21
|
-
comment_id
|
22
|
-
auth
|
23
|
-
constructor(init: GetPost);
|
16
|
+
export interface GetPost {
|
17
|
+
id?: number;
|
18
|
+
comment_id?: number;
|
19
|
+
auth?: string;
|
24
20
|
}
|
25
|
-
export
|
21
|
+
export interface GetPostResponse {
|
26
22
|
post_view: PostView;
|
27
23
|
community_view: CommunityView;
|
28
24
|
moderators: CommunityModeratorView[];
|
29
25
|
online: number;
|
30
26
|
}
|
31
|
-
export
|
32
|
-
type_
|
33
|
-
sort
|
34
|
-
page
|
35
|
-
limit
|
36
|
-
community_id
|
27
|
+
export interface GetPosts {
|
28
|
+
type_?: ListingType;
|
29
|
+
sort?: SortType;
|
30
|
+
page?: number;
|
31
|
+
limit?: number;
|
32
|
+
community_id?: number;
|
37
33
|
/**
|
38
34
|
* To get posts for a federated community by name, use `name@instance.tld` .
|
39
35
|
*/
|
40
|
-
community_name
|
41
|
-
saved_only
|
42
|
-
auth
|
43
|
-
constructor(init: GetPosts);
|
36
|
+
community_name?: string;
|
37
|
+
saved_only?: boolean;
|
38
|
+
auth?: string;
|
44
39
|
}
|
45
|
-
export
|
40
|
+
export interface GetPostsResponse {
|
46
41
|
posts: PostView[];
|
47
42
|
}
|
48
|
-
export
|
43
|
+
export interface CreatePostLike {
|
49
44
|
post_id: number;
|
50
45
|
/**
|
51
46
|
* `score` can be 0, -1, or 1. Anything else will be rejected.
|
52
47
|
*/
|
53
48
|
score: number;
|
54
49
|
auth: string;
|
55
|
-
constructor(init: CreatePostLike);
|
56
50
|
}
|
57
|
-
export
|
51
|
+
export interface EditPost {
|
58
52
|
post_id: number;
|
59
|
-
name
|
60
|
-
url
|
61
|
-
body
|
62
|
-
nsfw
|
63
|
-
language_id
|
53
|
+
name?: string;
|
54
|
+
url?: string;
|
55
|
+
body?: string;
|
56
|
+
nsfw?: boolean;
|
57
|
+
language_id?: number;
|
64
58
|
auth: string;
|
65
|
-
constructor(init: EditPost);
|
66
59
|
}
|
67
|
-
export
|
60
|
+
export interface DeletePost {
|
68
61
|
post_id: number;
|
69
62
|
deleted: boolean;
|
70
63
|
auth: string;
|
71
|
-
constructor(init: DeletePost);
|
72
64
|
}
|
73
65
|
/**
|
74
66
|
* Only admins and mods can remove a post.
|
75
67
|
*/
|
76
|
-
export
|
68
|
+
export interface RemovePost {
|
77
69
|
post_id: number;
|
78
70
|
removed: boolean;
|
79
|
-
reason
|
71
|
+
reason?: string;
|
80
72
|
auth: string;
|
81
|
-
constructor(init: RemovePost);
|
82
73
|
}
|
83
74
|
/**
|
84
75
|
* Marks a post as read.
|
85
76
|
*/
|
86
|
-
export
|
77
|
+
export interface MarkPostAsRead {
|
87
78
|
post_id: number;
|
88
79
|
read: boolean;
|
89
80
|
auth: string;
|
90
|
-
constructor(init: MarkPostAsRead);
|
91
81
|
}
|
92
82
|
/**
|
93
83
|
* Only admins and mods can lock a post.
|
94
84
|
*/
|
95
|
-
export
|
85
|
+
export interface LockPost {
|
96
86
|
post_id: number;
|
97
87
|
locked: boolean;
|
98
88
|
auth: string;
|
99
|
-
constructor(init: LockPost);
|
100
89
|
}
|
101
90
|
/**
|
102
91
|
* Only admins and mods can feature a community post.
|
103
92
|
*/
|
104
|
-
export
|
93
|
+
export interface FeaturePost {
|
105
94
|
post_id: number;
|
106
95
|
featured: boolean;
|
107
96
|
feature_type: PostFeatureType;
|
108
97
|
auth: string;
|
109
|
-
constructor(init: FeaturePost);
|
110
98
|
}
|
111
|
-
export
|
99
|
+
export interface SavePost {
|
112
100
|
post_id: number;
|
113
101
|
save: boolean;
|
114
102
|
auth: string;
|
115
|
-
constructor(init: SavePost);
|
116
103
|
}
|
117
|
-
export
|
104
|
+
export interface CreatePostReport {
|
118
105
|
post_id: number;
|
119
106
|
reason: string;
|
120
107
|
auth: string;
|
121
|
-
constructor(init: CreatePostReport);
|
122
108
|
}
|
123
|
-
export
|
109
|
+
export interface PostReportResponse {
|
124
110
|
post_report_view: PostReportView;
|
125
111
|
}
|
126
|
-
export
|
112
|
+
export interface ResolvePostReport {
|
127
113
|
report_id: number;
|
128
114
|
/**
|
129
115
|
* Either resolve or unresolve a report.
|
130
116
|
*/
|
131
117
|
resolved: boolean;
|
132
118
|
auth: string;
|
133
|
-
constructor(init: ResolvePostReport);
|
134
119
|
}
|
135
|
-
export
|
136
|
-
page
|
137
|
-
limit
|
120
|
+
export interface ListPostReports {
|
121
|
+
page?: number;
|
122
|
+
limit?: number;
|
138
123
|
/**
|
139
124
|
* if no community is given, it returns reports for all communities moderated by the auth user.
|
140
125
|
*/
|
141
|
-
community_id
|
126
|
+
community_id?: number;
|
142
127
|
/**
|
143
128
|
* Only shows the unresolved reports.
|
144
129
|
*/
|
145
|
-
unresolved_only
|
130
|
+
unresolved_only?: boolean;
|
146
131
|
auth: string;
|
147
|
-
constructor(init: ListPostReports);
|
148
132
|
}
|
149
|
-
export
|
133
|
+
export interface ListPostReportsResponse {
|
150
134
|
post_reports: PostReportView[];
|
151
135
|
}
|
152
|
-
export
|
136
|
+
export interface GetSiteMetadata {
|
153
137
|
url: string;
|
154
|
-
constructor(init: GetSiteMetadata);
|
155
138
|
}
|
156
|
-
export
|
139
|
+
export interface GetSiteMetadataResponse {
|
157
140
|
metadata: SiteMetadata;
|
158
141
|
}
|
@@ -1,477 +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.GetSiteMetadataResponse = exports.GetSiteMetadata = exports.ListPostReportsResponse = exports.ListPostReports = exports.ResolvePostReport = exports.PostReportResponse = exports.CreatePostReport = exports.SavePost = exports.FeaturePost = exports.LockPost = exports.MarkPostAsRead = exports.RemovePost = exports.DeletePost = exports.EditPost = exports.CreatePostLike = exports.GetPostsResponse = exports.GetPosts = exports.GetPostResponse = exports.GetPost = exports.PostResponse = exports.CreatePost = void 0;
|
10
|
-
var class_transformer_1 = require("class-transformer");
|
11
|
-
require("reflect-metadata");
|
12
|
-
var utils_1 = require("../../utils");
|
13
|
-
var others_1 = require("../others");
|
14
|
-
var views_1 = require("../views");
|
15
|
-
var CreatePost = /** @class */ (function () {
|
16
|
-
function CreatePost(init) {
|
17
|
-
Object.assign(this, init);
|
18
|
-
}
|
19
|
-
__decorate([
|
20
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
21
|
-
var value = _a.value;
|
22
|
-
return (0, utils_1.toOption)(value);
|
23
|
-
}, { toClassOnly: true }),
|
24
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
25
|
-
var value = _a.value;
|
26
|
-
return (0, utils_1.toUndefined)(value);
|
27
|
-
}, { toPlainOnly: true }),
|
28
|
-
(0, class_transformer_1.Expose)()
|
29
|
-
], CreatePost.prototype, "url", void 0);
|
30
|
-
__decorate([
|
31
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
32
|
-
var value = _a.value;
|
33
|
-
return (0, utils_1.toOption)(value);
|
34
|
-
}, { toClassOnly: true }),
|
35
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
36
|
-
var value = _a.value;
|
37
|
-
return (0, utils_1.toUndefined)(value);
|
38
|
-
}, { toPlainOnly: true }),
|
39
|
-
(0, class_transformer_1.Expose)()
|
40
|
-
], CreatePost.prototype, "body", void 0);
|
41
|
-
__decorate([
|
42
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
43
|
-
var value = _a.value;
|
44
|
-
return (0, utils_1.toOption)(value);
|
45
|
-
}, { toClassOnly: true }),
|
46
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
47
|
-
var value = _a.value;
|
48
|
-
return (0, utils_1.toUndefined)(value);
|
49
|
-
}, { toPlainOnly: true }),
|
50
|
-
(0, class_transformer_1.Expose)()
|
51
|
-
], CreatePost.prototype, "nsfw", void 0);
|
52
|
-
__decorate([
|
53
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
54
|
-
var value = _a.value;
|
55
|
-
return (0, utils_1.toOption)(value);
|
56
|
-
}, { toClassOnly: true }),
|
57
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
58
|
-
var value = _a.value;
|
59
|
-
return (0, utils_1.toUndefined)(value);
|
60
|
-
}, { toPlainOnly: true }),
|
61
|
-
(0, class_transformer_1.Expose)()
|
62
|
-
], CreatePost.prototype, "language_id", void 0);
|
63
|
-
__decorate([
|
64
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
65
|
-
var value = _a.value;
|
66
|
-
return (0, utils_1.toOption)(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
|
-
], CreatePost.prototype, "honeypot", void 0);
|
74
|
-
return CreatePost;
|
75
|
-
}());
|
76
|
-
exports.CreatePost = CreatePost;
|
77
|
-
var PostResponse = /** @class */ (function () {
|
78
|
-
function PostResponse() {
|
79
|
-
}
|
80
|
-
__decorate([
|
81
|
-
(0, class_transformer_1.Type)(function () { return views_1.PostView; })
|
82
|
-
], PostResponse.prototype, "post_view", void 0);
|
83
|
-
return PostResponse;
|
84
|
-
}());
|
85
|
-
exports.PostResponse = PostResponse;
|
86
|
-
var GetPost = /** @class */ (function () {
|
87
|
-
function GetPost(init) {
|
88
|
-
Object.assign(this, init);
|
89
|
-
}
|
90
|
-
__decorate([
|
91
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
92
|
-
var value = _a.value;
|
93
|
-
return (0, utils_1.toOption)(value);
|
94
|
-
}, { toClassOnly: true }),
|
95
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
96
|
-
var value = _a.value;
|
97
|
-
return (0, utils_1.toUndefined)(value);
|
98
|
-
}, { toPlainOnly: true }),
|
99
|
-
(0, class_transformer_1.Expose)()
|
100
|
-
], GetPost.prototype, "id", void 0);
|
101
|
-
__decorate([
|
102
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
103
|
-
var value = _a.value;
|
104
|
-
return (0, utils_1.toOption)(value);
|
105
|
-
}, { toClassOnly: true }),
|
106
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
107
|
-
var value = _a.value;
|
108
|
-
return (0, utils_1.toUndefined)(value);
|
109
|
-
}, { toPlainOnly: true }),
|
110
|
-
(0, class_transformer_1.Expose)()
|
111
|
-
], GetPost.prototype, "comment_id", void 0);
|
112
|
-
__decorate([
|
113
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
114
|
-
var value = _a.value;
|
115
|
-
return (0, utils_1.toOption)(value);
|
116
|
-
}, { toClassOnly: true }),
|
117
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
118
|
-
var value = _a.value;
|
119
|
-
return (0, utils_1.toUndefined)(value);
|
120
|
-
}, { toPlainOnly: true }),
|
121
|
-
(0, class_transformer_1.Expose)()
|
122
|
-
], GetPost.prototype, "auth", void 0);
|
123
|
-
return GetPost;
|
124
|
-
}());
|
125
|
-
exports.GetPost = GetPost;
|
126
|
-
var GetPostResponse = /** @class */ (function () {
|
127
|
-
function GetPostResponse() {
|
128
|
-
}
|
129
|
-
__decorate([
|
130
|
-
(0, class_transformer_1.Type)(function () { return views_1.PostView; })
|
131
|
-
], GetPostResponse.prototype, "post_view", void 0);
|
132
|
-
__decorate([
|
133
|
-
(0, class_transformer_1.Type)(function () { return views_1.CommunityView; })
|
134
|
-
], GetPostResponse.prototype, "community_view", void 0);
|
135
|
-
__decorate([
|
136
|
-
(0, class_transformer_1.Type)(function () { return views_1.CommunityModeratorView; })
|
137
|
-
], GetPostResponse.prototype, "moderators", void 0);
|
138
|
-
return GetPostResponse;
|
139
|
-
}());
|
140
|
-
exports.GetPostResponse = GetPostResponse;
|
141
|
-
var GetPosts = /** @class */ (function () {
|
142
|
-
function GetPosts(init) {
|
143
|
-
Object.assign(this, init);
|
144
|
-
}
|
145
|
-
__decorate([
|
146
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
147
|
-
var value = _a.value;
|
148
|
-
return (0, utils_1.toOption)(value);
|
149
|
-
}, { toClassOnly: true }),
|
150
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
151
|
-
var value = _a.value;
|
152
|
-
return (0, utils_1.toUndefined)(value);
|
153
|
-
}, { toPlainOnly: true }),
|
154
|
-
(0, class_transformer_1.Expose)()
|
155
|
-
], GetPosts.prototype, "type_", void 0);
|
156
|
-
__decorate([
|
157
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
158
|
-
var value = _a.value;
|
159
|
-
return (0, utils_1.toOption)(value);
|
160
|
-
}, { toClassOnly: true }),
|
161
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
162
|
-
var value = _a.value;
|
163
|
-
return (0, utils_1.toUndefined)(value);
|
164
|
-
}, { toPlainOnly: true }),
|
165
|
-
(0, class_transformer_1.Expose)()
|
166
|
-
], GetPosts.prototype, "sort", void 0);
|
167
|
-
__decorate([
|
168
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
169
|
-
var value = _a.value;
|
170
|
-
return (0, utils_1.toOption)(value);
|
171
|
-
}, { toClassOnly: true }),
|
172
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
173
|
-
var value = _a.value;
|
174
|
-
return (0, utils_1.toUndefined)(value);
|
175
|
-
}, { toPlainOnly: true }),
|
176
|
-
(0, class_transformer_1.Expose)()
|
177
|
-
], GetPosts.prototype, "page", void 0);
|
178
|
-
__decorate([
|
179
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
180
|
-
var value = _a.value;
|
181
|
-
return (0, utils_1.toOption)(value);
|
182
|
-
}, { toClassOnly: true }),
|
183
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
184
|
-
var value = _a.value;
|
185
|
-
return (0, utils_1.toUndefined)(value);
|
186
|
-
}, { toPlainOnly: true }),
|
187
|
-
(0, class_transformer_1.Expose)()
|
188
|
-
], GetPosts.prototype, "limit", void 0);
|
189
|
-
__decorate([
|
190
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
191
|
-
var value = _a.value;
|
192
|
-
return (0, utils_1.toOption)(value);
|
193
|
-
}, { toClassOnly: true }),
|
194
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
195
|
-
var value = _a.value;
|
196
|
-
return (0, utils_1.toUndefined)(value);
|
197
|
-
}, { toPlainOnly: true }),
|
198
|
-
(0, class_transformer_1.Expose)()
|
199
|
-
], GetPosts.prototype, "community_id", void 0);
|
200
|
-
__decorate([
|
201
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
202
|
-
var value = _a.value;
|
203
|
-
return (0, utils_1.toOption)(value);
|
204
|
-
}, { toClassOnly: true }),
|
205
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
206
|
-
var value = _a.value;
|
207
|
-
return (0, utils_1.toUndefined)(value);
|
208
|
-
}, { toPlainOnly: true }),
|
209
|
-
(0, class_transformer_1.Expose)()
|
210
|
-
], GetPosts.prototype, "community_name", void 0);
|
211
|
-
__decorate([
|
212
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
213
|
-
var value = _a.value;
|
214
|
-
return (0, utils_1.toOption)(value);
|
215
|
-
}, { toClassOnly: true }),
|
216
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
217
|
-
var value = _a.value;
|
218
|
-
return (0, utils_1.toUndefined)(value);
|
219
|
-
}, { toPlainOnly: true }),
|
220
|
-
(0, class_transformer_1.Expose)()
|
221
|
-
], GetPosts.prototype, "saved_only", void 0);
|
222
|
-
__decorate([
|
223
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
224
|
-
var value = _a.value;
|
225
|
-
return (0, utils_1.toOption)(value);
|
226
|
-
}, { toClassOnly: true }),
|
227
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
228
|
-
var value = _a.value;
|
229
|
-
return (0, utils_1.toUndefined)(value);
|
230
|
-
}, { toPlainOnly: true }),
|
231
|
-
(0, class_transformer_1.Expose)()
|
232
|
-
], GetPosts.prototype, "auth", void 0);
|
233
|
-
return GetPosts;
|
234
|
-
}());
|
235
|
-
exports.GetPosts = GetPosts;
|
236
|
-
var GetPostsResponse = /** @class */ (function () {
|
237
|
-
function GetPostsResponse() {
|
238
|
-
}
|
239
|
-
__decorate([
|
240
|
-
(0, class_transformer_1.Type)(function () { return views_1.PostView; })
|
241
|
-
], GetPostsResponse.prototype, "posts", void 0);
|
242
|
-
return GetPostsResponse;
|
243
|
-
}());
|
244
|
-
exports.GetPostsResponse = GetPostsResponse;
|
245
|
-
var CreatePostLike = /** @class */ (function () {
|
246
|
-
function CreatePostLike(init) {
|
247
|
-
Object.assign(this, init);
|
248
|
-
}
|
249
|
-
return CreatePostLike;
|
250
|
-
}());
|
251
|
-
exports.CreatePostLike = CreatePostLike;
|
252
|
-
var EditPost = /** @class */ (function () {
|
253
|
-
function EditPost(init) {
|
254
|
-
Object.assign(this, init);
|
255
|
-
}
|
256
|
-
__decorate([
|
257
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
258
|
-
var value = _a.value;
|
259
|
-
return (0, utils_1.toOption)(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
|
-
], EditPost.prototype, "name", void 0);
|
267
|
-
__decorate([
|
268
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
269
|
-
var value = _a.value;
|
270
|
-
return (0, utils_1.toOption)(value);
|
271
|
-
}, { toClassOnly: true }),
|
272
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
273
|
-
var value = _a.value;
|
274
|
-
return (0, utils_1.toUndefined)(value);
|
275
|
-
}, { toPlainOnly: true }),
|
276
|
-
(0, class_transformer_1.Expose)()
|
277
|
-
], EditPost.prototype, "url", void 0);
|
278
|
-
__decorate([
|
279
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
280
|
-
var value = _a.value;
|
281
|
-
return (0, utils_1.toOption)(value);
|
282
|
-
}, { toClassOnly: true }),
|
283
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
284
|
-
var value = _a.value;
|
285
|
-
return (0, utils_1.toUndefined)(value);
|
286
|
-
}, { toPlainOnly: true }),
|
287
|
-
(0, class_transformer_1.Expose)()
|
288
|
-
], EditPost.prototype, "body", void 0);
|
289
|
-
__decorate([
|
290
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
291
|
-
var value = _a.value;
|
292
|
-
return (0, utils_1.toOption)(value);
|
293
|
-
}, { toClassOnly: true }),
|
294
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
295
|
-
var value = _a.value;
|
296
|
-
return (0, utils_1.toUndefined)(value);
|
297
|
-
}, { toPlainOnly: true }),
|
298
|
-
(0, class_transformer_1.Expose)()
|
299
|
-
], EditPost.prototype, "nsfw", void 0);
|
300
|
-
__decorate([
|
301
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
302
|
-
var value = _a.value;
|
303
|
-
return (0, utils_1.toOption)(value);
|
304
|
-
}, { toClassOnly: true }),
|
305
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
306
|
-
var value = _a.value;
|
307
|
-
return (0, utils_1.toUndefined)(value);
|
308
|
-
}, { toPlainOnly: true }),
|
309
|
-
(0, class_transformer_1.Expose)()
|
310
|
-
], EditPost.prototype, "language_id", void 0);
|
311
|
-
return EditPost;
|
312
|
-
}());
|
313
|
-
exports.EditPost = EditPost;
|
314
|
-
var DeletePost = /** @class */ (function () {
|
315
|
-
function DeletePost(init) {
|
316
|
-
Object.assign(this, init);
|
317
|
-
}
|
318
|
-
return DeletePost;
|
319
|
-
}());
|
320
|
-
exports.DeletePost = DeletePost;
|
321
|
-
/**
|
322
|
-
* Only admins and mods can remove a post.
|
323
|
-
*/
|
324
|
-
var RemovePost = /** @class */ (function () {
|
325
|
-
function RemovePost(init) {
|
326
|
-
Object.assign(this, init);
|
327
|
-
}
|
328
|
-
__decorate([
|
329
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
330
|
-
var value = _a.value;
|
331
|
-
return (0, utils_1.toOption)(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
|
-
], RemovePost.prototype, "reason", void 0);
|
339
|
-
return RemovePost;
|
340
|
-
}());
|
341
|
-
exports.RemovePost = RemovePost;
|
342
|
-
/**
|
343
|
-
* Marks a post as read.
|
344
|
-
*/
|
345
|
-
var MarkPostAsRead = /** @class */ (function () {
|
346
|
-
function MarkPostAsRead(init) {
|
347
|
-
Object.assign(this, init);
|
348
|
-
}
|
349
|
-
return MarkPostAsRead;
|
350
|
-
}());
|
351
|
-
exports.MarkPostAsRead = MarkPostAsRead;
|
352
|
-
/**
|
353
|
-
* Only admins and mods can lock a post.
|
354
|
-
*/
|
355
|
-
var LockPost = /** @class */ (function () {
|
356
|
-
function LockPost(init) {
|
357
|
-
Object.assign(this, init);
|
358
|
-
}
|
359
|
-
return LockPost;
|
360
|
-
}());
|
361
|
-
exports.LockPost = LockPost;
|
362
|
-
/**
|
363
|
-
* Only admins and mods can feature a community post.
|
364
|
-
*/
|
365
|
-
var FeaturePost = /** @class */ (function () {
|
366
|
-
function FeaturePost(init) {
|
367
|
-
Object.assign(this, init);
|
368
|
-
}
|
369
|
-
return FeaturePost;
|
370
|
-
}());
|
371
|
-
exports.FeaturePost = FeaturePost;
|
372
|
-
var SavePost = /** @class */ (function () {
|
373
|
-
function SavePost(init) {
|
374
|
-
Object.assign(this, init);
|
375
|
-
}
|
376
|
-
return SavePost;
|
377
|
-
}());
|
378
|
-
exports.SavePost = SavePost;
|
379
|
-
var CreatePostReport = /** @class */ (function () {
|
380
|
-
function CreatePostReport(init) {
|
381
|
-
Object.assign(this, init);
|
382
|
-
}
|
383
|
-
return CreatePostReport;
|
384
|
-
}());
|
385
|
-
exports.CreatePostReport = CreatePostReport;
|
386
|
-
var PostReportResponse = /** @class */ (function () {
|
387
|
-
function PostReportResponse() {
|
388
|
-
}
|
389
|
-
__decorate([
|
390
|
-
(0, class_transformer_1.Type)(function () { return views_1.PostReportView; })
|
391
|
-
], PostReportResponse.prototype, "post_report_view", void 0);
|
392
|
-
return PostReportResponse;
|
393
|
-
}());
|
394
|
-
exports.PostReportResponse = PostReportResponse;
|
395
|
-
var ResolvePostReport = /** @class */ (function () {
|
396
|
-
function ResolvePostReport(init) {
|
397
|
-
Object.assign(this, init);
|
398
|
-
}
|
399
|
-
return ResolvePostReport;
|
400
|
-
}());
|
401
|
-
exports.ResolvePostReport = ResolvePostReport;
|
402
|
-
var ListPostReports = /** @class */ (function () {
|
403
|
-
function ListPostReports(init) {
|
404
|
-
Object.assign(this, init);
|
405
|
-
}
|
406
|
-
__decorate([
|
407
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
408
|
-
var value = _a.value;
|
409
|
-
return (0, utils_1.toOption)(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
|
-
], ListPostReports.prototype, "page", void 0);
|
417
|
-
__decorate([
|
418
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
419
|
-
var value = _a.value;
|
420
|
-
return (0, utils_1.toOption)(value);
|
421
|
-
}, { toClassOnly: true }),
|
422
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
423
|
-
var value = _a.value;
|
424
|
-
return (0, utils_1.toUndefined)(value);
|
425
|
-
}, { toPlainOnly: true }),
|
426
|
-
(0, class_transformer_1.Expose)()
|
427
|
-
], ListPostReports.prototype, "limit", void 0);
|
428
|
-
__decorate([
|
429
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
430
|
-
var value = _a.value;
|
431
|
-
return (0, utils_1.toOption)(value);
|
432
|
-
}, { toClassOnly: true }),
|
433
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
434
|
-
var value = _a.value;
|
435
|
-
return (0, utils_1.toUndefined)(value);
|
436
|
-
}, { toPlainOnly: true }),
|
437
|
-
(0, class_transformer_1.Expose)()
|
438
|
-
], ListPostReports.prototype, "community_id", void 0);
|
439
|
-
__decorate([
|
440
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
441
|
-
var value = _a.value;
|
442
|
-
return (0, utils_1.toOption)(value);
|
443
|
-
}, { toClassOnly: true }),
|
444
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
445
|
-
var value = _a.value;
|
446
|
-
return (0, utils_1.toUndefined)(value);
|
447
|
-
}, { toPlainOnly: true }),
|
448
|
-
(0, class_transformer_1.Expose)()
|
449
|
-
], ListPostReports.prototype, "unresolved_only", void 0);
|
450
|
-
return ListPostReports;
|
451
|
-
}());
|
452
|
-
exports.ListPostReports = ListPostReports;
|
453
|
-
var ListPostReportsResponse = /** @class */ (function () {
|
454
|
-
function ListPostReportsResponse() {
|
455
|
-
}
|
456
|
-
__decorate([
|
457
|
-
(0, class_transformer_1.Type)(function () { return views_1.PostReportView; })
|
458
|
-
], ListPostReportsResponse.prototype, "post_reports", void 0);
|
459
|
-
return ListPostReportsResponse;
|
460
|
-
}());
|
461
|
-
exports.ListPostReportsResponse = ListPostReportsResponse;
|
462
|
-
var GetSiteMetadata = /** @class */ (function () {
|
463
|
-
function GetSiteMetadata(init) {
|
464
|
-
Object.assign(this, init);
|
465
|
-
}
|
466
|
-
return GetSiteMetadata;
|
467
|
-
}());
|
468
|
-
exports.GetSiteMetadata = GetSiteMetadata;
|
469
|
-
var GetSiteMetadataResponse = /** @class */ (function () {
|
470
|
-
function GetSiteMetadataResponse() {
|
471
|
-
}
|
472
|
-
__decorate([
|
473
|
-
(0, class_transformer_1.Type)(function () { return others_1.SiteMetadata; })
|
474
|
-
], GetSiteMetadataResponse.prototype, "metadata", void 0);
|
475
|
-
return GetSiteMetadataResponse;
|
476
|
-
}());
|
477
|
-
exports.GetSiteMetadataResponse = GetSiteMetadataResponse;
|