lemmy-js-client 0.14.0-rc.1 → 0.15.0-rc.30
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/dist/http.d.ts +26 -6
- package/dist/http.js +125 -75
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/interfaces/api/comment.d.ts +1 -1
- package/dist/interfaces/api/community.d.ts +1 -1
- package/dist/interfaces/api/index.d.ts +6 -6
- package/dist/interfaces/api/index.js +1 -1
- package/dist/interfaces/api/person.d.ts +27 -2
- package/dist/interfaces/api/post.d.ts +2 -2
- package/dist/interfaces/api/site.d.ts +37 -3
- package/dist/interfaces/api/user.d.ts +190 -0
- package/dist/interfaces/api/user.js +2 -0
- package/dist/interfaces/index.d.ts +5 -5
- package/dist/interfaces/index.js +1 -1
- package/dist/interfaces/others.d.ts +38 -33
- package/dist/interfaces/others.js +39 -34
- package/dist/interfaces/source.d.ts +16 -2
- package/dist/interfaces/views.d.ts +8 -2
- package/dist/websocket.d.ts +26 -6
- package/dist/websocket.js +30 -0
- package/package.json +20 -9
package/dist/index.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from
|
2
|
-
export * from
|
3
|
-
export * from
|
1
|
+
export * from "./http";
|
2
|
+
export * from "./interfaces";
|
3
|
+
export * from "./websocket";
|
package/dist/index.js
CHANGED
@@ -10,6 +10,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
11
11
|
};
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13
|
-
__exportStar(require("./interfaces"), exports);
|
14
13
|
__exportStar(require("./http"), exports);
|
14
|
+
__exportStar(require("./interfaces"), exports);
|
15
15
|
__exportStar(require("./websocket"), exports);
|
@@ -1,6 +1,6 @@
|
|
1
|
-
export * from
|
2
|
-
export * from
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
1
|
+
export * from "./comment";
|
2
|
+
export * from "./community";
|
3
|
+
export * from "./person";
|
4
|
+
export * from "./post";
|
5
|
+
export * from "./site";
|
6
|
+
export * from "./websocket";
|
@@ -12,7 +12,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13
13
|
__exportStar(require("./comment"), exports);
|
14
14
|
__exportStar(require("./community"), exports);
|
15
|
+
__exportStar(require("./person"), exports);
|
15
16
|
__exportStar(require("./post"), exports);
|
16
17
|
__exportStar(require("./site"), exports);
|
17
|
-
__exportStar(require("./person"), exports);
|
18
18
|
__exportStar(require("./websocket"), exports);
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { CommentView, CommunityModeratorView,
|
1
|
+
import { CommentView, CommunityModeratorView, PersonMentionView, PersonViewSafe, PostView, PrivateMessageView } from "../views";
|
2
2
|
export interface Login {
|
3
3
|
username_or_email: string;
|
4
4
|
password: string;
|
@@ -10,6 +10,9 @@ export interface Login {
|
|
10
10
|
*/
|
11
11
|
export interface Register {
|
12
12
|
username: string;
|
13
|
+
/**
|
14
|
+
* Email is mandatory if email verification is enabled on the server
|
15
|
+
*/
|
13
16
|
email?: string;
|
14
17
|
password: string;
|
15
18
|
password_verify: string;
|
@@ -20,6 +23,10 @@ export interface Register {
|
|
20
23
|
captcha_uuid?: string;
|
21
24
|
captcha_answer?: string;
|
22
25
|
honeypot?: string;
|
26
|
+
/**
|
27
|
+
* An answer is mandatory if require application is enabled on the server
|
28
|
+
*/
|
29
|
+
answer?: string;
|
23
30
|
}
|
24
31
|
export interface GetCaptcha {
|
25
32
|
}
|
@@ -87,7 +94,12 @@ export interface ChangePassword {
|
|
87
94
|
* The `jwt` string should be stored and used anywhere `auth` is called for.
|
88
95
|
*/
|
89
96
|
export interface LoginResponse {
|
90
|
-
|
97
|
+
/**
|
98
|
+
* This is None in response to `Register` if email verification is enabled, or the server requires registration applications.
|
99
|
+
*/
|
100
|
+
jwt?: string;
|
101
|
+
verify_email_sent: boolean;
|
102
|
+
registration_created: boolean;
|
91
103
|
}
|
92
104
|
export interface GetPersonDetails {
|
93
105
|
person_id?: number;
|
@@ -175,6 +187,8 @@ export interface DeleteAccount {
|
|
175
187
|
password: string;
|
176
188
|
auth: string;
|
177
189
|
}
|
190
|
+
export interface DeleteAccountResponse {
|
191
|
+
}
|
178
192
|
export interface PasswordReset {
|
179
193
|
email: string;
|
180
194
|
}
|
@@ -237,6 +251,11 @@ export interface GetUnreadCountResponse {
|
|
237
251
|
mentions: number;
|
238
252
|
private_messages: number;
|
239
253
|
}
|
254
|
+
export interface VerifyEmail {
|
255
|
+
token: string;
|
256
|
+
}
|
257
|
+
export interface VerifyEmailResponse {
|
258
|
+
}
|
240
259
|
export interface BlockPerson {
|
241
260
|
person_id: number;
|
242
261
|
block: boolean;
|
@@ -246,3 +265,9 @@ export interface BlockPersonResponse {
|
|
246
265
|
person_view: PersonViewSafe;
|
247
266
|
blocked: boolean;
|
248
267
|
}
|
268
|
+
export interface GetBannedPersons {
|
269
|
+
auth: string;
|
270
|
+
}
|
271
|
+
export interface BannedPersonsResponse {
|
272
|
+
banned: PersonViewSafe[];
|
273
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { SiteMetadata } from
|
2
|
-
import {
|
1
|
+
import { SiteMetadata } from "..";
|
2
|
+
import { CommentView, CommunityModeratorView, CommunityView, PostReportView, PostView } from "../views";
|
3
3
|
export interface CreatePost {
|
4
4
|
name: string;
|
5
5
|
url?: string;
|
@@ -1,5 +1,4 @@
|
|
1
|
-
import { CommunityBlockView, CommunityFollowerView, CommunityModeratorView, LocalUserSettingsView, PersonBlockView } from
|
2
|
-
import { CommentView, CommunityView, ModAddCommunityView, ModTransferCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView, ModRemovePostView, ModStickyPostView, PostView, SiteView, PersonViewSafe } from '../views';
|
1
|
+
import { CommentView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, CommunityView, LocalUserSettingsView, ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView, ModRemovePostView, ModStickyPostView, ModTransferCommunityView, PersonBlockView, PersonViewSafe, PostView, RegistrationApplicationView, SiteView } from "../views";
|
3
2
|
/**
|
4
3
|
* Search lemmy for different types of data.
|
5
4
|
*/
|
@@ -42,6 +41,7 @@ export interface GetModlog {
|
|
42
41
|
community_id?: number;
|
43
42
|
page?: number;
|
44
43
|
limit?: number;
|
44
|
+
auth?: string;
|
45
45
|
}
|
46
46
|
export interface GetModlogResponse {
|
47
47
|
removed_posts: ModRemovePostView[];
|
@@ -65,6 +65,10 @@ export interface CreateSite {
|
|
65
65
|
open_registration?: boolean;
|
66
66
|
enable_nsfw?: boolean;
|
67
67
|
community_creation_admin_only?: boolean;
|
68
|
+
require_email_verification?: boolean;
|
69
|
+
require_application?: boolean;
|
70
|
+
application_question?: string;
|
71
|
+
private_instance?: boolean;
|
68
72
|
auth: string;
|
69
73
|
}
|
70
74
|
export interface EditSite {
|
@@ -77,6 +81,10 @@ export interface EditSite {
|
|
77
81
|
open_registration?: boolean;
|
78
82
|
enable_nsfw?: boolean;
|
79
83
|
community_creation_admin_only?: boolean;
|
84
|
+
require_email_verification?: boolean;
|
85
|
+
require_application?: boolean;
|
86
|
+
application_question?: string;
|
87
|
+
private_instance?: boolean;
|
80
88
|
auth: string;
|
81
89
|
}
|
82
90
|
export interface GetSite {
|
@@ -91,7 +99,6 @@ export interface GetSiteResponse {
|
|
91
99
|
*/
|
92
100
|
site_view?: SiteView;
|
93
101
|
admins: PersonViewSafe[];
|
94
|
-
banned: PersonViewSafe[];
|
95
102
|
online: number;
|
96
103
|
version: string;
|
97
104
|
/**
|
@@ -139,3 +146,30 @@ export interface ResolveObjectResponse {
|
|
139
146
|
community?: CommunityView;
|
140
147
|
person?: PersonViewSafe;
|
141
148
|
}
|
149
|
+
export interface ListRegistrationApplications {
|
150
|
+
/**
|
151
|
+
* Only shows the unread applications (IE those without an admin actor)
|
152
|
+
*/
|
153
|
+
unread_only?: boolean;
|
154
|
+
page?: number;
|
155
|
+
limit?: number;
|
156
|
+
auth: string;
|
157
|
+
}
|
158
|
+
export interface ListRegistrationApplicationsResponse {
|
159
|
+
registration_applications: RegistrationApplicationView[];
|
160
|
+
}
|
161
|
+
export interface ApproveRegistrationApplication {
|
162
|
+
id: number;
|
163
|
+
approve: boolean;
|
164
|
+
deny_reason?: string;
|
165
|
+
auth: string;
|
166
|
+
}
|
167
|
+
export interface RegistrationApplicationResponse {
|
168
|
+
registration_application: RegistrationApplicationView;
|
169
|
+
}
|
170
|
+
export interface GetUnreadRegistrationApplicationCount {
|
171
|
+
auth: string;
|
172
|
+
}
|
173
|
+
export interface GetUnreadRegistrationApplicationCountResponse {
|
174
|
+
registration_applications: number;
|
175
|
+
}
|
@@ -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
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export * from
|
2
|
-
export * from
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
1
|
+
export * from "./aggregates";
|
2
|
+
export * from "./api";
|
3
|
+
export * from "./others";
|
4
|
+
export * from "./source";
|
5
|
+
export * from "./views";
|
package/dist/interfaces/index.js
CHANGED
@@ -10,8 +10,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
11
11
|
};
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13
|
-
__exportStar(require("./api"), exports);
|
14
13
|
__exportStar(require("./aggregates"), exports);
|
14
|
+
__exportStar(require("./api"), exports);
|
15
15
|
__exportStar(require("./others"), exports);
|
16
16
|
__exportStar(require("./source"), exports);
|
17
17
|
__exportStar(require("./views"), exports);
|
@@ -41,39 +41,44 @@ export declare enum UserOperation {
|
|
41
41
|
EditSite = 35,
|
42
42
|
GetSite = 36,
|
43
43
|
AddAdmin = 37,
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
44
|
+
GetUnreadRegistrationApplicationCount = 38,
|
45
|
+
ListRegistrationApplications = 39,
|
46
|
+
ApproveRegistrationApplication = 40,
|
47
|
+
BanPerson = 41,
|
48
|
+
GetBannedPersons = 42,
|
49
|
+
Search = 43,
|
50
|
+
ResolveObject = 44,
|
51
|
+
MarkAllAsRead = 45,
|
52
|
+
SaveUserSettings = 46,
|
53
|
+
TransferCommunity = 47,
|
54
|
+
TransferSite = 48,
|
55
|
+
DeleteAccount = 49,
|
56
|
+
PasswordReset = 50,
|
57
|
+
PasswordChange = 51,
|
58
|
+
CreatePrivateMessage = 52,
|
59
|
+
EditPrivateMessage = 53,
|
60
|
+
DeletePrivateMessage = 54,
|
61
|
+
MarkPrivateMessageAsRead = 55,
|
62
|
+
GetPrivateMessages = 56,
|
63
|
+
UserJoin = 57,
|
64
|
+
GetComments = 58,
|
65
|
+
GetSiteConfig = 59,
|
66
|
+
SaveSiteConfig = 60,
|
67
|
+
PostJoin = 61,
|
68
|
+
CommunityJoin = 62,
|
69
|
+
ChangePassword = 63,
|
70
|
+
GetSiteMetadata = 64,
|
71
|
+
BlockCommunity = 65,
|
72
|
+
BlockPerson = 66,
|
73
|
+
CreateCommentReport = 67,
|
74
|
+
ResolveCommentReport = 68,
|
75
|
+
ListCommentReports = 69,
|
76
|
+
CreatePostReport = 70,
|
77
|
+
ResolvePostReport = 71,
|
78
|
+
ListPostReports = 72,
|
79
|
+
GetReportCount = 73,
|
80
|
+
GetUnreadCount = 74,
|
81
|
+
VerifyEmail = 75
|
77
82
|
}
|
78
83
|
/**
|
79
84
|
* Different sort types used in lemmy.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.SearchType = exports.ListingType = exports.SortType = exports.UserOperation = exports.VERSION = void 0;
|
4
|
-
exports.VERSION =
|
4
|
+
exports.VERSION = "v3";
|
5
5
|
/**
|
6
6
|
* All of the websocket operations available.
|
7
7
|
*/
|
@@ -45,39 +45,44 @@ var UserOperation;
|
|
45
45
|
UserOperation[UserOperation["EditSite"] = 35] = "EditSite";
|
46
46
|
UserOperation[UserOperation["GetSite"] = 36] = "GetSite";
|
47
47
|
UserOperation[UserOperation["AddAdmin"] = 37] = "AddAdmin";
|
48
|
-
UserOperation[UserOperation["
|
49
|
-
UserOperation[UserOperation["
|
50
|
-
UserOperation[UserOperation["
|
51
|
-
UserOperation[UserOperation["
|
52
|
-
UserOperation[UserOperation["
|
53
|
-
UserOperation[UserOperation["
|
54
|
-
UserOperation[UserOperation["
|
55
|
-
UserOperation[UserOperation["
|
56
|
-
UserOperation[UserOperation["
|
57
|
-
UserOperation[UserOperation["
|
58
|
-
UserOperation[UserOperation["
|
59
|
-
UserOperation[UserOperation["
|
60
|
-
UserOperation[UserOperation["
|
61
|
-
UserOperation[UserOperation["
|
62
|
-
UserOperation[UserOperation["
|
63
|
-
UserOperation[UserOperation["
|
64
|
-
UserOperation[UserOperation["
|
65
|
-
UserOperation[UserOperation["
|
66
|
-
UserOperation[UserOperation["
|
67
|
-
UserOperation[UserOperation["
|
68
|
-
UserOperation[UserOperation["
|
69
|
-
UserOperation[UserOperation["
|
70
|
-
UserOperation[UserOperation["
|
71
|
-
UserOperation[UserOperation["
|
72
|
-
UserOperation[UserOperation["
|
73
|
-
UserOperation[UserOperation["
|
74
|
-
UserOperation[UserOperation["
|
75
|
-
UserOperation[UserOperation["
|
76
|
-
UserOperation[UserOperation["
|
77
|
-
UserOperation[UserOperation["
|
78
|
-
UserOperation[UserOperation["
|
79
|
-
UserOperation[UserOperation["
|
80
|
-
UserOperation[UserOperation["
|
48
|
+
UserOperation[UserOperation["GetUnreadRegistrationApplicationCount"] = 38] = "GetUnreadRegistrationApplicationCount";
|
49
|
+
UserOperation[UserOperation["ListRegistrationApplications"] = 39] = "ListRegistrationApplications";
|
50
|
+
UserOperation[UserOperation["ApproveRegistrationApplication"] = 40] = "ApproveRegistrationApplication";
|
51
|
+
UserOperation[UserOperation["BanPerson"] = 41] = "BanPerson";
|
52
|
+
UserOperation[UserOperation["GetBannedPersons"] = 42] = "GetBannedPersons";
|
53
|
+
UserOperation[UserOperation["Search"] = 43] = "Search";
|
54
|
+
UserOperation[UserOperation["ResolveObject"] = 44] = "ResolveObject";
|
55
|
+
UserOperation[UserOperation["MarkAllAsRead"] = 45] = "MarkAllAsRead";
|
56
|
+
UserOperation[UserOperation["SaveUserSettings"] = 46] = "SaveUserSettings";
|
57
|
+
UserOperation[UserOperation["TransferCommunity"] = 47] = "TransferCommunity";
|
58
|
+
UserOperation[UserOperation["TransferSite"] = 48] = "TransferSite";
|
59
|
+
UserOperation[UserOperation["DeleteAccount"] = 49] = "DeleteAccount";
|
60
|
+
UserOperation[UserOperation["PasswordReset"] = 50] = "PasswordReset";
|
61
|
+
UserOperation[UserOperation["PasswordChange"] = 51] = "PasswordChange";
|
62
|
+
UserOperation[UserOperation["CreatePrivateMessage"] = 52] = "CreatePrivateMessage";
|
63
|
+
UserOperation[UserOperation["EditPrivateMessage"] = 53] = "EditPrivateMessage";
|
64
|
+
UserOperation[UserOperation["DeletePrivateMessage"] = 54] = "DeletePrivateMessage";
|
65
|
+
UserOperation[UserOperation["MarkPrivateMessageAsRead"] = 55] = "MarkPrivateMessageAsRead";
|
66
|
+
UserOperation[UserOperation["GetPrivateMessages"] = 56] = "GetPrivateMessages";
|
67
|
+
UserOperation[UserOperation["UserJoin"] = 57] = "UserJoin";
|
68
|
+
UserOperation[UserOperation["GetComments"] = 58] = "GetComments";
|
69
|
+
UserOperation[UserOperation["GetSiteConfig"] = 59] = "GetSiteConfig";
|
70
|
+
UserOperation[UserOperation["SaveSiteConfig"] = 60] = "SaveSiteConfig";
|
71
|
+
UserOperation[UserOperation["PostJoin"] = 61] = "PostJoin";
|
72
|
+
UserOperation[UserOperation["CommunityJoin"] = 62] = "CommunityJoin";
|
73
|
+
UserOperation[UserOperation["ChangePassword"] = 63] = "ChangePassword";
|
74
|
+
UserOperation[UserOperation["GetSiteMetadata"] = 64] = "GetSiteMetadata";
|
75
|
+
UserOperation[UserOperation["BlockCommunity"] = 65] = "BlockCommunity";
|
76
|
+
UserOperation[UserOperation["BlockPerson"] = 66] = "BlockPerson";
|
77
|
+
UserOperation[UserOperation["CreateCommentReport"] = 67] = "CreateCommentReport";
|
78
|
+
UserOperation[UserOperation["ResolveCommentReport"] = 68] = "ResolveCommentReport";
|
79
|
+
UserOperation[UserOperation["ListCommentReports"] = 69] = "ListCommentReports";
|
80
|
+
UserOperation[UserOperation["CreatePostReport"] = 70] = "CreatePostReport";
|
81
|
+
UserOperation[UserOperation["ResolvePostReport"] = 71] = "ResolvePostReport";
|
82
|
+
UserOperation[UserOperation["ListPostReports"] = 72] = "ListPostReports";
|
83
|
+
UserOperation[UserOperation["GetReportCount"] = 73] = "GetReportCount";
|
84
|
+
UserOperation[UserOperation["GetUnreadCount"] = 74] = "GetUnreadCount";
|
85
|
+
UserOperation[UserOperation["VerifyEmail"] = 75] = "VerifyEmail";
|
81
86
|
})(UserOperation = exports.UserOperation || (exports.UserOperation = {}));
|
82
87
|
/**
|
83
88
|
* Different sort types used in lemmy.
|
@@ -13,6 +13,8 @@ export interface LocalUserSettings {
|
|
13
13
|
show_scores: boolean;
|
14
14
|
show_read_posts: boolean;
|
15
15
|
show_new_post_notifs: boolean;
|
16
|
+
email_verified: boolean;
|
17
|
+
accepted_application: boolean;
|
16
18
|
}
|
17
19
|
export interface PersonSafe {
|
18
20
|
id: number;
|
@@ -37,16 +39,20 @@ export interface Site {
|
|
37
39
|
id: number;
|
38
40
|
name: string;
|
39
41
|
sidebar?: string;
|
40
|
-
description?: string;
|
41
42
|
creator_id: number;
|
42
43
|
published: string;
|
43
44
|
updated?: string;
|
44
45
|
enable_downvotes: boolean;
|
45
46
|
open_registration: boolean;
|
46
47
|
enable_nsfw: boolean;
|
47
|
-
community_creation_admin_only: boolean;
|
48
48
|
icon?: string;
|
49
49
|
banner?: string;
|
50
|
+
description?: string;
|
51
|
+
community_creation_admin_only: boolean;
|
52
|
+
require_email_verification: boolean;
|
53
|
+
require_application: boolean;
|
54
|
+
application_question?: string;
|
55
|
+
private_instance: boolean;
|
50
56
|
}
|
51
57
|
export interface PrivateMessage {
|
52
58
|
id: number;
|
@@ -228,3 +234,11 @@ export interface PersonMention {
|
|
228
234
|
read: boolean;
|
229
235
|
published: string;
|
230
236
|
}
|
237
|
+
export interface RegistrationApplication {
|
238
|
+
id: number;
|
239
|
+
local_user_id: number;
|
240
|
+
answer: string;
|
241
|
+
admin_id?: number;
|
242
|
+
deny_reason?: string;
|
243
|
+
published: string;
|
244
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { CommentAggregates, CommunityAggregates, PostAggregates, SiteAggregates
|
2
|
-
import { Comment, CommentReport, CommunitySafe, ModAdd, ModAddCommunity,
|
1
|
+
import { CommentAggregates, CommunityAggregates, PersonAggregates, PostAggregates, SiteAggregates } from "./aggregates";
|
2
|
+
import { Comment, CommentReport, CommunitySafe, LocalUserSettings, ModAdd, ModAddCommunity, ModBan, ModBanFromCommunity, ModLockPost, ModRemoveComment, ModRemoveCommunity, ModRemovePost, ModStickyPost, ModTransferCommunity, PersonMention, PersonSafe, Post, PostReport, PrivateMessage, RegistrationApplication, Site } from "./source";
|
3
3
|
export interface PersonViewSafe {
|
4
4
|
person: PersonSafe;
|
5
5
|
counts: PersonAggregates;
|
@@ -166,3 +166,9 @@ export interface CommunityView {
|
|
166
166
|
blocked: boolean;
|
167
167
|
counts: CommunityAggregates;
|
168
168
|
}
|
169
|
+
export interface RegistrationApplicationView {
|
170
|
+
registration_application: RegistrationApplication;
|
171
|
+
creator_local_user: LocalUserSettings;
|
172
|
+
creator: PersonSafe;
|
173
|
+
admin?: PersonSafe;
|
174
|
+
}
|