lemmy-js-client 0.17.0-rc.4 → 0.17.0-rc.40
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 +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,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,53 @@ 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>;
|
64
|
+
application_email_admins: boolean;
|
61
65
|
}
|
62
|
-
export
|
66
|
+
export declare class PrivateMessage {
|
63
67
|
id: number;
|
64
68
|
creator_id: number;
|
65
69
|
recipient_id: number;
|
@@ -67,184 +71,216 @@ export interface PrivateMessage {
|
|
67
71
|
deleted: boolean;
|
68
72
|
read: boolean;
|
69
73
|
published: string;
|
70
|
-
updated
|
74
|
+
updated: Option<string>;
|
71
75
|
ap_id: string;
|
72
76
|
local: boolean;
|
73
77
|
}
|
74
|
-
export
|
78
|
+
export declare class PostReport {
|
75
79
|
id: number;
|
76
80
|
creator_id: number;
|
77
81
|
post_id: number;
|
78
82
|
original_post_name: string;
|
79
|
-
original_post_url
|
80
|
-
original_post_body
|
83
|
+
original_post_url: Option<string>;
|
84
|
+
original_post_body: Option<string>;
|
81
85
|
reason: string;
|
82
86
|
resolved: boolean;
|
83
|
-
resolver_id
|
87
|
+
resolver_id: Option<number>;
|
84
88
|
published: string;
|
85
|
-
updated
|
89
|
+
updated: Option<string>;
|
86
90
|
}
|
87
|
-
export
|
91
|
+
export declare class Post {
|
88
92
|
id: number;
|
89
93
|
name: string;
|
90
|
-
url
|
91
|
-
body
|
94
|
+
url: Option<string>;
|
95
|
+
body: Option<string>;
|
92
96
|
creator_id: number;
|
93
97
|
community_id: number;
|
94
98
|
removed: boolean;
|
95
99
|
locked: boolean;
|
96
100
|
published: string;
|
97
|
-
updated
|
101
|
+
updated: Option<string>;
|
98
102
|
deleted: boolean;
|
99
103
|
nsfw: boolean;
|
100
104
|
stickied: boolean;
|
101
|
-
embed_title
|
102
|
-
embed_description
|
103
|
-
embed_html
|
104
|
-
thumbnail_url
|
105
|
+
embed_title: Option<string>;
|
106
|
+
embed_description: Option<string>;
|
107
|
+
embed_html: Option<string>;
|
108
|
+
thumbnail_url: Option<string>;
|
105
109
|
ap_id: string;
|
106
110
|
local: boolean;
|
107
111
|
}
|
108
|
-
export
|
112
|
+
export declare class PasswordResetRequest {
|
109
113
|
id: number;
|
110
114
|
local_user_id: number;
|
111
115
|
token_encrypted: string;
|
112
116
|
published: string;
|
113
117
|
}
|
114
|
-
export
|
118
|
+
export declare class ModRemovePost {
|
115
119
|
id: number;
|
116
120
|
mod_person_id: number;
|
117
121
|
post_id: number;
|
118
|
-
reason
|
119
|
-
removed
|
122
|
+
reason: Option<string>;
|
123
|
+
removed: Option<boolean>;
|
120
124
|
when_: string;
|
121
125
|
}
|
122
|
-
export
|
126
|
+
export declare class ModLockPost {
|
123
127
|
id: number;
|
124
128
|
mod_person_id: number;
|
125
129
|
post_id: number;
|
126
|
-
locked
|
130
|
+
locked: Option<boolean>;
|
127
131
|
when_: string;
|
128
132
|
}
|
129
|
-
export
|
133
|
+
export declare class ModStickyPost {
|
130
134
|
id: number;
|
131
135
|
mod_person_id: number;
|
132
136
|
post_id: number;
|
133
|
-
stickied
|
137
|
+
stickied: Option<boolean>;
|
134
138
|
when_: string;
|
135
139
|
}
|
136
|
-
export
|
140
|
+
export declare class ModRemoveComment {
|
137
141
|
id: number;
|
138
142
|
mod_person_id: number;
|
139
143
|
comment_id: number;
|
140
|
-
reason
|
141
|
-
removed
|
144
|
+
reason: Option<string>;
|
145
|
+
removed: Option<boolean>;
|
142
146
|
when_: string;
|
143
147
|
}
|
144
|
-
export
|
148
|
+
export declare class ModRemoveCommunity {
|
145
149
|
id: number;
|
146
150
|
mod_person_id: number;
|
147
151
|
community_id: number;
|
148
|
-
reason
|
149
|
-
removed
|
150
|
-
expires
|
152
|
+
reason: Option<string>;
|
153
|
+
removed: Option<boolean>;
|
154
|
+
expires: Option<string>;
|
151
155
|
when_: string;
|
152
156
|
}
|
153
|
-
export
|
157
|
+
export declare class ModBanFromCommunity {
|
154
158
|
id: number;
|
155
159
|
mod_person_id: number;
|
156
160
|
other_person_id: number;
|
157
161
|
community_id: number;
|
158
|
-
reason
|
159
|
-
banned
|
160
|
-
expires
|
162
|
+
reason: Option<string>;
|
163
|
+
banned: Option<boolean>;
|
164
|
+
expires: Option<string>;
|
161
165
|
when_: string;
|
162
166
|
}
|
163
|
-
export
|
167
|
+
export declare class ModBan {
|
164
168
|
id: number;
|
165
169
|
mod_person_id: number;
|
166
170
|
other_person_id: number;
|
167
|
-
reason
|
168
|
-
banned
|
169
|
-
expires
|
171
|
+
reason: Option<string>;
|
172
|
+
banned: Option<boolean>;
|
173
|
+
expires: Option<string>;
|
170
174
|
when_: string;
|
171
175
|
}
|
172
|
-
export
|
176
|
+
export declare class ModAddCommunity {
|
173
177
|
id: number;
|
174
178
|
mod_person_id: number;
|
175
179
|
other_person_id: number;
|
176
180
|
community_id: number;
|
177
|
-
removed
|
181
|
+
removed: Option<boolean>;
|
178
182
|
when_: string;
|
179
183
|
}
|
180
|
-
export
|
184
|
+
export declare class ModTransferCommunity {
|
181
185
|
id: number;
|
182
186
|
mod_person_id: number;
|
183
187
|
other_person_id: number;
|
184
188
|
community_id: number;
|
185
|
-
removed
|
189
|
+
removed: Option<boolean>;
|
186
190
|
when_: string;
|
187
191
|
}
|
188
|
-
export
|
192
|
+
export declare class ModAdd {
|
189
193
|
id: number;
|
190
194
|
mod_person_id: number;
|
191
195
|
other_person_id: number;
|
192
|
-
removed
|
196
|
+
removed: Option<boolean>;
|
193
197
|
when_: string;
|
194
198
|
}
|
195
|
-
export
|
199
|
+
export declare class AdminPurgePerson {
|
200
|
+
id: number;
|
201
|
+
admin_person_id: number;
|
202
|
+
reason: Option<string>;
|
203
|
+
when_: string;
|
204
|
+
}
|
205
|
+
export declare class AdminPurgeCommunity {
|
206
|
+
id: number;
|
207
|
+
admin_person_id: number;
|
208
|
+
reason: Option<string>;
|
209
|
+
when_: string;
|
210
|
+
}
|
211
|
+
export declare class AdminPurgePost {
|
212
|
+
id: number;
|
213
|
+
admin_person_id: number;
|
214
|
+
community_id: number;
|
215
|
+
reason: Option<string>;
|
216
|
+
when_: string;
|
217
|
+
}
|
218
|
+
export declare class AdminPurgeComment {
|
219
|
+
id: number;
|
220
|
+
admin_person_id: number;
|
221
|
+
post_id: number;
|
222
|
+
reason: Option<string>;
|
223
|
+
when_: string;
|
224
|
+
}
|
225
|
+
export declare class CommunitySafe {
|
196
226
|
id: number;
|
197
227
|
name: string;
|
198
228
|
title: string;
|
199
|
-
description
|
229
|
+
description: Option<string>;
|
200
230
|
removed: boolean;
|
201
231
|
published: string;
|
202
|
-
updated
|
232
|
+
updated: Option<string>;
|
203
233
|
deleted: boolean;
|
204
234
|
nsfw: boolean;
|
205
235
|
actor_id: string;
|
206
236
|
local: boolean;
|
207
|
-
icon
|
208
|
-
banner
|
237
|
+
icon: Option<string>;
|
238
|
+
banner: Option<string>;
|
209
239
|
posting_restricted_to_mods: boolean;
|
210
240
|
}
|
211
|
-
export
|
241
|
+
export declare class CommentReport {
|
212
242
|
id: number;
|
213
243
|
creator_id: number;
|
214
244
|
comment_id: number;
|
215
245
|
original_comment_text: string;
|
216
246
|
reason: string;
|
217
247
|
resolved: boolean;
|
218
|
-
resolver_id
|
248
|
+
resolver_id: Option<number>;
|
219
249
|
published: string;
|
220
|
-
updated
|
250
|
+
updated: Option<string>;
|
221
251
|
}
|
222
|
-
export
|
252
|
+
export declare class Comment {
|
223
253
|
id: number;
|
224
254
|
creator_id: number;
|
225
255
|
post_id: number;
|
226
|
-
parent_id?: number;
|
227
256
|
content: string;
|
228
257
|
removed: boolean;
|
229
|
-
read: boolean;
|
230
258
|
published: string;
|
231
|
-
updated
|
259
|
+
updated: Option<string>;
|
232
260
|
deleted: boolean;
|
233
261
|
ap_id: string;
|
234
262
|
local: boolean;
|
263
|
+
path: string;
|
264
|
+
}
|
265
|
+
export declare class PersonMention {
|
266
|
+
id: number;
|
267
|
+
recipient_id: number;
|
268
|
+
comment_id: number;
|
269
|
+
read: boolean;
|
270
|
+
published: string;
|
235
271
|
}
|
236
|
-
export
|
272
|
+
export declare class CommentReply {
|
237
273
|
id: number;
|
238
274
|
recipient_id: number;
|
239
275
|
comment_id: number;
|
240
276
|
read: boolean;
|
241
277
|
published: string;
|
242
278
|
}
|
243
|
-
export
|
279
|
+
export declare class RegistrationApplication {
|
244
280
|
id: number;
|
245
281
|
local_user_id: number;
|
246
282
|
answer: string;
|
247
|
-
admin_id
|
248
|
-
deny_reason
|
283
|
+
admin_id: Option<number>;
|
284
|
+
deny_reason: Option<string>;
|
249
285
|
published: string;
|
250
286
|
}
|