lemmy-js-client 0.17.2-rc.5 → 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 +7 -1
- package/dist/http.js +8 -0
- package/dist/interfaces/api/comment.d.ts +4 -0
- package/dist/interfaces/api/community.d.ts +2 -2
- package/dist/interfaces/api/person.d.ts +9 -9
- package/dist/interfaces/api/site.d.ts +8 -8
- package/dist/interfaces/others.d.ts +31 -22
- package/dist/interfaces/others.js +34 -23
- package/dist/interfaces/source.d.ts +11 -16
- package/dist/interfaces/source.js +1 -7
- package/dist/interfaces/views.d.ts +69 -69
- package/dist/websocket.d.ts +5 -1
- package/dist/websocket.js +6 -0
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
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
3
|
import { CreateCustomEmoji, DeleteCustomEmoji, EditCustomEmoji } from "./interfaces/api/custom_emoji";
|
4
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";
|
@@ -266,6 +266,12 @@ export declare class LemmyHttp {
|
|
266
266
|
* `HTTP.GET /comment/list`
|
267
267
|
*/
|
268
268
|
getComments(form: GetComments): Promise<GetCommentsResponse>;
|
269
|
+
/**
|
270
|
+
* Get / fetch comment.
|
271
|
+
*
|
272
|
+
* `HTTP.GET /comment`
|
273
|
+
*/
|
274
|
+
getComment(form: GetComment): Promise<CommentResponse>;
|
269
275
|
/**
|
270
276
|
* Report a comment.
|
271
277
|
*
|
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
|
*
|
@@ -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 {
|
@@ -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, CustomEmojiView, 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
|
/**
|
@@ -190,7 +190,7 @@ export interface ResolveObjectResponse {
|
|
190
190
|
comment?: CommentView;
|
191
191
|
post?: PostView;
|
192
192
|
community?: CommunityView;
|
193
|
-
person?:
|
193
|
+
person?: PersonView;
|
194
194
|
}
|
195
195
|
export interface PurgePerson {
|
196
196
|
person_id: number;
|
@@ -67,28 +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
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
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
|
92
93
|
}
|
93
94
|
/**
|
94
95
|
* Different post sort types used in lemmy.
|
@@ -169,6 +170,14 @@ export declare enum ListingType {
|
|
169
170
|
Subscribed = "Subscribed",
|
170
171
|
Community = "Community"
|
171
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
|
+
}
|
172
181
|
/**
|
173
182
|
* Search types for lemmy's search.
|
174
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,28 +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["
|
92
|
-
UserOperation[UserOperation["
|
93
|
-
UserOperation[UserOperation["
|
94
|
-
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";
|
95
96
|
})(UserOperation = exports.UserOperation || (exports.UserOperation = {}));
|
96
97
|
/**
|
97
98
|
* Different post sort types used in lemmy.
|
@@ -170,11 +171,21 @@ var CommentSortType;
|
|
170
171
|
*/
|
171
172
|
var ListingType;
|
172
173
|
(function (ListingType) {
|
174
|
+
// TODO do these need to be strings?
|
173
175
|
ListingType["All"] = "All";
|
174
176
|
ListingType["Local"] = "Local";
|
175
177
|
ListingType["Subscribed"] = "Subscribed";
|
176
178
|
ListingType["Community"] = "Community";
|
177
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 = {}));
|
178
189
|
/**
|
179
190
|
* Search types for lemmy's search.
|
180
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;
|
@@ -1,12 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.CustomEmojiKeyword = exports.CustomEmoji =
|
4
|
-
var RegistrationMode;
|
5
|
-
(function (RegistrationMode) {
|
6
|
-
RegistrationMode["Closed"] = "closed";
|
7
|
-
RegistrationMode["RequireApplication"] = "requireapplication";
|
8
|
-
RegistrationMode["Open"] = "open";
|
9
|
-
})(RegistrationMode = exports.RegistrationMode || (exports.RegistrationMode = {}));
|
3
|
+
exports.CustomEmojiKeyword = exports.CustomEmoji = void 0;
|
10
4
|
var CustomEmoji = /** @class */ (function () {
|
11
5
|
function CustomEmoji() {
|
12
6
|
}
|
@@ -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,9 +215,9 @@ 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
221
|
}
|
222
222
|
export declare class CustomEmojiView {
|
223
223
|
custom_emoji: CustomEmoji;
|
package/dist/websocket.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
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
3
|
import { CreateCustomEmoji, DeleteCustomEmoji, EditCustomEmoji } from "./interfaces/api/custom_emoji";
|
4
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";
|
@@ -131,6 +131,10 @@ export declare class LemmyWebsocket {
|
|
131
131
|
* Get / fetch comments.
|
132
132
|
*/
|
133
133
|
getComments(form: GetComments): string;
|
134
|
+
/**
|
135
|
+
* Get / fetch comment.
|
136
|
+
*/
|
137
|
+
getComment(form: GetComment): string;
|
134
138
|
/**
|
135
139
|
* Like / vote on a post.
|
136
140
|
*/
|
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
|
*/
|