lemmy-js-client 0.15.0-rc.3 → 0.15.0-rc.6
Sign up to get free protection for your applications and to get access to all the features.
package/dist/http.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, GetCommentsResponse, ListCommentReports, ListCommentReportsResponse, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
2
2
|
import { AddModToCommunity, AddModToCommunityResponse, BanFromCommunity, BanFromCommunityResponse, BlockCommunity, BlockCommunityResponse, CommunityResponse, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, GetCommunityResponse, ListCommunities, ListCommunitiesResponse, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
|
3
|
-
import { AddAdmin, AddAdminResponse, BanPerson, BanPersonResponse, BlockPerson, BlockPersonResponse, ChangePassword, CreatePrivateMessage, DeleteAccount, DeleteAccountResponse, DeletePrivateMessage, EditPrivateMessage, GetCaptchaResponse, GetPersonDetails, GetPersonDetailsResponse, GetPersonMentions, GetPersonMentionsResponse, GetPrivateMessages, GetReplies, GetRepliesResponse, GetReportCount, GetReportCountResponse, GetUnreadCount, GetUnreadCountResponse, Login, LoginResponse, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, PasswordResetResponse, PersonMentionResponse, PrivateMessageResponse, PrivateMessagesResponse, Register, SaveUserSettings, VerifyEmail } from "./interfaces/api/person";
|
3
|
+
import { AddAdmin, AddAdminResponse, BanPerson, BanPersonResponse, BlockPerson, BlockPersonResponse, ChangePassword, CreatePrivateMessage, DeleteAccount, DeleteAccountResponse, DeletePrivateMessage, EditPrivateMessage, GetCaptchaResponse, GetPersonDetails, GetPersonDetailsResponse, GetPersonMentions, GetPersonMentionsResponse, GetPrivateMessages, GetReplies, GetRepliesResponse, GetReportCount, GetReportCountResponse, GetUnreadCount, GetUnreadCountResponse, Login, LoginResponse, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, PasswordResetResponse, PersonMentionResponse, PrivateMessageResponse, PrivateMessagesResponse, Register, SaveUserSettings, VerifyEmail, VerifyEmailResponse } from "./interfaces/api/person";
|
4
4
|
import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPostResponse, GetPosts, GetPostsResponse, GetSiteMetadata, GetSiteMetadataResponse, ListPostReports, ListPostReportsResponse, LockPost, PostReportResponse, PostResponse, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
|
5
5
|
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetModlogResponse, GetSite, GetSiteConfig, GetSiteConfigResponse, GetSiteResponse, GetUnreadRegistrationApplicationCount, GetUnreadRegistrationApplicationCountResponse, ListRegistrationApplications, ListRegistrationApplicationsResponse, RegistrationApplicationResponse, ResolveObject, ResolveObjectResponse, SaveSiteConfig, Search, SearchResponse, SiteResponse, TransferSite } from "./interfaces/api/site";
|
6
6
|
/**
|
@@ -288,7 +288,7 @@ export declare class LemmyHttp {
|
|
288
288
|
/**
|
289
289
|
* Verify your email
|
290
290
|
*/
|
291
|
-
verifyEmail(form: VerifyEmail): Promise<
|
291
|
+
verifyEmail(form: VerifyEmail): Promise<VerifyEmailResponse>;
|
292
292
|
/**
|
293
293
|
* Add an admin to your site.
|
294
294
|
*/
|
@@ -0,0 +1,190 @@
|
|
1
|
+
import {
|
2
|
+
CommentView,
|
3
|
+
CommunityFollowerView,
|
4
|
+
CommunityModeratorView,
|
5
|
+
PostView,
|
6
|
+
PrivateMessageView,
|
7
|
+
UserMentionView,
|
8
|
+
UserViewSafe,
|
9
|
+
} from "../views";
|
10
|
+
export interface Login {
|
11
|
+
username_or_email: string;
|
12
|
+
password: string;
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* Only the first user will be able to be the admin.
|
16
|
+
*/
|
17
|
+
export interface Register {
|
18
|
+
username: string;
|
19
|
+
email?: string;
|
20
|
+
password: string;
|
21
|
+
password_verify: string;
|
22
|
+
show_nsfw: boolean;
|
23
|
+
captcha_uuid?: string;
|
24
|
+
captcha_answer?: string;
|
25
|
+
}
|
26
|
+
export interface GetCaptcha {}
|
27
|
+
export interface GetCaptchaResponse {
|
28
|
+
ok?: CaptchaResponse;
|
29
|
+
}
|
30
|
+
export interface CaptchaResponse {
|
31
|
+
png: string;
|
32
|
+
wav?: string;
|
33
|
+
uuid: string;
|
34
|
+
}
|
35
|
+
export interface SaveUserSettings {
|
36
|
+
show_nsfw: boolean;
|
37
|
+
theme: string;
|
38
|
+
default_sort_type: number;
|
39
|
+
default_listing_type: number;
|
40
|
+
lang: string;
|
41
|
+
avatar?: string;
|
42
|
+
banner?: string;
|
43
|
+
preferred_username?: string;
|
44
|
+
email?: string;
|
45
|
+
bio?: string;
|
46
|
+
matrix_user_id?: string;
|
47
|
+
new_password?: string;
|
48
|
+
new_password_verify?: string;
|
49
|
+
old_password?: string;
|
50
|
+
show_avatars: boolean;
|
51
|
+
send_notifications_to_email: boolean;
|
52
|
+
auth: string;
|
53
|
+
}
|
54
|
+
/**
|
55
|
+
* The `jwt` string should be stored and used anywhere `auth` is called for.
|
56
|
+
*/
|
57
|
+
export interface LoginResponse {
|
58
|
+
jwt: string;
|
59
|
+
}
|
60
|
+
/**
|
61
|
+
* `username` can only be used for local users. To get details for a federated user, pass `user_id` instead.
|
62
|
+
*/
|
63
|
+
export interface GetUserDetails {
|
64
|
+
user_id?: number;
|
65
|
+
username?: string;
|
66
|
+
sort: string;
|
67
|
+
page?: number;
|
68
|
+
limit?: number;
|
69
|
+
community_id?: number;
|
70
|
+
saved_only: boolean;
|
71
|
+
auth?: string;
|
72
|
+
}
|
73
|
+
export interface GetUserDetailsResponse {
|
74
|
+
user_view: UserViewSafe;
|
75
|
+
follows: CommunityFollowerView[];
|
76
|
+
moderates: CommunityModeratorView[];
|
77
|
+
comments: CommentView[];
|
78
|
+
posts: PostView[];
|
79
|
+
}
|
80
|
+
export interface GetRepliesResponse {
|
81
|
+
replies: CommentView[];
|
82
|
+
}
|
83
|
+
export interface GetUserMentionsResponse {
|
84
|
+
mentions: UserMentionView[];
|
85
|
+
}
|
86
|
+
export interface MarkAllAsRead {
|
87
|
+
auth: string;
|
88
|
+
}
|
89
|
+
export interface AddAdmin {
|
90
|
+
user_id: number;
|
91
|
+
added: boolean;
|
92
|
+
auth: string;
|
93
|
+
}
|
94
|
+
export interface AddAdminResponse {
|
95
|
+
admins: UserViewSafe[];
|
96
|
+
}
|
97
|
+
export interface BanUser {
|
98
|
+
user_id: number;
|
99
|
+
ban: boolean;
|
100
|
+
remove_data: boolean;
|
101
|
+
reason?: string;
|
102
|
+
expires?: number;
|
103
|
+
auth: string;
|
104
|
+
}
|
105
|
+
export interface BanUserResponse {
|
106
|
+
user_view: UserViewSafe;
|
107
|
+
banned: boolean;
|
108
|
+
}
|
109
|
+
export interface GetReplies {
|
110
|
+
sort: string;
|
111
|
+
page?: number;
|
112
|
+
limit?: number;
|
113
|
+
unread_only: boolean;
|
114
|
+
auth: string;
|
115
|
+
}
|
116
|
+
export interface GetUserMentions {
|
117
|
+
sort: string;
|
118
|
+
page?: number;
|
119
|
+
limit?: number;
|
120
|
+
unread_only: boolean;
|
121
|
+
auth: string;
|
122
|
+
}
|
123
|
+
export interface MarkUserMentionAsRead {
|
124
|
+
user_mention_id: number;
|
125
|
+
read: boolean;
|
126
|
+
auth: string;
|
127
|
+
}
|
128
|
+
export interface UserMentionResponse {
|
129
|
+
user_mention_view: UserMentionView;
|
130
|
+
}
|
131
|
+
/**
|
132
|
+
* Permanently deletes your posts and comments
|
133
|
+
*/
|
134
|
+
export interface DeleteAccount {
|
135
|
+
password: string;
|
136
|
+
auth: string;
|
137
|
+
}
|
138
|
+
export interface PasswordReset {
|
139
|
+
email: string;
|
140
|
+
}
|
141
|
+
export interface PasswordResetResponse {}
|
142
|
+
export interface PasswordChange {
|
143
|
+
token: string;
|
144
|
+
password: string;
|
145
|
+
password_verify: string;
|
146
|
+
}
|
147
|
+
export interface CreatePrivateMessage {
|
148
|
+
content: string;
|
149
|
+
recipient_id: number;
|
150
|
+
auth: string;
|
151
|
+
}
|
152
|
+
export interface EditPrivateMessage {
|
153
|
+
private_message_id: number;
|
154
|
+
content: string;
|
155
|
+
auth: string;
|
156
|
+
}
|
157
|
+
export interface DeletePrivateMessage {
|
158
|
+
private_message_id: number;
|
159
|
+
deleted: boolean;
|
160
|
+
auth: string;
|
161
|
+
}
|
162
|
+
export interface MarkPrivateMessageAsRead {
|
163
|
+
private_message_id: number;
|
164
|
+
read: boolean;
|
165
|
+
auth: string;
|
166
|
+
}
|
167
|
+
export interface GetPrivateMessages {
|
168
|
+
unread_only: boolean;
|
169
|
+
page?: number;
|
170
|
+
limit?: number;
|
171
|
+
auth: string;
|
172
|
+
}
|
173
|
+
export interface PrivateMessagesResponse {
|
174
|
+
private_messages: PrivateMessageView[];
|
175
|
+
}
|
176
|
+
export interface PrivateMessageResponse {
|
177
|
+
private_message_view: PrivateMessageView;
|
178
|
+
}
|
179
|
+
/**
|
180
|
+
* If a community is supplied, returns the report count for only that community, otherwise returns the report count for all communities the user moderates.
|
181
|
+
*/
|
182
|
+
export interface GetReportCount {
|
183
|
+
community?: number;
|
184
|
+
auth: string;
|
185
|
+
}
|
186
|
+
export interface GetReportCountResponse {
|
187
|
+
community?: number;
|
188
|
+
comment_reports: number;
|
189
|
+
post_reports: number;
|
190
|
+
}
|
package/package.json
CHANGED