lemmy-js-client 0.17.2-rc.5 → 0.17.2-rc.6

Sign up to get free protection for your applications and to get access to all the features.
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, PersonViewSafe } from "../views";
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: PersonViewSafe;
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, PersonViewSafe, PostView, PrivateMessageReportView, PrivateMessageView } from "../views";
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?: number;
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?: number;
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: PersonViewSafe;
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: PersonViewSafe[];
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: PersonViewSafe;
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: PersonViewSafe;
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: PersonViewSafe[];
315
+ banned: PersonView[];
316
316
  }
@@ -1,6 +1,6 @@
1
- import { ListingType, ModlogActionType, SearchType, SortType } from "../others";
2
- import { Language, RegistrationMode, 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, PersonViewSafe, PostView, RegistrationApplicationView, SiteView } from "../views";
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: PersonViewSafe[];
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?: string;
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?: string;
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: PersonViewSafe[];
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?: PersonViewSafe;
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
- PostJoin = 63,
71
- CommunityJoin = 64,
72
- ChangePassword = 65,
73
- GetSiteMetadata = 66,
74
- BlockCommunity = 67,
75
- BlockPerson = 68,
76
- PurgePerson = 69,
77
- PurgeCommunity = 70,
78
- PurgePost = 71,
79
- PurgeComment = 72,
80
- CreateCommentReport = 73,
81
- ResolveCommentReport = 74,
82
- ListCommentReports = 75,
83
- CreatePostReport = 76,
84
- ResolvePostReport = 77,
85
- ListPostReports = 78,
86
- GetReportCount = 79,
87
- GetUnreadCount = 80,
88
- VerifyEmail = 81,
89
- CreateCustomEmoji = 82,
90
- EditCustomEmoji = 83,
91
- DeleteCustomEmoji = 84
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["PostJoin"] = 63] = "PostJoin";
74
- UserOperation[UserOperation["CommunityJoin"] = 64] = "CommunityJoin";
75
- UserOperation[UserOperation["ChangePassword"] = 65] = "ChangePassword";
76
- UserOperation[UserOperation["GetSiteMetadata"] = 66] = "GetSiteMetadata";
77
- UserOperation[UserOperation["BlockCommunity"] = 67] = "BlockCommunity";
78
- UserOperation[UserOperation["BlockPerson"] = 68] = "BlockPerson";
79
- UserOperation[UserOperation["PurgePerson"] = 69] = "PurgePerson";
80
- UserOperation[UserOperation["PurgeCommunity"] = 70] = "PurgeCommunity";
81
- UserOperation[UserOperation["PurgePost"] = 71] = "PurgePost";
82
- UserOperation[UserOperation["PurgeComment"] = 72] = "PurgeComment";
83
- UserOperation[UserOperation["CreateCommentReport"] = 73] = "CreateCommentReport";
84
- UserOperation[UserOperation["ResolveCommentReport"] = 74] = "ResolveCommentReport";
85
- UserOperation[UserOperation["ListCommentReports"] = 75] = "ListCommentReports";
86
- UserOperation[UserOperation["CreatePostReport"] = 76] = "CreatePostReport";
87
- UserOperation[UserOperation["ResolvePostReport"] = 77] = "ResolvePostReport";
88
- UserOperation[UserOperation["ListPostReports"] = 78] = "ListPostReports";
89
- UserOperation[UserOperation["GetReportCount"] = 79] = "GetReportCount";
90
- UserOperation[UserOperation["GetUnreadCount"] = 80] = "GetUnreadCount";
91
- UserOperation[UserOperation["VerifyEmail"] = 81] = "VerifyEmail";
92
- UserOperation[UserOperation["CreateCustomEmoji"] = 82] = "CreateCustomEmoji";
93
- UserOperation[UserOperation["EditCustomEmoji"] = 83] = "EditCustomEmoji";
94
- UserOperation[UserOperation["DeleteCustomEmoji"] = 84] = "DeleteCustomEmoji";
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: number;
8
- default_listing_type: number;
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 PersonSafe {
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: string;
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?: boolean;
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?: boolean;
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?: boolean;
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?: boolean;
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?: boolean;
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 CommunitySafe {
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 = exports.RegistrationMode = void 0;
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, CommunitySafe, CustomEmoji, CustomEmojiKeyword, LocalSite, LocalSiteRateLimit, LocalUserSettings, ModAdd, ModAddCommunity, ModBan, ModBanFromCommunity, ModFeaturePost, ModLockPost, ModRemoveComment, ModRemoveCommunity, ModRemovePost, ModTransferCommunity, PersonMention, PersonSafe, Post, PostReport, PrivateMessage, PrivateMessageReport, RegistrationApplication, Site, Tagline } from "./source";
4
- export interface PersonViewSafe {
5
- person: PersonSafe;
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: PersonSafe;
11
+ creator: Person;
12
12
  post: Post;
13
- community: CommunitySafe;
14
- recipient: PersonSafe;
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: PersonSafe;
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: PersonSafe;
37
- recipient: PersonSafe;
36
+ creator: Person;
37
+ recipient: Person;
38
38
  }
39
39
  export interface PostView {
40
40
  post: Post;
41
- creator: PersonSafe;
42
- community: CommunitySafe;
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: CommunitySafe;
56
- creator: PersonSafe;
57
- post_creator: PersonSafe;
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?: PersonSafe;
61
+ resolver?: Person;
62
62
  }
63
63
  export interface CommentView {
64
64
  comment: Comment;
65
- creator: PersonSafe;
65
+ creator: Person;
66
66
  post: Post;
67
- community: CommunitySafe;
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: PersonSafe;
78
+ creator: Person;
79
79
  post: Post;
80
- community: CommunitySafe;
81
- recipient: PersonSafe;
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: CommunitySafe;
94
- creator: PersonSafe;
95
- comment_creator: PersonSafe;
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?: PersonSafe;
99
+ resolver?: Person;
100
100
  }
101
101
  export interface ModAddCommunityView {
102
102
  mod_add_community: ModAddCommunity;
103
- moderator?: PersonSafe;
104
- community: CommunitySafe;
105
- modded_person: PersonSafe;
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?: PersonSafe;
110
- community: CommunitySafe;
111
- modded_person: PersonSafe;
109
+ moderator?: Person;
110
+ community: Community;
111
+ modded_person: Person;
112
112
  }
113
113
  export interface ModAddView {
114
114
  mod_add: ModAdd;
115
- moderator?: PersonSafe;
116
- modded_person: PersonSafe;
115
+ moderator?: Person;
116
+ modded_person: Person;
117
117
  }
118
118
  export interface ModBanFromCommunityView {
119
119
  mod_ban_from_community: ModBanFromCommunity;
120
- moderator?: PersonSafe;
121
- community: CommunitySafe;
122
- banned_person: PersonSafe;
120
+ moderator?: Person;
121
+ community: Community;
122
+ banned_person: Person;
123
123
  }
124
124
  export interface ModBanView {
125
125
  mod_ban: ModBan;
126
- moderator?: PersonSafe;
127
- banned_person: PersonSafe;
126
+ moderator?: Person;
127
+ banned_person: Person;
128
128
  }
129
129
  export interface ModLockPostView {
130
130
  mod_lock_post: ModLockPost;
131
- moderator?: PersonSafe;
131
+ moderator?: Person;
132
132
  post: Post;
133
- community: CommunitySafe;
133
+ community: Community;
134
134
  }
135
135
  export interface ModRemoveCommentView {
136
136
  mod_remove_comment: ModRemoveComment;
137
- moderator?: PersonSafe;
137
+ moderator?: Person;
138
138
  comment: Comment;
139
- commenter: PersonSafe;
139
+ commenter: Person;
140
140
  post: Post;
141
- community: CommunitySafe;
141
+ community: Community;
142
142
  }
143
143
  export interface ModRemoveCommunityView {
144
144
  mod_remove_community: ModRemoveCommunity;
145
- moderator?: PersonSafe;
146
- community: CommunitySafe;
145
+ moderator?: Person;
146
+ community: Community;
147
147
  }
148
148
  export interface ModRemovePostView {
149
149
  mod_remove_post: ModRemovePost;
150
- moderator?: PersonSafe;
150
+ moderator?: Person;
151
151
  post: Post;
152
- community: CommunitySafe;
152
+ community: Community;
153
153
  }
154
154
  export interface ModFeaturePostView {
155
155
  mod_feature_post: ModFeaturePost;
156
- moderator?: PersonSafe;
156
+ moderator?: Person;
157
157
  post: Post;
158
- community: CommunitySafe;
158
+ community: Community;
159
159
  }
160
160
  export interface AdminPurgeCommunityView {
161
161
  admin_purge_community: AdminPurgeCommunity;
162
- admin?: PersonSafe;
162
+ admin?: Person;
163
163
  }
164
164
  export interface AdminPurgePersonView {
165
165
  admin_purge_person: AdminPurgePerson;
166
- admin?: PersonSafe;
166
+ admin?: Person;
167
167
  }
168
168
  export interface AdminPurgePostView {
169
169
  admin_purge_post: AdminPurgePost;
170
- admin?: PersonSafe;
171
- community: CommunitySafe;
170
+ admin?: Person;
171
+ community: Community;
172
172
  }
173
173
  export interface AdminPurgeCommentView {
174
174
  admin_purge_comment: AdminPurgeComment;
175
- admin?: PersonSafe;
175
+ admin?: Person;
176
176
  post: Post;
177
177
  }
178
178
  export interface CommunityFollowerView {
179
- community: CommunitySafe;
180
- follower: PersonSafe;
179
+ community: Community;
180
+ follower: Person;
181
181
  }
182
182
  export interface CommunityBlockView {
183
- person: PersonSafe;
184
- community: CommunitySafe;
183
+ person: Person;
184
+ community: Community;
185
185
  }
186
186
  export interface CommunityModeratorView {
187
- community: CommunitySafe;
188
- moderator: PersonSafe;
187
+ community: Community;
188
+ moderator: Person;
189
189
  }
190
190
  export interface CommunityPersonBanView {
191
- community: CommunitySafe;
192
- person: PersonSafe;
191
+ community: Community;
192
+ person: Person;
193
193
  }
194
194
  export interface PersonBlockView {
195
- person: PersonSafe;
196
- target: PersonSafe;
195
+ person: Person;
196
+ target: Person;
197
197
  }
198
198
  export interface CommunityView {
199
- community: CommunitySafe;
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: PersonSafe;
208
- admin?: PersonSafe;
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: PersonSafe;
219
- creator: PersonSafe;
220
- resolver?: PersonSafe;
218
+ private_message_creator: Person;
219
+ creator: Person;
220
+ resolver?: Person;
221
221
  }
222
222
  export declare class CustomEmojiView {
223
223
  custom_emoji: CustomEmoji;
@@ -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
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
- "version": "0.17.2-rc.5",
3
+ "version": "0.17.2-rc.6",
4
4
  "description": "A javascript / typescript client for Lemmy",
5
5
  "repository": "https://github.com/LemmyNet/lemmy-js-client",
6
6
  "license": "AGPL-3.0",