lemmy-js-client 0.13.4-rc.2 → 0.15.0-rc.3
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 +20 -16
- package/dist/http.js +98 -88
- 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 +28 -23
- package/dist/interfaces/index.d.ts +5 -5
- package/dist/interfaces/index.js +1 -1
- package/dist/interfaces/others.d.ts +37 -36
- package/dist/interfaces/others.js +38 -37
- package/dist/interfaces/source.d.ts +16 -28
- package/dist/interfaces/views.d.ts +8 -20
- package/dist/websocket.d.ts +26 -22
- package/dist/websocket.js +30 -24
- 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
|
}
|
@@ -229,6 +243,17 @@ export interface GetReportCountResponse {
|
|
229
243
|
comment_reports: number;
|
230
244
|
post_reports: number;
|
231
245
|
}
|
246
|
+
export interface GetUnreadCount {
|
247
|
+
auth: string;
|
248
|
+
}
|
249
|
+
export interface GetUnreadCountResponse {
|
250
|
+
replies: number;
|
251
|
+
mentions: number;
|
252
|
+
private_messages: number;
|
253
|
+
}
|
254
|
+
export interface VerifyEmail {
|
255
|
+
token: string;
|
256
|
+
}
|
232
257
|
export interface BlockPerson {
|
233
258
|
person_id: number;
|
234
259
|
block: boolean;
|
@@ -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 {
|
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
|
*/
|
@@ -54,10 +53,6 @@ export interface GetModlogResponse {
|
|
54
53
|
added_to_community: ModAddCommunityView[];
|
55
54
|
transferred_to_community: ModTransferCommunityView[];
|
56
55
|
added: ModAddView[];
|
57
|
-
admin_purged_persons: AdminPurgePersonView[];
|
58
|
-
admin_purged_communities: AdminPurgeCommunityView[];
|
59
|
-
admin_purged_posts: AdminPurgePostView[];
|
60
|
-
admin_purged_comments: AdminPurgeCommentView[];
|
61
56
|
}
|
62
57
|
export interface CreateSite {
|
63
58
|
name: string;
|
@@ -69,6 +64,10 @@ export interface CreateSite {
|
|
69
64
|
open_registration?: boolean;
|
70
65
|
enable_nsfw?: boolean;
|
71
66
|
community_creation_admin_only?: boolean;
|
67
|
+
require_email_verification?: boolean;
|
68
|
+
require_application?: boolean;
|
69
|
+
application_question?: string;
|
70
|
+
private_instance?: boolean;
|
72
71
|
auth: string;
|
73
72
|
}
|
74
73
|
export interface EditSite {
|
@@ -81,6 +80,10 @@ export interface EditSite {
|
|
81
80
|
open_registration?: boolean;
|
82
81
|
enable_nsfw?: boolean;
|
83
82
|
community_creation_admin_only?: boolean;
|
83
|
+
require_email_verification?: boolean;
|
84
|
+
require_application?: boolean;
|
85
|
+
application_question?: string;
|
86
|
+
private_instance?: boolean;
|
84
87
|
auth: string;
|
85
88
|
}
|
86
89
|
export interface GetSite {
|
@@ -143,28 +146,30 @@ export interface ResolveObjectResponse {
|
|
143
146
|
community?: CommunityView;
|
144
147
|
person?: PersonViewSafe;
|
145
148
|
}
|
146
|
-
export interface
|
147
|
-
|
148
|
-
|
149
|
-
|
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;
|
150
156
|
auth: string;
|
151
157
|
}
|
152
|
-
export interface
|
153
|
-
|
154
|
-
remove_images: boolean;
|
155
|
-
reason?: string;
|
156
|
-
auth: string;
|
158
|
+
export interface ListRegistrationApplicationsResponse {
|
159
|
+
registration_applications: RegistrationApplicationView[];
|
157
160
|
}
|
158
|
-
export interface
|
159
|
-
|
160
|
-
|
161
|
+
export interface ApproveRegistrationApplication {
|
162
|
+
id: number;
|
163
|
+
approve: boolean;
|
164
|
+
deny_reason?: string;
|
161
165
|
auth: string;
|
162
166
|
}
|
163
|
-
export interface
|
164
|
-
|
165
|
-
|
167
|
+
export interface RegistrationApplicationResponse {
|
168
|
+
registration_application: RegistrationApplicationView;
|
169
|
+
}
|
170
|
+
export interface GetUnreadRegistrationApplicationCount {
|
166
171
|
auth: string;
|
167
172
|
}
|
168
|
-
export interface
|
169
|
-
|
173
|
+
export interface GetUnreadRegistrationApplicationCountResponse {
|
174
|
+
registration_applications: number;
|
170
175
|
}
|
@@ -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,42 +41,43 @@ 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
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
44
|
+
GetUnreadRegistrationApplicationCount = 38,
|
45
|
+
ListRegistrationApplications = 39,
|
46
|
+
ApproveRegistrationApplication = 40,
|
47
|
+
BanPerson = 41,
|
48
|
+
Search = 42,
|
49
|
+
ResolveObject = 43,
|
50
|
+
MarkAllAsRead = 44,
|
51
|
+
SaveUserSettings = 45,
|
52
|
+
TransferCommunity = 46,
|
53
|
+
TransferSite = 47,
|
54
|
+
DeleteAccount = 48,
|
55
|
+
PasswordReset = 49,
|
56
|
+
PasswordChange = 50,
|
57
|
+
CreatePrivateMessage = 51,
|
58
|
+
EditPrivateMessage = 52,
|
59
|
+
DeletePrivateMessage = 53,
|
60
|
+
MarkPrivateMessageAsRead = 54,
|
61
|
+
GetPrivateMessages = 55,
|
62
|
+
UserJoin = 56,
|
63
|
+
GetComments = 57,
|
64
|
+
GetSiteConfig = 58,
|
65
|
+
SaveSiteConfig = 59,
|
66
|
+
PostJoin = 60,
|
67
|
+
CommunityJoin = 61,
|
68
|
+
ChangePassword = 62,
|
69
|
+
GetSiteMetadata = 63,
|
70
|
+
BlockCommunity = 64,
|
71
|
+
BlockPerson = 65,
|
72
|
+
CreateCommentReport = 66,
|
73
|
+
ResolveCommentReport = 67,
|
74
|
+
ListCommentReports = 68,
|
75
|
+
CreatePostReport = 69,
|
76
|
+
ResolvePostReport = 70,
|
77
|
+
ListPostReports = 71,
|
78
|
+
GetReportCount = 72,
|
79
|
+
GetUnreadCount = 73,
|
80
|
+
VerifyEmail = 74
|
80
81
|
}
|
81
82
|
/**
|
82
83
|
* 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,42 +45,43 @@ 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["
|
81
|
-
UserOperation[UserOperation["
|
82
|
-
UserOperation[UserOperation["
|
83
|
-
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["Search"] = 42] = "Search";
|
53
|
+
UserOperation[UserOperation["ResolveObject"] = 43] = "ResolveObject";
|
54
|
+
UserOperation[UserOperation["MarkAllAsRead"] = 44] = "MarkAllAsRead";
|
55
|
+
UserOperation[UserOperation["SaveUserSettings"] = 45] = "SaveUserSettings";
|
56
|
+
UserOperation[UserOperation["TransferCommunity"] = 46] = "TransferCommunity";
|
57
|
+
UserOperation[UserOperation["TransferSite"] = 47] = "TransferSite";
|
58
|
+
UserOperation[UserOperation["DeleteAccount"] = 48] = "DeleteAccount";
|
59
|
+
UserOperation[UserOperation["PasswordReset"] = 49] = "PasswordReset";
|
60
|
+
UserOperation[UserOperation["PasswordChange"] = 50] = "PasswordChange";
|
61
|
+
UserOperation[UserOperation["CreatePrivateMessage"] = 51] = "CreatePrivateMessage";
|
62
|
+
UserOperation[UserOperation["EditPrivateMessage"] = 52] = "EditPrivateMessage";
|
63
|
+
UserOperation[UserOperation["DeletePrivateMessage"] = 53] = "DeletePrivateMessage";
|
64
|
+
UserOperation[UserOperation["MarkPrivateMessageAsRead"] = 54] = "MarkPrivateMessageAsRead";
|
65
|
+
UserOperation[UserOperation["GetPrivateMessages"] = 55] = "GetPrivateMessages";
|
66
|
+
UserOperation[UserOperation["UserJoin"] = 56] = "UserJoin";
|
67
|
+
UserOperation[UserOperation["GetComments"] = 57] = "GetComments";
|
68
|
+
UserOperation[UserOperation["GetSiteConfig"] = 58] = "GetSiteConfig";
|
69
|
+
UserOperation[UserOperation["SaveSiteConfig"] = 59] = "SaveSiteConfig";
|
70
|
+
UserOperation[UserOperation["PostJoin"] = 60] = "PostJoin";
|
71
|
+
UserOperation[UserOperation["CommunityJoin"] = 61] = "CommunityJoin";
|
72
|
+
UserOperation[UserOperation["ChangePassword"] = 62] = "ChangePassword";
|
73
|
+
UserOperation[UserOperation["GetSiteMetadata"] = 63] = "GetSiteMetadata";
|
74
|
+
UserOperation[UserOperation["BlockCommunity"] = 64] = "BlockCommunity";
|
75
|
+
UserOperation[UserOperation["BlockPerson"] = 65] = "BlockPerson";
|
76
|
+
UserOperation[UserOperation["CreateCommentReport"] = 66] = "CreateCommentReport";
|
77
|
+
UserOperation[UserOperation["ResolveCommentReport"] = 67] = "ResolveCommentReport";
|
78
|
+
UserOperation[UserOperation["ListCommentReports"] = 68] = "ListCommentReports";
|
79
|
+
UserOperation[UserOperation["CreatePostReport"] = 69] = "CreatePostReport";
|
80
|
+
UserOperation[UserOperation["ResolvePostReport"] = 70] = "ResolvePostReport";
|
81
|
+
UserOperation[UserOperation["ListPostReports"] = 71] = "ListPostReports";
|
82
|
+
UserOperation[UserOperation["GetReportCount"] = 72] = "GetReportCount";
|
83
|
+
UserOperation[UserOperation["GetUnreadCount"] = 73] = "GetUnreadCount";
|
84
|
+
UserOperation[UserOperation["VerifyEmail"] = 74] = "VerifyEmail";
|
84
85
|
})(UserOperation = exports.UserOperation || (exports.UserOperation = {}));
|
85
86
|
/**
|
86
87
|
* 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;
|
@@ -181,32 +187,6 @@ export interface ModAdd {
|
|
181
187
|
removed?: boolean;
|
182
188
|
when_: string;
|
183
189
|
}
|
184
|
-
export interface AdminPurgePerson {
|
185
|
-
id: number;
|
186
|
-
admin_person_id: number;
|
187
|
-
reason?: string;
|
188
|
-
when_: string;
|
189
|
-
}
|
190
|
-
export interface AdminPurgeCommunity {
|
191
|
-
id: number;
|
192
|
-
admin_person_id: number;
|
193
|
-
reason?: string;
|
194
|
-
when_: string;
|
195
|
-
}
|
196
|
-
export interface AdminPurgePost {
|
197
|
-
id: number;
|
198
|
-
admin_person_id: number;
|
199
|
-
community_id: number;
|
200
|
-
reason?: string;
|
201
|
-
when_: string;
|
202
|
-
}
|
203
|
-
export interface AdminPurgeComment {
|
204
|
-
id: number;
|
205
|
-
admin_person_id: number;
|
206
|
-
post_id: number;
|
207
|
-
reason?: string;
|
208
|
-
when_: string;
|
209
|
-
}
|
210
190
|
export interface CommunitySafe {
|
211
191
|
id: number;
|
212
192
|
name: string;
|
@@ -254,3 +234,11 @@ export interface PersonMention {
|
|
254
234
|
read: boolean;
|
255
235
|
published: string;
|
256
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;
|
@@ -140,24 +140,6 @@ export interface ModStickyPostView {
|
|
140
140
|
post: Post;
|
141
141
|
community: CommunitySafe;
|
142
142
|
}
|
143
|
-
export interface AdminPurgeCommunityView {
|
144
|
-
admin_purge_community: AdminPurgeCommunity;
|
145
|
-
admin: PersonSafe;
|
146
|
-
}
|
147
|
-
export interface AdminPurgePersonView {
|
148
|
-
admin_purge_person: AdminPurgePerson;
|
149
|
-
admin: PersonSafe;
|
150
|
-
}
|
151
|
-
export interface AdminPurgePostView {
|
152
|
-
admin_purge_post: AdminPurgePost;
|
153
|
-
admin: PersonSafe;
|
154
|
-
community: CommunitySafe;
|
155
|
-
}
|
156
|
-
export interface AdminPurgeCommentView {
|
157
|
-
admin_purge_comment: AdminPurgeComment;
|
158
|
-
admin: PersonSafe;
|
159
|
-
post: Post;
|
160
|
-
}
|
161
143
|
export interface CommunityFollowerView {
|
162
144
|
community: CommunitySafe;
|
163
145
|
follower: PersonSafe;
|
@@ -184,3 +166,9 @@ export interface CommunityView {
|
|
184
166
|
blocked: boolean;
|
185
167
|
counts: CommunityAggregates;
|
186
168
|
}
|
169
|
+
export interface RegistrationApplicationView {
|
170
|
+
registration_application: RegistrationApplication;
|
171
|
+
creator_local_user: LocalUserSettings;
|
172
|
+
creator: PersonSafe;
|
173
|
+
admin?: PersonSafe;
|
174
|
+
}
|
package/dist/websocket.d.ts
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from
|
2
|
-
import { AddModToCommunity, BanFromCommunity, BlockCommunity, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, ListCommunities, RemoveCommunity, TransferCommunity } from
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
1
|
+
import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
2
|
+
import { AddModToCommunity, BanFromCommunity, BlockCommunity, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, ListCommunities, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
|
3
|
+
import { AddAdmin, BanPerson, BlockPerson, ChangePassword, CreatePrivateMessage, DeleteAccount, DeletePrivateMessage, EditPrivateMessage, GetPersonDetails, GetPersonMentions, GetPrivateMessages, GetReplies, GetReportCount, GetUnreadCount, Login, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, Register, SaveUserSettings, VerifyEmail } from "./interfaces/api/person";
|
4
|
+
import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPosts, GetSiteMetadata, ListPostReports, LockPost, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
|
5
|
+
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetSite, GetSiteConfig, GetUnreadRegistrationApplicationCount, ListRegistrationApplications, ResolveObject, SaveSiteConfig, Search, TransferSite } from "./interfaces/api/site";
|
6
|
+
import { CommunityJoin, PostJoin, UserJoin } from "./interfaces/api/websocket";
|
7
7
|
/**
|
8
8
|
* Helps build lemmy websocket message requests, that you can use in your Websocket sends.
|
9
9
|
*
|
@@ -197,6 +197,18 @@ export declare class LemmyWebsocket {
|
|
197
197
|
* Add an admin to your site.
|
198
198
|
*/
|
199
199
|
addAdmin(form: AddAdmin): string;
|
200
|
+
/**
|
201
|
+
* Get the unread registration applications count.
|
202
|
+
*/
|
203
|
+
getUnreadRegistrationApplicationCount(form: GetUnreadRegistrationApplicationCount): string;
|
204
|
+
/**
|
205
|
+
* List the unread registration applications.
|
206
|
+
*/
|
207
|
+
listRegistrationApplications(form: ListRegistrationApplications): string;
|
208
|
+
/**
|
209
|
+
* Approve a registration application
|
210
|
+
*/
|
211
|
+
approveRegistrationApplication(form: ApproveRegistrationApplication): string;
|
200
212
|
/**
|
201
213
|
* Get the details for a person.
|
202
214
|
*/
|
@@ -257,6 +269,14 @@ export declare class LemmyWebsocket {
|
|
257
269
|
* Get counts for your reports
|
258
270
|
*/
|
259
271
|
getReportCount(form: GetReportCount): string;
|
272
|
+
/**
|
273
|
+
* Get your unread counts
|
274
|
+
*/
|
275
|
+
getUnreadCount(form: GetUnreadCount): string;
|
276
|
+
/**
|
277
|
+
* Verify your email
|
278
|
+
*/
|
279
|
+
verifyEmail(form: VerifyEmail): string;
|
260
280
|
/**
|
261
281
|
* Delete your account.
|
262
282
|
*/
|
@@ -301,20 +321,4 @@ export declare class LemmyWebsocket {
|
|
301
321
|
* Block a community.
|
302
322
|
*/
|
303
323
|
blockCommunity(form: BlockCommunity): string;
|
304
|
-
/**
|
305
|
-
* Purge / Delete a person from the database.
|
306
|
-
*/
|
307
|
-
purgePerson(form: PurgePerson): string;
|
308
|
-
/**
|
309
|
-
* Purge / Delete a community from the database.
|
310
|
-
*/
|
311
|
-
purgeCommunity(form: PurgeCommunity): string;
|
312
|
-
/**
|
313
|
-
* Purge / Delete a post from the database.
|
314
|
-
*/
|
315
|
-
purgePost(form: PurgePost): string;
|
316
|
-
/**
|
317
|
-
* Purge / Delete a comment from the database.
|
318
|
-
*/
|
319
|
-
purgeComment(form: PurgeComment): string;
|
320
324
|
}
|