lemmy-js-client 0.13.4-rc.2 → 0.15.0-rc.3

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/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- export * from './interfaces';
2
- export * from './http';
3
- export * from './websocket';
1
+ export * from "./http";
2
+ export * from "./interfaces";
3
+ export * from "./websocket";
package/dist/index.js CHANGED
@@ -10,6 +10,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./interfaces"), exports);
14
13
  __exportStar(require("./http"), exports);
14
+ __exportStar(require("./interfaces"), exports);
15
15
  __exportStar(require("./websocket"), exports);
@@ -1,4 +1,4 @@
1
- import { CommentReportView, CommentView } from '../views';
1
+ import { CommentReportView, CommentView } from "../views";
2
2
  export interface CreateComment {
3
3
  content: string;
4
4
  parent_id?: number;
@@ -1,4 +1,4 @@
1
- import { CommunityModeratorView, CommunityView, PersonViewSafe } from '../views';
1
+ import { CommunityModeratorView, CommunityView, PersonViewSafe } from "../views";
2
2
  /**
3
3
  * You can use either `id` or `name` as an id.
4
4
  *
@@ -1,6 +1,6 @@
1
- export * from './comment';
2
- export * from './community';
3
- export * from './post';
4
- export * from './site';
5
- export * from './person';
6
- export * from './websocket';
1
+ export * from "./comment";
2
+ export * from "./community";
3
+ export * from "./person";
4
+ export * from "./post";
5
+ export * from "./site";
6
+ export * from "./websocket";
@@ -12,7 +12,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./comment"), exports);
14
14
  __exportStar(require("./community"), exports);
15
+ __exportStar(require("./person"), exports);
15
16
  __exportStar(require("./post"), exports);
16
17
  __exportStar(require("./site"), exports);
17
- __exportStar(require("./person"), exports);
18
18
  __exportStar(require("./websocket"), exports);
@@ -1,4 +1,4 @@
1
- import { CommentView, CommunityModeratorView, PostView, PrivateMessageView, PersonMentionView, PersonViewSafe } from '../views';
1
+ import { CommentView, CommunityModeratorView, PersonMentionView, PersonViewSafe, PostView, PrivateMessageView } from "../views";
2
2
  export interface Login {
3
3
  username_or_email: string;
4
4
  password: string;
@@ -10,6 +10,9 @@ export interface Login {
10
10
  */
11
11
  export interface Register {
12
12
  username: string;
13
+ /**
14
+ * Email is mandatory if email verification is enabled on the server
15
+ */
13
16
  email?: string;
14
17
  password: string;
15
18
  password_verify: string;
@@ -20,6 +23,10 @@ export interface Register {
20
23
  captcha_uuid?: string;
21
24
  captcha_answer?: string;
22
25
  honeypot?: string;
26
+ /**
27
+ * An answer is mandatory if require application is enabled on the server
28
+ */
29
+ answer?: string;
23
30
  }
24
31
  export interface GetCaptcha {
25
32
  }
@@ -87,7 +94,12 @@ export interface ChangePassword {
87
94
  * The `jwt` string should be stored and used anywhere `auth` is called for.
88
95
  */
89
96
  export interface LoginResponse {
90
- jwt: string;
97
+ /**
98
+ * This is None in response to `Register` if email verification is enabled, or the server requires registration applications.
99
+ */
100
+ jwt?: string;
101
+ verify_email_sent: boolean;
102
+ registration_created: boolean;
91
103
  }
92
104
  export interface GetPersonDetails {
93
105
  person_id?: number;
@@ -175,6 +187,8 @@ export interface DeleteAccount {
175
187
  password: string;
176
188
  auth: string;
177
189
  }
190
+ export interface DeleteAccountResponse {
191
+ }
178
192
  export interface PasswordReset {
179
193
  email: string;
180
194
  }
@@ -229,6 +243,17 @@ export interface GetReportCountResponse {
229
243
  comment_reports: number;
230
244
  post_reports: number;
231
245
  }
246
+ export interface GetUnreadCount {
247
+ auth: string;
248
+ }
249
+ export interface GetUnreadCountResponse {
250
+ replies: number;
251
+ mentions: number;
252
+ private_messages: number;
253
+ }
254
+ export interface VerifyEmail {
255
+ token: string;
256
+ }
232
257
  export interface BlockPerson {
233
258
  person_id: number;
234
259
  block: boolean;
@@ -1,5 +1,5 @@
1
- import { SiteMetadata } from '..';
2
- import { CommunityView, CommentView, CommunityModeratorView, PostReportView, PostView } from '../views';
1
+ import { SiteMetadata } from "..";
2
+ import { CommentView, CommunityModeratorView, CommunityView, PostReportView, PostView } from "../views";
3
3
  export interface CreatePost {
4
4
  name: string;
5
5
  url?: string;
@@ -1,5 +1,4 @@
1
- import { AdminPurgeCommentView, AdminPurgeCommunityView, AdminPurgePersonView, AdminPurgePostView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, LocalUserSettingsView, PersonBlockView } from '../views';
2
- import { CommentView, CommunityView, ModAddCommunityView, ModTransferCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView, ModRemovePostView, ModStickyPostView, PostView, SiteView, PersonViewSafe } from '../views';
1
+ import { CommentView, CommunityBlockView, CommunityFollowerView, CommunityModeratorView, CommunityView, LocalUserSettingsView, ModAddCommunityView, ModAddView, ModBanFromCommunityView, ModBanView, ModLockPostView, ModRemoveCommentView, ModRemoveCommunityView, ModRemovePostView, ModStickyPostView, ModTransferCommunityView, PersonBlockView, PersonViewSafe, PostView, RegistrationApplicationView, SiteView } from "../views";
3
2
  /**
4
3
  * Search lemmy for different types of data.
5
4
  */
@@ -54,10 +53,6 @@ export interface GetModlogResponse {
54
53
  added_to_community: ModAddCommunityView[];
55
54
  transferred_to_community: ModTransferCommunityView[];
56
55
  added: ModAddView[];
57
- admin_purged_persons: AdminPurgePersonView[];
58
- admin_purged_communities: AdminPurgeCommunityView[];
59
- admin_purged_posts: AdminPurgePostView[];
60
- admin_purged_comments: AdminPurgeCommentView[];
61
56
  }
62
57
  export interface CreateSite {
63
58
  name: string;
@@ -69,6 +64,10 @@ export interface CreateSite {
69
64
  open_registration?: boolean;
70
65
  enable_nsfw?: boolean;
71
66
  community_creation_admin_only?: boolean;
67
+ require_email_verification?: boolean;
68
+ require_application?: boolean;
69
+ application_question?: string;
70
+ private_instance?: boolean;
72
71
  auth: string;
73
72
  }
74
73
  export interface EditSite {
@@ -81,6 +80,10 @@ export interface EditSite {
81
80
  open_registration?: boolean;
82
81
  enable_nsfw?: boolean;
83
82
  community_creation_admin_only?: boolean;
83
+ require_email_verification?: boolean;
84
+ require_application?: boolean;
85
+ application_question?: string;
86
+ private_instance?: boolean;
84
87
  auth: string;
85
88
  }
86
89
  export interface GetSite {
@@ -143,28 +146,30 @@ export interface ResolveObjectResponse {
143
146
  community?: CommunityView;
144
147
  person?: PersonViewSafe;
145
148
  }
146
- export interface PurgePerson {
147
- person_id: number;
148
- remove_images: boolean;
149
- reason?: string;
149
+ export interface ListRegistrationApplications {
150
+ /**
151
+ * Only shows the unread applications (IE those without an admin actor)
152
+ */
153
+ unread_only?: boolean;
154
+ page?: number;
155
+ limit?: number;
150
156
  auth: string;
151
157
  }
152
- export interface PurgeCommunity {
153
- community_id: number;
154
- remove_images: boolean;
155
- reason?: string;
156
- auth: string;
158
+ export interface ListRegistrationApplicationsResponse {
159
+ registration_applications: RegistrationApplicationView[];
157
160
  }
158
- export interface PurgePost {
159
- post_id: number;
160
- reason?: string;
161
+ export interface ApproveRegistrationApplication {
162
+ id: number;
163
+ approve: boolean;
164
+ deny_reason?: string;
161
165
  auth: string;
162
166
  }
163
- export interface PurgeComment {
164
- comment_id: number;
165
- reason?: string;
167
+ export interface RegistrationApplicationResponse {
168
+ registration_application: RegistrationApplicationView;
169
+ }
170
+ export interface GetUnreadRegistrationApplicationCount {
166
171
  auth: string;
167
172
  }
168
- export interface PurgeItemResponse {
169
- success: boolean;
173
+ export interface GetUnreadRegistrationApplicationCountResponse {
174
+ registration_applications: number;
170
175
  }
@@ -1,5 +1,5 @@
1
- export * from './api';
2
- export * from './aggregates';
3
- export * from './others';
4
- export * from './source';
5
- export * from './views';
1
+ export * from "./aggregates";
2
+ export * from "./api";
3
+ export * from "./others";
4
+ export * from "./source";
5
+ export * from "./views";
@@ -10,8 +10,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
10
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./api"), exports);
14
13
  __exportStar(require("./aggregates"), exports);
14
+ __exportStar(require("./api"), exports);
15
15
  __exportStar(require("./others"), exports);
16
16
  __exportStar(require("./source"), exports);
17
17
  __exportStar(require("./views"), exports);
@@ -41,42 +41,43 @@ export declare enum UserOperation {
41
41
  EditSite = 35,
42
42
  GetSite = 36,
43
43
  AddAdmin = 37,
44
- BanPerson = 38,
45
- Search = 39,
46
- ResolveObject = 40,
47
- MarkAllAsRead = 41,
48
- SaveUserSettings = 42,
49
- TransferCommunity = 43,
50
- TransferSite = 44,
51
- DeleteAccount = 45,
52
- PasswordReset = 46,
53
- PasswordChange = 47,
54
- CreatePrivateMessage = 48,
55
- EditPrivateMessage = 49,
56
- DeletePrivateMessage = 50,
57
- MarkPrivateMessageAsRead = 51,
58
- GetPrivateMessages = 52,
59
- UserJoin = 53,
60
- GetComments = 54,
61
- GetSiteConfig = 55,
62
- SaveSiteConfig = 56,
63
- PostJoin = 57,
64
- CommunityJoin = 58,
65
- ChangePassword = 59,
66
- GetSiteMetadata = 60,
67
- BlockCommunity = 61,
68
- BlockPerson = 62,
69
- PurgePerson = 63,
70
- PurgeCommunity = 64,
71
- PurgePost = 65,
72
- PurgeComment = 66,
73
- CreateCommentReport = 67,
74
- ResolveCommentReport = 68,
75
- ListCommentReports = 69,
76
- CreatePostReport = 70,
77
- ResolvePostReport = 71,
78
- ListPostReports = 72,
79
- GetReportCount = 73
44
+ GetUnreadRegistrationApplicationCount = 38,
45
+ ListRegistrationApplications = 39,
46
+ ApproveRegistrationApplication = 40,
47
+ BanPerson = 41,
48
+ Search = 42,
49
+ ResolveObject = 43,
50
+ MarkAllAsRead = 44,
51
+ SaveUserSettings = 45,
52
+ TransferCommunity = 46,
53
+ TransferSite = 47,
54
+ DeleteAccount = 48,
55
+ PasswordReset = 49,
56
+ PasswordChange = 50,
57
+ CreatePrivateMessage = 51,
58
+ EditPrivateMessage = 52,
59
+ DeletePrivateMessage = 53,
60
+ MarkPrivateMessageAsRead = 54,
61
+ GetPrivateMessages = 55,
62
+ UserJoin = 56,
63
+ GetComments = 57,
64
+ GetSiteConfig = 58,
65
+ SaveSiteConfig = 59,
66
+ PostJoin = 60,
67
+ CommunityJoin = 61,
68
+ ChangePassword = 62,
69
+ GetSiteMetadata = 63,
70
+ BlockCommunity = 64,
71
+ BlockPerson = 65,
72
+ CreateCommentReport = 66,
73
+ ResolveCommentReport = 67,
74
+ ListCommentReports = 68,
75
+ CreatePostReport = 69,
76
+ ResolvePostReport = 70,
77
+ ListPostReports = 71,
78
+ GetReportCount = 72,
79
+ GetUnreadCount = 73,
80
+ VerifyEmail = 74
80
81
  }
81
82
  /**
82
83
  * Different sort types used in lemmy.
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SearchType = exports.ListingType = exports.SortType = exports.UserOperation = exports.VERSION = void 0;
4
- exports.VERSION = 'v3';
4
+ exports.VERSION = "v3";
5
5
  /**
6
6
  * All of the websocket operations available.
7
7
  */
@@ -45,42 +45,43 @@ var UserOperation;
45
45
  UserOperation[UserOperation["EditSite"] = 35] = "EditSite";
46
46
  UserOperation[UserOperation["GetSite"] = 36] = "GetSite";
47
47
  UserOperation[UserOperation["AddAdmin"] = 37] = "AddAdmin";
48
- UserOperation[UserOperation["BanPerson"] = 38] = "BanPerson";
49
- UserOperation[UserOperation["Search"] = 39] = "Search";
50
- UserOperation[UserOperation["ResolveObject"] = 40] = "ResolveObject";
51
- UserOperation[UserOperation["MarkAllAsRead"] = 41] = "MarkAllAsRead";
52
- UserOperation[UserOperation["SaveUserSettings"] = 42] = "SaveUserSettings";
53
- UserOperation[UserOperation["TransferCommunity"] = 43] = "TransferCommunity";
54
- UserOperation[UserOperation["TransferSite"] = 44] = "TransferSite";
55
- UserOperation[UserOperation["DeleteAccount"] = 45] = "DeleteAccount";
56
- UserOperation[UserOperation["PasswordReset"] = 46] = "PasswordReset";
57
- UserOperation[UserOperation["PasswordChange"] = 47] = "PasswordChange";
58
- UserOperation[UserOperation["CreatePrivateMessage"] = 48] = "CreatePrivateMessage";
59
- UserOperation[UserOperation["EditPrivateMessage"] = 49] = "EditPrivateMessage";
60
- UserOperation[UserOperation["DeletePrivateMessage"] = 50] = "DeletePrivateMessage";
61
- UserOperation[UserOperation["MarkPrivateMessageAsRead"] = 51] = "MarkPrivateMessageAsRead";
62
- UserOperation[UserOperation["GetPrivateMessages"] = 52] = "GetPrivateMessages";
63
- UserOperation[UserOperation["UserJoin"] = 53] = "UserJoin";
64
- UserOperation[UserOperation["GetComments"] = 54] = "GetComments";
65
- UserOperation[UserOperation["GetSiteConfig"] = 55] = "GetSiteConfig";
66
- UserOperation[UserOperation["SaveSiteConfig"] = 56] = "SaveSiteConfig";
67
- UserOperation[UserOperation["PostJoin"] = 57] = "PostJoin";
68
- UserOperation[UserOperation["CommunityJoin"] = 58] = "CommunityJoin";
69
- UserOperation[UserOperation["ChangePassword"] = 59] = "ChangePassword";
70
- UserOperation[UserOperation["GetSiteMetadata"] = 60] = "GetSiteMetadata";
71
- UserOperation[UserOperation["BlockCommunity"] = 61] = "BlockCommunity";
72
- UserOperation[UserOperation["BlockPerson"] = 62] = "BlockPerson";
73
- UserOperation[UserOperation["PurgePerson"] = 63] = "PurgePerson";
74
- UserOperation[UserOperation["PurgeCommunity"] = 64] = "PurgeCommunity";
75
- UserOperation[UserOperation["PurgePost"] = 65] = "PurgePost";
76
- UserOperation[UserOperation["PurgeComment"] = 66] = "PurgeComment";
77
- UserOperation[UserOperation["CreateCommentReport"] = 67] = "CreateCommentReport";
78
- UserOperation[UserOperation["ResolveCommentReport"] = 68] = "ResolveCommentReport";
79
- UserOperation[UserOperation["ListCommentReports"] = 69] = "ListCommentReports";
80
- UserOperation[UserOperation["CreatePostReport"] = 70] = "CreatePostReport";
81
- UserOperation[UserOperation["ResolvePostReport"] = 71] = "ResolvePostReport";
82
- UserOperation[UserOperation["ListPostReports"] = 72] = "ListPostReports";
83
- UserOperation[UserOperation["GetReportCount"] = 73] = "GetReportCount";
48
+ UserOperation[UserOperation["GetUnreadRegistrationApplicationCount"] = 38] = "GetUnreadRegistrationApplicationCount";
49
+ UserOperation[UserOperation["ListRegistrationApplications"] = 39] = "ListRegistrationApplications";
50
+ UserOperation[UserOperation["ApproveRegistrationApplication"] = 40] = "ApproveRegistrationApplication";
51
+ UserOperation[UserOperation["BanPerson"] = 41] = "BanPerson";
52
+ UserOperation[UserOperation["Search"] = 42] = "Search";
53
+ UserOperation[UserOperation["ResolveObject"] = 43] = "ResolveObject";
54
+ UserOperation[UserOperation["MarkAllAsRead"] = 44] = "MarkAllAsRead";
55
+ UserOperation[UserOperation["SaveUserSettings"] = 45] = "SaveUserSettings";
56
+ UserOperation[UserOperation["TransferCommunity"] = 46] = "TransferCommunity";
57
+ UserOperation[UserOperation["TransferSite"] = 47] = "TransferSite";
58
+ UserOperation[UserOperation["DeleteAccount"] = 48] = "DeleteAccount";
59
+ UserOperation[UserOperation["PasswordReset"] = 49] = "PasswordReset";
60
+ UserOperation[UserOperation["PasswordChange"] = 50] = "PasswordChange";
61
+ UserOperation[UserOperation["CreatePrivateMessage"] = 51] = "CreatePrivateMessage";
62
+ UserOperation[UserOperation["EditPrivateMessage"] = 52] = "EditPrivateMessage";
63
+ UserOperation[UserOperation["DeletePrivateMessage"] = 53] = "DeletePrivateMessage";
64
+ UserOperation[UserOperation["MarkPrivateMessageAsRead"] = 54] = "MarkPrivateMessageAsRead";
65
+ UserOperation[UserOperation["GetPrivateMessages"] = 55] = "GetPrivateMessages";
66
+ UserOperation[UserOperation["UserJoin"] = 56] = "UserJoin";
67
+ UserOperation[UserOperation["GetComments"] = 57] = "GetComments";
68
+ UserOperation[UserOperation["GetSiteConfig"] = 58] = "GetSiteConfig";
69
+ UserOperation[UserOperation["SaveSiteConfig"] = 59] = "SaveSiteConfig";
70
+ UserOperation[UserOperation["PostJoin"] = 60] = "PostJoin";
71
+ UserOperation[UserOperation["CommunityJoin"] = 61] = "CommunityJoin";
72
+ UserOperation[UserOperation["ChangePassword"] = 62] = "ChangePassword";
73
+ UserOperation[UserOperation["GetSiteMetadata"] = 63] = "GetSiteMetadata";
74
+ UserOperation[UserOperation["BlockCommunity"] = 64] = "BlockCommunity";
75
+ UserOperation[UserOperation["BlockPerson"] = 65] = "BlockPerson";
76
+ UserOperation[UserOperation["CreateCommentReport"] = 66] = "CreateCommentReport";
77
+ UserOperation[UserOperation["ResolveCommentReport"] = 67] = "ResolveCommentReport";
78
+ UserOperation[UserOperation["ListCommentReports"] = 68] = "ListCommentReports";
79
+ UserOperation[UserOperation["CreatePostReport"] = 69] = "CreatePostReport";
80
+ UserOperation[UserOperation["ResolvePostReport"] = 70] = "ResolvePostReport";
81
+ UserOperation[UserOperation["ListPostReports"] = 71] = "ListPostReports";
82
+ UserOperation[UserOperation["GetReportCount"] = 72] = "GetReportCount";
83
+ UserOperation[UserOperation["GetUnreadCount"] = 73] = "GetUnreadCount";
84
+ UserOperation[UserOperation["VerifyEmail"] = 74] = "VerifyEmail";
84
85
  })(UserOperation = exports.UserOperation || (exports.UserOperation = {}));
85
86
  /**
86
87
  * Different sort types used in lemmy.
@@ -13,6 +13,8 @@ export interface LocalUserSettings {
13
13
  show_scores: boolean;
14
14
  show_read_posts: boolean;
15
15
  show_new_post_notifs: boolean;
16
+ email_verified: boolean;
17
+ accepted_application: boolean;
16
18
  }
17
19
  export interface PersonSafe {
18
20
  id: number;
@@ -37,16 +39,20 @@ export interface Site {
37
39
  id: number;
38
40
  name: string;
39
41
  sidebar?: string;
40
- description?: string;
41
42
  creator_id: number;
42
43
  published: string;
43
44
  updated?: string;
44
45
  enable_downvotes: boolean;
45
46
  open_registration: boolean;
46
47
  enable_nsfw: boolean;
47
- community_creation_admin_only: boolean;
48
48
  icon?: string;
49
49
  banner?: string;
50
+ description?: string;
51
+ community_creation_admin_only: boolean;
52
+ require_email_verification: boolean;
53
+ require_application: boolean;
54
+ application_question?: string;
55
+ private_instance: boolean;
50
56
  }
51
57
  export interface PrivateMessage {
52
58
  id: number;
@@ -181,32 +187,6 @@ export interface ModAdd {
181
187
  removed?: boolean;
182
188
  when_: string;
183
189
  }
184
- export interface AdminPurgePerson {
185
- id: number;
186
- admin_person_id: number;
187
- reason?: string;
188
- when_: string;
189
- }
190
- export interface AdminPurgeCommunity {
191
- id: number;
192
- admin_person_id: number;
193
- reason?: string;
194
- when_: string;
195
- }
196
- export interface AdminPurgePost {
197
- id: number;
198
- admin_person_id: number;
199
- community_id: number;
200
- reason?: string;
201
- when_: string;
202
- }
203
- export interface AdminPurgeComment {
204
- id: number;
205
- admin_person_id: number;
206
- post_id: number;
207
- reason?: string;
208
- when_: string;
209
- }
210
190
  export interface CommunitySafe {
211
191
  id: number;
212
192
  name: string;
@@ -254,3 +234,11 @@ export interface PersonMention {
254
234
  read: boolean;
255
235
  published: string;
256
236
  }
237
+ export interface RegistrationApplication {
238
+ id: number;
239
+ local_user_id: number;
240
+ answer: string;
241
+ admin_id?: number;
242
+ deny_reason?: string;
243
+ published: string;
244
+ }
@@ -1,5 +1,5 @@
1
- import { CommentAggregates, CommunityAggregates, PostAggregates, SiteAggregates, PersonAggregates } from './aggregates';
2
- import { Comment, CommentReport, CommunitySafe, ModAdd, ModAddCommunity, ModTransferCommunity, ModBan, ModBanFromCommunity, ModLockPost, ModRemoveComment, ModRemoveCommunity, ModRemovePost, ModStickyPost, Post, PostReport, PrivateMessage, Site, PersonMention, PersonSafe, LocalUserSettings, AdminPurgeCommunity, AdminPurgePerson, AdminPurgePost, AdminPurgeComment } from './source';
1
+ import { CommentAggregates, CommunityAggregates, PersonAggregates, PostAggregates, SiteAggregates } from "./aggregates";
2
+ 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
3
  export interface PersonViewSafe {
4
4
  person: PersonSafe;
5
5
  counts: PersonAggregates;
@@ -140,24 +140,6 @@ export interface ModStickyPostView {
140
140
  post: Post;
141
141
  community: CommunitySafe;
142
142
  }
143
- export interface AdminPurgeCommunityView {
144
- admin_purge_community: AdminPurgeCommunity;
145
- admin: PersonSafe;
146
- }
147
- export interface AdminPurgePersonView {
148
- admin_purge_person: AdminPurgePerson;
149
- admin: PersonSafe;
150
- }
151
- export interface AdminPurgePostView {
152
- admin_purge_post: AdminPurgePost;
153
- admin: PersonSafe;
154
- community: CommunitySafe;
155
- }
156
- export interface AdminPurgeCommentView {
157
- admin_purge_comment: AdminPurgeComment;
158
- admin: PersonSafe;
159
- post: Post;
160
- }
161
143
  export interface CommunityFollowerView {
162
144
  community: CommunitySafe;
163
145
  follower: PersonSafe;
@@ -184,3 +166,9 @@ export interface CommunityView {
184
166
  blocked: boolean;
185
167
  counts: CommunityAggregates;
186
168
  }
169
+ export interface RegistrationApplicationView {
170
+ registration_application: RegistrationApplication;
171
+ creator_local_user: LocalUserSettings;
172
+ creator: PersonSafe;
173
+ admin?: PersonSafe;
174
+ }
@@ -1,9 +1,9 @@
1
- import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from './interfaces/api/comment';
2
- import { AddModToCommunity, BanFromCommunity, BlockCommunity, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, ListCommunities, RemoveCommunity, TransferCommunity } from './interfaces/api/community';
3
- import { CreatePost, CreatePostLike, CreatePostReport, DeletePost, EditPost, GetPost, GetPosts, GetSiteMetadata, ListPostReports, LockPost, RemovePost, ResolvePostReport, SavePost, StickyPost } from './interfaces/api/post';
4
- import { CreateSite, EditSite, GetModlog, GetSite, GetSiteConfig, PurgeComment, PurgeCommunity, PurgePerson, PurgePost, ResolveObject, SaveSiteConfig, Search, TransferSite } from './interfaces/api/site';
5
- import { AddAdmin, BanPerson, CreatePrivateMessage, DeleteAccount, DeletePrivateMessage, EditPrivateMessage, GetPrivateMessages, GetReplies, GetPersonDetails, GetPersonMentions, Login, MarkAllAsRead, MarkPrivateMessageAsRead, MarkPersonMentionAsRead, PasswordChange, PasswordReset, Register, SaveUserSettings, ChangePassword, BlockPerson, GetReportCount } from './interfaces/api/person';
6
- import { UserJoin, PostJoin, CommunityJoin } from './interfaces/api/websocket';
1
+ import { CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, ListCommentReports, MarkCommentAsRead, RemoveComment, ResolveCommentReport, SaveComment } from "./interfaces/api/comment";
2
+ import { AddModToCommunity, BanFromCommunity, BlockCommunity, CreateCommunity, DeleteCommunity, EditCommunity, FollowCommunity, GetCommunity, ListCommunities, RemoveCommunity, TransferCommunity } from "./interfaces/api/community";
3
+ import { AddAdmin, BanPerson, BlockPerson, ChangePassword, CreatePrivateMessage, DeleteAccount, DeletePrivateMessage, EditPrivateMessage, GetPersonDetails, GetPersonMentions, GetPrivateMessages, GetReplies, GetReportCount, GetUnreadCount, Login, MarkAllAsRead, MarkPersonMentionAsRead, MarkPrivateMessageAsRead, PasswordChange, PasswordReset, Register, SaveUserSettings, VerifyEmail } from "./interfaces/api/person";
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";
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.
9
9
  *
@@ -197,6 +197,18 @@ export declare class LemmyWebsocket {
197
197
  * Add an admin to your site.
198
198
  */
199
199
  addAdmin(form: AddAdmin): string;
200
+ /**
201
+ * Get the unread registration applications count.
202
+ */
203
+ getUnreadRegistrationApplicationCount(form: GetUnreadRegistrationApplicationCount): string;
204
+ /**
205
+ * List the unread registration applications.
206
+ */
207
+ listRegistrationApplications(form: ListRegistrationApplications): string;
208
+ /**
209
+ * Approve a registration application
210
+ */
211
+ approveRegistrationApplication(form: ApproveRegistrationApplication): string;
200
212
  /**
201
213
  * Get the details for a person.
202
214
  */
@@ -257,6 +269,14 @@ export declare class LemmyWebsocket {
257
269
  * Get counts for your reports
258
270
  */
259
271
  getReportCount(form: GetReportCount): string;
272
+ /**
273
+ * Get your unread counts
274
+ */
275
+ getUnreadCount(form: GetUnreadCount): string;
276
+ /**
277
+ * Verify your email
278
+ */
279
+ verifyEmail(form: VerifyEmail): string;
260
280
  /**
261
281
  * Delete your account.
262
282
  */
@@ -301,20 +321,4 @@ export declare class LemmyWebsocket {
301
321
  * Block a community.
302
322
  */
303
323
  blockCommunity(form: BlockCommunity): string;
304
- /**
305
- * Purge / Delete a person from the database.
306
- */
307
- purgePerson(form: PurgePerson): string;
308
- /**
309
- * Purge / Delete a community from the database.
310
- */
311
- purgeCommunity(form: PurgeCommunity): string;
312
- /**
313
- * Purge / Delete a post from the database.
314
- */
315
- purgePost(form: PurgePost): string;
316
- /**
317
- * Purge / Delete a comment from the database.
318
- */
319
- purgeComment(form: PurgeComment): string;
320
324
  }