lemmy-js-client 0.17.0-rc.4 → 0.17.0-rc.42
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.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 +125 -98
- package/dist/interfaces/api/site.js +963 -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 +112 -77
- package/dist/interfaces/source.js +809 -0
- package/dist/interfaces/views.d.ts +80 -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,7 +1,8 @@
|
|
1
|
-
|
1
|
+
import { Option } from "@sniptt/monads";
|
2
|
+
export declare class LocalUserSettings {
|
2
3
|
id: number;
|
3
4
|
person_id: number;
|
4
|
-
email
|
5
|
+
email: Option<string>;
|
5
6
|
show_nsfw: boolean;
|
6
7
|
theme: string;
|
7
8
|
default_sort_type: number;
|
@@ -16,50 +17,52 @@ export interface LocalUserSettings {
|
|
16
17
|
email_verified: boolean;
|
17
18
|
accepted_application: boolean;
|
18
19
|
}
|
19
|
-
export
|
20
|
+
export declare class PersonSafe {
|
20
21
|
id: number;
|
21
22
|
name: string;
|
22
|
-
display_name
|
23
|
-
avatar
|
23
|
+
display_name: Option<string>;
|
24
|
+
avatar: Option<string>;
|
24
25
|
banned: boolean;
|
25
26
|
published: string;
|
26
|
-
updated
|
27
|
+
updated: Option<string>;
|
27
28
|
actor_id: string;
|
28
|
-
bio
|
29
|
+
bio: Option<string>;
|
29
30
|
local: boolean;
|
30
|
-
banner
|
31
|
+
banner: Option<string>;
|
31
32
|
deleted: boolean;
|
32
33
|
inbox_url: string;
|
33
34
|
shared_inbox_url: string;
|
34
|
-
matrix_user_id
|
35
|
+
matrix_user_id: Option<string>;
|
35
36
|
admin: boolean;
|
36
37
|
bot_account: boolean;
|
37
|
-
ban_expires
|
38
|
+
ban_expires: Option<string>;
|
38
39
|
}
|
39
|
-
export
|
40
|
+
export declare class Site {
|
40
41
|
id: number;
|
41
42
|
name: string;
|
42
|
-
sidebar
|
43
|
+
sidebar: Option<string>;
|
43
44
|
published: string;
|
44
|
-
updated
|
45
|
+
updated: Option<string>;
|
45
46
|
enable_downvotes: boolean;
|
46
47
|
open_registration: boolean;
|
47
48
|
enable_nsfw: boolean;
|
48
|
-
icon
|
49
|
-
banner
|
50
|
-
description
|
49
|
+
icon: Option<string>;
|
50
|
+
banner: Option<string>;
|
51
|
+
description: Option<string>;
|
51
52
|
community_creation_admin_only: boolean;
|
52
53
|
require_email_verification: boolean;
|
53
54
|
require_application: boolean;
|
54
|
-
application_question
|
55
|
+
application_question: Option<string>;
|
55
56
|
private_instance: boolean;
|
56
57
|
default_theme: string;
|
58
|
+
default_post_listing_type: string;
|
57
59
|
actor_id: string;
|
58
60
|
last_refreshed_at: string;
|
59
61
|
inbox_url: string;
|
60
62
|
public_key: string;
|
63
|
+
legal_information: Option<string>;
|
61
64
|
}
|
62
|
-
export
|
65
|
+
export declare class PrivateMessage {
|
63
66
|
id: number;
|
64
67
|
creator_id: number;
|
65
68
|
recipient_id: number;
|
@@ -67,184 +70,216 @@ export interface PrivateMessage {
|
|
67
70
|
deleted: boolean;
|
68
71
|
read: boolean;
|
69
72
|
published: string;
|
70
|
-
updated
|
73
|
+
updated: Option<string>;
|
71
74
|
ap_id: string;
|
72
75
|
local: boolean;
|
73
76
|
}
|
74
|
-
export
|
77
|
+
export declare class PostReport {
|
75
78
|
id: number;
|
76
79
|
creator_id: number;
|
77
80
|
post_id: number;
|
78
81
|
original_post_name: string;
|
79
|
-
original_post_url
|
80
|
-
original_post_body
|
82
|
+
original_post_url: Option<string>;
|
83
|
+
original_post_body: Option<string>;
|
81
84
|
reason: string;
|
82
85
|
resolved: boolean;
|
83
|
-
resolver_id
|
86
|
+
resolver_id: Option<number>;
|
84
87
|
published: string;
|
85
|
-
updated
|
88
|
+
updated: Option<string>;
|
86
89
|
}
|
87
|
-
export
|
90
|
+
export declare class Post {
|
88
91
|
id: number;
|
89
92
|
name: string;
|
90
|
-
url
|
91
|
-
body
|
93
|
+
url: Option<string>;
|
94
|
+
body: Option<string>;
|
92
95
|
creator_id: number;
|
93
96
|
community_id: number;
|
94
97
|
removed: boolean;
|
95
98
|
locked: boolean;
|
96
99
|
published: string;
|
97
|
-
updated
|
100
|
+
updated: Option<string>;
|
98
101
|
deleted: boolean;
|
99
102
|
nsfw: boolean;
|
100
103
|
stickied: boolean;
|
101
|
-
embed_title
|
102
|
-
embed_description
|
103
|
-
embed_html
|
104
|
-
thumbnail_url
|
104
|
+
embed_title: Option<string>;
|
105
|
+
embed_description: Option<string>;
|
106
|
+
embed_html: Option<string>;
|
107
|
+
thumbnail_url: Option<string>;
|
105
108
|
ap_id: string;
|
106
109
|
local: boolean;
|
107
110
|
}
|
108
|
-
export
|
111
|
+
export declare class PasswordResetRequest {
|
109
112
|
id: number;
|
110
113
|
local_user_id: number;
|
111
114
|
token_encrypted: string;
|
112
115
|
published: string;
|
113
116
|
}
|
114
|
-
export
|
117
|
+
export declare class ModRemovePost {
|
115
118
|
id: number;
|
116
119
|
mod_person_id: number;
|
117
120
|
post_id: number;
|
118
|
-
reason
|
119
|
-
removed
|
121
|
+
reason: Option<string>;
|
122
|
+
removed: Option<boolean>;
|
120
123
|
when_: string;
|
121
124
|
}
|
122
|
-
export
|
125
|
+
export declare class ModLockPost {
|
123
126
|
id: number;
|
124
127
|
mod_person_id: number;
|
125
128
|
post_id: number;
|
126
|
-
locked
|
129
|
+
locked: Option<boolean>;
|
127
130
|
when_: string;
|
128
131
|
}
|
129
|
-
export
|
132
|
+
export declare class ModStickyPost {
|
130
133
|
id: number;
|
131
134
|
mod_person_id: number;
|
132
135
|
post_id: number;
|
133
|
-
stickied
|
136
|
+
stickied: Option<boolean>;
|
134
137
|
when_: string;
|
135
138
|
}
|
136
|
-
export
|
139
|
+
export declare class ModRemoveComment {
|
137
140
|
id: number;
|
138
141
|
mod_person_id: number;
|
139
142
|
comment_id: number;
|
140
|
-
reason
|
141
|
-
removed
|
143
|
+
reason: Option<string>;
|
144
|
+
removed: Option<boolean>;
|
142
145
|
when_: string;
|
143
146
|
}
|
144
|
-
export
|
147
|
+
export declare class ModRemoveCommunity {
|
145
148
|
id: number;
|
146
149
|
mod_person_id: number;
|
147
150
|
community_id: number;
|
148
|
-
reason
|
149
|
-
removed
|
150
|
-
expires
|
151
|
+
reason: Option<string>;
|
152
|
+
removed: Option<boolean>;
|
153
|
+
expires: Option<string>;
|
151
154
|
when_: string;
|
152
155
|
}
|
153
|
-
export
|
156
|
+
export declare class ModBanFromCommunity {
|
154
157
|
id: number;
|
155
158
|
mod_person_id: number;
|
156
159
|
other_person_id: number;
|
157
160
|
community_id: number;
|
158
|
-
reason
|
159
|
-
banned
|
160
|
-
expires
|
161
|
+
reason: Option<string>;
|
162
|
+
banned: Option<boolean>;
|
163
|
+
expires: Option<string>;
|
161
164
|
when_: string;
|
162
165
|
}
|
163
|
-
export
|
166
|
+
export declare class ModBan {
|
164
167
|
id: number;
|
165
168
|
mod_person_id: number;
|
166
169
|
other_person_id: number;
|
167
|
-
reason
|
168
|
-
banned
|
169
|
-
expires
|
170
|
+
reason: Option<string>;
|
171
|
+
banned: Option<boolean>;
|
172
|
+
expires: Option<string>;
|
170
173
|
when_: string;
|
171
174
|
}
|
172
|
-
export
|
175
|
+
export declare class ModAddCommunity {
|
173
176
|
id: number;
|
174
177
|
mod_person_id: number;
|
175
178
|
other_person_id: number;
|
176
179
|
community_id: number;
|
177
|
-
removed
|
180
|
+
removed: Option<boolean>;
|
178
181
|
when_: string;
|
179
182
|
}
|
180
|
-
export
|
183
|
+
export declare class ModTransferCommunity {
|
181
184
|
id: number;
|
182
185
|
mod_person_id: number;
|
183
186
|
other_person_id: number;
|
184
187
|
community_id: number;
|
185
|
-
removed
|
188
|
+
removed: Option<boolean>;
|
186
189
|
when_: string;
|
187
190
|
}
|
188
|
-
export
|
191
|
+
export declare class ModAdd {
|
189
192
|
id: number;
|
190
193
|
mod_person_id: number;
|
191
194
|
other_person_id: number;
|
192
|
-
removed
|
195
|
+
removed: Option<boolean>;
|
193
196
|
when_: string;
|
194
197
|
}
|
195
|
-
export
|
198
|
+
export declare class AdminPurgePerson {
|
199
|
+
id: number;
|
200
|
+
admin_person_id: number;
|
201
|
+
reason: Option<string>;
|
202
|
+
when_: string;
|
203
|
+
}
|
204
|
+
export declare class AdminPurgeCommunity {
|
205
|
+
id: number;
|
206
|
+
admin_person_id: number;
|
207
|
+
reason: Option<string>;
|
208
|
+
when_: string;
|
209
|
+
}
|
210
|
+
export declare class AdminPurgePost {
|
211
|
+
id: number;
|
212
|
+
admin_person_id: number;
|
213
|
+
community_id: number;
|
214
|
+
reason: Option<string>;
|
215
|
+
when_: string;
|
216
|
+
}
|
217
|
+
export declare class AdminPurgeComment {
|
218
|
+
id: number;
|
219
|
+
admin_person_id: number;
|
220
|
+
post_id: number;
|
221
|
+
reason: Option<string>;
|
222
|
+
when_: string;
|
223
|
+
}
|
224
|
+
export declare class CommunitySafe {
|
196
225
|
id: number;
|
197
226
|
name: string;
|
198
227
|
title: string;
|
199
|
-
description
|
228
|
+
description: Option<string>;
|
200
229
|
removed: boolean;
|
201
230
|
published: string;
|
202
|
-
updated
|
231
|
+
updated: Option<string>;
|
203
232
|
deleted: boolean;
|
204
233
|
nsfw: boolean;
|
205
234
|
actor_id: string;
|
206
235
|
local: boolean;
|
207
|
-
icon
|
208
|
-
banner
|
236
|
+
icon: Option<string>;
|
237
|
+
banner: Option<string>;
|
209
238
|
posting_restricted_to_mods: boolean;
|
210
239
|
}
|
211
|
-
export
|
240
|
+
export declare class CommentReport {
|
212
241
|
id: number;
|
213
242
|
creator_id: number;
|
214
243
|
comment_id: number;
|
215
244
|
original_comment_text: string;
|
216
245
|
reason: string;
|
217
246
|
resolved: boolean;
|
218
|
-
resolver_id
|
247
|
+
resolver_id: Option<number>;
|
219
248
|
published: string;
|
220
|
-
updated
|
249
|
+
updated: Option<string>;
|
221
250
|
}
|
222
|
-
export
|
251
|
+
export declare class Comment {
|
223
252
|
id: number;
|
224
253
|
creator_id: number;
|
225
254
|
post_id: number;
|
226
|
-
parent_id?: number;
|
227
255
|
content: string;
|
228
256
|
removed: boolean;
|
229
|
-
read: boolean;
|
230
257
|
published: string;
|
231
|
-
updated
|
258
|
+
updated: Option<string>;
|
232
259
|
deleted: boolean;
|
233
260
|
ap_id: string;
|
234
261
|
local: boolean;
|
262
|
+
path: string;
|
263
|
+
}
|
264
|
+
export declare class PersonMention {
|
265
|
+
id: number;
|
266
|
+
recipient_id: number;
|
267
|
+
comment_id: number;
|
268
|
+
read: boolean;
|
269
|
+
published: string;
|
235
270
|
}
|
236
|
-
export
|
271
|
+
export declare class CommentReply {
|
237
272
|
id: number;
|
238
273
|
recipient_id: number;
|
239
274
|
comment_id: number;
|
240
275
|
read: boolean;
|
241
276
|
published: string;
|
242
277
|
}
|
243
|
-
export
|
278
|
+
export declare class RegistrationApplication {
|
244
279
|
id: number;
|
245
280
|
local_user_id: number;
|
246
281
|
answer: string;
|
247
|
-
admin_id
|
248
|
-
deny_reason
|
282
|
+
admin_id: Option<number>;
|
283
|
+
deny_reason: Option<string>;
|
249
284
|
published: string;
|
250
285
|
}
|