lemmy-js-client 0.17.0-rc.4 → 0.17.0-rc.40
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +178 -14
- package/dist/http.js +296 -98
- package/dist/index.d.ts +1 -0
- package/dist/index.js +6 -1
- package/dist/interfaces/aggregates.d.ts +1 -0
- package/dist/interfaces/api/comment.d.ts +47 -45
- package/dist/interfaces/api/comment.js +349 -0
- package/dist/interfaces/api/community.d.ts +56 -48
- package/dist/interfaces/api/community.js +433 -0
- package/dist/interfaces/api/index.js +5 -1
- package/dist/interfaces/api/person.d.ts +132 -102
- package/dist/interfaces/api/person.js +910 -0
- package/dist/interfaces/api/post.d.ts +71 -54
- package/dist/interfaces/api/post.js +453 -0
- package/dist/interfaces/api/site.d.ts +127 -98
- package/dist/interfaces/api/site.js +985 -0
- package/dist/interfaces/index.js +5 -1
- package/dist/interfaces/others.d.ts +101 -93
- package/dist/interfaces/others.js +162 -59
- package/dist/interfaces/source.d.ts +113 -77
- package/dist/interfaces/source.js +809 -0
- package/dist/interfaces/views.d.ts +79 -40
- package/dist/interfaces/views.js +599 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +18 -0
- package/dist/websocket.d.ts +33 -14
- package/dist/websocket.js +49 -19
- package/package.json +17 -14
@@ -1,138 +1,155 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
|
1
|
+
import { Option } from "@sniptt/monads";
|
2
|
+
import "reflect-metadata";
|
3
|
+
import { ListingType, SiteMetadata, SortType } from "../others";
|
4
|
+
import { CommunityModeratorView, CommunityView, PostReportView, PostView } from "../views";
|
5
|
+
export declare class CreatePost {
|
4
6
|
name: string;
|
5
|
-
url
|
6
|
-
body
|
7
|
-
nsfw
|
7
|
+
url: Option<string>;
|
8
|
+
body: Option<string>;
|
9
|
+
nsfw: Option<boolean>;
|
8
10
|
community_id: number;
|
11
|
+
honeypot: Option<string>;
|
9
12
|
auth: string;
|
10
|
-
|
13
|
+
constructor(init: CreatePost);
|
11
14
|
}
|
12
|
-
export
|
15
|
+
export declare class PostResponse {
|
13
16
|
post_view: PostView;
|
14
17
|
}
|
15
|
-
export
|
16
|
-
id: number
|
17
|
-
|
18
|
+
export declare class GetPost {
|
19
|
+
id: Option<number>;
|
20
|
+
comment_id: Option<number>;
|
21
|
+
auth: Option<string>;
|
22
|
+
constructor(init: GetPost);
|
18
23
|
}
|
19
|
-
export
|
24
|
+
export declare class GetPostResponse {
|
20
25
|
post_view: PostView;
|
21
26
|
community_view: CommunityView;
|
22
|
-
comments: CommentView[];
|
23
27
|
moderators: CommunityModeratorView[];
|
24
28
|
online: number;
|
25
29
|
}
|
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;
|
30
|
+
export declare class GetPosts {
|
31
|
+
type_: Option<ListingType>;
|
32
|
+
sort: Option<SortType>;
|
33
|
+
page: Option<number>;
|
34
|
+
limit: Option<number>;
|
35
|
+
community_id: Option<number>;
|
40
36
|
/**
|
41
37
|
* To get posts for a federated community by name, use `name@instance.tld` .
|
42
38
|
*/
|
43
|
-
community_name
|
44
|
-
saved_only
|
45
|
-
auth
|
39
|
+
community_name: Option<string>;
|
40
|
+
saved_only: Option<boolean>;
|
41
|
+
auth: Option<string>;
|
42
|
+
constructor(init: GetPosts);
|
46
43
|
}
|
47
|
-
export
|
44
|
+
export declare class GetPostsResponse {
|
48
45
|
posts: PostView[];
|
49
46
|
}
|
50
|
-
export
|
47
|
+
export declare class CreatePostLike {
|
51
48
|
post_id: number;
|
52
49
|
/**
|
53
50
|
* `score` can be 0, -1, or 1. Anything else will be rejected.
|
54
51
|
*/
|
55
52
|
score: number;
|
56
53
|
auth: string;
|
54
|
+
constructor(init: CreatePostLike);
|
57
55
|
}
|
58
|
-
export
|
56
|
+
export declare class EditPost {
|
59
57
|
post_id: number;
|
60
|
-
name
|
61
|
-
url
|
62
|
-
body
|
63
|
-
nsfw
|
58
|
+
name: Option<string>;
|
59
|
+
url: Option<string>;
|
60
|
+
body: Option<string>;
|
61
|
+
nsfw: Option<boolean>;
|
64
62
|
auth: string;
|
63
|
+
constructor(init: EditPost);
|
65
64
|
}
|
66
|
-
export
|
65
|
+
export declare class DeletePost {
|
67
66
|
post_id: number;
|
68
67
|
deleted: boolean;
|
69
68
|
auth: string;
|
69
|
+
constructor(init: DeletePost);
|
70
70
|
}
|
71
71
|
/**
|
72
72
|
* Only admins and mods can remove a post.
|
73
73
|
*/
|
74
|
-
export
|
74
|
+
export declare class RemovePost {
|
75
75
|
post_id: number;
|
76
76
|
removed: boolean;
|
77
|
-
reason
|
77
|
+
reason: Option<string>;
|
78
|
+
auth: string;
|
79
|
+
constructor(init: RemovePost);
|
80
|
+
}
|
81
|
+
/**
|
82
|
+
* Marks a post as read.
|
83
|
+
*/
|
84
|
+
export declare class MarkPostAsRead {
|
85
|
+
post_id: number;
|
86
|
+
read: boolean;
|
78
87
|
auth: string;
|
88
|
+
constructor(init: MarkPostAsRead);
|
79
89
|
}
|
80
90
|
/**
|
81
91
|
* Only admins and mods can lock a post.
|
82
92
|
*/
|
83
|
-
export
|
93
|
+
export declare class LockPost {
|
84
94
|
post_id: number;
|
85
95
|
locked: boolean;
|
86
96
|
auth: string;
|
97
|
+
constructor(init: LockPost);
|
87
98
|
}
|
88
99
|
/**
|
89
100
|
* Only admins and mods can sticky a post.
|
90
101
|
*/
|
91
|
-
export
|
102
|
+
export declare class StickyPost {
|
92
103
|
post_id: number;
|
93
104
|
stickied: boolean;
|
94
105
|
auth: string;
|
106
|
+
constructor(init: StickyPost);
|
95
107
|
}
|
96
|
-
export
|
108
|
+
export declare class SavePost {
|
97
109
|
post_id: number;
|
98
110
|
save: boolean;
|
99
111
|
auth: string;
|
112
|
+
constructor(init: SavePost);
|
100
113
|
}
|
101
|
-
export
|
114
|
+
export declare class CreatePostReport {
|
102
115
|
post_id: number;
|
103
116
|
reason: string;
|
104
117
|
auth: string;
|
118
|
+
constructor(init: CreatePostReport);
|
105
119
|
}
|
106
|
-
export
|
120
|
+
export declare class PostReportResponse {
|
107
121
|
post_report_view: PostReportView;
|
108
122
|
}
|
109
|
-
export
|
123
|
+
export declare class ResolvePostReport {
|
110
124
|
report_id: number;
|
111
125
|
/**
|
112
126
|
* Either resolve or unresolve a report.
|
113
127
|
*/
|
114
128
|
resolved: boolean;
|
115
129
|
auth: string;
|
130
|
+
constructor(init: ResolvePostReport);
|
116
131
|
}
|
117
|
-
export
|
118
|
-
page
|
119
|
-
limit
|
132
|
+
export declare class ListPostReports {
|
133
|
+
page: Option<number>;
|
134
|
+
limit: Option<number>;
|
120
135
|
/**
|
121
136
|
* if no community is given, it returns reports for all communities moderated by the auth user.
|
122
137
|
*/
|
123
|
-
community_id
|
138
|
+
community_id: Option<number>;
|
124
139
|
/**
|
125
140
|
* Only shows the unresolved reports.
|
126
141
|
*/
|
127
|
-
unresolved_only
|
142
|
+
unresolved_only: Option<boolean>;
|
128
143
|
auth: string;
|
144
|
+
constructor(init: ListPostReports);
|
129
145
|
}
|
130
|
-
export
|
146
|
+
export declare class ListPostReportsResponse {
|
131
147
|
post_reports: PostReportView[];
|
132
148
|
}
|
133
|
-
export
|
149
|
+
export declare class GetSiteMetadata {
|
134
150
|
url: string;
|
151
|
+
constructor(init: GetSiteMetadata);
|
135
152
|
}
|
136
|
-
export
|
153
|
+
export declare class GetSiteMetadataResponse {
|
137
154
|
metadata: SiteMetadata;
|
138
155
|
}
|
@@ -1,2 +1,455 @@
|
|
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 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, "honeypot", void 0);
|
63
|
+
return CreatePost;
|
64
|
+
}());
|
65
|
+
exports.CreatePost = CreatePost;
|
66
|
+
var PostResponse = /** @class */ (function () {
|
67
|
+
function PostResponse() {
|
68
|
+
}
|
69
|
+
__decorate([
|
70
|
+
(0, class_transformer_1.Type)(function () { return views_1.PostView; })
|
71
|
+
], PostResponse.prototype, "post_view", void 0);
|
72
|
+
return PostResponse;
|
73
|
+
}());
|
74
|
+
exports.PostResponse = PostResponse;
|
75
|
+
var GetPost = /** @class */ (function () {
|
76
|
+
function GetPost(init) {
|
77
|
+
Object.assign(this, init);
|
78
|
+
}
|
79
|
+
__decorate([
|
80
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
81
|
+
var value = _a.value;
|
82
|
+
return (0, utils_1.toOption)(value);
|
83
|
+
}, { toClassOnly: true }),
|
84
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
85
|
+
var value = _a.value;
|
86
|
+
return (0, utils_1.toUndefined)(value);
|
87
|
+
}, { toPlainOnly: true }),
|
88
|
+
(0, class_transformer_1.Expose)()
|
89
|
+
], GetPost.prototype, "id", void 0);
|
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, "comment_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, "auth", void 0);
|
112
|
+
return GetPost;
|
113
|
+
}());
|
114
|
+
exports.GetPost = GetPost;
|
115
|
+
var GetPostResponse = /** @class */ (function () {
|
116
|
+
function GetPostResponse() {
|
117
|
+
}
|
118
|
+
__decorate([
|
119
|
+
(0, class_transformer_1.Type)(function () { return views_1.PostView; })
|
120
|
+
], GetPostResponse.prototype, "post_view", void 0);
|
121
|
+
__decorate([
|
122
|
+
(0, class_transformer_1.Type)(function () { return views_1.CommunityView; })
|
123
|
+
], GetPostResponse.prototype, "community_view", void 0);
|
124
|
+
__decorate([
|
125
|
+
(0, class_transformer_1.Type)(function () { return views_1.CommunityModeratorView; })
|
126
|
+
], GetPostResponse.prototype, "moderators", void 0);
|
127
|
+
return GetPostResponse;
|
128
|
+
}());
|
129
|
+
exports.GetPostResponse = GetPostResponse;
|
130
|
+
var GetPosts = /** @class */ (function () {
|
131
|
+
function GetPosts(init) {
|
132
|
+
Object.assign(this, init);
|
133
|
+
}
|
134
|
+
__decorate([
|
135
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
136
|
+
var value = _a.value;
|
137
|
+
return (0, utils_1.toOption)(value);
|
138
|
+
}, { toClassOnly: true }),
|
139
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
140
|
+
var value = _a.value;
|
141
|
+
return (0, utils_1.toUndefined)(value);
|
142
|
+
}, { toPlainOnly: true }),
|
143
|
+
(0, class_transformer_1.Expose)()
|
144
|
+
], GetPosts.prototype, "type_", void 0);
|
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, "sort", 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, "page", 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, "limit", 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, "community_id", 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_name", 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, "saved_only", 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, "auth", void 0);
|
222
|
+
return GetPosts;
|
223
|
+
}());
|
224
|
+
exports.GetPosts = GetPosts;
|
225
|
+
var GetPostsResponse = /** @class */ (function () {
|
226
|
+
function GetPostsResponse() {
|
227
|
+
}
|
228
|
+
__decorate([
|
229
|
+
(0, class_transformer_1.Type)(function () { return views_1.PostView; })
|
230
|
+
], GetPostsResponse.prototype, "posts", void 0);
|
231
|
+
return GetPostsResponse;
|
232
|
+
}());
|
233
|
+
exports.GetPostsResponse = GetPostsResponse;
|
234
|
+
var CreatePostLike = /** @class */ (function () {
|
235
|
+
function CreatePostLike(init) {
|
236
|
+
Object.assign(this, init);
|
237
|
+
}
|
238
|
+
return CreatePostLike;
|
239
|
+
}());
|
240
|
+
exports.CreatePostLike = CreatePostLike;
|
241
|
+
var EditPost = /** @class */ (function () {
|
242
|
+
function EditPost(init) {
|
243
|
+
Object.assign(this, init);
|
244
|
+
}
|
245
|
+
__decorate([
|
246
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
247
|
+
var value = _a.value;
|
248
|
+
return (0, utils_1.toOption)(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
|
+
], EditPost.prototype, "name", void 0);
|
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, "url", 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, "body", 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, "nsfw", void 0);
|
289
|
+
return EditPost;
|
290
|
+
}());
|
291
|
+
exports.EditPost = EditPost;
|
292
|
+
var DeletePost = /** @class */ (function () {
|
293
|
+
function DeletePost(init) {
|
294
|
+
Object.assign(this, init);
|
295
|
+
}
|
296
|
+
return DeletePost;
|
297
|
+
}());
|
298
|
+
exports.DeletePost = DeletePost;
|
299
|
+
/**
|
300
|
+
* Only admins and mods can remove a post.
|
301
|
+
*/
|
302
|
+
var RemovePost = /** @class */ (function () {
|
303
|
+
function RemovePost(init) {
|
304
|
+
Object.assign(this, init);
|
305
|
+
}
|
306
|
+
__decorate([
|
307
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
308
|
+
var value = _a.value;
|
309
|
+
return (0, utils_1.toOption)(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
|
+
], RemovePost.prototype, "reason", void 0);
|
317
|
+
return RemovePost;
|
318
|
+
}());
|
319
|
+
exports.RemovePost = RemovePost;
|
320
|
+
/**
|
321
|
+
* Marks a post as read.
|
322
|
+
*/
|
323
|
+
var MarkPostAsRead = /** @class */ (function () {
|
324
|
+
function MarkPostAsRead(init) {
|
325
|
+
Object.assign(this, init);
|
326
|
+
}
|
327
|
+
return MarkPostAsRead;
|
328
|
+
}());
|
329
|
+
exports.MarkPostAsRead = MarkPostAsRead;
|
330
|
+
/**
|
331
|
+
* Only admins and mods can lock a post.
|
332
|
+
*/
|
333
|
+
var LockPost = /** @class */ (function () {
|
334
|
+
function LockPost(init) {
|
335
|
+
Object.assign(this, init);
|
336
|
+
}
|
337
|
+
return LockPost;
|
338
|
+
}());
|
339
|
+
exports.LockPost = LockPost;
|
340
|
+
/**
|
341
|
+
* Only admins and mods can sticky a post.
|
342
|
+
*/
|
343
|
+
var StickyPost = /** @class */ (function () {
|
344
|
+
function StickyPost(init) {
|
345
|
+
Object.assign(this, init);
|
346
|
+
}
|
347
|
+
return StickyPost;
|
348
|
+
}());
|
349
|
+
exports.StickyPost = StickyPost;
|
350
|
+
var SavePost = /** @class */ (function () {
|
351
|
+
function SavePost(init) {
|
352
|
+
Object.assign(this, init);
|
353
|
+
}
|
354
|
+
return SavePost;
|
355
|
+
}());
|
356
|
+
exports.SavePost = SavePost;
|
357
|
+
var CreatePostReport = /** @class */ (function () {
|
358
|
+
function CreatePostReport(init) {
|
359
|
+
Object.assign(this, init);
|
360
|
+
}
|
361
|
+
return CreatePostReport;
|
362
|
+
}());
|
363
|
+
exports.CreatePostReport = CreatePostReport;
|
364
|
+
var PostReportResponse = /** @class */ (function () {
|
365
|
+
function PostReportResponse() {
|
366
|
+
}
|
367
|
+
__decorate([
|
368
|
+
(0, class_transformer_1.Type)(function () { return views_1.PostReportView; })
|
369
|
+
], PostReportResponse.prototype, "post_report_view", void 0);
|
370
|
+
return PostReportResponse;
|
371
|
+
}());
|
372
|
+
exports.PostReportResponse = PostReportResponse;
|
373
|
+
var ResolvePostReport = /** @class */ (function () {
|
374
|
+
function ResolvePostReport(init) {
|
375
|
+
Object.assign(this, init);
|
376
|
+
}
|
377
|
+
return ResolvePostReport;
|
378
|
+
}());
|
379
|
+
exports.ResolvePostReport = ResolvePostReport;
|
380
|
+
var ListPostReports = /** @class */ (function () {
|
381
|
+
function ListPostReports(init) {
|
382
|
+
Object.assign(this, init);
|
383
|
+
}
|
384
|
+
__decorate([
|
385
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
386
|
+
var value = _a.value;
|
387
|
+
return (0, utils_1.toOption)(value);
|
388
|
+
}, { toClassOnly: true }),
|
389
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
390
|
+
var value = _a.value;
|
391
|
+
return (0, utils_1.toUndefined)(value);
|
392
|
+
}, { toPlainOnly: true }),
|
393
|
+
(0, class_transformer_1.Expose)()
|
394
|
+
], ListPostReports.prototype, "page", void 0);
|
395
|
+
__decorate([
|
396
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
397
|
+
var value = _a.value;
|
398
|
+
return (0, utils_1.toOption)(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
|
+
], ListPostReports.prototype, "limit", void 0);
|
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, "community_id", 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, "unresolved_only", void 0);
|
428
|
+
return ListPostReports;
|
429
|
+
}());
|
430
|
+
exports.ListPostReports = ListPostReports;
|
431
|
+
var ListPostReportsResponse = /** @class */ (function () {
|
432
|
+
function ListPostReportsResponse() {
|
433
|
+
}
|
434
|
+
__decorate([
|
435
|
+
(0, class_transformer_1.Type)(function () { return views_1.PostReportView; })
|
436
|
+
], ListPostReportsResponse.prototype, "post_reports", void 0);
|
437
|
+
return ListPostReportsResponse;
|
438
|
+
}());
|
439
|
+
exports.ListPostReportsResponse = ListPostReportsResponse;
|
440
|
+
var GetSiteMetadata = /** @class */ (function () {
|
441
|
+
function GetSiteMetadata(init) {
|
442
|
+
Object.assign(this, init);
|
443
|
+
}
|
444
|
+
return GetSiteMetadata;
|
445
|
+
}());
|
446
|
+
exports.GetSiteMetadata = GetSiteMetadata;
|
447
|
+
var GetSiteMetadataResponse = /** @class */ (function () {
|
448
|
+
function GetSiteMetadataResponse() {
|
449
|
+
}
|
450
|
+
__decorate([
|
451
|
+
(0, class_transformer_1.Type)(function () { return others_1.SiteMetadata; })
|
452
|
+
], GetSiteMetadataResponse.prototype, "metadata", void 0);
|
453
|
+
return GetSiteMetadataResponse;
|
454
|
+
}());
|
455
|
+
exports.GetSiteMetadataResponse = GetSiteMetadataResponse;
|