lemmy-js-client 0.17.2-rc.4 → 0.17.2-rc.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/http.d.ts +26 -1
- package/dist/http.js +44 -0
- package/dist/interfaces/api/comment.d.ts +4 -0
- package/dist/interfaces/api/community.d.ts +2 -2
- package/dist/interfaces/api/custom_emoji.d.ts +33 -0
- package/dist/interfaces/api/custom_emoji.js +38 -0
- package/dist/interfaces/api/index.d.ts +1 -0
- package/dist/interfaces/api/index.js +1 -0
- package/dist/interfaces/api/person.d.ts +9 -9
- package/dist/interfaces/api/site.d.ts +10 -9
- package/dist/interfaces/others.d.ts +31 -19
- package/dist/interfaces/others.js +34 -20
- package/dist/interfaces/source.d.ts +26 -16
- package/dist/interfaces/source.js +13 -7
- package/dist/interfaces/views.d.ts +73 -69
- package/dist/interfaces/views.js +7 -0
- package/dist/websocket.d.ts +18 -1
- package/dist/websocket.js +24 -0
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, GetCommentsResponse, ListCommentReports, ListCommentReportsResponse, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
1
|
+
import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComment, GetComments, GetCommentsResponse, ListCommentReports, ListCommentReportsResponse, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
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
|
+
import { CreateCustomEmoji, DeleteCustomEmoji, EditCustomEmoji } from "./interfaces/api/custom_emoji";
|
3
4
|
import { AddAdmin, AddAdminResponse, BannedPersonsResponse, BanPerson, BanPersonResponse, BlockPerson, BlockPersonResponse, ChangePassword, CreatePrivateMessage, CreatePrivateMessageReport, DeleteAccount, DeleteAccountResponse, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, GetCaptchaResponse, GetPersonDetails, GetPersonDetailsResponse, GetPersonMentions, GetPersonMentionsResponse, GetPrivateMessages, GetReplies, GetRepliesResponse, GetReportCount, GetReportCountResponse, GetUnreadCount, GetUnreadCountResponse, ListPrivateMessageReports, ListPrivateMessageReportsResponse, Login, LoginResponse, MarkAllAsRead, MarkCommentReplyAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, PasswordResetResponse, PersonMentionResponse, PrivateMessageReportResponse, PrivateMessageResponse, PrivateMessagesResponse, Register, ResolvePrivateMessageReport, SaveUserSettings, VerifyEmail, VerifyEmailResponse } from "./interfaces/api/person";
|
4
5
|
import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, FeaturePost, GetPost, GetPostResponse, GetPosts, GetPostsResponse, GetSiteMetadata, GetSiteMetadataResponse, ListPostReports, ListPostReportsResponse, LockPost, MarkPostAsRead, PostReportResponse, PostResponse, RemovePost, ResolvePostReport, SavePost } from "./interfaces/api/post";
|
5
6
|
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";
|
@@ -265,6 +266,12 @@ export declare class LemmyHttp {
|
|
265
266
|
* `HTTP.GET /comment/list`
|
266
267
|
*/
|
267
268
|
getComments(form: GetComments): Promise<GetCommentsResponse>;
|
269
|
+
/**
|
270
|
+
* Get / fetch comment.
|
271
|
+
*
|
272
|
+
* `HTTP.GET /comment`
|
273
|
+
*/
|
274
|
+
getComment(form: GetComment): Promise<CommentResponse>;
|
268
275
|
/**
|
269
276
|
* Report a comment.
|
270
277
|
*
|
@@ -493,6 +500,24 @@ export declare class LemmyHttp {
|
|
493
500
|
* `HTTP.POST /admin/purge/comment`
|
494
501
|
*/
|
495
502
|
purgeComment(form: PurgeComment): Promise<PurgeItemResponse>;
|
503
|
+
/**
|
504
|
+
* Create a new custom emoji
|
505
|
+
*
|
506
|
+
* `HTTP.POST /custom_emoji`
|
507
|
+
*/
|
508
|
+
createCustomEmoji(form: CreateCustomEmoji): Promise<unknown>;
|
509
|
+
/**
|
510
|
+
* Edit an existing custom emoji
|
511
|
+
*
|
512
|
+
* `HTTP.PUT /custom_emoji`
|
513
|
+
*/
|
514
|
+
editCustomEmoji(form: EditCustomEmoji): Promise<unknown>;
|
515
|
+
/**
|
516
|
+
* Delete a custom emoji
|
517
|
+
*
|
518
|
+
* `HTTP.Post /custom_emoji/delete`
|
519
|
+
*/
|
520
|
+
deleteCustomEmoji(form: DeleteCustomEmoji): Promise<unknown>;
|
496
521
|
/**
|
497
522
|
* Upload an image to the server.
|
498
523
|
*/
|
package/dist/http.js
CHANGED
@@ -405,6 +405,14 @@ var LemmyHttp = /** @class */ (function () {
|
|
405
405
|
LemmyHttp.prototype.getComments = function (form) {
|
406
406
|
return this.wrapper(HttpType.Get, "/comment/list", form);
|
407
407
|
};
|
408
|
+
/**
|
409
|
+
* Get / fetch comment.
|
410
|
+
*
|
411
|
+
* `HTTP.GET /comment`
|
412
|
+
*/
|
413
|
+
LemmyHttp.prototype.getComment = function (form) {
|
414
|
+
return this.wrapper(HttpType.Get, "/comment", form);
|
415
|
+
};
|
408
416
|
/**
|
409
417
|
* Report a comment.
|
410
418
|
*
|
@@ -709,6 +717,42 @@ var LemmyHttp = /** @class */ (function () {
|
|
709
717
|
LemmyHttp.prototype.purgeComment = function (form) {
|
710
718
|
return this.wrapper(HttpType.Post, "/admin/purge/comment", form);
|
711
719
|
};
|
720
|
+
/**
|
721
|
+
* Create a new custom emoji
|
722
|
+
*
|
723
|
+
* `HTTP.POST /custom_emoji`
|
724
|
+
*/
|
725
|
+
LemmyHttp.prototype.createCustomEmoji = function (form) {
|
726
|
+
return __awaiter(this, void 0, void 0, function () {
|
727
|
+
return __generator(this, function (_a) {
|
728
|
+
return [2 /*return*/, this.wrapper(HttpType.Post, "/custom_emoji", form)];
|
729
|
+
});
|
730
|
+
});
|
731
|
+
};
|
732
|
+
/**
|
733
|
+
* Edit an existing custom emoji
|
734
|
+
*
|
735
|
+
* `HTTP.PUT /custom_emoji`
|
736
|
+
*/
|
737
|
+
LemmyHttp.prototype.editCustomEmoji = function (form) {
|
738
|
+
return __awaiter(this, void 0, void 0, function () {
|
739
|
+
return __generator(this, function (_a) {
|
740
|
+
return [2 /*return*/, this.wrapper(HttpType.Put, "/custom_emoji", form)];
|
741
|
+
});
|
742
|
+
});
|
743
|
+
};
|
744
|
+
/**
|
745
|
+
* Delete a custom emoji
|
746
|
+
*
|
747
|
+
* `HTTP.Post /custom_emoji/delete`
|
748
|
+
*/
|
749
|
+
LemmyHttp.prototype.deleteCustomEmoji = function (form) {
|
750
|
+
return __awaiter(this, void 0, void 0, function () {
|
751
|
+
return __generator(this, function (_a) {
|
752
|
+
return [2 /*return*/, this.wrapper(HttpType.Post, "/custom_emoji/delete", form)];
|
753
|
+
});
|
754
|
+
});
|
755
|
+
};
|
712
756
|
/**
|
713
757
|
* Upload an image to the server.
|
714
758
|
*/
|
@@ -82,6 +82,10 @@ export interface GetComments {
|
|
82
82
|
export interface GetCommentsResponse {
|
83
83
|
comments: CommentView[];
|
84
84
|
}
|
85
|
+
export interface GetComment {
|
86
|
+
id: number;
|
87
|
+
auth?: string;
|
88
|
+
}
|
85
89
|
export interface CreateCommentReport {
|
86
90
|
comment_id: number;
|
87
91
|
reason: string;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ListingType, SortType } from "../others";
|
2
2
|
import { Site } from "../source";
|
3
|
-
import { CommunityModeratorView, CommunityView,
|
3
|
+
import { CommunityModeratorView, CommunityView, PersonView } from "../views";
|
4
4
|
/**
|
5
5
|
* You can use either `id` or `name` as an id.
|
6
6
|
*
|
@@ -60,7 +60,7 @@ export interface BanFromCommunity {
|
|
60
60
|
auth: string;
|
61
61
|
}
|
62
62
|
export interface BanFromCommunityResponse {
|
63
|
-
person_view:
|
63
|
+
person_view: PersonView;
|
64
64
|
banned: boolean;
|
65
65
|
}
|
66
66
|
export interface AddModToCommunity {
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { CustomEmojiView } from "../views";
|
2
|
+
export declare class CreateCustomEmoji {
|
3
|
+
category: string;
|
4
|
+
shortcode: string;
|
5
|
+
image_url: string;
|
6
|
+
alt_text: string;
|
7
|
+
keywords: string[];
|
8
|
+
auth: string;
|
9
|
+
constructor(init: CreateCustomEmoji);
|
10
|
+
}
|
11
|
+
export declare class EditCustomEmoji {
|
12
|
+
id: number;
|
13
|
+
category: string;
|
14
|
+
image_url: string;
|
15
|
+
alt_text: string;
|
16
|
+
keywords: string[];
|
17
|
+
auth: string;
|
18
|
+
constructor(init: EditCustomEmoji);
|
19
|
+
}
|
20
|
+
export declare class DeleteCustomEmoji {
|
21
|
+
id: number;
|
22
|
+
auth: string;
|
23
|
+
constructor(init: DeleteCustomEmoji);
|
24
|
+
}
|
25
|
+
export declare class DeleteCustomEmojiResponse {
|
26
|
+
id: number;
|
27
|
+
success: boolean;
|
28
|
+
constructor(init: DeleteCustomEmojiResponse);
|
29
|
+
}
|
30
|
+
export declare class CustomEmojiResponse {
|
31
|
+
custom_emoji: CustomEmojiView;
|
32
|
+
constructor(init: CustomEmojiResponse);
|
33
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CustomEmojiResponse = exports.DeleteCustomEmojiResponse = exports.DeleteCustomEmoji = exports.EditCustomEmoji = exports.CreateCustomEmoji = void 0;
|
4
|
+
var CreateCustomEmoji = /** @class */ (function () {
|
5
|
+
function CreateCustomEmoji(init) {
|
6
|
+
Object.assign(this, init);
|
7
|
+
}
|
8
|
+
return CreateCustomEmoji;
|
9
|
+
}());
|
10
|
+
exports.CreateCustomEmoji = CreateCustomEmoji;
|
11
|
+
var EditCustomEmoji = /** @class */ (function () {
|
12
|
+
function EditCustomEmoji(init) {
|
13
|
+
Object.assign(this, init);
|
14
|
+
}
|
15
|
+
return EditCustomEmoji;
|
16
|
+
}());
|
17
|
+
exports.EditCustomEmoji = EditCustomEmoji;
|
18
|
+
var DeleteCustomEmoji = /** @class */ (function () {
|
19
|
+
function DeleteCustomEmoji(init) {
|
20
|
+
Object.assign(this, init);
|
21
|
+
}
|
22
|
+
return DeleteCustomEmoji;
|
23
|
+
}());
|
24
|
+
exports.DeleteCustomEmoji = DeleteCustomEmoji;
|
25
|
+
var DeleteCustomEmojiResponse = /** @class */ (function () {
|
26
|
+
function DeleteCustomEmojiResponse(init) {
|
27
|
+
Object.assign(this, init);
|
28
|
+
}
|
29
|
+
return DeleteCustomEmojiResponse;
|
30
|
+
}());
|
31
|
+
exports.DeleteCustomEmojiResponse = DeleteCustomEmojiResponse;
|
32
|
+
var CustomEmojiResponse = /** @class */ (function () {
|
33
|
+
function CustomEmojiResponse(init) {
|
34
|
+
Object.assign(this, init);
|
35
|
+
}
|
36
|
+
return CustomEmojiResponse;
|
37
|
+
}());
|
38
|
+
exports.CustomEmojiResponse = CustomEmojiResponse;
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
__exportStar(require("./comment"), exports);
|
18
18
|
__exportStar(require("./community"), exports);
|
19
|
+
__exportStar(require("./custom_emoji"), exports);
|
19
20
|
__exportStar(require("./person"), exports);
|
20
21
|
__exportStar(require("./post"), exports);
|
21
22
|
__exportStar(require("./site"), exports);
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { CommentSortType, SortType } from "../others";
|
2
|
-
import { CommentReplyView, CommentView, CommunityModeratorView, PersonMentionView,
|
1
|
+
import { CommentSortType, ListingType, SortType } from "../others";
|
2
|
+
import { CommentReplyView, CommentView, CommunityModeratorView, PersonMentionView, PersonView, PostView, PrivateMessageReportView, PrivateMessageView } from "../views";
|
3
3
|
export interface Login {
|
4
4
|
username_or_email: string;
|
5
5
|
password: string;
|
@@ -66,13 +66,13 @@ export interface SaveUserSettings {
|
|
66
66
|
*
|
67
67
|
* The Sort types from above, zero indexed as a number
|
68
68
|
*/
|
69
|
-
default_sort_type?:
|
69
|
+
default_sort_type?: SortType;
|
70
70
|
/**
|
71
71
|
* The [[ListingType]].
|
72
72
|
*
|
73
73
|
* Post listing types are `All, Subscribed, Community`
|
74
74
|
*/
|
75
|
-
default_listing_type?:
|
75
|
+
default_listing_type?: ListingType;
|
76
76
|
interface_language?: string;
|
77
77
|
avatar?: string;
|
78
78
|
banner?: string;
|
@@ -130,7 +130,7 @@ export interface GetPersonDetails {
|
|
130
130
|
auth?: string;
|
131
131
|
}
|
132
132
|
export interface GetPersonDetailsResponse {
|
133
|
-
person_view:
|
133
|
+
person_view: PersonView;
|
134
134
|
comments: CommentView[];
|
135
135
|
posts: PostView[];
|
136
136
|
moderates: CommunityModeratorView[];
|
@@ -150,7 +150,7 @@ export interface AddAdmin {
|
|
150
150
|
auth: string;
|
151
151
|
}
|
152
152
|
export interface AddAdminResponse {
|
153
|
-
admins:
|
153
|
+
admins: PersonView[];
|
154
154
|
}
|
155
155
|
export interface BanPerson {
|
156
156
|
person_id: number;
|
@@ -167,7 +167,7 @@ export interface BanPerson {
|
|
167
167
|
auth: string;
|
168
168
|
}
|
169
169
|
export interface BanPersonResponse {
|
170
|
-
person_view:
|
170
|
+
person_view: PersonView;
|
171
171
|
banned: boolean;
|
172
172
|
}
|
173
173
|
export interface GetReplies {
|
@@ -305,12 +305,12 @@ export interface BlockPerson {
|
|
305
305
|
auth: string;
|
306
306
|
}
|
307
307
|
export interface BlockPersonResponse {
|
308
|
-
person_view:
|
308
|
+
person_view: PersonView;
|
309
309
|
blocked: boolean;
|
310
310
|
}
|
311
311
|
export interface GetBannedPersons {
|
312
312
|
auth: string;
|
313
313
|
}
|
314
314
|
export interface BannedPersonsResponse {
|
315
|
-
banned:
|
315
|
+
banned: PersonView[];
|
316
316
|
}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { ListingType, ModlogActionType, SearchType, SortType } from "../others";
|
2
|
-
import { Language,
|
3
|
-
import { AdminPurgeCommentView, AdminPurgeCommunityView, AdminPurgePersonView, AdminPurgePostView, CommentView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, CommunityView, LocalUserSettingsView, ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModFeaturePostView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView, ModRemovePostView, ModTransferCommunityView, PersonBlockView,
|
1
|
+
import { ListingType, ModlogActionType, RegistrationMode, SearchType, SortType } from "../others";
|
2
|
+
import { Language, Tagline } from "../source";
|
3
|
+
import { AdminPurgeCommentView, AdminPurgeCommunityView, AdminPurgePersonView, AdminPurgePostView, CommentView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, CommunityView, CustomEmojiView, LocalUserSettingsView, ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModFeaturePostView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView, ModRemovePostView, ModTransferCommunityView, PersonBlockView, PersonView, PostView, RegistrationApplicationView, SiteView } from "../views";
|
4
4
|
/**
|
5
5
|
* Search lemmy for different types of data.
|
6
6
|
*/
|
@@ -27,7 +27,7 @@ export interface SearchResponse {
|
|
27
27
|
comments: CommentView[];
|
28
28
|
posts: PostView[];
|
29
29
|
communities: CommunityView[];
|
30
|
-
users:
|
30
|
+
users: PersonView[];
|
31
31
|
}
|
32
32
|
export interface GetModlog {
|
33
33
|
mod_person_id?: number;
|
@@ -68,7 +68,7 @@ export interface CreateSite {
|
|
68
68
|
application_question?: string;
|
69
69
|
private_instance?: boolean;
|
70
70
|
default_theme?: string;
|
71
|
-
default_post_listing_type?:
|
71
|
+
default_post_listing_type?: ListingType;
|
72
72
|
application_email_admins?: boolean;
|
73
73
|
reports_email_admins?: boolean;
|
74
74
|
hide_modlog_mod_names?: boolean;
|
@@ -112,7 +112,7 @@ export interface EditSite {
|
|
112
112
|
application_question?: string;
|
113
113
|
private_instance?: boolean;
|
114
114
|
default_theme?: string;
|
115
|
-
default_post_listing_type?:
|
115
|
+
default_post_listing_type?: ListingType;
|
116
116
|
legal_information?: string;
|
117
117
|
application_email_admins?: boolean;
|
118
118
|
reports_email_admins?: boolean;
|
@@ -150,7 +150,7 @@ export interface SiteResponse {
|
|
150
150
|
}
|
151
151
|
export interface GetSiteResponse {
|
152
152
|
site_view: SiteView;
|
153
|
-
admins:
|
153
|
+
admins: PersonView[];
|
154
154
|
online: number;
|
155
155
|
version: string;
|
156
156
|
/**
|
@@ -160,7 +160,8 @@ export interface GetSiteResponse {
|
|
160
160
|
federated_instances?: FederatedInstances;
|
161
161
|
all_languages: Language[];
|
162
162
|
discussion_languages: number[];
|
163
|
-
taglines
|
163
|
+
taglines: Tagline[];
|
164
|
+
custom_emojis: CustomEmojiView[];
|
164
165
|
}
|
165
166
|
/**
|
166
167
|
* Your user info, such as blocks, follows, etc.
|
@@ -189,7 +190,7 @@ export interface ResolveObjectResponse {
|
|
189
190
|
comment?: CommentView;
|
190
191
|
post?: PostView;
|
191
192
|
community?: CommunityView;
|
192
|
-
person?:
|
193
|
+
person?: PersonView;
|
193
194
|
}
|
194
195
|
export interface PurgePerson {
|
195
196
|
person_id: number;
|
@@ -67,25 +67,29 @@ export declare enum UserOperation {
|
|
67
67
|
GetPrivateMessages = 60,
|
68
68
|
UserJoin = 61,
|
69
69
|
GetComments = 62,
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
70
|
+
GetComment = 63,
|
71
|
+
PostJoin = 64,
|
72
|
+
CommunityJoin = 65,
|
73
|
+
ChangePassword = 66,
|
74
|
+
GetSiteMetadata = 67,
|
75
|
+
BlockCommunity = 68,
|
76
|
+
BlockPerson = 69,
|
77
|
+
PurgePerson = 70,
|
78
|
+
PurgeCommunity = 71,
|
79
|
+
PurgePost = 72,
|
80
|
+
PurgeComment = 73,
|
81
|
+
CreateCommentReport = 74,
|
82
|
+
ResolveCommentReport = 75,
|
83
|
+
ListCommentReports = 76,
|
84
|
+
CreatePostReport = 77,
|
85
|
+
ResolvePostReport = 78,
|
86
|
+
ListPostReports = 79,
|
87
|
+
GetReportCount = 80,
|
88
|
+
GetUnreadCount = 81,
|
89
|
+
VerifyEmail = 82,
|
90
|
+
CreateCustomEmoji = 83,
|
91
|
+
EditCustomEmoji = 84,
|
92
|
+
DeleteCustomEmoji = 85
|
89
93
|
}
|
90
94
|
/**
|
91
95
|
* Different post sort types used in lemmy.
|
@@ -166,6 +170,14 @@ export declare enum ListingType {
|
|
166
170
|
Subscribed = "Subscribed",
|
167
171
|
Community = "Community"
|
168
172
|
}
|
173
|
+
/**
|
174
|
+
* The different types of registration modes
|
175
|
+
*/
|
176
|
+
export declare enum RegistrationMode {
|
177
|
+
Closed = "Closed",
|
178
|
+
RequireApplication = "RequireApplication",
|
179
|
+
Open = "Open"
|
180
|
+
}
|
169
181
|
/**
|
170
182
|
* Search types for lemmy's search.
|
171
183
|
*/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.PostFeatureType = exports.SubscribedType = exports.ModlogActionType = exports.SearchType = exports.ListingType = exports.CommentSortType = exports.SortType = exports.UserOperation = exports.VERSION = void 0;
|
3
|
+
exports.PostFeatureType = exports.SubscribedType = exports.ModlogActionType = exports.SearchType = exports.RegistrationMode = exports.ListingType = exports.CommentSortType = exports.SortType = exports.UserOperation = exports.VERSION = void 0;
|
4
4
|
exports.VERSION = "v3";
|
5
5
|
/**
|
6
6
|
* All of the websocket operations available.
|
@@ -70,25 +70,29 @@ var UserOperation;
|
|
70
70
|
UserOperation[UserOperation["GetPrivateMessages"] = 60] = "GetPrivateMessages";
|
71
71
|
UserOperation[UserOperation["UserJoin"] = 61] = "UserJoin";
|
72
72
|
UserOperation[UserOperation["GetComments"] = 62] = "GetComments";
|
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["
|
84
|
-
UserOperation[UserOperation["
|
85
|
-
UserOperation[UserOperation["
|
86
|
-
UserOperation[UserOperation["
|
87
|
-
UserOperation[UserOperation["
|
88
|
-
UserOperation[UserOperation["
|
89
|
-
UserOperation[UserOperation["
|
90
|
-
UserOperation[UserOperation["
|
91
|
-
UserOperation[UserOperation["
|
73
|
+
UserOperation[UserOperation["GetComment"] = 63] = "GetComment";
|
74
|
+
UserOperation[UserOperation["PostJoin"] = 64] = "PostJoin";
|
75
|
+
UserOperation[UserOperation["CommunityJoin"] = 65] = "CommunityJoin";
|
76
|
+
UserOperation[UserOperation["ChangePassword"] = 66] = "ChangePassword";
|
77
|
+
UserOperation[UserOperation["GetSiteMetadata"] = 67] = "GetSiteMetadata";
|
78
|
+
UserOperation[UserOperation["BlockCommunity"] = 68] = "BlockCommunity";
|
79
|
+
UserOperation[UserOperation["BlockPerson"] = 69] = "BlockPerson";
|
80
|
+
UserOperation[UserOperation["PurgePerson"] = 70] = "PurgePerson";
|
81
|
+
UserOperation[UserOperation["PurgeCommunity"] = 71] = "PurgeCommunity";
|
82
|
+
UserOperation[UserOperation["PurgePost"] = 72] = "PurgePost";
|
83
|
+
UserOperation[UserOperation["PurgeComment"] = 73] = "PurgeComment";
|
84
|
+
UserOperation[UserOperation["CreateCommentReport"] = 74] = "CreateCommentReport";
|
85
|
+
UserOperation[UserOperation["ResolveCommentReport"] = 75] = "ResolveCommentReport";
|
86
|
+
UserOperation[UserOperation["ListCommentReports"] = 76] = "ListCommentReports";
|
87
|
+
UserOperation[UserOperation["CreatePostReport"] = 77] = "CreatePostReport";
|
88
|
+
UserOperation[UserOperation["ResolvePostReport"] = 78] = "ResolvePostReport";
|
89
|
+
UserOperation[UserOperation["ListPostReports"] = 79] = "ListPostReports";
|
90
|
+
UserOperation[UserOperation["GetReportCount"] = 80] = "GetReportCount";
|
91
|
+
UserOperation[UserOperation["GetUnreadCount"] = 81] = "GetUnreadCount";
|
92
|
+
UserOperation[UserOperation["VerifyEmail"] = 82] = "VerifyEmail";
|
93
|
+
UserOperation[UserOperation["CreateCustomEmoji"] = 83] = "CreateCustomEmoji";
|
94
|
+
UserOperation[UserOperation["EditCustomEmoji"] = 84] = "EditCustomEmoji";
|
95
|
+
UserOperation[UserOperation["DeleteCustomEmoji"] = 85] = "DeleteCustomEmoji";
|
92
96
|
})(UserOperation = exports.UserOperation || (exports.UserOperation = {}));
|
93
97
|
/**
|
94
98
|
* Different post sort types used in lemmy.
|
@@ -167,11 +171,21 @@ var CommentSortType;
|
|
167
171
|
*/
|
168
172
|
var ListingType;
|
169
173
|
(function (ListingType) {
|
174
|
+
// TODO do these need to be strings?
|
170
175
|
ListingType["All"] = "All";
|
171
176
|
ListingType["Local"] = "Local";
|
172
177
|
ListingType["Subscribed"] = "Subscribed";
|
173
178
|
ListingType["Community"] = "Community";
|
174
179
|
})(ListingType = exports.ListingType || (exports.ListingType = {}));
|
180
|
+
/**
|
181
|
+
* The different types of registration modes
|
182
|
+
*/
|
183
|
+
var RegistrationMode;
|
184
|
+
(function (RegistrationMode) {
|
185
|
+
RegistrationMode["Closed"] = "Closed";
|
186
|
+
RegistrationMode["RequireApplication"] = "RequireApplication";
|
187
|
+
RegistrationMode["Open"] = "Open";
|
188
|
+
})(RegistrationMode = exports.RegistrationMode || (exports.RegistrationMode = {}));
|
175
189
|
/**
|
176
190
|
* Search types for lemmy's search.
|
177
191
|
*/
|
@@ -1,11 +1,12 @@
|
|
1
|
+
import { ListingType, RegistrationMode, SortType } from "./others";
|
1
2
|
export interface LocalUserSettings {
|
2
3
|
id: number;
|
3
4
|
person_id: number;
|
4
5
|
email?: string;
|
5
6
|
show_nsfw: boolean;
|
6
7
|
theme: string;
|
7
|
-
default_sort_type:
|
8
|
-
default_listing_type:
|
8
|
+
default_sort_type: SortType;
|
9
|
+
default_listing_type: ListingType;
|
9
10
|
interface_language: string;
|
10
11
|
show_avatars: boolean;
|
11
12
|
send_notifications_to_email: boolean;
|
@@ -21,7 +22,7 @@ export interface LocalUserSettings {
|
|
21
22
|
*/
|
22
23
|
totp_2fa_url?: string;
|
23
24
|
}
|
24
|
-
export interface
|
25
|
+
export interface Person {
|
25
26
|
id: number;
|
26
27
|
name: string;
|
27
28
|
display_name?: string;
|
@@ -58,11 +59,6 @@ export interface Site {
|
|
58
59
|
public_key: string;
|
59
60
|
instance_id: number;
|
60
61
|
}
|
61
|
-
export declare enum RegistrationMode {
|
62
|
-
Closed = "closed",
|
63
|
-
RequireApplication = "requireapplication",
|
64
|
-
Open = "open"
|
65
|
-
}
|
66
62
|
export interface LocalSite {
|
67
63
|
id: number;
|
68
64
|
site_id: number;
|
@@ -75,7 +71,7 @@ export interface LocalSite {
|
|
75
71
|
application_question?: string;
|
76
72
|
private_instance: boolean;
|
77
73
|
default_theme: string;
|
78
|
-
default_post_listing_type:
|
74
|
+
default_post_listing_type: ListingType;
|
79
75
|
legal_information?: string;
|
80
76
|
hide_modlog_mod_names: boolean;
|
81
77
|
application_email_admins: boolean;
|
@@ -167,7 +163,7 @@ export interface ModRemovePost {
|
|
167
163
|
mod_person_id: number;
|
168
164
|
post_id: number;
|
169
165
|
reason?: string;
|
170
|
-
removed
|
166
|
+
removed: boolean;
|
171
167
|
when_: string;
|
172
168
|
}
|
173
169
|
export interface ModLockPost {
|
@@ -190,7 +186,7 @@ export interface ModRemoveComment {
|
|
190
186
|
mod_person_id: number;
|
191
187
|
comment_id: number;
|
192
188
|
reason?: string;
|
193
|
-
removed
|
189
|
+
removed: boolean;
|
194
190
|
when_: string;
|
195
191
|
}
|
196
192
|
export interface ModRemoveCommunity {
|
@@ -198,7 +194,7 @@ export interface ModRemoveCommunity {
|
|
198
194
|
mod_person_id: number;
|
199
195
|
community_id: number;
|
200
196
|
reason?: string;
|
201
|
-
removed
|
197
|
+
removed: boolean;
|
202
198
|
expires?: string;
|
203
199
|
when_: string;
|
204
200
|
}
|
@@ -226,7 +222,7 @@ export interface ModAddCommunity {
|
|
226
222
|
mod_person_id: number;
|
227
223
|
other_person_id: number;
|
228
224
|
community_id: number;
|
229
|
-
removed
|
225
|
+
removed: boolean;
|
230
226
|
when_: string;
|
231
227
|
}
|
232
228
|
export interface ModTransferCommunity {
|
@@ -234,14 +230,13 @@ export interface ModTransferCommunity {
|
|
234
230
|
mod_person_id: number;
|
235
231
|
other_person_id: number;
|
236
232
|
community_id: number;
|
237
|
-
removed?: boolean;
|
238
233
|
when_: string;
|
239
234
|
}
|
240
235
|
export interface ModAdd {
|
241
236
|
id: number;
|
242
237
|
mod_person_id: number;
|
243
238
|
other_person_id: number;
|
244
|
-
removed
|
239
|
+
removed: boolean;
|
245
240
|
when_: string;
|
246
241
|
}
|
247
242
|
export interface AdminPurgePerson {
|
@@ -270,7 +265,7 @@ export interface AdminPurgeComment {
|
|
270
265
|
reason?: string;
|
271
266
|
when_: string;
|
272
267
|
}
|
273
|
-
export interface
|
268
|
+
export interface Community {
|
274
269
|
id: number;
|
275
270
|
name: string;
|
276
271
|
title: string;
|
@@ -359,3 +354,18 @@ export interface Tagline {
|
|
359
354
|
published: string;
|
360
355
|
updated?: string;
|
361
356
|
}
|
357
|
+
export declare class CustomEmoji {
|
358
|
+
id: number;
|
359
|
+
local_site_id: number;
|
360
|
+
shortcode: string;
|
361
|
+
image_url: string;
|
362
|
+
alt_text: string;
|
363
|
+
category: string;
|
364
|
+
published: string;
|
365
|
+
updated: string;
|
366
|
+
}
|
367
|
+
export declare class CustomEmojiKeyword {
|
368
|
+
id: number;
|
369
|
+
custom_emoji_id: number;
|
370
|
+
keyword: string;
|
371
|
+
}
|
@@ -1,9 +1,15 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
var
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
3
|
+
exports.CustomEmojiKeyword = exports.CustomEmoji = void 0;
|
4
|
+
var CustomEmoji = /** @class */ (function () {
|
5
|
+
function CustomEmoji() {
|
6
|
+
}
|
7
|
+
return CustomEmoji;
|
8
|
+
}());
|
9
|
+
exports.CustomEmoji = CustomEmoji;
|
10
|
+
var CustomEmojiKeyword = /** @class */ (function () {
|
11
|
+
function CustomEmojiKeyword() {
|
12
|
+
}
|
13
|
+
return CustomEmojiKeyword;
|
14
|
+
}());
|
15
|
+
exports.CustomEmojiKeyword = CustomEmojiKeyword;
|
@@ -1,17 +1,17 @@
|
|
1
1
|
import { CommentAggregates, CommunityAggregates, PersonAggregates, PostAggregates, SiteAggregates } from "./aggregates";
|
2
2
|
import { SubscribedType } from "./others";
|
3
|
-
import { AdminPurgeComment, AdminPurgeCommunity, AdminPurgePerson, AdminPurgePost, Comment, CommentReply, CommentReport,
|
4
|
-
export interface
|
5
|
-
person:
|
3
|
+
import { AdminPurgeComment, AdminPurgeCommunity, AdminPurgePerson, AdminPurgePost, Comment, CommentReply, CommentReport, Community, CustomEmoji, CustomEmojiKeyword, LocalSite, LocalSiteRateLimit, LocalUserSettings, ModAdd, ModAddCommunity, ModBan, ModBanFromCommunity, ModFeaturePost, ModLockPost, ModRemoveComment, ModRemoveCommunity, ModRemovePost, ModTransferCommunity, Person, PersonMention, Post, PostReport, PrivateMessage, PrivateMessageReport, RegistrationApplication, Site, Tagline } from "./source";
|
4
|
+
export interface PersonView {
|
5
|
+
person: Person;
|
6
6
|
counts: PersonAggregates;
|
7
7
|
}
|
8
8
|
export interface PersonMentionView {
|
9
9
|
person_mention: PersonMention;
|
10
10
|
comment: Comment;
|
11
|
-
creator:
|
11
|
+
creator: Person;
|
12
12
|
post: Post;
|
13
|
-
community:
|
14
|
-
recipient:
|
13
|
+
community: Community;
|
14
|
+
recipient: Person;
|
15
15
|
counts: CommentAggregates;
|
16
16
|
creator_banned_from_community: boolean;
|
17
17
|
subscribed: SubscribedType;
|
@@ -21,7 +21,7 @@ export interface PersonMentionView {
|
|
21
21
|
}
|
22
22
|
export interface LocalUserSettingsView {
|
23
23
|
local_user: LocalUserSettings;
|
24
|
-
person:
|
24
|
+
person: Person;
|
25
25
|
counts: PersonAggregates;
|
26
26
|
}
|
27
27
|
export interface SiteView {
|
@@ -33,13 +33,13 @@ export interface SiteView {
|
|
33
33
|
}
|
34
34
|
export interface PrivateMessageView {
|
35
35
|
private_message: PrivateMessage;
|
36
|
-
creator:
|
37
|
-
recipient:
|
36
|
+
creator: Person;
|
37
|
+
recipient: Person;
|
38
38
|
}
|
39
39
|
export interface PostView {
|
40
40
|
post: Post;
|
41
|
-
creator:
|
42
|
-
community:
|
41
|
+
creator: Person;
|
42
|
+
community: Community;
|
43
43
|
creator_banned_from_community: boolean;
|
44
44
|
counts: PostAggregates;
|
45
45
|
subscribed: SubscribedType;
|
@@ -52,19 +52,19 @@ export interface PostView {
|
|
52
52
|
export interface PostReportView {
|
53
53
|
post_report: PostReport;
|
54
54
|
post: Post;
|
55
|
-
community:
|
56
|
-
creator:
|
57
|
-
post_creator:
|
55
|
+
community: Community;
|
56
|
+
creator: Person;
|
57
|
+
post_creator: Person;
|
58
58
|
creator_banned_from_community: boolean;
|
59
59
|
my_vote?: number;
|
60
60
|
counts: PostAggregates;
|
61
|
-
resolver?:
|
61
|
+
resolver?: Person;
|
62
62
|
}
|
63
63
|
export interface CommentView {
|
64
64
|
comment: Comment;
|
65
|
-
creator:
|
65
|
+
creator: Person;
|
66
66
|
post: Post;
|
67
|
-
community:
|
67
|
+
community: Community;
|
68
68
|
counts: CommentAggregates;
|
69
69
|
creator_banned_from_community: boolean;
|
70
70
|
subscribed: SubscribedType;
|
@@ -75,10 +75,10 @@ export interface CommentView {
|
|
75
75
|
export interface CommentReplyView {
|
76
76
|
comment_reply: CommentReply;
|
77
77
|
comment: Comment;
|
78
|
-
creator:
|
78
|
+
creator: Person;
|
79
79
|
post: Post;
|
80
|
-
community:
|
81
|
-
recipient:
|
80
|
+
community: Community;
|
81
|
+
recipient: Person;
|
82
82
|
counts: CommentAggregates;
|
83
83
|
creator_banned_from_community: boolean;
|
84
84
|
subscribed: SubscribedType;
|
@@ -90,113 +90,113 @@ export interface CommentReportView {
|
|
90
90
|
comment_report: CommentReport;
|
91
91
|
comment: Comment;
|
92
92
|
post: Post;
|
93
|
-
community:
|
94
|
-
creator:
|
95
|
-
comment_creator:
|
93
|
+
community: Community;
|
94
|
+
creator: Person;
|
95
|
+
comment_creator: Person;
|
96
96
|
counts: CommentAggregates;
|
97
97
|
creator_banned_from_community: boolean;
|
98
98
|
my_vote?: number;
|
99
|
-
resolver?:
|
99
|
+
resolver?: Person;
|
100
100
|
}
|
101
101
|
export interface ModAddCommunityView {
|
102
102
|
mod_add_community: ModAddCommunity;
|
103
|
-
moderator?:
|
104
|
-
community:
|
105
|
-
modded_person:
|
103
|
+
moderator?: Person;
|
104
|
+
community: Community;
|
105
|
+
modded_person: Person;
|
106
106
|
}
|
107
107
|
export interface ModTransferCommunityView {
|
108
108
|
mod_transfer_community: ModTransferCommunity;
|
109
|
-
moderator?:
|
110
|
-
community:
|
111
|
-
modded_person:
|
109
|
+
moderator?: Person;
|
110
|
+
community: Community;
|
111
|
+
modded_person: Person;
|
112
112
|
}
|
113
113
|
export interface ModAddView {
|
114
114
|
mod_add: ModAdd;
|
115
|
-
moderator?:
|
116
|
-
modded_person:
|
115
|
+
moderator?: Person;
|
116
|
+
modded_person: Person;
|
117
117
|
}
|
118
118
|
export interface ModBanFromCommunityView {
|
119
119
|
mod_ban_from_community: ModBanFromCommunity;
|
120
|
-
moderator?:
|
121
|
-
community:
|
122
|
-
banned_person:
|
120
|
+
moderator?: Person;
|
121
|
+
community: Community;
|
122
|
+
banned_person: Person;
|
123
123
|
}
|
124
124
|
export interface ModBanView {
|
125
125
|
mod_ban: ModBan;
|
126
|
-
moderator?:
|
127
|
-
banned_person:
|
126
|
+
moderator?: Person;
|
127
|
+
banned_person: Person;
|
128
128
|
}
|
129
129
|
export interface ModLockPostView {
|
130
130
|
mod_lock_post: ModLockPost;
|
131
|
-
moderator?:
|
131
|
+
moderator?: Person;
|
132
132
|
post: Post;
|
133
|
-
community:
|
133
|
+
community: Community;
|
134
134
|
}
|
135
135
|
export interface ModRemoveCommentView {
|
136
136
|
mod_remove_comment: ModRemoveComment;
|
137
|
-
moderator?:
|
137
|
+
moderator?: Person;
|
138
138
|
comment: Comment;
|
139
|
-
commenter:
|
139
|
+
commenter: Person;
|
140
140
|
post: Post;
|
141
|
-
community:
|
141
|
+
community: Community;
|
142
142
|
}
|
143
143
|
export interface ModRemoveCommunityView {
|
144
144
|
mod_remove_community: ModRemoveCommunity;
|
145
|
-
moderator?:
|
146
|
-
community:
|
145
|
+
moderator?: Person;
|
146
|
+
community: Community;
|
147
147
|
}
|
148
148
|
export interface ModRemovePostView {
|
149
149
|
mod_remove_post: ModRemovePost;
|
150
|
-
moderator?:
|
150
|
+
moderator?: Person;
|
151
151
|
post: Post;
|
152
|
-
community:
|
152
|
+
community: Community;
|
153
153
|
}
|
154
154
|
export interface ModFeaturePostView {
|
155
155
|
mod_feature_post: ModFeaturePost;
|
156
|
-
moderator?:
|
156
|
+
moderator?: Person;
|
157
157
|
post: Post;
|
158
|
-
community:
|
158
|
+
community: Community;
|
159
159
|
}
|
160
160
|
export interface AdminPurgeCommunityView {
|
161
161
|
admin_purge_community: AdminPurgeCommunity;
|
162
|
-
admin?:
|
162
|
+
admin?: Person;
|
163
163
|
}
|
164
164
|
export interface AdminPurgePersonView {
|
165
165
|
admin_purge_person: AdminPurgePerson;
|
166
|
-
admin?:
|
166
|
+
admin?: Person;
|
167
167
|
}
|
168
168
|
export interface AdminPurgePostView {
|
169
169
|
admin_purge_post: AdminPurgePost;
|
170
|
-
admin?:
|
171
|
-
community:
|
170
|
+
admin?: Person;
|
171
|
+
community: Community;
|
172
172
|
}
|
173
173
|
export interface AdminPurgeCommentView {
|
174
174
|
admin_purge_comment: AdminPurgeComment;
|
175
|
-
admin?:
|
175
|
+
admin?: Person;
|
176
176
|
post: Post;
|
177
177
|
}
|
178
178
|
export interface CommunityFollowerView {
|
179
|
-
community:
|
180
|
-
follower:
|
179
|
+
community: Community;
|
180
|
+
follower: Person;
|
181
181
|
}
|
182
182
|
export interface CommunityBlockView {
|
183
|
-
person:
|
184
|
-
community:
|
183
|
+
person: Person;
|
184
|
+
community: Community;
|
185
185
|
}
|
186
186
|
export interface CommunityModeratorView {
|
187
|
-
community:
|
188
|
-
moderator:
|
187
|
+
community: Community;
|
188
|
+
moderator: Person;
|
189
189
|
}
|
190
190
|
export interface CommunityPersonBanView {
|
191
|
-
community:
|
192
|
-
person:
|
191
|
+
community: Community;
|
192
|
+
person: Person;
|
193
193
|
}
|
194
194
|
export interface PersonBlockView {
|
195
|
-
person:
|
196
|
-
target:
|
195
|
+
person: Person;
|
196
|
+
target: Person;
|
197
197
|
}
|
198
198
|
export interface CommunityView {
|
199
|
-
community:
|
199
|
+
community: Community;
|
200
200
|
subscribed: SubscribedType;
|
201
201
|
blocked: boolean;
|
202
202
|
counts: CommunityAggregates;
|
@@ -204,8 +204,8 @@ export interface CommunityView {
|
|
204
204
|
export interface RegistrationApplicationView {
|
205
205
|
registration_application: RegistrationApplication;
|
206
206
|
creator_local_user: LocalUserSettings;
|
207
|
-
creator:
|
208
|
-
admin?:
|
207
|
+
creator: Person;
|
208
|
+
admin?: Person;
|
209
209
|
}
|
210
210
|
export interface CommentNode {
|
211
211
|
comment_view: CommentView | PersonMentionView | CommentReplyView;
|
@@ -215,7 +215,11 @@ export interface CommentNode {
|
|
215
215
|
export interface PrivateMessageReportView {
|
216
216
|
private_message_report: PrivateMessageReport;
|
217
217
|
private_message: PrivateMessage;
|
218
|
-
private_message_creator:
|
219
|
-
creator:
|
220
|
-
resolver?:
|
218
|
+
private_message_creator: Person;
|
219
|
+
creator: Person;
|
220
|
+
resolver?: Person;
|
221
|
+
}
|
222
|
+
export declare class CustomEmojiView {
|
223
|
+
custom_emoji: CustomEmoji;
|
224
|
+
keywords: CustomEmojiKeyword[];
|
221
225
|
}
|
package/dist/interfaces/views.js
CHANGED
@@ -1,2 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CustomEmojiView = void 0;
|
4
|
+
var CustomEmojiView = /** @class */ (function () {
|
5
|
+
function CustomEmojiView() {
|
6
|
+
}
|
7
|
+
return CustomEmojiView;
|
8
|
+
}());
|
9
|
+
exports.CustomEmojiView = CustomEmojiView;
|
package/dist/websocket.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
1
|
+
import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComment, GetComments, ListCommentReports, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
2
2
|
import { AddModToCommunity, BanFromCommunity, BlockCommunity, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, ListCommunities, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
|
3
|
+
import { CreateCustomEmoji, DeleteCustomEmoji, EditCustomEmoji } from "./interfaces/api/custom_emoji";
|
3
4
|
import { AddAdmin, BanPerson, BlockPerson, ChangePassword, CreatePrivateMessage, CreatePrivateMessageReport, DeleteAccount, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, GetPersonDetails, GetPersonMentions, GetPrivateMessages, GetReplies, GetReportCount, GetUnreadCount, ListPrivateMessageReports, Login, MarkAllAsRead, MarkCommentReplyAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, Register, ResolvePrivateMessageReport, SaveUserSettings, VerifyEmail } from "./interfaces/api/person";
|
4
5
|
import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, FeaturePost, GetPost, GetPosts, GetSiteMetadata, ListPostReports, LockPost, MarkPostAsRead, RemovePost, ResolvePostReport, SavePost } from "./interfaces/api/post";
|
5
6
|
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetSite, GetUnreadRegistrationApplicationCount, LeaveAdmin, ListRegistrationApplications, PurgeComment, PurgeCommunity, PurgePerson, PurgePost, ResolveObject, Search } from "./interfaces/api/site";
|
@@ -130,6 +131,10 @@ export declare class LemmyWebsocket {
|
|
130
131
|
* Get / fetch comments.
|
131
132
|
*/
|
132
133
|
getComments(form: GetComments): string;
|
134
|
+
/**
|
135
|
+
* Get / fetch comment.
|
136
|
+
*/
|
137
|
+
getComment(form: GetComment): string;
|
133
138
|
/**
|
134
139
|
* Like / vote on a post.
|
135
140
|
*/
|
@@ -350,6 +355,18 @@ export declare class LemmyWebsocket {
|
|
350
355
|
* Purge / Delete a comment from the database.
|
351
356
|
*/
|
352
357
|
purgeComment(form: PurgeComment): string;
|
358
|
+
/**
|
359
|
+
* Create a custom emoji
|
360
|
+
*/
|
361
|
+
createCustomEmoji(form: CreateCustomEmoji): string;
|
362
|
+
/**
|
363
|
+
* Edit a custom emoji
|
364
|
+
*/
|
365
|
+
editCustomEmoji(form: EditCustomEmoji): string;
|
366
|
+
/**
|
367
|
+
* Delete a custom emoji
|
368
|
+
*/
|
369
|
+
deleteCustomEmoji(form: DeleteCustomEmoji): string;
|
353
370
|
}
|
354
371
|
export declare function wsUserOp(msg: any): UserOperation;
|
355
372
|
/**
|
package/dist/websocket.js
CHANGED
@@ -182,6 +182,12 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
182
182
|
LemmyWebsocket.prototype.getComments = function (form) {
|
183
183
|
return wrapper(others_1.UserOperation.GetComments, form);
|
184
184
|
};
|
185
|
+
/**
|
186
|
+
* Get / fetch comment.
|
187
|
+
*/
|
188
|
+
LemmyWebsocket.prototype.getComment = function (form) {
|
189
|
+
return wrapper(others_1.UserOperation.GetComment, form);
|
190
|
+
};
|
185
191
|
/**
|
186
192
|
* Like / vote on a post.
|
187
193
|
*/
|
@@ -512,6 +518,24 @@ var LemmyWebsocket = /** @class */ (function () {
|
|
512
518
|
LemmyWebsocket.prototype.purgeComment = function (form) {
|
513
519
|
return wrapper(others_1.UserOperation.PurgeComment, form);
|
514
520
|
};
|
521
|
+
/**
|
522
|
+
* Create a custom emoji
|
523
|
+
*/
|
524
|
+
LemmyWebsocket.prototype.createCustomEmoji = function (form) {
|
525
|
+
return wrapper(others_1.UserOperation.CreateCustomEmoji, form);
|
526
|
+
};
|
527
|
+
/**
|
528
|
+
* Edit a custom emoji
|
529
|
+
*/
|
530
|
+
LemmyWebsocket.prototype.editCustomEmoji = function (form) {
|
531
|
+
return wrapper(others_1.UserOperation.EditCustomEmoji, form);
|
532
|
+
};
|
533
|
+
/**
|
534
|
+
* Delete a custom emoji
|
535
|
+
*/
|
536
|
+
LemmyWebsocket.prototype.deleteCustomEmoji = function (form) {
|
537
|
+
return wrapper(others_1.UserOperation.DeleteCustomEmoji, form);
|
538
|
+
};
|
515
539
|
return LemmyWebsocket;
|
516
540
|
}());
|
517
541
|
exports.LemmyWebsocket = LemmyWebsocket;
|