lemmy-js-client 0.17.0-rc.59 → 0.17.0-rc.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/http.js +85 -100
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/interfaces/api/comment.d.ts +38 -50
- package/dist/interfaces/api/comment.js +0 -393
- package/dist/interfaces/api/community.d.ts +45 -58
- package/dist/interfaces/api/community.js +0 -466
- package/dist/interfaces/api/person.d.ts +106 -136
- package/dist/interfaces/api/person.js +0 -1004
- package/dist/interfaces/api/post.d.ts +47 -64
- package/dist/interfaces/api/post.js +0 -475
- package/dist/interfaces/api/site.d.ts +142 -157
- package/dist/interfaces/api/site.js +0 -1520
- package/dist/interfaces/others.d.ts +5 -7
- package/dist/interfaces/others.js +1 -63
- package/dist/interfaces/source.d.ts +97 -98
- package/dist/interfaces/source.js +1 -905
- package/dist/interfaces/views.d.ts +57 -59
- package/dist/interfaces/views.js +0 -772
- package/dist/utils.d.ts +0 -9
- package/dist/utils.js +0 -18
- package/dist/websocket.d.ts +1 -2
- package/dist/websocket.js +4 -4
- package/package.json +2 -5
@@ -1,4 +1,3 @@
|
|
1
|
-
import { Option } from "@sniptt/monads";
|
2
1
|
export declare const VERSION = "v3";
|
3
2
|
/**
|
4
3
|
* All of the websocket operations available.
|
@@ -216,10 +215,9 @@ export declare enum PostFeatureType {
|
|
216
215
|
/**
|
217
216
|
* A holder for a site's metadata ( such as opengraph tags ), used for post links.
|
218
217
|
*/
|
219
|
-
export
|
220
|
-
title
|
221
|
-
description
|
222
|
-
image
|
223
|
-
html
|
224
|
-
constructor(init: SiteMetadata);
|
218
|
+
export interface SiteMetadata {
|
219
|
+
title?: string;
|
220
|
+
description?: string;
|
221
|
+
image?: string;
|
222
|
+
html?: string;
|
225
223
|
}
|
@@ -1,14 +1,6 @@
|
|
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.
|
10
|
-
var class_transformer_1 = require("class-transformer");
|
11
|
-
var utils_1 = require("../utils");
|
3
|
+
exports.PostFeatureType = exports.SubscribedType = exports.ModlogActionType = exports.SearchType = exports.ListingType = exports.CommentSortType = exports.SortType = exports.UserOperation = exports.VERSION = void 0;
|
12
4
|
exports.VERSION = "v3";
|
13
5
|
/**
|
14
6
|
* All of the websocket operations available.
|
@@ -231,57 +223,3 @@ var PostFeatureType;
|
|
231
223
|
PostFeatureType["Local"] = "Local";
|
232
224
|
PostFeatureType["Community"] = "Community";
|
233
225
|
})(PostFeatureType = exports.PostFeatureType || (exports.PostFeatureType = {}));
|
234
|
-
/**
|
235
|
-
* A holder for a site's metadata ( such as opengraph tags ), used for post links.
|
236
|
-
*/
|
237
|
-
var SiteMetadata = /** @class */ (function () {
|
238
|
-
function SiteMetadata(init) {
|
239
|
-
Object.assign(this, init);
|
240
|
-
}
|
241
|
-
__decorate([
|
242
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
243
|
-
var value = _a.value;
|
244
|
-
return (0, utils_1.toOption)(value);
|
245
|
-
}, { toClassOnly: true }),
|
246
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
247
|
-
var value = _a.value;
|
248
|
-
return (0, utils_1.toUndefined)(value);
|
249
|
-
}, { toPlainOnly: true }),
|
250
|
-
(0, class_transformer_1.Expose)()
|
251
|
-
], SiteMetadata.prototype, "title", void 0);
|
252
|
-
__decorate([
|
253
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
254
|
-
var value = _a.value;
|
255
|
-
return (0, utils_1.toOption)(value);
|
256
|
-
}, { toClassOnly: true }),
|
257
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
258
|
-
var value = _a.value;
|
259
|
-
return (0, utils_1.toUndefined)(value);
|
260
|
-
}, { toPlainOnly: true }),
|
261
|
-
(0, class_transformer_1.Expose)()
|
262
|
-
], SiteMetadata.prototype, "description", void 0);
|
263
|
-
__decorate([
|
264
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
265
|
-
var value = _a.value;
|
266
|
-
return (0, utils_1.toOption)(value);
|
267
|
-
}, { toClassOnly: true }),
|
268
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
269
|
-
var value = _a.value;
|
270
|
-
return (0, utils_1.toUndefined)(value);
|
271
|
-
}, { toPlainOnly: true }),
|
272
|
-
(0, class_transformer_1.Expose)()
|
273
|
-
], SiteMetadata.prototype, "image", void 0);
|
274
|
-
__decorate([
|
275
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
276
|
-
var value = _a.value;
|
277
|
-
return (0, utils_1.toOption)(value);
|
278
|
-
}, { toClassOnly: true }),
|
279
|
-
(0, class_transformer_1.Transform)(function (_a) {
|
280
|
-
var value = _a.value;
|
281
|
-
return (0, utils_1.toUndefined)(value);
|
282
|
-
}, { toPlainOnly: true }),
|
283
|
-
(0, class_transformer_1.Expose)()
|
284
|
-
], SiteMetadata.prototype, "html", void 0);
|
285
|
-
return SiteMetadata;
|
286
|
-
}());
|
287
|
-
exports.SiteMetadata = SiteMetadata;
|
@@ -1,8 +1,7 @@
|
|
1
|
-
|
2
|
-
export declare class LocalUserSettings {
|
1
|
+
export interface LocalUserSettings {
|
3
2
|
id: number;
|
4
3
|
person_id: number;
|
5
|
-
email
|
4
|
+
email?: string;
|
6
5
|
show_nsfw: boolean;
|
7
6
|
theme: string;
|
8
7
|
default_sort_type: number;
|
@@ -18,40 +17,40 @@ export declare class LocalUserSettings {
|
|
18
17
|
email_verified: boolean;
|
19
18
|
accepted_application: boolean;
|
20
19
|
}
|
21
|
-
export
|
20
|
+
export interface PersonSafe {
|
22
21
|
id: number;
|
23
22
|
name: string;
|
24
|
-
display_name
|
25
|
-
avatar
|
23
|
+
display_name?: string;
|
24
|
+
avatar?: string;
|
26
25
|
banned: boolean;
|
27
26
|
published: string;
|
28
|
-
updated
|
27
|
+
updated?: string;
|
29
28
|
actor_id: string;
|
30
|
-
bio
|
29
|
+
bio?: string;
|
31
30
|
local: boolean;
|
32
|
-
banner
|
31
|
+
banner?: string;
|
33
32
|
deleted: boolean;
|
34
33
|
inbox_url: string;
|
35
|
-
shared_inbox_url
|
36
|
-
matrix_user_id
|
34
|
+
shared_inbox_url?: string;
|
35
|
+
matrix_user_id?: string;
|
37
36
|
admin: boolean;
|
38
37
|
bot_account: boolean;
|
39
|
-
ban_expires
|
38
|
+
ban_expires?: string;
|
40
39
|
instance_id: number;
|
41
40
|
}
|
42
|
-
export
|
41
|
+
export interface Site {
|
43
42
|
id: number;
|
44
43
|
name: string;
|
45
|
-
sidebar
|
44
|
+
sidebar?: string;
|
46
45
|
published: string;
|
47
|
-
updated
|
48
|
-
icon
|
49
|
-
banner
|
50
|
-
description
|
46
|
+
updated?: string;
|
47
|
+
icon?: string;
|
48
|
+
banner?: string;
|
49
|
+
description?: string;
|
51
50
|
actor_id: string;
|
52
51
|
last_refreshed_at: string;
|
53
52
|
inbox_url: string;
|
54
|
-
private_key
|
53
|
+
private_key?: string;
|
55
54
|
public_key: string;
|
56
55
|
instance_id: number;
|
57
56
|
}
|
@@ -60,7 +59,7 @@ export declare enum RegistrationMode {
|
|
60
59
|
RequireApplication = "require_application",
|
61
60
|
Open = "open"
|
62
61
|
}
|
63
|
-
export
|
62
|
+
export interface LocalSite {
|
64
63
|
id: number;
|
65
64
|
site_id: number;
|
66
65
|
site_setup: boolean;
|
@@ -69,14 +68,14 @@ export declare class LocalSite {
|
|
69
68
|
enable_nsfw: boolean;
|
70
69
|
community_creation_admin_only: boolean;
|
71
70
|
require_email_verification: boolean;
|
72
|
-
application_question
|
71
|
+
application_question?: string;
|
73
72
|
private_instance: boolean;
|
74
73
|
default_theme: string;
|
75
74
|
default_post_listing_type: string;
|
76
|
-
legal_information
|
75
|
+
legal_information?: string;
|
77
76
|
hide_modlog_mod_names: boolean;
|
78
77
|
application_email_admins: boolean;
|
79
|
-
slur_filter_regex
|
78
|
+
slur_filter_regex?: string;
|
80
79
|
actor_name_max_length: number;
|
81
80
|
federation_enabled: boolean;
|
82
81
|
federation_debug: boolean;
|
@@ -84,9 +83,9 @@ export declare class LocalSite {
|
|
84
83
|
captcha_enabled: boolean;
|
85
84
|
captcha_difficulty: string;
|
86
85
|
published: string;
|
87
|
-
updated
|
86
|
+
updated?: string;
|
88
87
|
}
|
89
|
-
export
|
88
|
+
export interface LocalSiteRateLimit {
|
90
89
|
id: number;
|
91
90
|
local_site_id: number;
|
92
91
|
message: number;
|
@@ -102,9 +101,9 @@ export declare class LocalSiteRateLimit {
|
|
102
101
|
search: number;
|
103
102
|
search_per_second: number;
|
104
103
|
published: string;
|
105
|
-
updated
|
104
|
+
updated?: string;
|
106
105
|
}
|
107
|
-
export
|
106
|
+
export interface PrivateMessage {
|
108
107
|
id: number;
|
109
108
|
creator_id: number;
|
110
109
|
recipient_id: number;
|
@@ -112,68 +111,68 @@ export declare class PrivateMessage {
|
|
112
111
|
deleted: boolean;
|
113
112
|
read: boolean;
|
114
113
|
published: string;
|
115
|
-
updated
|
114
|
+
updated?: string;
|
116
115
|
ap_id: string;
|
117
116
|
local: boolean;
|
118
117
|
}
|
119
|
-
export
|
118
|
+
export interface PostReport {
|
120
119
|
id: number;
|
121
120
|
creator_id: number;
|
122
121
|
post_id: number;
|
123
122
|
original_post_name: string;
|
124
|
-
original_post_url
|
125
|
-
original_post_body
|
123
|
+
original_post_url?: string;
|
124
|
+
original_post_body?: string;
|
126
125
|
reason: string;
|
127
126
|
resolved: boolean;
|
128
|
-
resolver_id
|
127
|
+
resolver_id?: number;
|
129
128
|
published: string;
|
130
|
-
updated
|
129
|
+
updated?: string;
|
131
130
|
}
|
132
|
-
export
|
131
|
+
export interface Post {
|
133
132
|
id: number;
|
134
133
|
name: string;
|
135
|
-
url
|
136
|
-
body
|
134
|
+
url?: string;
|
135
|
+
body?: string;
|
137
136
|
creator_id: number;
|
138
137
|
community_id: number;
|
139
138
|
removed: boolean;
|
140
139
|
locked: boolean;
|
141
140
|
published: string;
|
142
|
-
updated
|
141
|
+
updated?: string;
|
143
142
|
deleted: boolean;
|
144
143
|
nsfw: boolean;
|
145
|
-
embed_title
|
146
|
-
embed_description
|
147
|
-
embed_video_url
|
148
|
-
thumbnail_url
|
144
|
+
embed_title?: string;
|
145
|
+
embed_description?: string;
|
146
|
+
embed_video_url?: string;
|
147
|
+
thumbnail_url?: string;
|
149
148
|
ap_id: string;
|
150
149
|
local: boolean;
|
151
150
|
language_id: number;
|
152
151
|
featured_community: boolean;
|
153
152
|
featured_local: boolean;
|
154
153
|
}
|
155
|
-
export
|
154
|
+
export interface PasswordResetRequest {
|
156
155
|
id: number;
|
157
156
|
local_user_id: number;
|
158
157
|
token_encrypted: string;
|
159
158
|
published: string;
|
160
159
|
}
|
161
|
-
export
|
160
|
+
export interface ModRemovePost {
|
162
161
|
id: number;
|
163
162
|
mod_person_id: number;
|
164
163
|
post_id: number;
|
165
|
-
reason
|
166
|
-
removed
|
164
|
+
reason?: string;
|
165
|
+
removed?: boolean;
|
167
166
|
when_: string;
|
168
167
|
}
|
169
|
-
export
|
168
|
+
export interface ModLockPost {
|
170
169
|
id: number;
|
171
170
|
mod_person_id: number;
|
172
171
|
post_id: number;
|
173
|
-
locked
|
172
|
+
locked?: boolean;
|
174
173
|
when_: string;
|
175
174
|
}
|
176
|
-
export
|
175
|
+
export interface ModFeaturePost {
|
177
176
|
id: number;
|
178
177
|
mod_person_id: number;
|
179
178
|
post_id: number;
|
@@ -181,128 +180,128 @@ export declare class ModFeaturePost {
|
|
181
180
|
is_featured_community: boolean;
|
182
181
|
when_: string;
|
183
182
|
}
|
184
|
-
export
|
183
|
+
export interface ModRemoveComment {
|
185
184
|
id: number;
|
186
185
|
mod_person_id: number;
|
187
186
|
comment_id: number;
|
188
|
-
reason
|
189
|
-
removed
|
187
|
+
reason?: string;
|
188
|
+
removed?: boolean;
|
190
189
|
when_: string;
|
191
190
|
}
|
192
|
-
export
|
191
|
+
export interface ModRemoveCommunity {
|
193
192
|
id: number;
|
194
193
|
mod_person_id: number;
|
195
194
|
community_id: number;
|
196
|
-
reason
|
197
|
-
removed
|
198
|
-
expires
|
195
|
+
reason?: string;
|
196
|
+
removed?: boolean;
|
197
|
+
expires?: string;
|
199
198
|
when_: string;
|
200
199
|
}
|
201
|
-
export
|
200
|
+
export interface ModBanFromCommunity {
|
202
201
|
id: number;
|
203
202
|
mod_person_id: number;
|
204
203
|
other_person_id: number;
|
205
204
|
community_id: number;
|
206
|
-
reason
|
207
|
-
banned
|
208
|
-
expires
|
205
|
+
reason?: string;
|
206
|
+
banned?: boolean;
|
207
|
+
expires?: string;
|
209
208
|
when_: string;
|
210
209
|
}
|
211
|
-
export
|
210
|
+
export interface ModBan {
|
212
211
|
id: number;
|
213
212
|
mod_person_id: number;
|
214
213
|
other_person_id: number;
|
215
|
-
reason
|
216
|
-
banned
|
217
|
-
expires
|
214
|
+
reason?: string;
|
215
|
+
banned?: boolean;
|
216
|
+
expires?: string;
|
218
217
|
when_: string;
|
219
218
|
}
|
220
|
-
export
|
219
|
+
export interface ModAddCommunity {
|
221
220
|
id: number;
|
222
221
|
mod_person_id: number;
|
223
222
|
other_person_id: number;
|
224
223
|
community_id: number;
|
225
|
-
removed
|
224
|
+
removed?: boolean;
|
226
225
|
when_: string;
|
227
226
|
}
|
228
|
-
export
|
227
|
+
export interface ModTransferCommunity {
|
229
228
|
id: number;
|
230
229
|
mod_person_id: number;
|
231
230
|
other_person_id: number;
|
232
231
|
community_id: number;
|
233
|
-
removed
|
232
|
+
removed?: boolean;
|
234
233
|
when_: string;
|
235
234
|
}
|
236
|
-
export
|
235
|
+
export interface ModAdd {
|
237
236
|
id: number;
|
238
237
|
mod_person_id: number;
|
239
238
|
other_person_id: number;
|
240
|
-
removed
|
239
|
+
removed?: boolean;
|
241
240
|
when_: string;
|
242
241
|
}
|
243
|
-
export
|
242
|
+
export interface AdminPurgePerson {
|
244
243
|
id: number;
|
245
244
|
admin_person_id: number;
|
246
|
-
reason
|
245
|
+
reason?: string;
|
247
246
|
when_: string;
|
248
247
|
}
|
249
|
-
export
|
248
|
+
export interface AdminPurgeCommunity {
|
250
249
|
id: number;
|
251
250
|
admin_person_id: number;
|
252
|
-
reason
|
251
|
+
reason?: string;
|
253
252
|
when_: string;
|
254
253
|
}
|
255
|
-
export
|
254
|
+
export interface AdminPurgePost {
|
256
255
|
id: number;
|
257
256
|
admin_person_id: number;
|
258
257
|
community_id: number;
|
259
|
-
reason
|
258
|
+
reason?: string;
|
260
259
|
when_: string;
|
261
260
|
}
|
262
|
-
export
|
261
|
+
export interface AdminPurgeComment {
|
263
262
|
id: number;
|
264
263
|
admin_person_id: number;
|
265
264
|
post_id: number;
|
266
|
-
reason
|
265
|
+
reason?: string;
|
267
266
|
when_: string;
|
268
267
|
}
|
269
|
-
export
|
268
|
+
export interface CommunitySafe {
|
270
269
|
id: number;
|
271
270
|
name: string;
|
272
271
|
title: string;
|
273
|
-
description
|
272
|
+
description?: string;
|
274
273
|
removed: boolean;
|
275
274
|
published: string;
|
276
|
-
updated
|
275
|
+
updated?: string;
|
277
276
|
deleted: boolean;
|
278
277
|
nsfw: boolean;
|
279
278
|
actor_id: string;
|
280
279
|
local: boolean;
|
281
|
-
icon
|
282
|
-
banner
|
280
|
+
icon?: string;
|
281
|
+
banner?: string;
|
283
282
|
hidden: boolean;
|
284
283
|
posting_restricted_to_mods: boolean;
|
285
284
|
instance_id: number;
|
286
285
|
}
|
287
|
-
export
|
286
|
+
export interface CommentReport {
|
288
287
|
id: number;
|
289
288
|
creator_id: number;
|
290
289
|
comment_id: number;
|
291
290
|
original_comment_text: string;
|
292
291
|
reason: string;
|
293
292
|
resolved: boolean;
|
294
|
-
resolver_id
|
293
|
+
resolver_id?: number;
|
295
294
|
published: string;
|
296
|
-
updated
|
295
|
+
updated?: string;
|
297
296
|
}
|
298
|
-
export
|
297
|
+
export interface Comment {
|
299
298
|
id: number;
|
300
299
|
creator_id: number;
|
301
300
|
post_id: number;
|
302
301
|
content: string;
|
303
302
|
removed: boolean;
|
304
303
|
published: string;
|
305
|
-
updated
|
304
|
+
updated?: string;
|
306
305
|
deleted: boolean;
|
307
306
|
ap_id: string;
|
308
307
|
local: boolean;
|
@@ -310,48 +309,48 @@ export declare class Comment {
|
|
310
309
|
distinguished: boolean;
|
311
310
|
language_id: number;
|
312
311
|
}
|
313
|
-
export
|
312
|
+
export interface PersonMention {
|
314
313
|
id: number;
|
315
314
|
recipient_id: number;
|
316
315
|
comment_id: number;
|
317
316
|
read: boolean;
|
318
317
|
published: string;
|
319
318
|
}
|
320
|
-
export
|
319
|
+
export interface CommentReply {
|
321
320
|
id: number;
|
322
321
|
recipient_id: number;
|
323
322
|
comment_id: number;
|
324
323
|
read: boolean;
|
325
324
|
published: string;
|
326
325
|
}
|
327
|
-
export
|
326
|
+
export interface RegistrationApplication {
|
328
327
|
id: number;
|
329
328
|
local_user_id: number;
|
330
329
|
answer: string;
|
331
|
-
admin_id
|
332
|
-
deny_reason
|
330
|
+
admin_id?: number;
|
331
|
+
deny_reason?: string;
|
333
332
|
published: string;
|
334
333
|
}
|
335
|
-
export
|
334
|
+
export interface Language {
|
336
335
|
id: number;
|
337
336
|
code: string;
|
338
337
|
name: string;
|
339
338
|
}
|
340
|
-
export
|
339
|
+
export interface PrivateMessageReport {
|
341
340
|
id: number;
|
342
341
|
creator_id: number;
|
343
342
|
private_message_id: number;
|
344
343
|
original_pm_text: string;
|
345
344
|
reason: string;
|
346
345
|
resolved: boolean;
|
347
|
-
resolver_id
|
346
|
+
resolver_id?: number;
|
348
347
|
published: string;
|
349
|
-
updated
|
348
|
+
updated?: string;
|
350
349
|
}
|
351
|
-
export
|
350
|
+
export interface Tagline {
|
352
351
|
id: number;
|
353
352
|
local_site_id: number;
|
354
353
|
content: string;
|
355
354
|
published: string;
|
356
|
-
updated
|
355
|
+
updated?: string;
|
357
356
|
}
|