lemmy-js-client 0.13.4-rc.1 → 0.15.0-rc.2
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 +22 -6
- package/dist/http.js +115 -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 +21 -2
- package/dist/interfaces/api/post.d.ts +2 -2
- package/dist/interfaces/api/site.d.ts +36 -2
- package/dist/interfaces/index.d.ts +5 -5
- package/dist/interfaces/index.js +1 -1
- package/dist/interfaces/others.d.ts +37 -33
- package/dist/interfaces/others.js +38 -34
- package/dist/interfaces/source.d.ts +16 -2
- package/dist/interfaces/views.d.ts +8 -2
- package/dist/websocket.d.ts +22 -6
- package/dist/websocket.js +24 -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;
|
@@ -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
|
*/
|
@@ -65,6 +64,10 @@ export interface CreateSite {
|
|
65
64
|
open_registration?: boolean;
|
66
65
|
enable_nsfw?: boolean;
|
67
66
|
community_creation_admin_only?: boolean;
|
67
|
+
require_email_verification?: boolean;
|
68
|
+
require_application?: boolean;
|
69
|
+
application_question?: string;
|
70
|
+
private_instance?: boolean;
|
68
71
|
auth: string;
|
69
72
|
}
|
70
73
|
export interface EditSite {
|
@@ -77,6 +80,10 @@ export interface EditSite {
|
|
77
80
|
open_registration?: boolean;
|
78
81
|
enable_nsfw?: boolean;
|
79
82
|
community_creation_admin_only?: boolean;
|
83
|
+
require_email_verification?: boolean;
|
84
|
+
require_application?: boolean;
|
85
|
+
application_question?: string;
|
86
|
+
private_instance?: boolean;
|
80
87
|
auth: string;
|
81
88
|
}
|
82
89
|
export interface GetSite {
|
@@ -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
|
+
}
|
@@ -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,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
|
-
|
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
|
77
81
|
}
|
78
82
|
/**
|
79
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,39 +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["
|
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";
|
81
85
|
})(UserOperation = exports.UserOperation || (exports.UserOperation = {}));
|
82
86
|
/**
|
83
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;
|
@@ -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
|
+
}
|
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
|
*/
|
@@ -261,6 +273,10 @@ export declare class LemmyWebsocket {
|
|
261
273
|
* Get your unread counts
|
262
274
|
*/
|
263
275
|
getUnreadCount(form: GetUnreadCount): string;
|
276
|
+
/**
|
277
|
+
* Verify your email
|
278
|
+
*/
|
279
|
+
verifyEmail(form: VerifyEmail): string;
|
264
280
|
/**
|
265
281
|
* Delete your account.
|
266
282
|
*/
|
package/dist/websocket.js
CHANGED
@@ -284,6 +284,24 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
284
284
|
LemmyWebsocket.prototype.addAdmin = function (form) {
|
285
285
|
return wrapper(others_1.UserOperation.AddAdmin, form);
|
286
286
|
};
|
287
|
+
/**
|
288
|
+
* Get the unread registration applications count.
|
289
|
+
*/
|
290
|
+
LemmyWebsocket.prototype.getUnreadRegistrationApplicationCount = function (form) {
|
291
|
+
return wrapper(others_1.UserOperation.GetUnreadRegistrationApplicationCount, form);
|
292
|
+
};
|
293
|
+
/**
|
294
|
+
* List the unread registration applications.
|
295
|
+
*/
|
296
|
+
LemmyWebsocket.prototype.listRegistrationApplications = function (form) {
|
297
|
+
return wrapper(others_1.UserOperation.ListRegistrationApplications, form);
|
298
|
+
};
|
299
|
+
/**
|
300
|
+
* Approve a registration application
|
301
|
+
*/
|
302
|
+
LemmyWebsocket.prototype.approveRegistrationApplication = function (form) {
|
303
|
+
return wrapper(others_1.UserOperation.ApproveRegistrationApplication, form);
|
304
|
+
};
|
287
305
|
/**
|
288
306
|
* Get the details for a person.
|
289
307
|
*/
|
@@ -381,6 +399,12 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
381
399
|
LemmyWebsocket.prototype.getUnreadCount = function (form) {
|
382
400
|
return wrapper(others_1.UserOperation.GetUnreadCount, form);
|
383
401
|
};
|
402
|
+
/**
|
403
|
+
* Verify your email
|
404
|
+
*/
|
405
|
+
LemmyWebsocket.prototype.verifyEmail = function (form) {
|
406
|
+
return wrapper(others_1.UserOperation.VerifyEmail, form);
|
407
|
+
};
|
384
408
|
/**
|
385
409
|
* Delete your account.
|
386
410
|
*/
|
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.
|
4
|
+
"version": "0.15.0-rc.2",
|
5
5
|
"author": "Dessalines <tyhou13@gmx.com>",
|
6
6
|
"license": "AGPL-3.0",
|
7
7
|
"main": "./dist/index.js",
|
@@ -16,18 +16,23 @@
|
|
16
16
|
},
|
17
17
|
"repository": "https://github.com/LemmyNet/lemmy-js-client",
|
18
18
|
"devDependencies": {
|
19
|
-
"@types/node": "^16.
|
19
|
+
"@types/node": "^16.11.11",
|
20
20
|
"@types/node-fetch": "^3.0.3",
|
21
|
-
"eslint": "^
|
22
|
-
"eslint
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"
|
26
|
-
"
|
21
|
+
"@typescript-eslint/eslint-plugin": "^5.5.0",
|
22
|
+
"@typescript-eslint/parser": "^5.5.0",
|
23
|
+
"eslint": "^8.3.0",
|
24
|
+
"eslint-plugin-prettier": "^4.0.0",
|
25
|
+
"husky": "^7.0.4",
|
26
|
+
"lint-staged": "^12.1.2",
|
27
|
+
"node-fetch": "^3.1.0",
|
28
|
+
"prettier": "^2.5.0",
|
29
|
+
"prettier-plugin-import-sort": "^0.0.7",
|
30
|
+
"prettier-plugin-organize-imports": "^2.3.4",
|
31
|
+
"prettier-plugin-packagejson": "^2.2.15",
|
27
32
|
"sortpack": "^2.2.0",
|
28
33
|
"typedoc": "^0.21.6",
|
29
34
|
"typedoc-plugin-sourcefile-url": "^1.0.6",
|
30
|
-
"typescript": "^4.
|
35
|
+
"typescript": "^4.5.2"
|
31
36
|
},
|
32
37
|
"types": "./dist/index.d.ts",
|
33
38
|
"lint-staged": {
|
@@ -38,5 +43,11 @@
|
|
38
43
|
"package.json": [
|
39
44
|
"sortpack"
|
40
45
|
]
|
46
|
+
},
|
47
|
+
"importSort": {
|
48
|
+
".js, .jsx, .ts, .tsx": {
|
49
|
+
"style": "module",
|
50
|
+
"parser": "typescript"
|
51
|
+
}
|
41
52
|
}
|
42
53
|
}
|