lemmy-js-client 0.15.0 → 0.15.1-rc.1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/http.d.ts CHANGED
@@ -2,7 +2,7 @@ import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLik
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 { 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, PostReportResponse, PostResponse, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
5
- import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetModlogResponse, GetSite, GetSiteConfig, GetSiteConfigResponse, GetSiteResponse, GetUnreadRegistrationApplicationCount, GetUnreadRegistrationApplicationCountResponse, ListRegistrationApplications, ListRegistrationApplicationsResponse, RegistrationApplicationResponse, ResolveObject, ResolveObjectResponse, SaveSiteConfig, Search, SearchResponse, SiteResponse, TransferSite } from "./interfaces/api/site";
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";
6
6
  /**
7
7
  * Helps build lemmy HTTP requests.
8
8
  */
@@ -30,9 +30,9 @@ export declare class LemmyHttp {
30
30
  */
31
31
  editSite(form: EditSite): Promise<SiteResponse>;
32
32
  /**
33
- * Transfer your site to another user.
33
+ * Leave the Site admins.
34
34
  */
35
- transferSite(form: TransferSite): Promise<GetSiteResponse>;
35
+ leaveAdmin(form: LeaveAdmin): Promise<GetSiteResponse>;
36
36
  /**
37
37
  * Get your site configuration.
38
38
  */
package/dist/http.js CHANGED
@@ -103,12 +103,12 @@ var LemmyHttp = /** @class */ (function () {
103
103
  });
104
104
  };
105
105
  /**
106
- * Transfer your site to another user.
106
+ * Leave the Site admins.
107
107
  */
108
- LemmyHttp.prototype.transferSite = function (form) {
108
+ LemmyHttp.prototype.leaveAdmin = function (form) {
109
109
  return __awaiter(this, void 0, void 0, function () {
110
110
  return __generator(this, function (_a) {
111
- return [2 /*return*/, this.wrapper(HttpType.Post, "/site/transfer", form)];
111
+ return [2 /*return*/, this.wrapper(HttpType.Post, "/user/leave_admin", form)];
112
112
  });
113
113
  });
114
114
  };
@@ -117,8 +117,7 @@ export interface MyUserInfo {
117
117
  community_blocks: CommunityBlockView[];
118
118
  person_blocks: PersonBlockView[];
119
119
  }
120
- export interface TransferSite {
121
- person_id: number;
120
+ export interface LeaveAdmin {
122
121
  auth: string;
123
122
  }
124
123
  export interface GetSiteConfig {
@@ -51,7 +51,7 @@ export declare enum UserOperation {
51
51
  MarkAllAsRead = 45,
52
52
  SaveUserSettings = 46,
53
53
  TransferCommunity = 47,
54
- TransferSite = 48,
54
+ LeaveAdmin = 48,
55
55
  DeleteAccount = 49,
56
56
  PasswordReset = 50,
57
57
  PasswordChange = 51,
@@ -55,7 +55,7 @@ var UserOperation;
55
55
  UserOperation[UserOperation["MarkAllAsRead"] = 45] = "MarkAllAsRead";
56
56
  UserOperation[UserOperation["SaveUserSettings"] = 46] = "SaveUserSettings";
57
57
  UserOperation[UserOperation["TransferCommunity"] = 47] = "TransferCommunity";
58
- UserOperation[UserOperation["TransferSite"] = 48] = "TransferSite";
58
+ UserOperation[UserOperation["LeaveAdmin"] = 48] = "LeaveAdmin";
59
59
  UserOperation[UserOperation["DeleteAccount"] = 49] = "DeleteAccount";
60
60
  UserOperation[UserOperation["PasswordReset"] = 50] = "PasswordReset";
61
61
  UserOperation[UserOperation["PasswordChange"] = 51] = "PasswordChange";
@@ -40,7 +40,6 @@ export interface Site {
40
40
  id: number;
41
41
  name: string;
42
42
  sidebar?: string;
43
- creator_id: number;
44
43
  published: string;
45
44
  updated?: string;
46
45
  enable_downvotes: boolean;
@@ -2,7 +2,7 @@ import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, E
2
2
  import { AddModToCommunity, BanFromCommunity, BlockCommunity, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, ListCommunities, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
3
3
  import { AddAdmin, BanPerson, BlockPerson, ChangePassword, CreatePrivateMessage, DeleteAccount, DeletePrivateMessage, EditPrivateMessage, GetBannedPersons, GetPersonDetails, GetPersonMentions, GetPrivateMessages, GetReplies, GetReportCount, GetUnreadCount, Login, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, Register, SaveUserSettings, VerifyEmail } from "./interfaces/api/person";
4
4
  import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPosts, GetSiteMetadata, ListPostReports, LockPost, RemovePost, ResolvePostReport, SavePost, StickyPost } from "./interfaces/api/post";
5
- import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetSite, GetSiteConfig, GetUnreadRegistrationApplicationCount, ListRegistrationApplications, ResolveObject, SaveSiteConfig, Search, TransferSite } from "./interfaces/api/site";
5
+ import { ApproveRegistrationApplication, CreateSite, EditSite, GetModlog, GetSite, GetSiteConfig, GetUnreadRegistrationApplicationCount, LeaveAdmin, ListRegistrationApplications, ResolveObject, SaveSiteConfig, Search } from "./interfaces/api/site";
6
6
  import { CommunityJoin, PostJoin, UserJoin } from "./interfaces/api/websocket";
7
7
  /**
8
8
  * Helps build lemmy websocket message requests, that you can use in your Websocket sends.
@@ -186,9 +186,9 @@ export declare class LemmyWebsocket {
186
186
  */
187
187
  transferCommunity(form: TransferCommunity): string;
188
188
  /**
189
- * Transfer your site to another user.
189
+ * Leave the Site admins.
190
190
  */
191
- transferSite(form: TransferSite): string;
191
+ leaveAdmin(form: LeaveAdmin): string;
192
192
  /**
193
193
  * Ban a person from your site.
194
194
  */
package/dist/websocket.js CHANGED
@@ -267,10 +267,10 @@ var LemmyWebsocket = /** @class */ (function () {
267
267
  return wrapper(others_1.UserOperation.TransferCommunity, form);
268
268
  };
269
269
  /**
270
- * Transfer your site to another user.
270
+ * Leave the Site admins.
271
271
  */
272
- LemmyWebsocket.prototype.transferSite = function (form) {
273
- return wrapper(others_1.UserOperation.TransferSite, form);
272
+ LemmyWebsocket.prototype.leaveAdmin = function (form) {
273
+ return wrapper(others_1.UserOperation.LeaveAdmin, form);
274
274
  };
275
275
  /**
276
276
  * Ban a person from your site.
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.15.0",
4
+ "version": "0.15.1-rc.1",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",