lemmy-js-client 0.15.0-rc.8 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -51,6 +51,9 @@ export interface BanFromCommunity {
|
|
51
51
|
*/
|
52
52
|
remove_data?: boolean;
|
53
53
|
reason?: string;
|
54
|
+
/**
|
55
|
+
* The expire time in Unix seconds
|
56
|
+
*/
|
54
57
|
expires?: number;
|
55
58
|
auth: string;
|
56
59
|
}
|
@@ -91,6 +94,9 @@ export interface RemoveCommunity {
|
|
91
94
|
community_id: number;
|
92
95
|
removed: boolean;
|
93
96
|
reason?: string;
|
97
|
+
/**
|
98
|
+
* The expire time in Unix seconds
|
99
|
+
*/
|
94
100
|
expires?: number;
|
95
101
|
auth: string;
|
96
102
|
}
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "lemmy-js-client",
|
3
3
|
"description": "A javascript / typescript client for Lemmy",
|
4
|
-
"version": "0.15.0
|
4
|
+
"version": "0.15.0",
|
5
5
|
"author": "Dessalines <tyhou13@gmx.com>",
|
6
6
|
"license": "AGPL-3.0",
|
7
7
|
"main": "./dist/index.js",
|
@@ -16,14 +16,14 @@
|
|
16
16
|
},
|
17
17
|
"repository": "https://github.com/LemmyNet/lemmy-js-client",
|
18
18
|
"devDependencies": {
|
19
|
-
"@types/node": "^
|
19
|
+
"@types/node": "^17.0.8",
|
20
20
|
"@types/node-fetch": "^3.0.3",
|
21
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
22
|
-
"@typescript-eslint/parser": "^5.
|
23
|
-
"eslint": "^8.
|
21
|
+
"@typescript-eslint/eslint-plugin": "^5.9.1",
|
22
|
+
"@typescript-eslint/parser": "^5.9.1",
|
23
|
+
"eslint": "^8.6.0",
|
24
24
|
"eslint-plugin-prettier": "^4.0.0",
|
25
25
|
"husky": "^7.0.4",
|
26
|
-
"lint-staged": "^12.1.
|
26
|
+
"lint-staged": "^12.1.7",
|
27
27
|
"node-fetch": "^3.1.0",
|
28
28
|
"prettier": "^2.5.0",
|
29
29
|
"prettier-plugin-import-sort": "^0.0.7",
|
@@ -32,7 +32,7 @@
|
|
32
32
|
"sortpack": "^2.2.0",
|
33
33
|
"typedoc": "^0.21.6",
|
34
34
|
"typedoc-plugin-sourcefile-url": "^1.0.6",
|
35
|
-
"typescript": "^4.5.
|
35
|
+
"typescript": "^4.5.4"
|
36
36
|
},
|
37
37
|
"types": "./dist/index.d.ts",
|
38
38
|
"lint-staged": {
|
@@ -1,190 +0,0 @@
|
|
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
|
-
}
|