lemmy-js-client 0.17.0-rc.6 → 0.17.0-rc.61
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -4
- package/dist/http.d.ts +198 -16
- package/dist/http.js +245 -26
- package/dist/index.js +5 -1
- package/dist/interfaces/aggregates.d.ts +3 -0
- package/dist/interfaces/api/comment.d.ts +13 -17
- package/dist/interfaces/api/community.d.ts +8 -8
- package/dist/interfaces/api/index.js +5 -1
- package/dist/interfaces/api/person.d.ts +39 -12
- package/dist/interfaces/api/post.d.ts +21 -18
- package/dist/interfaces/api/site.d.ts +99 -35
- package/dist/interfaces/index.js +5 -1
- package/dist/interfaces/others.d.ts +122 -85
- package/dist/interfaces/others.js +133 -59
- package/dist/interfaces/source.d.ts +124 -19
- package/dist/interfaces/source.js +7 -0
- package/dist/interfaces/views.d.ts +66 -18
- package/dist/utils.d.ts +0 -0
- package/dist/utils.js +0 -0
- package/dist/websocket.d.ts +44 -14
- package/dist/websocket.js +67 -19
- package/package.json +26 -28
package/dist/index.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|
@@ -51,6 +51,8 @@ export interface PostAggregates {
|
|
51
51
|
*/
|
52
52
|
newest_comment_time_necro: string;
|
53
53
|
newest_comment_time: string;
|
54
|
+
featured_community: boolean;
|
55
|
+
featured_local: boolean;
|
54
56
|
}
|
55
57
|
/**
|
56
58
|
* Aggregate data for your community.
|
@@ -87,4 +89,5 @@ export interface CommentAggregates {
|
|
87
89
|
score: number;
|
88
90
|
upvotes: number;
|
89
91
|
downvotes: number;
|
92
|
+
child_count: number;
|
90
93
|
}
|
@@ -1,7 +1,9 @@
|
|
1
|
+
import { CommentSortType, ListingType } from "../others";
|
1
2
|
import { CommentReportView, CommentView } from "../views";
|
2
3
|
export interface CreateComment {
|
3
4
|
content: string;
|
4
5
|
parent_id?: number;
|
6
|
+
language_id?: number;
|
5
7
|
post_id: number;
|
6
8
|
/**
|
7
9
|
* An optional front end ID, to tell which is comment is coming back.
|
@@ -10,8 +12,13 @@ export interface CreateComment {
|
|
10
12
|
auth: string;
|
11
13
|
}
|
12
14
|
export interface EditComment {
|
13
|
-
content: string;
|
14
15
|
comment_id: number;
|
16
|
+
content?: string;
|
17
|
+
/**
|
18
|
+
* "Distinguishes" a comment, or speak officially. Only doable by community mods or admins.
|
19
|
+
*/
|
20
|
+
distinguished?: boolean;
|
21
|
+
language_id?: number;
|
15
22
|
/**
|
16
23
|
* An optional front end ID, to tell which is comment is coming back.
|
17
24
|
*/
|
@@ -35,14 +42,6 @@ export interface RemoveComment {
|
|
35
42
|
reason?: string;
|
36
43
|
auth: string;
|
37
44
|
}
|
38
|
-
/**
|
39
|
-
* Only the recipient can do this.
|
40
|
-
*/
|
41
|
-
export interface MarkCommentAsRead {
|
42
|
-
comment_id: number;
|
43
|
-
read: boolean;
|
44
|
-
auth: string;
|
45
|
-
}
|
46
45
|
export interface SaveComment {
|
47
46
|
comment_id: number;
|
48
47
|
save: boolean;
|
@@ -68,18 +67,15 @@ export interface CreateCommentLike {
|
|
68
67
|
* To get posts for a federated community by name, use `name@instance.tld` .
|
69
68
|
*/
|
70
69
|
export interface GetComments {
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
type_?: string;
|
75
|
-
/**
|
76
|
-
* The [[SortType]].
|
77
|
-
*/
|
78
|
-
sort?: string;
|
70
|
+
type_?: ListingType;
|
71
|
+
sort?: CommentSortType;
|
72
|
+
max_depth?: number;
|
79
73
|
page?: number;
|
80
74
|
limit?: number;
|
81
75
|
community_id?: number;
|
82
76
|
community_name?: string;
|
77
|
+
post_id?: number;
|
78
|
+
parent_id?: number;
|
83
79
|
saved_only?: boolean;
|
84
80
|
auth?: string;
|
85
81
|
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { ListingType, SortType } from "../others";
|
1
2
|
import { Site } from "../source";
|
2
3
|
import { CommunityModeratorView, CommunityView, PersonViewSafe } from "../views";
|
3
4
|
/**
|
@@ -15,6 +16,8 @@ export interface GetCommunityResponse {
|
|
15
16
|
site?: Site;
|
16
17
|
moderators: CommunityModeratorView[];
|
17
18
|
online: number;
|
19
|
+
discussion_languages: number[];
|
20
|
+
default_post_language?: number;
|
18
21
|
}
|
19
22
|
export interface CreateCommunity {
|
20
23
|
name: string;
|
@@ -24,20 +27,16 @@ export interface CreateCommunity {
|
|
24
27
|
banner?: string;
|
25
28
|
nsfw?: boolean;
|
26
29
|
posting_restricted_to_mods?: boolean;
|
30
|
+
discussion_languages?: number[];
|
27
31
|
auth: string;
|
28
32
|
}
|
29
33
|
export interface CommunityResponse {
|
30
34
|
community_view: CommunityView;
|
35
|
+
discussion_languages: number[];
|
31
36
|
}
|
32
37
|
export interface ListCommunities {
|
33
|
-
|
34
|
-
|
35
|
-
*/
|
36
|
-
type_?: string;
|
37
|
-
/**
|
38
|
-
* The [[SortType]].
|
39
|
-
*/
|
40
|
-
sort?: string;
|
38
|
+
type_?: ListingType;
|
39
|
+
sort?: SortType;
|
41
40
|
page?: number;
|
42
41
|
limit?: number;
|
43
42
|
auth?: string;
|
@@ -84,6 +83,7 @@ export interface EditCommunity {
|
|
84
83
|
banner?: string;
|
85
84
|
nsfw?: boolean;
|
86
85
|
posting_restricted_to_mods?: boolean;
|
86
|
+
discussion_languages?: number[];
|
87
87
|
auth: string;
|
88
88
|
}
|
89
89
|
export interface DeleteCommunity {
|
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|
@@ -1,4 +1,5 @@
|
|
1
|
-
import {
|
1
|
+
import { CommentSortType, SortType } from "../others";
|
2
|
+
import { CommentReplyView, CommentView, CommunityModeratorView, PersonMentionView, PersonViewSafe, PostView, PrivateMessageReportView, PrivateMessageView } from "../views";
|
2
3
|
export interface Login {
|
3
4
|
username_or_email: string;
|
4
5
|
password: string;
|
@@ -68,7 +69,7 @@ export interface SaveUserSettings {
|
|
68
69
|
* Post listing types are `All, Subscribed, Community`
|
69
70
|
*/
|
70
71
|
default_listing_type?: number;
|
71
|
-
|
72
|
+
interface_language?: string;
|
72
73
|
avatar?: string;
|
73
74
|
banner?: string;
|
74
75
|
display_name?: string;
|
@@ -82,6 +83,7 @@ export interface SaveUserSettings {
|
|
82
83
|
show_bot_accounts?: boolean;
|
83
84
|
show_read_posts?: boolean;
|
84
85
|
show_new_post_notifs?: boolean;
|
86
|
+
discussion_languages?: number[];
|
85
87
|
auth: string;
|
86
88
|
}
|
87
89
|
export interface ChangePassword {
|
@@ -107,7 +109,7 @@ export interface GetPersonDetails {
|
|
107
109
|
* To get details for a federated user, use `person@instance.tld`.
|
108
110
|
*/
|
109
111
|
username?: string;
|
110
|
-
sort?:
|
112
|
+
sort?: SortType;
|
111
113
|
page?: number;
|
112
114
|
limit?: number;
|
113
115
|
community_id?: number;
|
@@ -121,7 +123,7 @@ export interface GetPersonDetailsResponse {
|
|
121
123
|
moderates: CommunityModeratorView[];
|
122
124
|
}
|
123
125
|
export interface GetRepliesResponse {
|
124
|
-
replies:
|
126
|
+
replies: CommentReplyView[];
|
125
127
|
}
|
126
128
|
export interface GetPersonMentionsResponse {
|
127
129
|
mentions: PersonMentionView[];
|
@@ -156,20 +158,14 @@ export interface BanPersonResponse {
|
|
156
158
|
banned: boolean;
|
157
159
|
}
|
158
160
|
export interface GetReplies {
|
159
|
-
|
160
|
-
* The [[SortType]].
|
161
|
-
*/
|
162
|
-
sort?: string;
|
161
|
+
sort?: CommentSortType;
|
163
162
|
page?: number;
|
164
163
|
limit?: number;
|
165
164
|
unread_only?: boolean;
|
166
165
|
auth: string;
|
167
166
|
}
|
168
167
|
export interface GetPersonMentions {
|
169
|
-
|
170
|
-
* The [[SortType]].
|
171
|
-
*/
|
172
|
-
sort?: string;
|
168
|
+
sort?: CommentSortType;
|
173
169
|
page?: number;
|
174
170
|
limit?: number;
|
175
171
|
unread_only?: boolean;
|
@@ -183,6 +179,14 @@ export interface MarkPersonMentionAsRead {
|
|
183
179
|
export interface PersonMentionResponse {
|
184
180
|
person_mention_view: PersonMentionView;
|
185
181
|
}
|
182
|
+
export interface MarkCommentReplyAsRead {
|
183
|
+
comment_reply_id: number;
|
184
|
+
read: boolean;
|
185
|
+
auth: string;
|
186
|
+
}
|
187
|
+
export interface CommentReplyResponse {
|
188
|
+
comment_reply_view: CommentReplyView;
|
189
|
+
}
|
186
190
|
/**
|
187
191
|
* Permanently deletes your posts and comments
|
188
192
|
*/
|
@@ -234,6 +238,28 @@ export interface PrivateMessagesResponse {
|
|
234
238
|
export interface PrivateMessageResponse {
|
235
239
|
private_message_view: PrivateMessageView;
|
236
240
|
}
|
241
|
+
export interface CreatePrivateMessageReport {
|
242
|
+
private_message_id: number;
|
243
|
+
reason: string;
|
244
|
+
auth: string;
|
245
|
+
}
|
246
|
+
export interface PrivateMessageReportResponse {
|
247
|
+
private_message_report_view: PrivateMessageReportView;
|
248
|
+
}
|
249
|
+
export interface ResolvePrivateMessageReport {
|
250
|
+
report_id: number;
|
251
|
+
resolved: boolean;
|
252
|
+
auth: string;
|
253
|
+
}
|
254
|
+
export interface ListPrivateMessageReports {
|
255
|
+
page?: number;
|
256
|
+
limit?: number;
|
257
|
+
unresolved_only?: boolean;
|
258
|
+
auth: string;
|
259
|
+
}
|
260
|
+
export interface ListPrivateMessageReportsResponse {
|
261
|
+
private_message_reports: PrivateMessageReportView[];
|
262
|
+
}
|
237
263
|
export interface GetReportCount {
|
238
264
|
/**
|
239
265
|
* If a community is supplied, returns the report count for only that community, otherwise returns the report count for all communities the user moderates.
|
@@ -245,6 +271,7 @@ export interface GetReportCountResponse {
|
|
245
271
|
community_id?: number;
|
246
272
|
comment_reports: number;
|
247
273
|
post_reports: number;
|
274
|
+
private_message_reports?: number;
|
248
275
|
}
|
249
276
|
export interface GetUnreadCount {
|
250
277
|
auth: string;
|
@@ -1,39 +1,32 @@
|
|
1
|
-
import { SiteMetadata } from "
|
2
|
-
import {
|
1
|
+
import { ListingType, PostFeatureType, SiteMetadata, SortType } from "../others";
|
2
|
+
import { CommunityModeratorView, CommunityView, PostReportView, PostView } from "../views";
|
3
3
|
export interface CreatePost {
|
4
4
|
name: string;
|
5
5
|
url?: string;
|
6
6
|
body?: string;
|
7
7
|
nsfw?: boolean;
|
8
|
+
language_id?: number;
|
8
9
|
community_id: number;
|
9
|
-
auth: string;
|
10
10
|
honeypot?: string;
|
11
|
+
auth: string;
|
11
12
|
}
|
12
13
|
export interface PostResponse {
|
13
14
|
post_view: PostView;
|
14
15
|
}
|
15
16
|
export interface GetPost {
|
16
|
-
id
|
17
|
+
id?: number;
|
18
|
+
comment_id?: number;
|
17
19
|
auth?: string;
|
18
20
|
}
|
19
21
|
export interface GetPostResponse {
|
20
22
|
post_view: PostView;
|
21
23
|
community_view: CommunityView;
|
22
|
-
comments: CommentView[];
|
23
24
|
moderators: CommunityModeratorView[];
|
24
25
|
online: number;
|
25
26
|
}
|
26
27
|
export interface GetPosts {
|
27
|
-
|
28
|
-
|
29
|
-
*
|
30
|
-
* Post listing types are `All, Subscribed, Community`
|
31
|
-
*/
|
32
|
-
type_?: string;
|
33
|
-
/**
|
34
|
-
* The [[SortType]].
|
35
|
-
*/
|
36
|
-
sort?: string;
|
28
|
+
type_?: ListingType;
|
29
|
+
sort?: SortType;
|
37
30
|
page?: number;
|
38
31
|
limit?: number;
|
39
32
|
community_id?: number;
|
@@ -61,6 +54,7 @@ export interface EditPost {
|
|
61
54
|
url?: string;
|
62
55
|
body?: string;
|
63
56
|
nsfw?: boolean;
|
57
|
+
language_id?: number;
|
64
58
|
auth: string;
|
65
59
|
}
|
66
60
|
export interface DeletePost {
|
@@ -77,6 +71,14 @@ export interface RemovePost {
|
|
77
71
|
reason?: string;
|
78
72
|
auth: string;
|
79
73
|
}
|
74
|
+
/**
|
75
|
+
* Marks a post as read.
|
76
|
+
*/
|
77
|
+
export interface MarkPostAsRead {
|
78
|
+
post_id: number;
|
79
|
+
read: boolean;
|
80
|
+
auth: string;
|
81
|
+
}
|
80
82
|
/**
|
81
83
|
* Only admins and mods can lock a post.
|
82
84
|
*/
|
@@ -86,11 +88,12 @@ export interface LockPost {
|
|
86
88
|
auth: string;
|
87
89
|
}
|
88
90
|
/**
|
89
|
-
* Only admins and mods can
|
91
|
+
* Only admins and mods can feature a community post.
|
90
92
|
*/
|
91
|
-
export interface
|
93
|
+
export interface FeaturePost {
|
92
94
|
post_id: number;
|
93
|
-
|
95
|
+
featured: boolean;
|
96
|
+
feature_type: PostFeatureType;
|
94
97
|
auth: string;
|
95
98
|
}
|
96
99
|
export interface SavePost {
|
@@ -1,5 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { ListingType, ModlogActionType, SearchType, SortType } from "../others";
|
2
|
+
import { Language, RegistrationMode, Tagline } from "../source";
|
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";
|
3
4
|
/**
|
4
5
|
* Search lemmy for different types of data.
|
5
6
|
*/
|
@@ -8,21 +9,12 @@ export interface Search {
|
|
8
9
|
* The search query string.
|
9
10
|
*/
|
10
11
|
q: string;
|
11
|
-
|
12
|
-
* The [[SearchType]].
|
13
|
-
*/
|
14
|
-
type_?: string;
|
12
|
+
type_?: SearchType;
|
15
13
|
community_id?: number;
|
16
14
|
community_name?: string;
|
17
15
|
creator_id?: number;
|
18
|
-
|
19
|
-
|
20
|
-
*/
|
21
|
-
sort?: string;
|
22
|
-
/**
|
23
|
-
* The [[ListingType]].
|
24
|
-
*/
|
25
|
-
listing_type?: string;
|
16
|
+
sort?: SortType;
|
17
|
+
listing_type?: ListingType;
|
26
18
|
page?: number;
|
27
19
|
limit?: number;
|
28
20
|
auth?: string;
|
@@ -43,11 +35,13 @@ export interface GetModlog {
|
|
43
35
|
page?: number;
|
44
36
|
limit?: number;
|
45
37
|
auth?: string;
|
38
|
+
type_: ModlogActionType;
|
39
|
+
other_person_id?: number;
|
46
40
|
}
|
47
41
|
export interface GetModlogResponse {
|
48
42
|
removed_posts: ModRemovePostView[];
|
49
43
|
locked_posts: ModLockPostView[];
|
50
|
-
|
44
|
+
featured_posts: ModFeaturePostView[];
|
51
45
|
removed_comments: ModRemoveCommentView[];
|
52
46
|
removed_communities: ModRemoveCommunityView[];
|
53
47
|
banned_from_community: ModBanFromCommunityView[];
|
@@ -55,6 +49,10 @@ export interface GetModlogResponse {
|
|
55
49
|
added_to_community: ModAddCommunityView[];
|
56
50
|
transferred_to_community: ModTransferCommunityView[];
|
57
51
|
added: ModAddView[];
|
52
|
+
admin_purged_persons: AdminPurgePersonView[];
|
53
|
+
admin_purged_communities: AdminPurgeCommunityView[];
|
54
|
+
admin_purged_posts: AdminPurgePostView[];
|
55
|
+
admin_purged_comments: AdminPurgeCommentView[];
|
58
56
|
}
|
59
57
|
export interface CreateSite {
|
60
58
|
name: string;
|
@@ -63,31 +61,83 @@ export interface CreateSite {
|
|
63
61
|
icon?: string;
|
64
62
|
banner?: string;
|
65
63
|
enable_downvotes?: boolean;
|
66
|
-
open_registration?: boolean;
|
67
64
|
enable_nsfw?: boolean;
|
68
65
|
community_creation_admin_only?: boolean;
|
69
66
|
require_email_verification?: boolean;
|
70
|
-
|
67
|
+
registration_mode?: RegistrationMode;
|
71
68
|
application_question?: string;
|
72
69
|
private_instance?: boolean;
|
73
70
|
default_theme?: string;
|
71
|
+
default_post_listing_type?: string;
|
72
|
+
application_email_admins?: boolean;
|
73
|
+
hide_modlog_mod_names?: boolean;
|
74
|
+
discussion_languages?: number[];
|
75
|
+
legal_information?: string;
|
76
|
+
slur_filter_regex?: string;
|
77
|
+
actor_name_max_length?: number;
|
78
|
+
rate_limit_message?: number;
|
79
|
+
rate_limit_message_per_second?: number;
|
80
|
+
rate_limit_post?: number;
|
81
|
+
rate_limit_post_per_second?: number;
|
82
|
+
rate_limit_register?: number;
|
83
|
+
rate_limit_register_per_second?: number;
|
84
|
+
rate_limit_image?: number;
|
85
|
+
rate_limit_image_per_second?: number;
|
86
|
+
rate_limit_comment?: number;
|
87
|
+
rate_limit_comment_per_second?: number;
|
88
|
+
rate_limit_search?: number;
|
89
|
+
rate_limit_search_per_second?: number;
|
90
|
+
federation_enabled?: boolean;
|
91
|
+
federation_debug?: boolean;
|
92
|
+
federation_worker_count?: number;
|
93
|
+
captcha_enabled?: boolean;
|
94
|
+
captcha_difficulty?: string;
|
95
|
+
allowed_instances?: string[];
|
96
|
+
blocked_instances?: string[];
|
97
|
+
taglines?: string[];
|
74
98
|
auth: string;
|
75
99
|
}
|
76
100
|
export interface EditSite {
|
77
101
|
name?: string;
|
78
|
-
sidebar
|
102
|
+
sidebar?: string;
|
79
103
|
description?: string;
|
80
104
|
icon?: string;
|
81
105
|
banner?: string;
|
82
106
|
enable_downvotes?: boolean;
|
83
|
-
open_registration?: boolean;
|
84
107
|
enable_nsfw?: boolean;
|
85
108
|
community_creation_admin_only?: boolean;
|
86
109
|
require_email_verification?: boolean;
|
87
|
-
|
110
|
+
registration_mode?: RegistrationMode;
|
88
111
|
application_question?: string;
|
89
112
|
private_instance?: boolean;
|
90
113
|
default_theme?: string;
|
114
|
+
default_post_listing_type?: string;
|
115
|
+
legal_information?: string;
|
116
|
+
application_email_admins?: boolean;
|
117
|
+
hide_modlog_mod_names?: boolean;
|
118
|
+
discussion_languages?: number[];
|
119
|
+
slur_filter_regex?: string;
|
120
|
+
actor_name_max_length?: number;
|
121
|
+
rate_limit_message?: number;
|
122
|
+
rate_limit_message_per_second?: number;
|
123
|
+
rate_limit_post?: number;
|
124
|
+
rate_limit_post_per_second?: number;
|
125
|
+
rate_limit_register?: number;
|
126
|
+
rate_limit_register_per_second?: number;
|
127
|
+
rate_limit_image?: number;
|
128
|
+
rate_limit_image_per_second?: number;
|
129
|
+
rate_limit_comment?: number;
|
130
|
+
rate_limit_comment_per_second?: number;
|
131
|
+
rate_limit_search?: number;
|
132
|
+
rate_limit_search_per_second?: number;
|
133
|
+
federation_enabled?: boolean;
|
134
|
+
federation_debug?: boolean;
|
135
|
+
federation_worker_count?: number;
|
136
|
+
captcha_enabled?: boolean;
|
137
|
+
captcha_difficulty?: string;
|
138
|
+
allowed_instances?: string[];
|
139
|
+
blocked_instances?: string[];
|
140
|
+
taglines?: string[];
|
91
141
|
auth: string;
|
92
142
|
}
|
93
143
|
export interface GetSite {
|
@@ -97,18 +147,18 @@ export interface SiteResponse {
|
|
97
147
|
site_view: SiteView;
|
98
148
|
}
|
99
149
|
export interface GetSiteResponse {
|
100
|
-
|
101
|
-
* Optional, because the site might not be set up yet.
|
102
|
-
*/
|
103
|
-
site_view: Option<SiteView>;
|
150
|
+
site_view: SiteView;
|
104
151
|
admins: PersonViewSafe[];
|
105
152
|
online: number;
|
106
153
|
version: string;
|
107
154
|
/**
|
108
155
|
* If you're logged in, you'll get back extra user info.
|
109
156
|
*/
|
110
|
-
my_user
|
157
|
+
my_user?: MyUserInfo;
|
111
158
|
federated_instances?: FederatedInstances;
|
159
|
+
all_languages: Language[];
|
160
|
+
discussion_languages: number[];
|
161
|
+
taglines?: Tagline[];
|
112
162
|
}
|
113
163
|
/**
|
114
164
|
* Your user info, such as blocks, follows, etc.
|
@@ -119,20 +169,11 @@ export interface MyUserInfo {
|
|
119
169
|
moderates: CommunityModeratorView[];
|
120
170
|
community_blocks: CommunityBlockView[];
|
121
171
|
person_blocks: PersonBlockView[];
|
172
|
+
discussion_languages: number[];
|
122
173
|
}
|
123
174
|
export interface LeaveAdmin {
|
124
175
|
auth: string;
|
125
176
|
}
|
126
|
-
export interface GetSiteConfig {
|
127
|
-
auth: string;
|
128
|
-
}
|
129
|
-
export interface GetSiteConfigResponse {
|
130
|
-
config_hjson: string;
|
131
|
-
}
|
132
|
-
export interface SaveSiteConfig {
|
133
|
-
config_hjson: string;
|
134
|
-
auth: string;
|
135
|
-
}
|
136
177
|
export interface FederatedInstances {
|
137
178
|
linked: string[];
|
138
179
|
allowed?: string[];
|
@@ -148,6 +189,29 @@ export interface ResolveObjectResponse {
|
|
148
189
|
community?: CommunityView;
|
149
190
|
person?: PersonViewSafe;
|
150
191
|
}
|
192
|
+
export interface PurgePerson {
|
193
|
+
person_id: number;
|
194
|
+
reason?: string;
|
195
|
+
auth: string;
|
196
|
+
}
|
197
|
+
export interface PurgeCommunity {
|
198
|
+
community_id: number;
|
199
|
+
reason?: string;
|
200
|
+
auth: string;
|
201
|
+
}
|
202
|
+
export interface PurgePost {
|
203
|
+
post_id: number;
|
204
|
+
reason?: string;
|
205
|
+
auth: string;
|
206
|
+
}
|
207
|
+
export interface PurgeComment {
|
208
|
+
comment_id: number;
|
209
|
+
reason?: string;
|
210
|
+
auth: string;
|
211
|
+
}
|
212
|
+
export interface PurgeItemResponse {
|
213
|
+
success: boolean;
|
214
|
+
}
|
151
215
|
export interface ListRegistrationApplications {
|
152
216
|
/**
|
153
217
|
* Only shows the unread applications (IE those without an admin actor)
|
package/dist/interfaces/index.js
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
"use strict";
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
3
|
if (k2 === undefined) k2 = k;
|
4
|
-
Object.
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
5
9
|
}) : (function(o, m, k, k2) {
|
6
10
|
if (k2 === undefined) k2 = k;
|
7
11
|
o[k2] = m[k];
|