lemmy-js-client 0.17.0-rc.59 → 0.17.0-rc.60
Sign up to get free protection for your applications and to get access to all the features.
- 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,28 +1,25 @@
|
|
1
|
-
import { Option } from "@sniptt/monads";
|
2
|
-
import "reflect-metadata";
|
3
1
|
import { ListingType, ModlogActionType, SearchType, SortType } from "../others";
|
4
|
-
import { Language,
|
2
|
+
import { Language, Tagline } from "../source";
|
5
3
|
import { AdminPurgeCommentView, AdminPurgeCommunityView, AdminPurgePersonView, AdminPurgePostView, CommentView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, CommunityView, LocalUserSettingsView, ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModFeaturePostView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView, ModRemovePostView, ModTransferCommunityView, PersonBlockView, PersonViewSafe, PostView, RegistrationApplicationView, SiteView } from "../views";
|
6
4
|
/**
|
7
5
|
* Search lemmy for different types of data.
|
8
6
|
*/
|
9
|
-
export
|
7
|
+
export interface Search {
|
10
8
|
/**
|
11
9
|
* The search query string.
|
12
10
|
*/
|
13
11
|
q: string;
|
14
|
-
type_
|
15
|
-
community_id
|
16
|
-
community_name
|
17
|
-
creator_id
|
18
|
-
sort
|
19
|
-
listing_type
|
20
|
-
page
|
21
|
-
limit
|
22
|
-
auth
|
23
|
-
|
24
|
-
|
25
|
-
export declare class SearchResponse {
|
12
|
+
type_?: SearchType;
|
13
|
+
community_id?: number;
|
14
|
+
community_name?: string;
|
15
|
+
creator_id?: number;
|
16
|
+
sort?: SortType;
|
17
|
+
listing_type?: ListingType;
|
18
|
+
page?: number;
|
19
|
+
limit?: number;
|
20
|
+
auth?: string;
|
21
|
+
}
|
22
|
+
export interface SearchResponse {
|
26
23
|
/**
|
27
24
|
* The [[SearchType]].
|
28
25
|
*/
|
@@ -32,17 +29,16 @@ export declare class SearchResponse {
|
|
32
29
|
communities: CommunityView[];
|
33
30
|
users: PersonViewSafe[];
|
34
31
|
}
|
35
|
-
export
|
36
|
-
mod_person_id
|
37
|
-
community_id
|
38
|
-
page
|
39
|
-
limit
|
40
|
-
auth
|
32
|
+
export interface GetModlog {
|
33
|
+
mod_person_id?: number;
|
34
|
+
community_id?: number;
|
35
|
+
page?: number;
|
36
|
+
limit?: number;
|
37
|
+
auth?: string;
|
41
38
|
type_: ModlogActionType;
|
42
|
-
other_person_id
|
43
|
-
constructor(init: GetModlog);
|
39
|
+
other_person_id?: number;
|
44
40
|
}
|
45
|
-
export
|
41
|
+
export interface GetModlogResponse {
|
46
42
|
removed_posts: ModRemovePostView[];
|
47
43
|
locked_posts: ModLockPostView[];
|
48
44
|
featured_posts: ModFeaturePostView[];
|
@@ -58,102 +54,101 @@ export declare class GetModlogResponse {
|
|
58
54
|
admin_purged_posts: AdminPurgePostView[];
|
59
55
|
admin_purged_comments: AdminPurgeCommentView[];
|
60
56
|
}
|
61
|
-
export
|
57
|
+
export interface CreateSite {
|
62
58
|
name: string;
|
63
|
-
sidebar
|
64
|
-
description
|
65
|
-
icon
|
66
|
-
banner
|
67
|
-
enable_downvotes
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
59
|
+
sidebar?: string;
|
60
|
+
description?: string;
|
61
|
+
icon?: string;
|
62
|
+
banner?: string;
|
63
|
+
enable_downvotes?: boolean;
|
64
|
+
open_registration?: boolean;
|
65
|
+
enable_nsfw?: boolean;
|
66
|
+
community_creation_admin_only?: boolean;
|
67
|
+
require_email_verification?: boolean;
|
68
|
+
require_application?: boolean;
|
69
|
+
application_question?: string;
|
70
|
+
private_instance?: boolean;
|
71
|
+
default_theme?: string;
|
72
|
+
default_post_listing_type?: string;
|
73
|
+
application_email_admins?: boolean;
|
74
|
+
hide_modlog_mod_names?: boolean;
|
75
|
+
discussion_languages?: number[];
|
76
|
+
legal_information?: string;
|
77
|
+
slur_filter_regex?: string;
|
78
|
+
actor_name_max_length?: number;
|
79
|
+
rate_limit_message?: number;
|
80
|
+
rate_limit_message_per_second?: number;
|
81
|
+
rate_limit_post?: number;
|
82
|
+
rate_limit_post_per_second?: number;
|
83
|
+
rate_limit_register?: number;
|
84
|
+
rate_limit_register_per_second?: number;
|
85
|
+
rate_limit_image?: number;
|
86
|
+
rate_limit_image_per_second?: number;
|
87
|
+
rate_limit_comment?: number;
|
88
|
+
rate_limit_comment_per_second?: number;
|
89
|
+
rate_limit_search?: number;
|
90
|
+
rate_limit_search_per_second?: number;
|
91
|
+
federation_enabled?: boolean;
|
92
|
+
federation_debug?: boolean;
|
93
|
+
federation_worker_count?: number;
|
94
|
+
captcha_enabled?: boolean;
|
95
|
+
captcha_difficulty?: string;
|
96
|
+
allowed_instances?: string[];
|
97
|
+
blocked_instances?: string[];
|
98
|
+
taglines?: string[];
|
102
99
|
auth: string;
|
103
|
-
constructor(init: CreateSite);
|
104
100
|
}
|
105
|
-
export
|
106
|
-
name
|
107
|
-
sidebar
|
108
|
-
description
|
109
|
-
icon
|
110
|
-
banner
|
111
|
-
enable_downvotes
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
101
|
+
export interface EditSite {
|
102
|
+
name?: string;
|
103
|
+
sidebar?: string;
|
104
|
+
description?: string;
|
105
|
+
icon?: string;
|
106
|
+
banner?: string;
|
107
|
+
enable_downvotes?: boolean;
|
108
|
+
open_registration?: boolean;
|
109
|
+
enable_nsfw?: boolean;
|
110
|
+
community_creation_admin_only?: boolean;
|
111
|
+
require_email_verification?: boolean;
|
112
|
+
require_application?: boolean;
|
113
|
+
application_question?: string;
|
114
|
+
private_instance?: boolean;
|
115
|
+
default_theme?: string;
|
116
|
+
default_post_listing_type?: string;
|
117
|
+
legal_information?: string;
|
118
|
+
application_email_admins?: boolean;
|
119
|
+
hide_modlog_mod_names?: boolean;
|
120
|
+
discussion_languages?: number[];
|
121
|
+
slur_filter_regex?: string;
|
122
|
+
actor_name_max_length?: number;
|
123
|
+
rate_limit_message?: number;
|
124
|
+
rate_limit_message_per_second?: number;
|
125
|
+
rate_limit_post?: number;
|
126
|
+
rate_limit_post_per_second?: number;
|
127
|
+
rate_limit_register?: number;
|
128
|
+
rate_limit_register_per_second?: number;
|
129
|
+
rate_limit_image?: number;
|
130
|
+
rate_limit_image_per_second?: number;
|
131
|
+
rate_limit_comment?: number;
|
132
|
+
rate_limit_comment_per_second?: number;
|
133
|
+
rate_limit_search?: number;
|
134
|
+
rate_limit_search_per_second?: number;
|
135
|
+
federation_enabled?: boolean;
|
136
|
+
federation_debug?: boolean;
|
137
|
+
federation_worker_count?: number;
|
138
|
+
captcha_enabled?: boolean;
|
139
|
+
captcha_difficulty?: string;
|
140
|
+
allowed_instances?: string[];
|
141
|
+
blocked_instances?: string[];
|
142
|
+
taglines?: string[];
|
146
143
|
auth: string;
|
147
|
-
constructor(init: EditSite);
|
148
144
|
}
|
149
|
-
export
|
150
|
-
auth
|
151
|
-
constructor(init: GetSite);
|
145
|
+
export interface GetSite {
|
146
|
+
auth?: string;
|
152
147
|
}
|
153
|
-
export
|
148
|
+
export interface SiteResponse {
|
154
149
|
site_view: SiteView;
|
155
150
|
}
|
156
|
-
export
|
151
|
+
export interface GetSiteResponse {
|
157
152
|
site_view: SiteView;
|
158
153
|
admins: PersonViewSafe[];
|
159
154
|
online: number;
|
@@ -161,16 +156,16 @@ export declare class GetSiteResponse {
|
|
161
156
|
/**
|
162
157
|
* If you're logged in, you'll get back extra user info.
|
163
158
|
*/
|
164
|
-
my_user
|
165
|
-
federated_instances
|
159
|
+
my_user?: MyUserInfo;
|
160
|
+
federated_instances?: FederatedInstances;
|
166
161
|
all_languages: Language[];
|
167
162
|
discussion_languages: number[];
|
168
|
-
taglines
|
163
|
+
taglines?: Tagline[];
|
169
164
|
}
|
170
165
|
/**
|
171
166
|
* Your user info, such as blocks, follows, etc.
|
172
167
|
*/
|
173
|
-
export
|
168
|
+
export interface MyUserInfo {
|
174
169
|
local_user_view: LocalUserSettingsView;
|
175
170
|
follows: CommunityFollowerView[];
|
176
171
|
moderates: CommunityModeratorView[];
|
@@ -178,81 +173,71 @@ export declare class MyUserInfo {
|
|
178
173
|
person_blocks: PersonBlockView[];
|
179
174
|
discussion_languages: number[];
|
180
175
|
}
|
181
|
-
export
|
176
|
+
export interface LeaveAdmin {
|
182
177
|
auth: string;
|
183
|
-
constructor(init: LeaveAdmin);
|
184
178
|
}
|
185
|
-
export
|
179
|
+
export interface FederatedInstances {
|
186
180
|
linked: string[];
|
187
|
-
allowed
|
188
|
-
blocked
|
189
|
-
constructor(init: FederatedInstances);
|
181
|
+
allowed?: string[];
|
182
|
+
blocked?: string[];
|
190
183
|
}
|
191
|
-
export
|
184
|
+
export interface ResolveObject {
|
192
185
|
q: string;
|
193
|
-
auth
|
194
|
-
constructor(init: ResolveObject);
|
186
|
+
auth?: string;
|
195
187
|
}
|
196
|
-
export
|
197
|
-
comment
|
198
|
-
post
|
199
|
-
community
|
200
|
-
person
|
188
|
+
export interface ResolveObjectResponse {
|
189
|
+
comment?: CommentView;
|
190
|
+
post?: PostView;
|
191
|
+
community?: CommunityView;
|
192
|
+
person?: PersonViewSafe;
|
201
193
|
}
|
202
|
-
export
|
194
|
+
export interface PurgePerson {
|
203
195
|
person_id: number;
|
204
|
-
reason
|
196
|
+
reason?: string;
|
205
197
|
auth: string;
|
206
|
-
constructor(init: PurgePerson);
|
207
198
|
}
|
208
|
-
export
|
199
|
+
export interface PurgeCommunity {
|
209
200
|
community_id: number;
|
210
|
-
reason
|
201
|
+
reason?: string;
|
211
202
|
auth: string;
|
212
|
-
constructor(init: PurgeCommunity);
|
213
203
|
}
|
214
|
-
export
|
204
|
+
export interface PurgePost {
|
215
205
|
post_id: number;
|
216
|
-
reason
|
206
|
+
reason?: string;
|
217
207
|
auth: string;
|
218
|
-
constructor(init: PurgePost);
|
219
208
|
}
|
220
|
-
export
|
209
|
+
export interface PurgeComment {
|
221
210
|
comment_id: number;
|
222
|
-
reason
|
211
|
+
reason?: string;
|
223
212
|
auth: string;
|
224
|
-
constructor(init: PurgeComment);
|
225
213
|
}
|
226
|
-
export
|
214
|
+
export interface PurgeItemResponse {
|
227
215
|
success: boolean;
|
228
216
|
}
|
229
|
-
export
|
217
|
+
export interface ListRegistrationApplications {
|
230
218
|
/**
|
231
219
|
* Only shows the unread applications (IE those without an admin actor)
|
232
220
|
*/
|
233
|
-
unread_only
|
234
|
-
page
|
235
|
-
limit
|
221
|
+
unread_only?: boolean;
|
222
|
+
page?: number;
|
223
|
+
limit?: number;
|
236
224
|
auth: string;
|
237
|
-
constructor(init: ListRegistrationApplications);
|
238
225
|
}
|
239
|
-
export
|
226
|
+
export interface ListRegistrationApplicationsResponse {
|
240
227
|
registration_applications: RegistrationApplicationView[];
|
241
228
|
}
|
242
|
-
export
|
229
|
+
export interface ApproveRegistrationApplication {
|
243
230
|
id: number;
|
244
231
|
approve: boolean;
|
245
|
-
deny_reason
|
232
|
+
deny_reason?: string;
|
246
233
|
auth: string;
|
247
|
-
constructor(init: ApproveRegistrationApplication);
|
248
234
|
}
|
249
|
-
export
|
235
|
+
export interface RegistrationApplicationResponse {
|
250
236
|
registration_application: RegistrationApplicationView;
|
251
237
|
}
|
252
|
-
export
|
238
|
+
export interface GetUnreadRegistrationApplicationCount {
|
253
239
|
auth: string;
|
254
|
-
constructor(init: GetUnreadRegistrationApplicationCount);
|
255
240
|
}
|
256
|
-
export
|
241
|
+
export interface GetUnreadRegistrationApplicationCountResponse {
|
257
242
|
registration_applications: number;
|
258
243
|
}
|