lemmy-js-client 0.15.0-rc.3 → 0.15.0-rc.6

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,6 +1,6 @@
1
1
  import { CommentReportResponse, CommentResponse, CreateComment, CreateCommentLike, CreateCommentReport, DeleteComment, EditComment, GetComments, GetCommentsResponse, ListCommentReports, ListCommentReportsResponse, MarkCommentAsRead, 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
- import { AddAdmin, AddAdminResponse, BanPerson, BanPersonResponse, BlockPerson, BlockPersonResponse, ChangePassword, CreatePrivateMessage, DeleteAccount, DeleteAccountResponse, DeletePrivateMessage, EditPrivateMessage, 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 } from "./interfaces/api/person";
3
+ import { AddAdmin, AddAdminResponse, BanPerson, BanPersonResponse, BlockPerson, BlockPersonResponse, ChangePassword, CreatePrivateMessage, DeleteAccount, DeleteAccountResponse, DeletePrivateMessage, EditPrivateMessage, 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
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";
6
6
  /**
@@ -288,7 +288,7 @@ export declare class LemmyHttp {
288
288
  /**
289
289
  * Verify your email
290
290
  */
291
- verifyEmail(form: VerifyEmail): Promise<LoginResponse>;
291
+ verifyEmail(form: VerifyEmail): Promise<VerifyEmailResponse>;
292
292
  /**
293
293
  * Add an admin to your site.
294
294
  */
@@ -254,6 +254,8 @@ export interface GetUnreadCountResponse {
254
254
  export interface VerifyEmail {
255
255
  token: string;
256
256
  }
257
+ export interface VerifyEmailResponse {
258
+ }
257
259
  export interface BlockPerson {
258
260
  person_id: number;
259
261
  block: boolean;
@@ -41,6 +41,7 @@ export interface GetModlog {
41
41
  community_id?: number;
42
42
  page?: number;
43
43
  limit?: number;
44
+ auth?: string;
44
45
  }
45
46
  export interface GetModlogResponse {
46
47
  removed_posts: ModRemovePostView[];
@@ -0,0 +1,190 @@
1
+ import {
2
+ CommentView,
3
+ CommunityFollowerView,
4
+ CommunityModeratorView,
5
+ PostView,
6
+ PrivateMessageView,
7
+ UserMentionView,
8
+ UserViewSafe,
9
+ } from "../views";
10
+ export interface Login {
11
+ username_or_email: string;
12
+ password: string;
13
+ }
14
+ /**
15
+ * Only the first user will be able to be the admin.
16
+ */
17
+ export interface Register {
18
+ username: string;
19
+ email?: string;
20
+ password: string;
21
+ password_verify: string;
22
+ show_nsfw: boolean;
23
+ captcha_uuid?: string;
24
+ captcha_answer?: string;
25
+ }
26
+ export interface GetCaptcha {}
27
+ export interface GetCaptchaResponse {
28
+ ok?: CaptchaResponse;
29
+ }
30
+ export interface CaptchaResponse {
31
+ png: string;
32
+ wav?: string;
33
+ uuid: string;
34
+ }
35
+ export interface SaveUserSettings {
36
+ show_nsfw: boolean;
37
+ theme: string;
38
+ default_sort_type: number;
39
+ default_listing_type: number;
40
+ lang: string;
41
+ avatar?: string;
42
+ banner?: string;
43
+ preferred_username?: string;
44
+ email?: string;
45
+ bio?: string;
46
+ matrix_user_id?: string;
47
+ new_password?: string;
48
+ new_password_verify?: string;
49
+ old_password?: string;
50
+ show_avatars: boolean;
51
+ send_notifications_to_email: boolean;
52
+ auth: string;
53
+ }
54
+ /**
55
+ * The `jwt` string should be stored and used anywhere `auth` is called for.
56
+ */
57
+ export interface LoginResponse {
58
+ jwt: string;
59
+ }
60
+ /**
61
+ * `username` can only be used for local users. To get details for a federated user, pass `user_id` instead.
62
+ */
63
+ export interface GetUserDetails {
64
+ user_id?: number;
65
+ username?: string;
66
+ sort: string;
67
+ page?: number;
68
+ limit?: number;
69
+ community_id?: number;
70
+ saved_only: boolean;
71
+ auth?: string;
72
+ }
73
+ export interface GetUserDetailsResponse {
74
+ user_view: UserViewSafe;
75
+ follows: CommunityFollowerView[];
76
+ moderates: CommunityModeratorView[];
77
+ comments: CommentView[];
78
+ posts: PostView[];
79
+ }
80
+ export interface GetRepliesResponse {
81
+ replies: CommentView[];
82
+ }
83
+ export interface GetUserMentionsResponse {
84
+ mentions: UserMentionView[];
85
+ }
86
+ export interface MarkAllAsRead {
87
+ auth: string;
88
+ }
89
+ export interface AddAdmin {
90
+ user_id: number;
91
+ added: boolean;
92
+ auth: string;
93
+ }
94
+ export interface AddAdminResponse {
95
+ admins: UserViewSafe[];
96
+ }
97
+ export interface BanUser {
98
+ user_id: number;
99
+ ban: boolean;
100
+ remove_data: boolean;
101
+ reason?: string;
102
+ expires?: number;
103
+ auth: string;
104
+ }
105
+ export interface BanUserResponse {
106
+ user_view: UserViewSafe;
107
+ banned: boolean;
108
+ }
109
+ export interface GetReplies {
110
+ sort: string;
111
+ page?: number;
112
+ limit?: number;
113
+ unread_only: boolean;
114
+ auth: string;
115
+ }
116
+ export interface GetUserMentions {
117
+ sort: string;
118
+ page?: number;
119
+ limit?: number;
120
+ unread_only: boolean;
121
+ auth: string;
122
+ }
123
+ export interface MarkUserMentionAsRead {
124
+ user_mention_id: number;
125
+ read: boolean;
126
+ auth: string;
127
+ }
128
+ export interface UserMentionResponse {
129
+ user_mention_view: UserMentionView;
130
+ }
131
+ /**
132
+ * Permanently deletes your posts and comments
133
+ */
134
+ export interface DeleteAccount {
135
+ password: string;
136
+ auth: string;
137
+ }
138
+ export interface PasswordReset {
139
+ email: string;
140
+ }
141
+ export interface PasswordResetResponse {}
142
+ export interface PasswordChange {
143
+ token: string;
144
+ password: string;
145
+ password_verify: string;
146
+ }
147
+ export interface CreatePrivateMessage {
148
+ content: string;
149
+ recipient_id: number;
150
+ auth: string;
151
+ }
152
+ export interface EditPrivateMessage {
153
+ private_message_id: number;
154
+ content: string;
155
+ auth: string;
156
+ }
157
+ export interface DeletePrivateMessage {
158
+ private_message_id: number;
159
+ deleted: boolean;
160
+ auth: string;
161
+ }
162
+ export interface MarkPrivateMessageAsRead {
163
+ private_message_id: number;
164
+ read: boolean;
165
+ auth: string;
166
+ }
167
+ export interface GetPrivateMessages {
168
+ unread_only: boolean;
169
+ page?: number;
170
+ limit?: number;
171
+ auth: string;
172
+ }
173
+ export interface PrivateMessagesResponse {
174
+ private_messages: PrivateMessageView[];
175
+ }
176
+ export interface PrivateMessageResponse {
177
+ private_message_view: PrivateMessageView;
178
+ }
179
+ /**
180
+ * If a community is supplied, returns the report count for only that community, otherwise returns the report count for all communities the user moderates.
181
+ */
182
+ export interface GetReportCount {
183
+ community?: number;
184
+ auth: string;
185
+ }
186
+ export interface GetReportCountResponse {
187
+ community?: number;
188
+ comment_reports: number;
189
+ post_reports: number;
190
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
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-rc.3",
4
+ "version": "0.15.0-rc.6",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",