lemmy-js-client 0.17.0-rc.6 → 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/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 +97 -31
- 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, 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;
|
@@ -71,11 +69,38 @@ export interface CreateSite {
|
|
71
69
|
application_question?: string;
|
72
70
|
private_instance?: boolean;
|
73
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[];
|
74
99
|
auth: string;
|
75
100
|
}
|
76
101
|
export interface EditSite {
|
77
102
|
name?: string;
|
78
|
-
sidebar
|
103
|
+
sidebar?: string;
|
79
104
|
description?: string;
|
80
105
|
icon?: string;
|
81
106
|
banner?: string;
|
@@ -88,6 +113,33 @@ export interface EditSite {
|
|
88
113
|
application_question?: string;
|
89
114
|
private_instance?: boolean;
|
90
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[];
|
91
143
|
auth: string;
|
92
144
|
}
|
93
145
|
export interface GetSite {
|
@@ -97,18 +149,18 @@ export interface SiteResponse {
|
|
97
149
|
site_view: SiteView;
|
98
150
|
}
|
99
151
|
export interface GetSiteResponse {
|
100
|
-
|
101
|
-
* Optional, because the site might not be set up yet.
|
102
|
-
*/
|
103
|
-
site_view: Option<SiteView>;
|
152
|
+
site_view: SiteView;
|
104
153
|
admins: PersonViewSafe[];
|
105
154
|
online: number;
|
106
155
|
version: string;
|
107
156
|
/**
|
108
157
|
* If you're logged in, you'll get back extra user info.
|
109
158
|
*/
|
110
|
-
my_user
|
159
|
+
my_user?: MyUserInfo;
|
111
160
|
federated_instances?: FederatedInstances;
|
161
|
+
all_languages: Language[];
|
162
|
+
discussion_languages: number[];
|
163
|
+
taglines?: Tagline[];
|
112
164
|
}
|
113
165
|
/**
|
114
166
|
* Your user info, such as blocks, follows, etc.
|
@@ -119,20 +171,11 @@ export interface MyUserInfo {
|
|
119
171
|
moderates: CommunityModeratorView[];
|
120
172
|
community_blocks: CommunityBlockView[];
|
121
173
|
person_blocks: PersonBlockView[];
|
174
|
+
discussion_languages: number[];
|
122
175
|
}
|
123
176
|
export interface LeaveAdmin {
|
124
177
|
auth: string;
|
125
178
|
}
|
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
179
|
export interface FederatedInstances {
|
137
180
|
linked: string[];
|
138
181
|
allowed?: string[];
|
@@ -148,6 +191,29 @@ export interface ResolveObjectResponse {
|
|
148
191
|
community?: CommunityView;
|
149
192
|
person?: PersonViewSafe;
|
150
193
|
}
|
194
|
+
export interface PurgePerson {
|
195
|
+
person_id: number;
|
196
|
+
reason?: string;
|
197
|
+
auth: string;
|
198
|
+
}
|
199
|
+
export interface PurgeCommunity {
|
200
|
+
community_id: number;
|
201
|
+
reason?: string;
|
202
|
+
auth: string;
|
203
|
+
}
|
204
|
+
export interface PurgePost {
|
205
|
+
post_id: number;
|
206
|
+
reason?: string;
|
207
|
+
auth: string;
|
208
|
+
}
|
209
|
+
export interface PurgeComment {
|
210
|
+
comment_id: number;
|
211
|
+
reason?: string;
|
212
|
+
auth: string;
|
213
|
+
}
|
214
|
+
export interface PurgeItemResponse {
|
215
|
+
success: boolean;
|
216
|
+
}
|
151
217
|
export interface ListRegistrationApplications {
|
152
218
|
/**
|
153
219
|
* 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];
|