lemmy-js-client 0.17.0-rc.2 → 0.17.0-rc.20
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +156 -4
- package/dist/http.js +255 -80
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -1
- package/dist/interfaces/api/comment.d.ts +45 -38
- package/dist/interfaces/api/comment.js +313 -0
- package/dist/interfaces/api/community.d.ts +56 -52
- package/dist/interfaces/api/community.js +411 -0
- package/dist/interfaces/api/index.js +5 -1
- package/dist/interfaces/api/person.d.ts +120 -100
- package/dist/interfaces/api/person.js +854 -0
- package/dist/interfaces/api/post.d.ts +67 -51
- package/dist/interfaces/api/post.js +405 -0
- package/dist/interfaces/api/site.d.ts +99 -90
- package/dist/interfaces/api/site.js +824 -0
- package/dist/interfaces/index.js +5 -1
- package/dist/interfaces/others.d.ts +62 -92
- package/dist/interfaces/others.js +119 -55
- package/dist/interfaces/source.d.ts +79 -76
- package/dist/interfaces/source.js +747 -0
- package/dist/interfaces/views.d.ts +36 -37
- package/dist/interfaces/views.js +270 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +10 -0
- package/dist/websocket.d.ts +16 -2
- package/dist/websocket.js +35 -3
- package/package.json +13 -11
@@ -1,138 +1,154 @@
|
|
1
|
-
import {
|
1
|
+
import { Option } from "@sniptt/monads";
|
2
|
+
import { ListingType, SiteMetadata, SortType } from "../others";
|
2
3
|
import { CommentView, CommunityModeratorView, CommunityView, PostReportView, PostView } from "../views";
|
3
|
-
export
|
4
|
+
export declare class CreatePost {
|
4
5
|
name: string;
|
5
|
-
url
|
6
|
-
body
|
7
|
-
nsfw
|
6
|
+
url: Option<string>;
|
7
|
+
body: Option<string>;
|
8
|
+
nsfw: Option<boolean>;
|
8
9
|
community_id: number;
|
10
|
+
honeypot: Option<string>;
|
9
11
|
auth: string;
|
10
|
-
|
12
|
+
constructor(init: CreatePost);
|
11
13
|
}
|
12
|
-
export
|
14
|
+
export declare class PostResponse {
|
13
15
|
post_view: PostView;
|
14
16
|
}
|
15
|
-
export
|
17
|
+
export declare class GetPost {
|
16
18
|
id: number;
|
17
|
-
auth
|
19
|
+
auth: Option<string>;
|
20
|
+
constructor(init: GetPost);
|
18
21
|
}
|
19
|
-
export
|
22
|
+
export declare class GetPostResponse {
|
20
23
|
post_view: PostView;
|
21
24
|
community_view: CommunityView;
|
22
25
|
comments: CommentView[];
|
23
26
|
moderators: CommunityModeratorView[];
|
24
27
|
online: number;
|
25
28
|
}
|
26
|
-
export
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
type_?: string;
|
33
|
-
/**
|
34
|
-
* The [[SortType]].
|
35
|
-
*/
|
36
|
-
sort?: string;
|
37
|
-
page?: number;
|
38
|
-
limit?: number;
|
39
|
-
community_id?: number;
|
29
|
+
export declare class GetPosts {
|
30
|
+
type_: Option<ListingType>;
|
31
|
+
sort: Option<SortType>;
|
32
|
+
page: Option<number>;
|
33
|
+
limit: Option<number>;
|
34
|
+
community_id: Option<number>;
|
40
35
|
/**
|
41
36
|
* To get posts for a federated community by name, use `name@instance.tld` .
|
42
37
|
*/
|
43
|
-
community_name
|
44
|
-
saved_only
|
45
|
-
auth
|
38
|
+
community_name: Option<string>;
|
39
|
+
saved_only: Option<boolean>;
|
40
|
+
auth: Option<string>;
|
41
|
+
constructor(init: GetPosts);
|
46
42
|
}
|
47
|
-
export
|
43
|
+
export declare class GetPostsResponse {
|
48
44
|
posts: PostView[];
|
49
45
|
}
|
50
|
-
export
|
46
|
+
export declare class CreatePostLike {
|
51
47
|
post_id: number;
|
52
48
|
/**
|
53
49
|
* `score` can be 0, -1, or 1. Anything else will be rejected.
|
54
50
|
*/
|
55
51
|
score: number;
|
56
52
|
auth: string;
|
53
|
+
constructor(init: CreatePostLike);
|
57
54
|
}
|
58
|
-
export
|
55
|
+
export declare class EditPost {
|
59
56
|
post_id: number;
|
60
|
-
name
|
61
|
-
url
|
62
|
-
body
|
63
|
-
nsfw
|
57
|
+
name: Option<string>;
|
58
|
+
url: Option<string>;
|
59
|
+
body: Option<string>;
|
60
|
+
nsfw: Option<boolean>;
|
64
61
|
auth: string;
|
62
|
+
constructor(init: EditPost);
|
65
63
|
}
|
66
|
-
export
|
64
|
+
export declare class DeletePost {
|
67
65
|
post_id: number;
|
68
66
|
deleted: boolean;
|
69
67
|
auth: string;
|
68
|
+
constructor(init: DeletePost);
|
70
69
|
}
|
71
70
|
/**
|
72
71
|
* Only admins and mods can remove a post.
|
73
72
|
*/
|
74
|
-
export
|
73
|
+
export declare class RemovePost {
|
75
74
|
post_id: number;
|
76
75
|
removed: boolean;
|
77
|
-
reason
|
76
|
+
reason: Option<string>;
|
77
|
+
auth: string;
|
78
|
+
constructor(init: RemovePost);
|
79
|
+
}
|
80
|
+
/**
|
81
|
+
* Marks a post as read.
|
82
|
+
*/
|
83
|
+
export declare class MarkPostAsRead {
|
84
|
+
post_id: number;
|
85
|
+
read: boolean;
|
78
86
|
auth: string;
|
87
|
+
constructor(init: MarkPostAsRead);
|
79
88
|
}
|
80
89
|
/**
|
81
90
|
* Only admins and mods can lock a post.
|
82
91
|
*/
|
83
|
-
export
|
92
|
+
export declare class LockPost {
|
84
93
|
post_id: number;
|
85
94
|
locked: boolean;
|
86
95
|
auth: string;
|
96
|
+
constructor(init: LockPost);
|
87
97
|
}
|
88
98
|
/**
|
89
99
|
* Only admins and mods can sticky a post.
|
90
100
|
*/
|
91
|
-
export
|
101
|
+
export declare class StickyPost {
|
92
102
|
post_id: number;
|
93
103
|
stickied: boolean;
|
94
104
|
auth: string;
|
105
|
+
constructor(init: StickyPost);
|
95
106
|
}
|
96
|
-
export
|
107
|
+
export declare class SavePost {
|
97
108
|
post_id: number;
|
98
109
|
save: boolean;
|
99
110
|
auth: string;
|
111
|
+
constructor(init: SavePost);
|
100
112
|
}
|
101
|
-
export
|
113
|
+
export declare class CreatePostReport {
|
102
114
|
post_id: number;
|
103
115
|
reason: string;
|
104
116
|
auth: string;
|
117
|
+
constructor(init: CreatePostReport);
|
105
118
|
}
|
106
|
-
export
|
119
|
+
export declare class PostReportResponse {
|
107
120
|
post_report_view: PostReportView;
|
108
121
|
}
|
109
|
-
export
|
122
|
+
export declare class ResolvePostReport {
|
110
123
|
report_id: number;
|
111
124
|
/**
|
112
125
|
* Either resolve or unresolve a report.
|
113
126
|
*/
|
114
127
|
resolved: boolean;
|
115
128
|
auth: string;
|
129
|
+
constructor(init: ResolvePostReport);
|
116
130
|
}
|
117
|
-
export
|
118
|
-
page
|
119
|
-
limit
|
131
|
+
export declare class ListPostReports {
|
132
|
+
page: Option<number>;
|
133
|
+
limit: Option<number>;
|
120
134
|
/**
|
121
135
|
* if no community is given, it returns reports for all communities moderated by the auth user.
|
122
136
|
*/
|
123
|
-
community_id
|
137
|
+
community_id: Option<number>;
|
124
138
|
/**
|
125
139
|
* Only shows the unresolved reports.
|
126
140
|
*/
|
127
|
-
unresolved_only
|
141
|
+
unresolved_only: Option<boolean>;
|
128
142
|
auth: string;
|
143
|
+
constructor(init: ListPostReports);
|
129
144
|
}
|
130
|
-
export
|
145
|
+
export declare class ListPostReportsResponse {
|
131
146
|
post_reports: PostReportView[];
|
132
147
|
}
|
133
|
-
export
|
148
|
+
export declare class GetSiteMetadata {
|
134
149
|
url: string;
|
150
|
+
constructor(init: GetSiteMetadata);
|
135
151
|
}
|
136
|
-
export
|
152
|
+
export declare class GetSiteMetadataResponse {
|
137
153
|
metadata: SiteMetadata;
|
138
154
|
}
|
@@ -1,2 +1,407 @@
|
|
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.GetSiteMetadataResponse = exports.GetSiteMetadata = exports.ListPostReportsResponse = exports.ListPostReports = exports.ResolvePostReport = exports.PostReportResponse = exports.CreatePostReport = exports.SavePost = exports.StickyPost = 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 monads_1 = require("@sniptt/monads");
|
11
|
+
var class_transformer_1 = require("class-transformer");
|
12
|
+
var utils_1 = require("../../utils");
|
13
|
+
var CreatePost = /** @class */ (function () {
|
14
|
+
function CreatePost(init) {
|
15
|
+
Object.assign(this, init);
|
16
|
+
}
|
17
|
+
__decorate([
|
18
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
19
|
+
var value = _a.value;
|
20
|
+
return (0, monads_1.Some)(value);
|
21
|
+
}, { toClassOnly: true }),
|
22
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
23
|
+
var value = _a.value;
|
24
|
+
return (0, utils_1.toUndefined)(value);
|
25
|
+
}, { toPlainOnly: true }),
|
26
|
+
(0, class_transformer_1.Expose)()
|
27
|
+
], CreatePost.prototype, "url", void 0);
|
28
|
+
__decorate([
|
29
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
30
|
+
var value = _a.value;
|
31
|
+
return (0, monads_1.Some)(value);
|
32
|
+
}, { toClassOnly: true }),
|
33
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
34
|
+
var value = _a.value;
|
35
|
+
return (0, utils_1.toUndefined)(value);
|
36
|
+
}, { toPlainOnly: true }),
|
37
|
+
(0, class_transformer_1.Expose)()
|
38
|
+
], CreatePost.prototype, "body", void 0);
|
39
|
+
__decorate([
|
40
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
41
|
+
var value = _a.value;
|
42
|
+
return (0, monads_1.Some)(value);
|
43
|
+
}, { toClassOnly: true }),
|
44
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
45
|
+
var value = _a.value;
|
46
|
+
return (0, utils_1.toUndefined)(value);
|
47
|
+
}, { toPlainOnly: true }),
|
48
|
+
(0, class_transformer_1.Expose)()
|
49
|
+
], CreatePost.prototype, "nsfw", void 0);
|
50
|
+
__decorate([
|
51
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
52
|
+
var value = _a.value;
|
53
|
+
return (0, monads_1.Some)(value);
|
54
|
+
}, { toClassOnly: true }),
|
55
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
56
|
+
var value = _a.value;
|
57
|
+
return (0, utils_1.toUndefined)(value);
|
58
|
+
}, { toPlainOnly: true }),
|
59
|
+
(0, class_transformer_1.Expose)()
|
60
|
+
], CreatePost.prototype, "honeypot", void 0);
|
61
|
+
return CreatePost;
|
62
|
+
}());
|
63
|
+
exports.CreatePost = CreatePost;
|
64
|
+
var PostResponse = /** @class */ (function () {
|
65
|
+
function PostResponse() {
|
66
|
+
}
|
67
|
+
return PostResponse;
|
68
|
+
}());
|
69
|
+
exports.PostResponse = PostResponse;
|
70
|
+
var GetPost = /** @class */ (function () {
|
71
|
+
function GetPost(init) {
|
72
|
+
Object.assign(this, init);
|
73
|
+
}
|
74
|
+
__decorate([
|
75
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
76
|
+
var value = _a.value;
|
77
|
+
return (0, monads_1.Some)(value);
|
78
|
+
}, { toClassOnly: true }),
|
79
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
80
|
+
var value = _a.value;
|
81
|
+
return (0, utils_1.toUndefined)(value);
|
82
|
+
}, { toPlainOnly: true }),
|
83
|
+
(0, class_transformer_1.Expose)()
|
84
|
+
], GetPost.prototype, "auth", void 0);
|
85
|
+
return GetPost;
|
86
|
+
}());
|
87
|
+
exports.GetPost = GetPost;
|
88
|
+
var GetPostResponse = /** @class */ (function () {
|
89
|
+
function GetPostResponse() {
|
90
|
+
}
|
91
|
+
return GetPostResponse;
|
92
|
+
}());
|
93
|
+
exports.GetPostResponse = GetPostResponse;
|
94
|
+
var GetPosts = /** @class */ (function () {
|
95
|
+
function GetPosts(init) {
|
96
|
+
Object.assign(this, init);
|
97
|
+
}
|
98
|
+
__decorate([
|
99
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
100
|
+
var value = _a.value;
|
101
|
+
return (0, monads_1.Some)(value);
|
102
|
+
}, { toClassOnly: true }),
|
103
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
104
|
+
var value = _a.value;
|
105
|
+
return (0, utils_1.toUndefined)(value);
|
106
|
+
}, { toPlainOnly: true }),
|
107
|
+
(0, class_transformer_1.Expose)()
|
108
|
+
], GetPosts.prototype, "type_", void 0);
|
109
|
+
__decorate([
|
110
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
111
|
+
var value = _a.value;
|
112
|
+
return (0, monads_1.Some)(value);
|
113
|
+
}, { toClassOnly: true }),
|
114
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
115
|
+
var value = _a.value;
|
116
|
+
return (0, utils_1.toUndefined)(value);
|
117
|
+
}, { toPlainOnly: true }),
|
118
|
+
(0, class_transformer_1.Expose)()
|
119
|
+
], GetPosts.prototype, "sort", void 0);
|
120
|
+
__decorate([
|
121
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
122
|
+
var value = _a.value;
|
123
|
+
return (0, monads_1.Some)(value);
|
124
|
+
}, { toClassOnly: true }),
|
125
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
126
|
+
var value = _a.value;
|
127
|
+
return (0, utils_1.toUndefined)(value);
|
128
|
+
}, { toPlainOnly: true }),
|
129
|
+
(0, class_transformer_1.Expose)()
|
130
|
+
], GetPosts.prototype, "page", void 0);
|
131
|
+
__decorate([
|
132
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
133
|
+
var value = _a.value;
|
134
|
+
return (0, monads_1.Some)(value);
|
135
|
+
}, { toClassOnly: true }),
|
136
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
137
|
+
var value = _a.value;
|
138
|
+
return (0, utils_1.toUndefined)(value);
|
139
|
+
}, { toPlainOnly: true }),
|
140
|
+
(0, class_transformer_1.Expose)()
|
141
|
+
], GetPosts.prototype, "limit", void 0);
|
142
|
+
__decorate([
|
143
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
144
|
+
var value = _a.value;
|
145
|
+
return (0, monads_1.Some)(value);
|
146
|
+
}, { toClassOnly: true }),
|
147
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
148
|
+
var value = _a.value;
|
149
|
+
return (0, utils_1.toUndefined)(value);
|
150
|
+
}, { toPlainOnly: true }),
|
151
|
+
(0, class_transformer_1.Expose)()
|
152
|
+
], GetPosts.prototype, "community_id", void 0);
|
153
|
+
__decorate([
|
154
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
155
|
+
var value = _a.value;
|
156
|
+
return (0, monads_1.Some)(value);
|
157
|
+
}, { toClassOnly: true }),
|
158
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
159
|
+
var value = _a.value;
|
160
|
+
return (0, utils_1.toUndefined)(value);
|
161
|
+
}, { toPlainOnly: true }),
|
162
|
+
(0, class_transformer_1.Expose)()
|
163
|
+
], GetPosts.prototype, "community_name", void 0);
|
164
|
+
__decorate([
|
165
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
166
|
+
var value = _a.value;
|
167
|
+
return (0, monads_1.Some)(value);
|
168
|
+
}, { toClassOnly: true }),
|
169
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
170
|
+
var value = _a.value;
|
171
|
+
return (0, utils_1.toUndefined)(value);
|
172
|
+
}, { toPlainOnly: true }),
|
173
|
+
(0, class_transformer_1.Expose)()
|
174
|
+
], GetPosts.prototype, "saved_only", void 0);
|
175
|
+
__decorate([
|
176
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
177
|
+
var value = _a.value;
|
178
|
+
return (0, monads_1.Some)(value);
|
179
|
+
}, { toClassOnly: true }),
|
180
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
181
|
+
var value = _a.value;
|
182
|
+
return (0, utils_1.toUndefined)(value);
|
183
|
+
}, { toPlainOnly: true }),
|
184
|
+
(0, class_transformer_1.Expose)()
|
185
|
+
], GetPosts.prototype, "auth", void 0);
|
186
|
+
return GetPosts;
|
187
|
+
}());
|
188
|
+
exports.GetPosts = GetPosts;
|
189
|
+
var GetPostsResponse = /** @class */ (function () {
|
190
|
+
function GetPostsResponse() {
|
191
|
+
}
|
192
|
+
return GetPostsResponse;
|
193
|
+
}());
|
194
|
+
exports.GetPostsResponse = GetPostsResponse;
|
195
|
+
var CreatePostLike = /** @class */ (function () {
|
196
|
+
function CreatePostLike(init) {
|
197
|
+
Object.assign(this, init);
|
198
|
+
}
|
199
|
+
return CreatePostLike;
|
200
|
+
}());
|
201
|
+
exports.CreatePostLike = CreatePostLike;
|
202
|
+
var EditPost = /** @class */ (function () {
|
203
|
+
function EditPost(init) {
|
204
|
+
Object.assign(this, init);
|
205
|
+
}
|
206
|
+
__decorate([
|
207
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
208
|
+
var value = _a.value;
|
209
|
+
return (0, monads_1.Some)(value);
|
210
|
+
}, { toClassOnly: true }),
|
211
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
212
|
+
var value = _a.value;
|
213
|
+
return (0, utils_1.toUndefined)(value);
|
214
|
+
}, { toPlainOnly: true }),
|
215
|
+
(0, class_transformer_1.Expose)()
|
216
|
+
], EditPost.prototype, "name", void 0);
|
217
|
+
__decorate([
|
218
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
219
|
+
var value = _a.value;
|
220
|
+
return (0, monads_1.Some)(value);
|
221
|
+
}, { toClassOnly: true }),
|
222
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
223
|
+
var value = _a.value;
|
224
|
+
return (0, utils_1.toUndefined)(value);
|
225
|
+
}, { toPlainOnly: true }),
|
226
|
+
(0, class_transformer_1.Expose)()
|
227
|
+
], EditPost.prototype, "url", void 0);
|
228
|
+
__decorate([
|
229
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
230
|
+
var value = _a.value;
|
231
|
+
return (0, monads_1.Some)(value);
|
232
|
+
}, { toClassOnly: true }),
|
233
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
234
|
+
var value = _a.value;
|
235
|
+
return (0, utils_1.toUndefined)(value);
|
236
|
+
}, { toPlainOnly: true }),
|
237
|
+
(0, class_transformer_1.Expose)()
|
238
|
+
], EditPost.prototype, "body", void 0);
|
239
|
+
__decorate([
|
240
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
241
|
+
var value = _a.value;
|
242
|
+
return (0, monads_1.Some)(value);
|
243
|
+
}, { toClassOnly: true }),
|
244
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
245
|
+
var value = _a.value;
|
246
|
+
return (0, utils_1.toUndefined)(value);
|
247
|
+
}, { toPlainOnly: true }),
|
248
|
+
(0, class_transformer_1.Expose)()
|
249
|
+
], EditPost.prototype, "nsfw", void 0);
|
250
|
+
return EditPost;
|
251
|
+
}());
|
252
|
+
exports.EditPost = EditPost;
|
253
|
+
var DeletePost = /** @class */ (function () {
|
254
|
+
function DeletePost(init) {
|
255
|
+
Object.assign(this, init);
|
256
|
+
}
|
257
|
+
return DeletePost;
|
258
|
+
}());
|
259
|
+
exports.DeletePost = DeletePost;
|
260
|
+
/**
|
261
|
+
* Only admins and mods can remove a post.
|
262
|
+
*/
|
263
|
+
var RemovePost = /** @class */ (function () {
|
264
|
+
function RemovePost(init) {
|
265
|
+
Object.assign(this, init);
|
266
|
+
}
|
267
|
+
__decorate([
|
268
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
269
|
+
var value = _a.value;
|
270
|
+
return (0, monads_1.Some)(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
|
+
], RemovePost.prototype, "reason", void 0);
|
278
|
+
return RemovePost;
|
279
|
+
}());
|
280
|
+
exports.RemovePost = RemovePost;
|
281
|
+
/**
|
282
|
+
* Marks a post as read.
|
283
|
+
*/
|
284
|
+
var MarkPostAsRead = /** @class */ (function () {
|
285
|
+
function MarkPostAsRead(init) {
|
286
|
+
Object.assign(this, init);
|
287
|
+
}
|
288
|
+
return MarkPostAsRead;
|
289
|
+
}());
|
290
|
+
exports.MarkPostAsRead = MarkPostAsRead;
|
291
|
+
/**
|
292
|
+
* Only admins and mods can lock a post.
|
293
|
+
*/
|
294
|
+
var LockPost = /** @class */ (function () {
|
295
|
+
function LockPost(init) {
|
296
|
+
Object.assign(this, init);
|
297
|
+
}
|
298
|
+
return LockPost;
|
299
|
+
}());
|
300
|
+
exports.LockPost = LockPost;
|
301
|
+
/**
|
302
|
+
* Only admins and mods can sticky a post.
|
303
|
+
*/
|
304
|
+
var StickyPost = /** @class */ (function () {
|
305
|
+
function StickyPost(init) {
|
306
|
+
Object.assign(this, init);
|
307
|
+
}
|
308
|
+
return StickyPost;
|
309
|
+
}());
|
310
|
+
exports.StickyPost = StickyPost;
|
311
|
+
var SavePost = /** @class */ (function () {
|
312
|
+
function SavePost(init) {
|
313
|
+
Object.assign(this, init);
|
314
|
+
}
|
315
|
+
return SavePost;
|
316
|
+
}());
|
317
|
+
exports.SavePost = SavePost;
|
318
|
+
var CreatePostReport = /** @class */ (function () {
|
319
|
+
function CreatePostReport(init) {
|
320
|
+
Object.assign(this, init);
|
321
|
+
}
|
322
|
+
return CreatePostReport;
|
323
|
+
}());
|
324
|
+
exports.CreatePostReport = CreatePostReport;
|
325
|
+
var PostReportResponse = /** @class */ (function () {
|
326
|
+
function PostReportResponse() {
|
327
|
+
}
|
328
|
+
return PostReportResponse;
|
329
|
+
}());
|
330
|
+
exports.PostReportResponse = PostReportResponse;
|
331
|
+
var ResolvePostReport = /** @class */ (function () {
|
332
|
+
function ResolvePostReport(init) {
|
333
|
+
Object.assign(this, init);
|
334
|
+
}
|
335
|
+
return ResolvePostReport;
|
336
|
+
}());
|
337
|
+
exports.ResolvePostReport = ResolvePostReport;
|
338
|
+
var ListPostReports = /** @class */ (function () {
|
339
|
+
function ListPostReports(init) {
|
340
|
+
Object.assign(this, init);
|
341
|
+
}
|
342
|
+
__decorate([
|
343
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
344
|
+
var value = _a.value;
|
345
|
+
return (0, monads_1.Some)(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
|
+
], ListPostReports.prototype, "page", void 0);
|
353
|
+
__decorate([
|
354
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
355
|
+
var value = _a.value;
|
356
|
+
return (0, monads_1.Some)(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
|
+
], ListPostReports.prototype, "limit", void 0);
|
364
|
+
__decorate([
|
365
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
366
|
+
var value = _a.value;
|
367
|
+
return (0, monads_1.Some)(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
|
+
], ListPostReports.prototype, "community_id", void 0);
|
375
|
+
__decorate([
|
376
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
377
|
+
var value = _a.value;
|
378
|
+
return (0, monads_1.Some)(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
|
+
], ListPostReports.prototype, "unresolved_only", void 0);
|
386
|
+
return ListPostReports;
|
387
|
+
}());
|
388
|
+
exports.ListPostReports = ListPostReports;
|
389
|
+
var ListPostReportsResponse = /** @class */ (function () {
|
390
|
+
function ListPostReportsResponse() {
|
391
|
+
}
|
392
|
+
return ListPostReportsResponse;
|
393
|
+
}());
|
394
|
+
exports.ListPostReportsResponse = ListPostReportsResponse;
|
395
|
+
var GetSiteMetadata = /** @class */ (function () {
|
396
|
+
function GetSiteMetadata(init) {
|
397
|
+
Object.assign(this, init);
|
398
|
+
}
|
399
|
+
return GetSiteMetadata;
|
400
|
+
}());
|
401
|
+
exports.GetSiteMetadata = GetSiteMetadata;
|
402
|
+
var GetSiteMetadataResponse = /** @class */ (function () {
|
403
|
+
function GetSiteMetadataResponse() {
|
404
|
+
}
|
405
|
+
return GetSiteMetadataResponse;
|
406
|
+
}());
|
407
|
+
exports.GetSiteMetadataResponse = GetSiteMetadataResponse;
|