lemmy-js-client 0.15.1-rc.1 → 0.15.4-rc.1
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 +3 -3
- package/dist/http.js +3 -3
- package/dist/interfaces/api/site.d.ts +2 -1
- package/dist/interfaces/others.d.ts +1 -1
- package/dist/interfaces/others.js +1 -1
- package/dist/interfaces/source.d.ts +2 -0
- package/dist/websocket.d.ts +3 -3
- package/dist/websocket.js +3 -3
- package/package.json +7 -7
package/dist/http.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLik
|
|
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
3
|
import { AddAdmin, AddAdminResponse, BannedPersonsResponse, BanPerson, BanPersonResponse, BlockPerson, BlockPersonResponse, ChangePassword, CreatePrivateMessage, DeleteAccount, DeleteAccountResponse, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, 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
|
-
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetModlogResponse, GetSite, GetSiteConfig, GetSiteConfigResponse, GetSiteResponse, GetUnreadRegistrationApplicationCount, GetUnreadRegistrationApplicationCountResponse,
|
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
|
/**
|
7
7
|
* Helps build lemmy HTTP requests.
|
8
8
|
*/
|
@@ -30,9 +30,9 @@ export declare class LemmyHttp {
|
|
30
30
|
*/
|
31
31
|
editSite(form: EditSite): Promise<SiteResponse>;
|
32
32
|
/**
|
33
|
-
*
|
33
|
+
* Transfer your site to another user.
|
34
34
|
*/
|
35
|
-
|
35
|
+
transferSite(form: TransferSite): Promise<GetSiteResponse>;
|
36
36
|
/**
|
37
37
|
* Get your site configuration.
|
38
38
|
*/
|
package/dist/http.js
CHANGED
@@ -103,12 +103,12 @@ var LemmyHttp = /** @class */ (function () {
|
|
103
103
|
});
|
104
104
|
};
|
105
105
|
/**
|
106
|
-
*
|
106
|
+
* Transfer your site to another user.
|
107
107
|
*/
|
108
|
-
LemmyHttp.prototype.
|
108
|
+
LemmyHttp.prototype.transferSite = function (form) {
|
109
109
|
return __awaiter(this, void 0, void 0, function () {
|
110
110
|
return __generator(this, function (_a) {
|
111
|
-
return [2 /*return*/, this.wrapper(HttpType.Post, "/
|
111
|
+
return [2 /*return*/, this.wrapper(HttpType.Post, "/site/transfer", form)];
|
112
112
|
});
|
113
113
|
});
|
114
114
|
};
|
@@ -117,7 +117,8 @@ export interface MyUserInfo {
|
|
117
117
|
community_blocks: CommunityBlockView[];
|
118
118
|
person_blocks: PersonBlockView[];
|
119
119
|
}
|
120
|
-
export interface
|
120
|
+
export interface TransferSite {
|
121
|
+
person_id: number;
|
121
122
|
auth: string;
|
122
123
|
}
|
123
124
|
export interface GetSiteConfig {
|
@@ -55,7 +55,7 @@ var UserOperation;
|
|
55
55
|
UserOperation[UserOperation["MarkAllAsRead"] = 45] = "MarkAllAsRead";
|
56
56
|
UserOperation[UserOperation["SaveUserSettings"] = 46] = "SaveUserSettings";
|
57
57
|
UserOperation[UserOperation["TransferCommunity"] = 47] = "TransferCommunity";
|
58
|
-
UserOperation[UserOperation["
|
58
|
+
UserOperation[UserOperation["TransferSite"] = 48] = "TransferSite";
|
59
59
|
UserOperation[UserOperation["DeleteAccount"] = 49] = "DeleteAccount";
|
60
60
|
UserOperation[UserOperation["PasswordReset"] = 50] = "PasswordReset";
|
61
61
|
UserOperation[UserOperation["PasswordChange"] = 51] = "PasswordChange";
|
@@ -40,6 +40,7 @@ export interface Site {
|
|
40
40
|
id: number;
|
41
41
|
name: string;
|
42
42
|
sidebar?: string;
|
43
|
+
creator_id: number;
|
43
44
|
published: string;
|
44
45
|
updated?: string;
|
45
46
|
enable_downvotes: boolean;
|
@@ -53,6 +54,7 @@ export interface Site {
|
|
53
54
|
require_application: boolean;
|
54
55
|
application_question?: string;
|
55
56
|
private_instance: boolean;
|
57
|
+
default_theme: string;
|
56
58
|
}
|
57
59
|
export interface PrivateMessage {
|
58
60
|
id: number;
|
package/dist/websocket.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, E
|
|
2
2
|
import { AddModToCommunity, BanFromCommunity, BlockCommunity, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, ListCommunities, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
|
3
3
|
import { AddAdmin, BanPerson, BlockPerson, ChangePassword, CreatePrivateMessage, DeleteAccount, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, GetPersonDetails, GetPersonMentions, GetPrivateMessages, GetReplies, GetReportCount, GetUnreadCount, Login, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, Register, SaveUserSettings, VerifyEmail } from "./interfaces/api/person";
|
4
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,
|
5
|
+
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetSite, GetSiteConfig, GetUnreadRegistrationApplicationCount, ListRegistrationApplications, ResolveObject, SaveSiteConfig, Search, TransferSite } from "./interfaces/api/site";
|
6
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.
|
@@ -186,9 +186,9 @@ export declare class LemmyWebsocket {
|
|
186
186
|
*/
|
187
187
|
transferCommunity(form: TransferCommunity): string;
|
188
188
|
/**
|
189
|
-
*
|
189
|
+
* Transfer your site to another user.
|
190
190
|
*/
|
191
|
-
|
191
|
+
transferSite(form: TransferSite): string;
|
192
192
|
/**
|
193
193
|
* Ban a person from your site.
|
194
194
|
*/
|
package/dist/websocket.js
CHANGED
@@ -267,10 +267,10 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
267
267
|
return wrapper(others_1.UserOperation.TransferCommunity, form);
|
268
268
|
};
|
269
269
|
/**
|
270
|
-
*
|
270
|
+
* Transfer your site to another user.
|
271
271
|
*/
|
272
|
-
LemmyWebsocket.prototype.
|
273
|
-
return wrapper(others_1.UserOperation.
|
272
|
+
LemmyWebsocket.prototype.transferSite = function (form) {
|
273
|
+
return wrapper(others_1.UserOperation.TransferSite, form);
|
274
274
|
};
|
275
275
|
/**
|
276
276
|
* Ban a person from your site.
|
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.
|
4
|
+
"version": "0.15.4-rc.1",
|
5
5
|
"author": "Dessalines <tyhou13@gmx.com>",
|
6
6
|
"license": "AGPL-3.0",
|
7
7
|
"main": "./dist/index.js",
|
@@ -16,15 +16,15 @@
|
|
16
16
|
},
|
17
17
|
"repository": "https://github.com/LemmyNet/lemmy-js-client",
|
18
18
|
"devDependencies": {
|
19
|
-
"@types/node": "^17.0.
|
19
|
+
"@types/node": "^17.0.10",
|
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.10.0",
|
22
|
+
"@typescript-eslint/parser": "^5.10.0",
|
23
|
+
"eslint": "^8.7.0",
|
24
24
|
"eslint-plugin-prettier": "^4.0.0",
|
25
25
|
"husky": "^7.0.4",
|
26
|
-
"lint-staged": "^12.
|
27
|
-
"node-fetch": "^3.1.
|
26
|
+
"lint-staged": "^12.2.2",
|
27
|
+
"node-fetch": "^3.1.1",
|
28
28
|
"prettier": "^2.5.0",
|
29
29
|
"prettier-plugin-import-sort": "^0.0.7",
|
30
30
|
"prettier-plugin-organize-imports": "^2.3.4",
|