lemmy-js-client 0.17.0-rc.10 → 0.17.0-rc.11
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
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, GetCommentsResponse, ListCommentReports, ListCommentReportsResponse, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
|
2
|
-
import { AddModToCommunity, AddModToCommunityResponse, BanFromCommunity, BanFromCommunityResponse, BlockCommunity, BlockCommunityResponse, CommunityResponse, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity,
|
2
|
+
import { AddModToCommunity, AddModToCommunityResponse, BanFromCommunity, BanFromCommunityResponse, BlockCommunity, BlockCommunityResponse, CommunityResponse, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, GetCommunityResponse, ListCommunities, ListCommunitiesResponse, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
|
3
3
|
import { AddAdmin, AddAdminResponse, BannedPersonsResponse, BanPerson, BanPersonResponse, BlockPerson, BlockPersonResponse, ChangePassword, CreatePrivateMessage, DeleteAccount, DeleteAccountResponse, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, GetCaptchaResponse, GetPersonDetails, GetPersonDetailsResponse, GetPersonMentions, GetPersonMentionsResponse, GetPrivateMessages, GetReplies, GetRepliesResponse, GetReportCount, GetReportCountResponse, GetUnreadCount, GetUnreadCountResponse, Login, LoginResponse, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, PasswordResetResponse, PersonMentionResponse, PrivateMessageResponse, PrivateMessagesResponse, Register, SaveUserSettings, VerifyEmail, VerifyEmailResponse } from "./interfaces/api/person";
|
4
4
|
import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPostResponse, GetPosts, GetPostsResponse, GetSiteMetadata, GetSiteMetadataResponse, ListPostReports, ListPostReportsResponse, LockPost, MarkPostAsRead, PostReportResponse, PostResponse, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
|
5
5
|
import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetModlogResponse, GetSite, GetSiteConfig, GetSiteConfigResponse, GetSiteResponse, GetUnreadRegistrationApplicationCount, GetUnreadRegistrationApplicationCountResponse, LeaveAdmin, ListRegistrationApplications, ListRegistrationApplicationsResponse, RegistrationApplicationResponse, ResolveObject, ResolveObjectResponse, SaveSiteConfig, Search, SearchResponse, SiteResponse } from "./interfaces/api/site";
|
@@ -86,7 +86,7 @@ export declare class LemmyHttp {
|
|
86
86
|
* Follow / subscribe to a community.
|
87
87
|
* `HTTP.POST /community/follow`
|
88
88
|
*/
|
89
|
-
followCommunity(form: FollowCommunity): Promise<
|
89
|
+
followCommunity(form: FollowCommunity): Promise<CommunityResponse>;
|
90
90
|
/**
|
91
91
|
* Block a community.
|
92
92
|
* `HTTP.POST /community/block`
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ListingType, SortType } from "../others";
|
2
2
|
import { Site } from "../source";
|
3
|
-
import {
|
3
|
+
import { CommunityModeratorView, CommunityView, PersonViewSafe } from "../views";
|
4
4
|
/**
|
5
5
|
* You can use either `id` or `name` as an id.
|
6
6
|
*
|
@@ -30,12 +30,6 @@ export interface CreateCommunity {
|
|
30
30
|
export interface CommunityResponse {
|
31
31
|
community_view: CommunityView;
|
32
32
|
}
|
33
|
-
export interface FollowCommunityResponse {
|
34
|
-
/**
|
35
|
-
* An unfollow returns null.
|
36
|
-
*/
|
37
|
-
community_follower_view?: CommunityFollowerView;
|
38
|
-
}
|
39
33
|
export interface ListCommunities {
|
40
34
|
type_?: ListingType;
|
41
35
|
sort?: SortType;
|
@@ -143,6 +143,14 @@ export declare enum SearchType {
|
|
143
143
|
Users = "Users",
|
144
144
|
Url = "Url"
|
145
145
|
}
|
146
|
+
/**
|
147
|
+
* Different Subscribed states
|
148
|
+
*/
|
149
|
+
export declare enum SubscribedType {
|
150
|
+
Subscribed = "Subscribed",
|
151
|
+
NotSubscribed = "NotSubscribed",
|
152
|
+
Pending = "Pending"
|
153
|
+
}
|
146
154
|
/**
|
147
155
|
* A websocket response. Includes the return type.
|
148
156
|
* Can be used like:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.SearchType = exports.ListingType = exports.SortType = exports.UserOperation = exports.VERSION = void 0;
|
3
|
+
exports.SubscribedType = exports.SearchType = exports.ListingType = exports.SortType = exports.UserOperation = exports.VERSION = void 0;
|
4
4
|
exports.VERSION = "v3";
|
5
5
|
/**
|
6
6
|
* All of the websocket operations available.
|
@@ -150,3 +150,12 @@ var SearchType;
|
|
150
150
|
SearchType["Users"] = "Users";
|
151
151
|
SearchType["Url"] = "Url";
|
152
152
|
})(SearchType = exports.SearchType || (exports.SearchType = {}));
|
153
|
+
/**
|
154
|
+
* Different Subscribed states
|
155
|
+
*/
|
156
|
+
var SubscribedType;
|
157
|
+
(function (SubscribedType) {
|
158
|
+
SubscribedType["Subscribed"] = "Subscribed";
|
159
|
+
SubscribedType["NotSubscribed"] = "NotSubscribed";
|
160
|
+
SubscribedType["Pending"] = "Pending";
|
161
|
+
})(SubscribedType = exports.SubscribedType || (exports.SubscribedType = {}));
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { CommentAggregates, CommunityAggregates, PersonAggregates, PostAggregates, SiteAggregates } from "./aggregates";
|
2
|
+
import { SubscribedType } from "./others";
|
2
3
|
import { Comment, CommentReport, CommunitySafe, LocalUserSettings, ModAdd, ModAddCommunity, ModBan, ModBanFromCommunity, ModLockPost, ModRemoveComment, ModRemoveCommunity, ModRemovePost, ModStickyPost, ModTransferCommunity, PersonMention, PersonSafe, Post, PostReport, PrivateMessage, RegistrationApplication, Site } from "./source";
|
3
4
|
export interface PersonViewSafe {
|
4
5
|
person: PersonSafe;
|
@@ -13,7 +14,7 @@ export interface PersonMentionView {
|
|
13
14
|
recipient: PersonSafe;
|
14
15
|
counts: CommentAggregates;
|
15
16
|
creator_banned_from_community: boolean;
|
16
|
-
subscribed:
|
17
|
+
subscribed: SubscribedType;
|
17
18
|
saved: boolean;
|
18
19
|
creator_blocked: boolean;
|
19
20
|
my_vote?: number;
|
@@ -38,7 +39,7 @@ export interface PostView {
|
|
38
39
|
community: CommunitySafe;
|
39
40
|
creator_banned_from_community: boolean;
|
40
41
|
counts: PostAggregates;
|
41
|
-
subscribed:
|
42
|
+
subscribed: SubscribedType;
|
42
43
|
saved: boolean;
|
43
44
|
read: boolean;
|
44
45
|
creator_blocked: boolean;
|
@@ -63,7 +64,7 @@ export interface CommentView {
|
|
63
64
|
community: CommunitySafe;
|
64
65
|
counts: CommentAggregates;
|
65
66
|
creator_banned_from_community: boolean;
|
66
|
-
subscribed:
|
67
|
+
subscribed: SubscribedType;
|
67
68
|
saved: boolean;
|
68
69
|
creator_blocked: boolean;
|
69
70
|
my_vote?: number;
|
@@ -162,7 +163,7 @@ export interface PersonBlockView {
|
|
162
163
|
}
|
163
164
|
export interface CommunityView {
|
164
165
|
community: CommunitySafe;
|
165
|
-
subscribed:
|
166
|
+
subscribed: SubscribedType;
|
166
167
|
blocked: boolean;
|
167
168
|
counts: CommunityAggregates;
|
168
169
|
}
|
package/package.json
CHANGED