lemmy-js-client 0.17.0-rc.30 → 0.17.0-rc.33
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +25 -13
- package/dist/http.js +48 -24
- package/dist/interfaces/api/site.d.ts +32 -13
- package/dist/interfaces/api/site.js +91 -21
- package/dist/interfaces/others.d.ts +27 -17
- package/dist/interfaces/others.js +29 -18
- package/dist/interfaces/source.d.ts +26 -0
- package/dist/interfaces/source.js +69 -1
- package/dist/interfaces/views.d.ts +24 -5
- package/dist/interfaces/views.js +55 -1
- package/dist/websocket.d.ts +17 -9
- package/dist/websocket.js +24 -12
- package/package.json +1 -1
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, MarkPostAsRead, PostReportResponse, PostResponse, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
|
5
|
-
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetModlogResponse, GetSite,
|
5
|
+
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetModlogResponse, GetSite, GetSiteResponse, GetUnreadRegistrationApplicationCount, GetUnreadRegistrationApplicationCountResponse, LeaveAdmin, ListRegistrationApplications, ListRegistrationApplicationsResponse, PurgeComment, PurgeCommunity, PurgeItemResponse, PurgePerson, PurgePost, RegistrationApplicationResponse, ResolveObject, ResolveObjectResponse, Search, SearchResponse, SiteResponse } from "./interfaces/api/site";
|
6
6
|
/**
|
7
7
|
* Helps build lemmy HTTP requests.
|
8
8
|
*/
|
@@ -41,18 +41,6 @@ export declare class LemmyHttp {
|
|
41
41
|
* `HTTP.POST /user/leave_admin`
|
42
42
|
*/
|
43
43
|
leaveAdmin(form: LeaveAdmin): Promise<GetSiteResponse>;
|
44
|
-
/**
|
45
|
-
* Get your site configuration.
|
46
|
-
*
|
47
|
-
* `HTTP.GET /site/config`
|
48
|
-
*/
|
49
|
-
getSiteConfig(form: GetSiteConfig): Promise<GetSiteConfigResponse>;
|
50
|
-
/**
|
51
|
-
* Save your site config.
|
52
|
-
*
|
53
|
-
* `HTTP.PUT /site/config`
|
54
|
-
*/
|
55
|
-
saveSiteConfig(form: SaveSiteConfig): Promise<GetSiteConfigResponse>;
|
56
44
|
/**
|
57
45
|
* Get the modlog.
|
58
46
|
*
|
@@ -461,6 +449,30 @@ export declare class LemmyHttp {
|
|
461
449
|
* `HTTP.PUT /admin/registration_application/approve`
|
462
450
|
*/
|
463
451
|
approveRegistrationApplication(form: ApproveRegistrationApplication): Promise<RegistrationApplicationResponse>;
|
452
|
+
/**
|
453
|
+
* Purge / Delete a person from the database.
|
454
|
+
*
|
455
|
+
* `HTTP.POST /admin/purge/person`
|
456
|
+
*/
|
457
|
+
purgePerson(form: PurgePerson): Promise<PurgeItemResponse>;
|
458
|
+
/**
|
459
|
+
* Purge / Delete a community from the database.
|
460
|
+
*
|
461
|
+
* `HTTP.POST /admin/purge/community`
|
462
|
+
*/
|
463
|
+
purgeCommunity(form: PurgeCommunity): Promise<PurgeItemResponse>;
|
464
|
+
/**
|
465
|
+
* Purge / Delete a post from the database.
|
466
|
+
*
|
467
|
+
* `HTTP.POST /admin/purge/post`
|
468
|
+
*/
|
469
|
+
purgePost(form: PurgePost): Promise<PurgeItemResponse>;
|
470
|
+
/**
|
471
|
+
* Purge / Delete a comment from the database.
|
472
|
+
*
|
473
|
+
* `HTTP.POST /admin/purge/comment`
|
474
|
+
*/
|
475
|
+
purgeComment(form: PurgeComment): Promise<PurgeItemResponse>;
|
464
476
|
private buildFullUrl;
|
465
477
|
private wrapper;
|
466
478
|
}
|
package/dist/http.js
CHANGED
@@ -126,30 +126,6 @@ var LemmyHttp = /** @class */ (function () {
|
|
126
126
|
});
|
127
127
|
});
|
128
128
|
};
|
129
|
-
/**
|
130
|
-
* Get your site configuration.
|
131
|
-
*
|
132
|
-
* `HTTP.GET /site/config`
|
133
|
-
*/
|
134
|
-
LemmyHttp.prototype.getSiteConfig = function (form) {
|
135
|
-
return __awaiter(this, void 0, void 0, function () {
|
136
|
-
return __generator(this, function (_a) {
|
137
|
-
return [2 /*return*/, this.wrapper(HttpType.Get, "/site/config", form, site_1.GetSiteConfigResponse)];
|
138
|
-
});
|
139
|
-
});
|
140
|
-
};
|
141
|
-
/**
|
142
|
-
* Save your site config.
|
143
|
-
*
|
144
|
-
* `HTTP.PUT /site/config`
|
145
|
-
*/
|
146
|
-
LemmyHttp.prototype.saveSiteConfig = function (form) {
|
147
|
-
return __awaiter(this, void 0, void 0, function () {
|
148
|
-
return __generator(this, function (_a) {
|
149
|
-
return [2 /*return*/, this.wrapper(HttpType.Put, "/site/config", form, site_1.GetSiteConfigResponse)];
|
150
|
-
});
|
151
|
-
});
|
152
|
-
};
|
153
129
|
/**
|
154
130
|
* Get the modlog.
|
155
131
|
*
|
@@ -966,6 +942,54 @@ var LemmyHttp = /** @class */ (function () {
|
|
966
942
|
});
|
967
943
|
});
|
968
944
|
};
|
945
|
+
/**
|
946
|
+
* Purge / Delete a person from the database.
|
947
|
+
*
|
948
|
+
* `HTTP.POST /admin/purge/person`
|
949
|
+
*/
|
950
|
+
LemmyHttp.prototype.purgePerson = function (form) {
|
951
|
+
return __awaiter(this, void 0, void 0, function () {
|
952
|
+
return __generator(this, function (_a) {
|
953
|
+
return [2 /*return*/, this.wrapper(HttpType.Post, "/admin/purge/person", form, site_1.PurgeItemResponse)];
|
954
|
+
});
|
955
|
+
});
|
956
|
+
};
|
957
|
+
/**
|
958
|
+
* Purge / Delete a community from the database.
|
959
|
+
*
|
960
|
+
* `HTTP.POST /admin/purge/community`
|
961
|
+
*/
|
962
|
+
LemmyHttp.prototype.purgeCommunity = function (form) {
|
963
|
+
return __awaiter(this, void 0, void 0, function () {
|
964
|
+
return __generator(this, function (_a) {
|
965
|
+
return [2 /*return*/, this.wrapper(HttpType.Post, "/admin/purge/community", form, site_1.PurgeItemResponse)];
|
966
|
+
});
|
967
|
+
});
|
968
|
+
};
|
969
|
+
/**
|
970
|
+
* Purge / Delete a post from the database.
|
971
|
+
*
|
972
|
+
* `HTTP.POST /admin/purge/post`
|
973
|
+
*/
|
974
|
+
LemmyHttp.prototype.purgePost = function (form) {
|
975
|
+
return __awaiter(this, void 0, void 0, function () {
|
976
|
+
return __generator(this, function (_a) {
|
977
|
+
return [2 /*return*/, this.wrapper(HttpType.Post, "/admin/purge/post", form, site_1.PurgeItemResponse)];
|
978
|
+
});
|
979
|
+
});
|
980
|
+
};
|
981
|
+
/**
|
982
|
+
* Purge / Delete a comment from the database.
|
983
|
+
*
|
984
|
+
* `HTTP.POST /admin/purge/comment`
|
985
|
+
*/
|
986
|
+
LemmyHttp.prototype.purgeComment = function (form) {
|
987
|
+
return __awaiter(this, void 0, void 0, function () {
|
988
|
+
return __generator(this, function (_a) {
|
989
|
+
return [2 /*return*/, this.wrapper(HttpType.Post, "/admin/purge/comment", form, site_1.PurgeItemResponse)];
|
990
|
+
});
|
991
|
+
});
|
992
|
+
};
|
969
993
|
LemmyHttp.prototype.buildFullUrl = function (endpoint) {
|
970
994
|
return "".concat(this.apiUrl).concat(endpoint);
|
971
995
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Option } from "@sniptt/monads";
|
2
2
|
import "reflect-metadata";
|
3
3
|
import { ListingType, SearchType, SortType } from "../others";
|
4
|
-
import { CommentView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, CommunityView, LocalUserSettingsView, ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView, ModRemovePostView, ModStickyPostView, ModTransferCommunityView, PersonBlockView, PersonViewSafe, PostView, RegistrationApplicationView, SiteView } from "../views";
|
4
|
+
import { AdminPurgeCommentView, AdminPurgeCommunityView, AdminPurgePersonView, AdminPurgePostView, CommentView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, CommunityView, LocalUserSettingsView, ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView, ModRemovePostView, ModStickyPostView, ModTransferCommunityView, PersonBlockView, PersonViewSafe, PostView, RegistrationApplicationView, SiteView } from "../views";
|
5
5
|
/**
|
6
6
|
* Search lemmy for different types of data.
|
7
7
|
*/
|
@@ -50,6 +50,10 @@ export declare class GetModlogResponse {
|
|
50
50
|
added_to_community: ModAddCommunityView[];
|
51
51
|
transferred_to_community: ModTransferCommunityView[];
|
52
52
|
added: ModAddView[];
|
53
|
+
admin_purged_persons: AdminPurgePersonView[];
|
54
|
+
admin_purged_communities: AdminPurgeCommunityView[];
|
55
|
+
admin_purged_posts: AdminPurgePostView[];
|
56
|
+
admin_purged_comments: AdminPurgeCommentView[];
|
53
57
|
}
|
54
58
|
export declare class CreateSite {
|
55
59
|
name: string;
|
@@ -125,18 +129,6 @@ export declare class LeaveAdmin {
|
|
125
129
|
auth: string;
|
126
130
|
constructor(init: LeaveAdmin);
|
127
131
|
}
|
128
|
-
export declare class GetSiteConfig {
|
129
|
-
auth: string;
|
130
|
-
constructor(init: GetSiteConfig);
|
131
|
-
}
|
132
|
-
export declare class GetSiteConfigResponse {
|
133
|
-
config_hjson: string;
|
134
|
-
}
|
135
|
-
export declare class SaveSiteConfig {
|
136
|
-
config_hjson: string;
|
137
|
-
auth: string;
|
138
|
-
constructor(init: SaveSiteConfig);
|
139
|
-
}
|
140
132
|
export declare class FederatedInstances {
|
141
133
|
linked: string[];
|
142
134
|
allowed: Option<string[]>;
|
@@ -154,6 +146,33 @@ export declare class ResolveObjectResponse {
|
|
154
146
|
community: Option<CommunityView>;
|
155
147
|
person: Option<PersonViewSafe>;
|
156
148
|
}
|
149
|
+
export declare class PurgePerson {
|
150
|
+
person_id: number;
|
151
|
+
reason: Option<string>;
|
152
|
+
auth: string;
|
153
|
+
constructor(init: PurgePerson);
|
154
|
+
}
|
155
|
+
export declare class PurgeCommunity {
|
156
|
+
community_id: number;
|
157
|
+
reason: Option<string>;
|
158
|
+
auth: string;
|
159
|
+
constructor(init: PurgeCommunity);
|
160
|
+
}
|
161
|
+
export declare class PurgePost {
|
162
|
+
post_id: number;
|
163
|
+
reason: Option<string>;
|
164
|
+
auth: string;
|
165
|
+
constructor(init: PurgePost);
|
166
|
+
}
|
167
|
+
export declare class PurgeComment {
|
168
|
+
comment_id: number;
|
169
|
+
reason: Option<string>;
|
170
|
+
auth: string;
|
171
|
+
constructor(init: PurgeComment);
|
172
|
+
}
|
173
|
+
export declare class PurgeItemResponse {
|
174
|
+
success: boolean;
|
175
|
+
}
|
157
176
|
export declare class ListRegistrationApplications {
|
158
177
|
/**
|
159
178
|
* Only shows the unread applications (IE those without an admin actor)
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
7
|
};
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.GetUnreadRegistrationApplicationCountResponse = exports.GetUnreadRegistrationApplicationCount = exports.RegistrationApplicationResponse = exports.ApproveRegistrationApplication = exports.ListRegistrationApplicationsResponse = exports.ListRegistrationApplications = exports.
|
9
|
+
exports.GetUnreadRegistrationApplicationCountResponse = exports.GetUnreadRegistrationApplicationCount = exports.RegistrationApplicationResponse = exports.ApproveRegistrationApplication = exports.ListRegistrationApplicationsResponse = exports.ListRegistrationApplications = exports.PurgeItemResponse = exports.PurgeComment = exports.PurgePost = exports.PurgeCommunity = exports.PurgePerson = exports.ResolveObjectResponse = exports.ResolveObject = exports.FederatedInstances = exports.LeaveAdmin = exports.MyUserInfo = exports.GetSiteResponse = exports.SiteResponse = exports.GetSite = exports.EditSite = exports.CreateSite = exports.GetModlogResponse = exports.GetModlog = exports.SearchResponse = exports.Search = void 0;
|
10
10
|
var class_transformer_1 = require("class-transformer");
|
11
11
|
require("reflect-metadata");
|
12
12
|
var utils_1 = require("../../utils");
|
@@ -233,6 +233,18 @@ var GetModlogResponse = /** @class */ (function () {
|
|
233
233
|
__decorate([
|
234
234
|
(0, class_transformer_1.Type)(function () { return views_1.ModAddView; })
|
235
235
|
], GetModlogResponse.prototype, "added", void 0);
|
236
|
+
__decorate([
|
237
|
+
(0, class_transformer_1.Type)(function () { return views_1.AdminPurgePersonView; })
|
238
|
+
], GetModlogResponse.prototype, "admin_purged_persons", void 0);
|
239
|
+
__decorate([
|
240
|
+
(0, class_transformer_1.Type)(function () { return views_1.AdminPurgeCommunityView; })
|
241
|
+
], GetModlogResponse.prototype, "admin_purged_communities", void 0);
|
242
|
+
__decorate([
|
243
|
+
(0, class_transformer_1.Type)(function () { return views_1.AdminPurgePostView; })
|
244
|
+
], GetModlogResponse.prototype, "admin_purged_posts", void 0);
|
245
|
+
__decorate([
|
246
|
+
(0, class_transformer_1.Type)(function () { return views_1.AdminPurgeCommentView; })
|
247
|
+
], GetModlogResponse.prototype, "admin_purged_comments", void 0);
|
236
248
|
return GetModlogResponse;
|
237
249
|
}());
|
238
250
|
exports.GetModlogResponse = GetModlogResponse;
|
@@ -683,26 +695,6 @@ var LeaveAdmin = /** @class */ (function () {
|
|
683
695
|
return LeaveAdmin;
|
684
696
|
}());
|
685
697
|
exports.LeaveAdmin = LeaveAdmin;
|
686
|
-
var GetSiteConfig = /** @class */ (function () {
|
687
|
-
function GetSiteConfig(init) {
|
688
|
-
Object.assign(this, init);
|
689
|
-
}
|
690
|
-
return GetSiteConfig;
|
691
|
-
}());
|
692
|
-
exports.GetSiteConfig = GetSiteConfig;
|
693
|
-
var GetSiteConfigResponse = /** @class */ (function () {
|
694
|
-
function GetSiteConfigResponse() {
|
695
|
-
}
|
696
|
-
return GetSiteConfigResponse;
|
697
|
-
}());
|
698
|
-
exports.GetSiteConfigResponse = GetSiteConfigResponse;
|
699
|
-
var SaveSiteConfig = /** @class */ (function () {
|
700
|
-
function SaveSiteConfig(init) {
|
701
|
-
Object.assign(this, init);
|
702
|
-
}
|
703
|
-
return SaveSiteConfig;
|
704
|
-
}());
|
705
|
-
exports.SaveSiteConfig = SaveSiteConfig;
|
706
698
|
var FederatedInstances = /** @class */ (function () {
|
707
699
|
function FederatedInstances(init) {
|
708
700
|
Object.assign(this, init);
|
@@ -804,6 +796,84 @@ var ResolveObjectResponse = /** @class */ (function () {
|
|
804
796
|
return ResolveObjectResponse;
|
805
797
|
}());
|
806
798
|
exports.ResolveObjectResponse = ResolveObjectResponse;
|
799
|
+
var PurgePerson = /** @class */ (function () {
|
800
|
+
function PurgePerson(init) {
|
801
|
+
Object.assign(this, init);
|
802
|
+
}
|
803
|
+
__decorate([
|
804
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
805
|
+
var value = _a.value;
|
806
|
+
return (0, utils_1.toOption)(value);
|
807
|
+
}, { toClassOnly: true }),
|
808
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
809
|
+
var value = _a.value;
|
810
|
+
return (0, utils_1.toUndefined)(value);
|
811
|
+
}, { toPlainOnly: true }),
|
812
|
+
(0, class_transformer_1.Expose)()
|
813
|
+
], PurgePerson.prototype, "reason", void 0);
|
814
|
+
return PurgePerson;
|
815
|
+
}());
|
816
|
+
exports.PurgePerson = PurgePerson;
|
817
|
+
var PurgeCommunity = /** @class */ (function () {
|
818
|
+
function PurgeCommunity(init) {
|
819
|
+
Object.assign(this, init);
|
820
|
+
}
|
821
|
+
__decorate([
|
822
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
823
|
+
var value = _a.value;
|
824
|
+
return (0, utils_1.toOption)(value);
|
825
|
+
}, { toClassOnly: true }),
|
826
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
827
|
+
var value = _a.value;
|
828
|
+
return (0, utils_1.toUndefined)(value);
|
829
|
+
}, { toPlainOnly: true }),
|
830
|
+
(0, class_transformer_1.Expose)()
|
831
|
+
], PurgeCommunity.prototype, "reason", void 0);
|
832
|
+
return PurgeCommunity;
|
833
|
+
}());
|
834
|
+
exports.PurgeCommunity = PurgeCommunity;
|
835
|
+
var PurgePost = /** @class */ (function () {
|
836
|
+
function PurgePost(init) {
|
837
|
+
Object.assign(this, init);
|
838
|
+
}
|
839
|
+
__decorate([
|
840
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
841
|
+
var value = _a.value;
|
842
|
+
return (0, utils_1.toOption)(value);
|
843
|
+
}, { toClassOnly: true }),
|
844
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
845
|
+
var value = _a.value;
|
846
|
+
return (0, utils_1.toUndefined)(value);
|
847
|
+
}, { toPlainOnly: true }),
|
848
|
+
(0, class_transformer_1.Expose)()
|
849
|
+
], PurgePost.prototype, "reason", void 0);
|
850
|
+
return PurgePost;
|
851
|
+
}());
|
852
|
+
exports.PurgePost = PurgePost;
|
853
|
+
var PurgeComment = /** @class */ (function () {
|
854
|
+
function PurgeComment(init) {
|
855
|
+
Object.assign(this, init);
|
856
|
+
}
|
857
|
+
__decorate([
|
858
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
859
|
+
var value = _a.value;
|
860
|
+
return (0, utils_1.toOption)(value);
|
861
|
+
}, { toClassOnly: true }),
|
862
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
863
|
+
var value = _a.value;
|
864
|
+
return (0, utils_1.toUndefined)(value);
|
865
|
+
}, { toPlainOnly: true }),
|
866
|
+
(0, class_transformer_1.Expose)()
|
867
|
+
], PurgeComment.prototype, "reason", void 0);
|
868
|
+
return PurgeComment;
|
869
|
+
}());
|
870
|
+
exports.PurgeComment = PurgeComment;
|
871
|
+
var PurgeItemResponse = /** @class */ (function () {
|
872
|
+
function PurgeItemResponse() {
|
873
|
+
}
|
874
|
+
return PurgeItemResponse;
|
875
|
+
}());
|
876
|
+
exports.PurgeItemResponse = PurgeItemResponse;
|
807
877
|
var ListRegistrationApplications = /** @class */ (function () {
|
808
878
|
function ListRegistrationApplications(init) {
|
809
879
|
Object.assign(this, init);
|
@@ -64,23 +64,25 @@ export declare enum UserOperation {
|
|
64
64
|
GetPrivateMessages = 57,
|
65
65
|
UserJoin = 58,
|
66
66
|
GetComments = 59,
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
67
|
+
PostJoin = 60,
|
68
|
+
CommunityJoin = 61,
|
69
|
+
ChangePassword = 62,
|
70
|
+
GetSiteMetadata = 63,
|
71
|
+
BlockCommunity = 64,
|
72
|
+
BlockPerson = 65,
|
73
|
+
PurgePerson = 66,
|
74
|
+
PurgeCommunity = 67,
|
75
|
+
PurgePost = 68,
|
76
|
+
PurgeComment = 69,
|
77
|
+
CreateCommentReport = 70,
|
78
|
+
ResolveCommentReport = 71,
|
79
|
+
ListCommentReports = 72,
|
80
|
+
CreatePostReport = 73,
|
81
|
+
ResolvePostReport = 74,
|
82
|
+
ListPostReports = 75,
|
83
|
+
GetReportCount = 76,
|
84
|
+
GetUnreadCount = 77,
|
85
|
+
VerifyEmail = 78
|
84
86
|
}
|
85
87
|
/**
|
86
88
|
* Different sort types used in lemmy.
|
@@ -144,6 +146,14 @@ export declare enum SearchType {
|
|
144
146
|
Users = "Users",
|
145
147
|
Url = "Url"
|
146
148
|
}
|
149
|
+
/**
|
150
|
+
* Different Subscribed states
|
151
|
+
*/
|
152
|
+
export declare enum SubscribedType {
|
153
|
+
Subscribed = "Subscribed",
|
154
|
+
NotSubscribed = "NotSubscribed",
|
155
|
+
Pending = "Pending"
|
156
|
+
}
|
147
157
|
/**
|
148
158
|
* A holder for a site's metadata ( such as opengraph tags ), used for post links.
|
149
159
|
*/
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
7
|
};
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.SiteMetadata = exports.SearchType = exports.ListingType = exports.SortType = exports.UserOperation = exports.VERSION = void 0;
|
9
|
+
exports.SiteMetadata = exports.SubscribedType = exports.SearchType = exports.ListingType = exports.SortType = exports.UserOperation = exports.VERSION = void 0;
|
10
10
|
var class_transformer_1 = require("class-transformer");
|
11
11
|
var utils_1 = require("../utils");
|
12
12
|
exports.VERSION = "v3";
|
@@ -75,23 +75,25 @@ var UserOperation;
|
|
75
75
|
UserOperation[UserOperation["GetPrivateMessages"] = 57] = "GetPrivateMessages";
|
76
76
|
UserOperation[UserOperation["UserJoin"] = 58] = "UserJoin";
|
77
77
|
UserOperation[UserOperation["GetComments"] = 59] = "GetComments";
|
78
|
-
UserOperation[UserOperation["
|
79
|
-
UserOperation[UserOperation["
|
80
|
-
UserOperation[UserOperation["
|
81
|
-
UserOperation[UserOperation["
|
82
|
-
UserOperation[UserOperation["
|
83
|
-
UserOperation[UserOperation["
|
84
|
-
UserOperation[UserOperation["
|
85
|
-
UserOperation[UserOperation["
|
86
|
-
UserOperation[UserOperation["
|
87
|
-
UserOperation[UserOperation["
|
88
|
-
UserOperation[UserOperation["
|
89
|
-
UserOperation[UserOperation["
|
90
|
-
UserOperation[UserOperation["
|
91
|
-
UserOperation[UserOperation["
|
92
|
-
UserOperation[UserOperation["
|
93
|
-
UserOperation[UserOperation["
|
94
|
-
UserOperation[UserOperation["
|
78
|
+
UserOperation[UserOperation["PostJoin"] = 60] = "PostJoin";
|
79
|
+
UserOperation[UserOperation["CommunityJoin"] = 61] = "CommunityJoin";
|
80
|
+
UserOperation[UserOperation["ChangePassword"] = 62] = "ChangePassword";
|
81
|
+
UserOperation[UserOperation["GetSiteMetadata"] = 63] = "GetSiteMetadata";
|
82
|
+
UserOperation[UserOperation["BlockCommunity"] = 64] = "BlockCommunity";
|
83
|
+
UserOperation[UserOperation["BlockPerson"] = 65] = "BlockPerson";
|
84
|
+
UserOperation[UserOperation["PurgePerson"] = 66] = "PurgePerson";
|
85
|
+
UserOperation[UserOperation["PurgeCommunity"] = 67] = "PurgeCommunity";
|
86
|
+
UserOperation[UserOperation["PurgePost"] = 68] = "PurgePost";
|
87
|
+
UserOperation[UserOperation["PurgeComment"] = 69] = "PurgeComment";
|
88
|
+
UserOperation[UserOperation["CreateCommentReport"] = 70] = "CreateCommentReport";
|
89
|
+
UserOperation[UserOperation["ResolveCommentReport"] = 71] = "ResolveCommentReport";
|
90
|
+
UserOperation[UserOperation["ListCommentReports"] = 72] = "ListCommentReports";
|
91
|
+
UserOperation[UserOperation["CreatePostReport"] = 73] = "CreatePostReport";
|
92
|
+
UserOperation[UserOperation["ResolvePostReport"] = 74] = "ResolvePostReport";
|
93
|
+
UserOperation[UserOperation["ListPostReports"] = 75] = "ListPostReports";
|
94
|
+
UserOperation[UserOperation["GetReportCount"] = 76] = "GetReportCount";
|
95
|
+
UserOperation[UserOperation["GetUnreadCount"] = 77] = "GetUnreadCount";
|
96
|
+
UserOperation[UserOperation["VerifyEmail"] = 78] = "VerifyEmail";
|
95
97
|
})(UserOperation = exports.UserOperation || (exports.UserOperation = {}));
|
96
98
|
/**
|
97
99
|
* Different sort types used in lemmy.
|
@@ -158,6 +160,15 @@ var SearchType;
|
|
158
160
|
SearchType["Users"] = "Users";
|
159
161
|
SearchType["Url"] = "Url";
|
160
162
|
})(SearchType = exports.SearchType || (exports.SearchType = {}));
|
163
|
+
/**
|
164
|
+
* Different Subscribed states
|
165
|
+
*/
|
166
|
+
var SubscribedType;
|
167
|
+
(function (SubscribedType) {
|
168
|
+
SubscribedType["Subscribed"] = "Subscribed";
|
169
|
+
SubscribedType["NotSubscribed"] = "NotSubscribed";
|
170
|
+
SubscribedType["Pending"] = "Pending";
|
171
|
+
})(SubscribedType = exports.SubscribedType || (exports.SubscribedType = {}));
|
161
172
|
/**
|
162
173
|
* A holder for a site's metadata ( such as opengraph tags ), used for post links.
|
163
174
|
*/
|
@@ -195,6 +195,32 @@ export declare class ModAdd {
|
|
195
195
|
removed: Option<boolean>;
|
196
196
|
when_: string;
|
197
197
|
}
|
198
|
+
export declare class AdminPurgePerson {
|
199
|
+
id: number;
|
200
|
+
admin_person_id: number;
|
201
|
+
reason: Option<string>;
|
202
|
+
when_: string;
|
203
|
+
}
|
204
|
+
export declare class AdminPurgeCommunity {
|
205
|
+
id: number;
|
206
|
+
admin_person_id: number;
|
207
|
+
reason: Option<string>;
|
208
|
+
when_: string;
|
209
|
+
}
|
210
|
+
export declare class AdminPurgePost {
|
211
|
+
id: number;
|
212
|
+
admin_person_id: number;
|
213
|
+
community_id: number;
|
214
|
+
reason: Option<string>;
|
215
|
+
when_: string;
|
216
|
+
}
|
217
|
+
export declare class AdminPurgeComment {
|
218
|
+
id: number;
|
219
|
+
admin_person_id: number;
|
220
|
+
post_id: number;
|
221
|
+
reason: Option<string>;
|
222
|
+
when_: string;
|
223
|
+
}
|
198
224
|
export declare class CommunitySafe {
|
199
225
|
id: number;
|
200
226
|
name: string;
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
7
|
};
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.RegistrationApplication = exports.PersonMention = exports.Comment = exports.CommentReport = exports.CommunitySafe = exports.ModAdd = exports.ModTransferCommunity = exports.ModAddCommunity = exports.ModBan = exports.ModBanFromCommunity = exports.ModRemoveCommunity = exports.ModRemoveComment = exports.ModStickyPost = exports.ModLockPost = exports.ModRemovePost = exports.PasswordResetRequest = exports.Post = exports.PostReport = exports.PrivateMessage = exports.Site = exports.PersonSafe = exports.LocalUserSettings = void 0;
|
9
|
+
exports.RegistrationApplication = exports.PersonMention = exports.Comment = exports.CommentReport = exports.CommunitySafe = exports.AdminPurgeComment = exports.AdminPurgePost = exports.AdminPurgeCommunity = exports.AdminPurgePerson = exports.ModAdd = exports.ModTransferCommunity = exports.ModAddCommunity = exports.ModBan = exports.ModBanFromCommunity = exports.ModRemoveCommunity = exports.ModRemoveComment = exports.ModStickyPost = exports.ModLockPost = exports.ModRemovePost = exports.PasswordResetRequest = exports.Post = exports.PostReport = exports.PrivateMessage = exports.Site = exports.PersonSafe = exports.LocalUserSettings = void 0;
|
10
10
|
var class_transformer_1 = require("class-transformer");
|
11
11
|
var utils_1 = require("../utils");
|
12
12
|
var LocalUserSettings = /** @class */ (function () {
|
@@ -606,6 +606,74 @@ var ModAdd = /** @class */ (function () {
|
|
606
606
|
return ModAdd;
|
607
607
|
}());
|
608
608
|
exports.ModAdd = ModAdd;
|
609
|
+
var AdminPurgePerson = /** @class */ (function () {
|
610
|
+
function AdminPurgePerson() {
|
611
|
+
}
|
612
|
+
__decorate([
|
613
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
614
|
+
var value = _a.value;
|
615
|
+
return (0, utils_1.toOption)(value);
|
616
|
+
}, { toClassOnly: true }),
|
617
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
618
|
+
var value = _a.value;
|
619
|
+
return (0, utils_1.toUndefined)(value);
|
620
|
+
}, { toPlainOnly: true }),
|
621
|
+
(0, class_transformer_1.Expose)()
|
622
|
+
], AdminPurgePerson.prototype, "reason", void 0);
|
623
|
+
return AdminPurgePerson;
|
624
|
+
}());
|
625
|
+
exports.AdminPurgePerson = AdminPurgePerson;
|
626
|
+
var AdminPurgeCommunity = /** @class */ (function () {
|
627
|
+
function AdminPurgeCommunity() {
|
628
|
+
}
|
629
|
+
__decorate([
|
630
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
631
|
+
var value = _a.value;
|
632
|
+
return (0, utils_1.toOption)(value);
|
633
|
+
}, { toClassOnly: true }),
|
634
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
635
|
+
var value = _a.value;
|
636
|
+
return (0, utils_1.toUndefined)(value);
|
637
|
+
}, { toPlainOnly: true }),
|
638
|
+
(0, class_transformer_1.Expose)()
|
639
|
+
], AdminPurgeCommunity.prototype, "reason", void 0);
|
640
|
+
return AdminPurgeCommunity;
|
641
|
+
}());
|
642
|
+
exports.AdminPurgeCommunity = AdminPurgeCommunity;
|
643
|
+
var AdminPurgePost = /** @class */ (function () {
|
644
|
+
function AdminPurgePost() {
|
645
|
+
}
|
646
|
+
__decorate([
|
647
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
648
|
+
var value = _a.value;
|
649
|
+
return (0, utils_1.toOption)(value);
|
650
|
+
}, { toClassOnly: true }),
|
651
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
652
|
+
var value = _a.value;
|
653
|
+
return (0, utils_1.toUndefined)(value);
|
654
|
+
}, { toPlainOnly: true }),
|
655
|
+
(0, class_transformer_1.Expose)()
|
656
|
+
], AdminPurgePost.prototype, "reason", void 0);
|
657
|
+
return AdminPurgePost;
|
658
|
+
}());
|
659
|
+
exports.AdminPurgePost = AdminPurgePost;
|
660
|
+
var AdminPurgeComment = /** @class */ (function () {
|
661
|
+
function AdminPurgeComment() {
|
662
|
+
}
|
663
|
+
__decorate([
|
664
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
665
|
+
var value = _a.value;
|
666
|
+
return (0, utils_1.toOption)(value);
|
667
|
+
}, { toClassOnly: true }),
|
668
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
669
|
+
var value = _a.value;
|
670
|
+
return (0, utils_1.toUndefined)(value);
|
671
|
+
}, { toPlainOnly: true }),
|
672
|
+
(0, class_transformer_1.Expose)()
|
673
|
+
], AdminPurgeComment.prototype, "reason", void 0);
|
674
|
+
return AdminPurgeComment;
|
675
|
+
}());
|
676
|
+
exports.AdminPurgeComment = AdminPurgeComment;
|
609
677
|
var CommunitySafe = /** @class */ (function () {
|
610
678
|
function CommunitySafe() {
|
611
679
|
}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { Option } from "@sniptt/monads";
|
2
2
|
import "reflect-metadata";
|
3
3
|
import { CommentAggregates, CommunityAggregates, PersonAggregates, PostAggregates, SiteAggregates } from "./aggregates";
|
4
|
-
import {
|
4
|
+
import { SubscribedType } from "./others";
|
5
|
+
import { AdminPurgeComment, AdminPurgeCommunity, AdminPurgePerson, AdminPurgePost, Comment, CommentReport, CommunitySafe, LocalUserSettings, ModAdd, ModAddCommunity, ModBan, ModBanFromCommunity, ModLockPost, ModRemoveComment, ModRemoveCommunity, ModRemovePost, ModStickyPost, ModTransferCommunity, PersonMention, PersonSafe, Post, PostReport, PrivateMessage, RegistrationApplication, Site } from "./source";
|
5
6
|
export declare class PersonViewSafe {
|
6
7
|
person: PersonSafe;
|
7
8
|
counts: PersonAggregates;
|
@@ -15,7 +16,7 @@ export declare class PersonMentionView {
|
|
15
16
|
recipient: PersonSafe;
|
16
17
|
counts: CommentAggregates;
|
17
18
|
creator_banned_from_community: boolean;
|
18
|
-
subscribed:
|
19
|
+
subscribed: SubscribedType;
|
19
20
|
saved: boolean;
|
20
21
|
creator_blocked: boolean;
|
21
22
|
my_vote: Option<number>;
|
@@ -40,7 +41,7 @@ export declare class PostView {
|
|
40
41
|
community: CommunitySafe;
|
41
42
|
creator_banned_from_community: boolean;
|
42
43
|
counts: PostAggregates;
|
43
|
-
subscribed:
|
44
|
+
subscribed: SubscribedType;
|
44
45
|
saved: boolean;
|
45
46
|
read: boolean;
|
46
47
|
creator_blocked: boolean;
|
@@ -65,7 +66,7 @@ export declare class CommentView {
|
|
65
66
|
community: CommunitySafe;
|
66
67
|
counts: CommentAggregates;
|
67
68
|
creator_banned_from_community: boolean;
|
68
|
-
subscribed:
|
69
|
+
subscribed: SubscribedType;
|
69
70
|
saved: boolean;
|
70
71
|
creator_blocked: boolean;
|
71
72
|
my_vote: Option<number>;
|
@@ -141,6 +142,24 @@ export declare class ModStickyPostView {
|
|
141
142
|
post: Post;
|
142
143
|
community: CommunitySafe;
|
143
144
|
}
|
145
|
+
export declare class AdminPurgeCommunityView {
|
146
|
+
admin_purge_community: AdminPurgeCommunity;
|
147
|
+
admin: PersonSafe;
|
148
|
+
}
|
149
|
+
export declare class AdminPurgePersonView {
|
150
|
+
admin_purge_person: AdminPurgePerson;
|
151
|
+
admin: PersonSafe;
|
152
|
+
}
|
153
|
+
export declare class AdminPurgePostView {
|
154
|
+
admin_purge_post: AdminPurgePost;
|
155
|
+
admin: PersonSafe;
|
156
|
+
community: CommunitySafe;
|
157
|
+
}
|
158
|
+
export declare class AdminPurgeCommentView {
|
159
|
+
admin_purge_comment: AdminPurgeComment;
|
160
|
+
admin: PersonSafe;
|
161
|
+
post: Post;
|
162
|
+
}
|
144
163
|
export declare class CommunityFollowerView {
|
145
164
|
community: CommunitySafe;
|
146
165
|
follower: PersonSafe;
|
@@ -163,7 +182,7 @@ export declare class PersonBlockView {
|
|
163
182
|
}
|
164
183
|
export declare class CommunityView {
|
165
184
|
community: CommunitySafe;
|
166
|
-
subscribed:
|
185
|
+
subscribed: SubscribedType;
|
167
186
|
blocked: boolean;
|
168
187
|
counts: CommunityAggregates;
|
169
188
|
}
|
package/dist/interfaces/views.js
CHANGED
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
7
|
};
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.RegistrationApplicationView = exports.CommunityView = exports.PersonBlockView = exports.CommunityPersonBanView = exports.CommunityModeratorView = exports.CommunityBlockView = exports.CommunityFollowerView = exports.ModStickyPostView = exports.ModRemovePostView = exports.ModRemoveCommunityView = exports.ModRemoveCommentView = exports.ModLockPostView = exports.ModBanView = exports.ModBanFromCommunityView = exports.ModAddView = exports.ModTransferCommunityView = exports.ModAddCommunityView = exports.CommentReportView = exports.CommentView = exports.PostReportView = exports.PostView = exports.PrivateMessageView = exports.SiteView = exports.LocalUserSettingsView = exports.PersonMentionView = exports.PersonViewSafe = void 0;
|
9
|
+
exports.RegistrationApplicationView = exports.CommunityView = exports.PersonBlockView = exports.CommunityPersonBanView = exports.CommunityModeratorView = exports.CommunityBlockView = exports.CommunityFollowerView = exports.AdminPurgeCommentView = exports.AdminPurgePostView = exports.AdminPurgePersonView = exports.AdminPurgeCommunityView = exports.ModStickyPostView = exports.ModRemovePostView = exports.ModRemoveCommunityView = exports.ModRemoveCommentView = exports.ModLockPostView = exports.ModBanView = exports.ModBanFromCommunityView = exports.ModAddView = exports.ModTransferCommunityView = exports.ModAddCommunityView = exports.CommentReportView = exports.CommentView = exports.PostReportView = exports.PostView = exports.PrivateMessageView = exports.SiteView = exports.LocalUserSettingsView = exports.PersonMentionView = exports.PersonViewSafe = void 0;
|
10
10
|
var class_transformer_1 = require("class-transformer");
|
11
11
|
require("reflect-metadata");
|
12
12
|
var utils_1 = require("../utils");
|
@@ -426,6 +426,60 @@ var ModStickyPostView = /** @class */ (function () {
|
|
426
426
|
return ModStickyPostView;
|
427
427
|
}());
|
428
428
|
exports.ModStickyPostView = ModStickyPostView;
|
429
|
+
var AdminPurgeCommunityView = /** @class */ (function () {
|
430
|
+
function AdminPurgeCommunityView() {
|
431
|
+
}
|
432
|
+
__decorate([
|
433
|
+
(0, class_transformer_1.Type)(function () { return source_1.AdminPurgeCommunity; })
|
434
|
+
], AdminPurgeCommunityView.prototype, "admin_purge_community", void 0);
|
435
|
+
__decorate([
|
436
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
437
|
+
], AdminPurgeCommunityView.prototype, "admin", void 0);
|
438
|
+
return AdminPurgeCommunityView;
|
439
|
+
}());
|
440
|
+
exports.AdminPurgeCommunityView = AdminPurgeCommunityView;
|
441
|
+
var AdminPurgePersonView = /** @class */ (function () {
|
442
|
+
function AdminPurgePersonView() {
|
443
|
+
}
|
444
|
+
__decorate([
|
445
|
+
(0, class_transformer_1.Type)(function () { return source_1.AdminPurgePerson; })
|
446
|
+
], AdminPurgePersonView.prototype, "admin_purge_person", void 0);
|
447
|
+
__decorate([
|
448
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
449
|
+
], AdminPurgePersonView.prototype, "admin", void 0);
|
450
|
+
return AdminPurgePersonView;
|
451
|
+
}());
|
452
|
+
exports.AdminPurgePersonView = AdminPurgePersonView;
|
453
|
+
var AdminPurgePostView = /** @class */ (function () {
|
454
|
+
function AdminPurgePostView() {
|
455
|
+
}
|
456
|
+
__decorate([
|
457
|
+
(0, class_transformer_1.Type)(function () { return source_1.AdminPurgePost; })
|
458
|
+
], AdminPurgePostView.prototype, "admin_purge_post", void 0);
|
459
|
+
__decorate([
|
460
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
461
|
+
], AdminPurgePostView.prototype, "admin", void 0);
|
462
|
+
__decorate([
|
463
|
+
(0, class_transformer_1.Type)(function () { return source_1.CommunitySafe; })
|
464
|
+
], AdminPurgePostView.prototype, "community", void 0);
|
465
|
+
return AdminPurgePostView;
|
466
|
+
}());
|
467
|
+
exports.AdminPurgePostView = AdminPurgePostView;
|
468
|
+
var AdminPurgeCommentView = /** @class */ (function () {
|
469
|
+
function AdminPurgeCommentView() {
|
470
|
+
}
|
471
|
+
__decorate([
|
472
|
+
(0, class_transformer_1.Type)(function () { return source_1.AdminPurgeComment; })
|
473
|
+
], AdminPurgeCommentView.prototype, "admin_purge_comment", void 0);
|
474
|
+
__decorate([
|
475
|
+
(0, class_transformer_1.Type)(function () { return source_1.PersonSafe; })
|
476
|
+
], AdminPurgeCommentView.prototype, "admin", void 0);
|
477
|
+
__decorate([
|
478
|
+
(0, class_transformer_1.Type)(function () { return source_1.Post; })
|
479
|
+
], AdminPurgeCommentView.prototype, "post", void 0);
|
480
|
+
return AdminPurgeCommentView;
|
481
|
+
}());
|
482
|
+
exports.AdminPurgeCommentView = AdminPurgeCommentView;
|
429
483
|
var CommunityFollowerView = /** @class */ (function () {
|
430
484
|
function CommunityFollowerView() {
|
431
485
|
}
|
package/dist/websocket.d.ts
CHANGED
@@ -3,7 +3,7 @@ import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, E
|
|
3
3
|
import { AddModToCommunity, BanFromCommunity, BlockCommunity, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, ListCommunities, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
|
4
4
|
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";
|
5
5
|
import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPosts, GetSiteMetadata, ListPostReports, LockPost, MarkPostAsRead, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
|
6
|
-
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetSite,
|
6
|
+
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetSite, GetUnreadRegistrationApplicationCount, LeaveAdmin, ListRegistrationApplications, PurgeComment, PurgeCommunity, PurgePerson, PurgePost, ResolveObject, Search } from "./interfaces/api/site";
|
7
7
|
import { CommunityJoin, PostJoin, UserJoin } from "./interfaces/api/websocket";
|
8
8
|
import { UserOperation } from "./interfaces/others";
|
9
9
|
/**
|
@@ -251,10 +251,6 @@ export declare class LemmyWebsocket {
|
|
251
251
|
* Gets the site, and your user data.
|
252
252
|
*/
|
253
253
|
getSite(form: GetSite): string;
|
254
|
-
/**
|
255
|
-
* Get your site configuration.
|
256
|
-
*/
|
257
|
-
getSiteConfig(form: GetSiteConfig): string;
|
258
254
|
/**
|
259
255
|
* Search lemmy.
|
260
256
|
*/
|
@@ -319,10 +315,6 @@ export declare class LemmyWebsocket {
|
|
319
315
|
* Get / fetch private messages.
|
320
316
|
*/
|
321
317
|
getPrivateMessages(form: GetPrivateMessages): string;
|
322
|
-
/**
|
323
|
-
* Save your site config.
|
324
|
-
*/
|
325
|
-
saveSiteConfig(form: SaveSiteConfig): string;
|
326
318
|
/**
|
327
319
|
* Block a person.
|
328
320
|
*/
|
@@ -331,6 +323,22 @@ export declare class LemmyWebsocket {
|
|
331
323
|
* Block a community.
|
332
324
|
*/
|
333
325
|
blockCommunity(form: BlockCommunity): string;
|
326
|
+
/**
|
327
|
+
* Purge / Delete a person from the database.
|
328
|
+
*/
|
329
|
+
purgePerson(form: PurgePerson): string;
|
330
|
+
/**
|
331
|
+
* Purge / Delete a community from the database.
|
332
|
+
*/
|
333
|
+
purgeCommunity(form: PurgeCommunity): string;
|
334
|
+
/**
|
335
|
+
* Purge / Delete a post from the database.
|
336
|
+
*/
|
337
|
+
purgePost(form: PurgePost): string;
|
338
|
+
/**
|
339
|
+
* Purge / Delete a comment from the database.
|
340
|
+
*/
|
341
|
+
purgeComment(form: PurgeComment): string;
|
334
342
|
}
|
335
343
|
export declare function wsUserOp(msg: any): UserOperation;
|
336
344
|
/**
|
package/dist/websocket.js
CHANGED
@@ -363,12 +363,6 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
363
363
|
LemmyWebsocket.prototype.getSite = function (form) {
|
364
364
|
return wrapper(others_1.UserOperation.GetSite, form);
|
365
365
|
};
|
366
|
-
/**
|
367
|
-
* Get your site configuration.
|
368
|
-
*/
|
369
|
-
LemmyWebsocket.prototype.getSiteConfig = function (form) {
|
370
|
-
return wrapper(others_1.UserOperation.GetSiteConfig, form);
|
371
|
-
};
|
372
366
|
/**
|
373
367
|
* Search lemmy.
|
374
368
|
*/
|
@@ -465,12 +459,6 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
465
459
|
LemmyWebsocket.prototype.getPrivateMessages = function (form) {
|
466
460
|
return wrapper(others_1.UserOperation.GetPrivateMessages, form);
|
467
461
|
};
|
468
|
-
/**
|
469
|
-
* Save your site config.
|
470
|
-
*/
|
471
|
-
LemmyWebsocket.prototype.saveSiteConfig = function (form) {
|
472
|
-
return wrapper(others_1.UserOperation.SaveSiteConfig, form);
|
473
|
-
};
|
474
462
|
/**
|
475
463
|
* Block a person.
|
476
464
|
*/
|
@@ -483,6 +471,30 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
483
471
|
LemmyWebsocket.prototype.blockCommunity = function (form) {
|
484
472
|
return wrapper(others_1.UserOperation.BlockCommunity, form);
|
485
473
|
};
|
474
|
+
/**
|
475
|
+
* Purge / Delete a person from the database.
|
476
|
+
*/
|
477
|
+
LemmyWebsocket.prototype.purgePerson = function (form) {
|
478
|
+
return wrapper(others_1.UserOperation.PurgePerson, form);
|
479
|
+
};
|
480
|
+
/**
|
481
|
+
* Purge / Delete a community from the database.
|
482
|
+
*/
|
483
|
+
LemmyWebsocket.prototype.purgeCommunity = function (form) {
|
484
|
+
return wrapper(others_1.UserOperation.PurgeCommunity, form);
|
485
|
+
};
|
486
|
+
/**
|
487
|
+
* Purge / Delete a post from the database.
|
488
|
+
*/
|
489
|
+
LemmyWebsocket.prototype.purgePost = function (form) {
|
490
|
+
return wrapper(others_1.UserOperation.PurgePost, form);
|
491
|
+
};
|
492
|
+
/**
|
493
|
+
* Purge / Delete a comment from the database.
|
494
|
+
*/
|
495
|
+
LemmyWebsocket.prototype.purgeComment = function (form) {
|
496
|
+
return wrapper(others_1.UserOperation.PurgeComment, form);
|
497
|
+
};
|
486
498
|
return LemmyWebsocket;
|
487
499
|
}());
|
488
500
|
exports.LemmyWebsocket = LemmyWebsocket;
|
package/package.json
CHANGED