lemmy-js-client 0.17.0-rc.10 → 0.17.0-rc.11

Sign up to get free protection for your applications and to get access to all the features.
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, FollowCommunityResponse, GetCommunity, GetCommunityResponse, ListCommunities, ListCommunitiesResponse, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
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<FollowCommunityResponse>;
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 { CommunityFollowerView, CommunityModeratorView, CommunityView, PersonViewSafe } from "../views";
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: boolean;
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: boolean;
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: boolean;
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: boolean;
166
+ subscribed: SubscribedType;
166
167
  blocked: boolean;
167
168
  counts: CommunityAggregates;
168
169
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
3
  "description": "A javascript / typescript client for Lemmy",
4
- "version": "0.17.0-rc.10",
4
+ "version": "0.17.0-rc.11",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",