lemmy-js-client 0.19.4-alpha.6 → 0.19.4-alpha.8
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +15 -0
- package/dist/http.js +16 -0
- package/dist/index.d.ts +5 -0
- package/dist/types/EditSite.d.ts +1 -0
- package/dist/types/GetModlog.d.ts +4 -0
- package/dist/types/GetPosts.d.ts +1 -0
- package/dist/types/GetSiteResponse.d.ts +2 -0
- package/dist/types/HidePost.d.ts +5 -0
- package/dist/types/HidePost.js +2 -0
- package/dist/types/LemmyErrorType.d.ts +4 -0
- package/dist/types/ListCommentReports.d.ts +2 -0
- package/dist/types/ListMedia.d.ts +4 -0
- package/dist/types/ListMedia.js +3 -0
- package/dist/types/ListMediaResponse.d.ts +4 -0
- package/dist/types/ListMediaResponse.js +2 -0
- package/dist/types/ListPostReports.d.ts +2 -0
- package/dist/types/LocalImage.d.ts +7 -0
- package/dist/types/LocalImage.js +2 -0
- package/dist/types/LocalSiteUrlBlocklist.d.ts +6 -0
- package/dist/types/LocalSiteUrlBlocklist.js +3 -0
- package/dist/types/MarkPostAsRead.d.ts +1 -2
- package/dist/types/ModlogListParams.d.ts +4 -0
- package/dist/types/PostView.d.ts +1 -0
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -132,6 +132,9 @@ import { ListPostLikes } from "./types/ListPostLikes";
|
|
132
132
|
import { ListPostLikesResponse } from "./types/ListPostLikesResponse";
|
133
133
|
import { ListCommentLikes } from "./types/ListCommentLikes";
|
134
134
|
import { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
|
135
|
+
import { HidePost } from "./types/HidePost";
|
136
|
+
import { ListMedia } from "./types/ListMedia";
|
137
|
+
import { ListMediaResponse } from "./types/ListMediaResponse";
|
135
138
|
/**
|
136
139
|
* Helps build lemmy HTTP requests.
|
137
140
|
*/
|
@@ -205,6 +208,12 @@ export declare class LemmyHttp {
|
|
205
208
|
* `HTTP.GET /user/validate_auth`
|
206
209
|
*/
|
207
210
|
validateAuth(): Promise<SuccessResponse>;
|
211
|
+
/**
|
212
|
+
* List all the media for your user
|
213
|
+
*
|
214
|
+
* `HTTP.GET /user/list_media`
|
215
|
+
*/
|
216
|
+
listMedia(form: ListMedia): Promise<ListMediaResponse>;
|
208
217
|
/**
|
209
218
|
* Enable / Disable TOTP / two-factor authentication.
|
210
219
|
*
|
@@ -341,6 +350,12 @@ export declare class LemmyHttp {
|
|
341
350
|
* `HTTP.POST /post/mark_as_read`
|
342
351
|
*/
|
343
352
|
markPostAsRead(form: MarkPostAsRead): Promise<SuccessResponse>;
|
353
|
+
/**
|
354
|
+
* Hide a post from list views.
|
355
|
+
*
|
356
|
+
* `HTTP.POST /post/hide`
|
357
|
+
*/
|
358
|
+
hidePost(form: HidePost): Promise<SuccessResponse>;
|
344
359
|
/**
|
345
360
|
* A moderator can lock a post ( IE disable new comments ).
|
346
361
|
*
|
package/dist/http.js
CHANGED
@@ -133,6 +133,14 @@ class LemmyHttp {
|
|
133
133
|
validateAuth() {
|
134
134
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/validate_auth", {});
|
135
135
|
}
|
136
|
+
/**
|
137
|
+
* List all the media for your user
|
138
|
+
*
|
139
|
+
* `HTTP.GET /user/list_media`
|
140
|
+
*/
|
141
|
+
listMedia(form) {
|
142
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/list_media", form);
|
143
|
+
}
|
136
144
|
/**
|
137
145
|
* Enable / Disable TOTP / two-factor authentication.
|
138
146
|
*
|
@@ -313,6 +321,14 @@ class LemmyHttp {
|
|
313
321
|
markPostAsRead(form) {
|
314
322
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/mark_as_read", form);
|
315
323
|
}
|
324
|
+
/**
|
325
|
+
* Hide a post from list views.
|
326
|
+
*
|
327
|
+
* `HTTP.POST /post/hide`
|
328
|
+
*/
|
329
|
+
hidePost(form) {
|
330
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/post/hide", form);
|
331
|
+
}
|
316
332
|
/**
|
317
333
|
* A moderator can lock a post ( IE disable new comments ).
|
318
334
|
*
|
package/dist/index.d.ts
CHANGED
@@ -110,6 +110,7 @@ export { GetSiteResponse } from "./types/GetSiteResponse";
|
|
110
110
|
export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
|
111
111
|
export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
|
112
112
|
export { HideCommunity } from "./types/HideCommunity";
|
113
|
+
export { HidePost } from "./types/HidePost";
|
113
114
|
export { Instance } from "./types/Instance";
|
114
115
|
export { InstanceBlockView } from "./types/InstanceBlockView";
|
115
116
|
export { InstanceId } from "./types/InstanceId";
|
@@ -124,6 +125,8 @@ export { ListCommentReports } from "./types/ListCommentReports";
|
|
124
125
|
export { ListCommentReportsResponse } from "./types/ListCommentReportsResponse";
|
125
126
|
export { ListCommunities } from "./types/ListCommunities";
|
126
127
|
export { ListCommunitiesResponse } from "./types/ListCommunitiesResponse";
|
128
|
+
export { ListMedia } from "./types/ListMedia";
|
129
|
+
export { ListMediaResponse } from "./types/ListMediaResponse";
|
127
130
|
export { ListPostLikes } from "./types/ListPostLikes";
|
128
131
|
export { ListPostLikesResponse } from "./types/ListPostLikesResponse";
|
129
132
|
export { ListPostReports } from "./types/ListPostReports";
|
@@ -133,9 +136,11 @@ export { ListPrivateMessageReportsResponse } from "./types/ListPrivateMessageRep
|
|
133
136
|
export { ListRegistrationApplications } from "./types/ListRegistrationApplications";
|
134
137
|
export { ListRegistrationApplicationsResponse } from "./types/ListRegistrationApplicationsResponse";
|
135
138
|
export { ListingType } from "./types/ListingType";
|
139
|
+
export { LocalImage } from "./types/LocalImage";
|
136
140
|
export { LocalSite } from "./types/LocalSite";
|
137
141
|
export { LocalSiteId } from "./types/LocalSiteId";
|
138
142
|
export { LocalSiteRateLimit } from "./types/LocalSiteRateLimit";
|
143
|
+
export { LocalSiteUrlBlocklist } from "./types/LocalSiteUrlBlocklist";
|
139
144
|
export { LocalUser } from "./types/LocalUser";
|
140
145
|
export { LocalUserId } from "./types/LocalUserId";
|
141
146
|
export { LocalUserView } from "./types/LocalUserView";
|
package/dist/types/EditSite.d.ts
CHANGED
@@ -42,6 +42,7 @@ export interface EditSite {
|
|
42
42
|
captcha_difficulty?: string;
|
43
43
|
allowed_instances?: Array<string>;
|
44
44
|
blocked_instances?: Array<string>;
|
45
|
+
blocked_urls?: Array<string>;
|
45
46
|
taglines?: Array<string>;
|
46
47
|
registration_mode?: RegistrationMode;
|
47
48
|
reports_email_admins?: boolean;
|
@@ -1,6 +1,8 @@
|
|
1
|
+
import type { CommentId } from "./CommentId";
|
1
2
|
import type { CommunityId } from "./CommunityId";
|
2
3
|
import type { ModlogActionType } from "./ModlogActionType";
|
3
4
|
import type { PersonId } from "./PersonId";
|
5
|
+
import type { PostId } from "./PostId";
|
4
6
|
export interface GetModlog {
|
5
7
|
mod_person_id?: PersonId;
|
6
8
|
community_id?: CommunityId;
|
@@ -8,4 +10,6 @@ export interface GetModlog {
|
|
8
10
|
limit?: number;
|
9
11
|
type_?: ModlogActionType;
|
10
12
|
other_person_id?: PersonId;
|
13
|
+
post_id?: PostId;
|
14
|
+
comment_id?: CommentId;
|
11
15
|
}
|
package/dist/types/GetPosts.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { CustomEmojiView } from "./CustomEmojiView";
|
2
2
|
import type { Language } from "./Language";
|
3
3
|
import type { LanguageId } from "./LanguageId";
|
4
|
+
import type { LocalSiteUrlBlocklist } from "./LocalSiteUrlBlocklist";
|
4
5
|
import type { MyUserInfo } from "./MyUserInfo";
|
5
6
|
import type { PersonView } from "./PersonView";
|
6
7
|
import type { SiteView } from "./SiteView";
|
@@ -14,4 +15,5 @@ export interface GetSiteResponse {
|
|
14
15
|
discussion_languages: Array<LanguageId>;
|
15
16
|
taglines: Array<Tagline>;
|
16
17
|
custom_emojis: Array<CustomEmojiView>;
|
18
|
+
blocked_urls: Array<LocalSiteUrlBlocklist>;
|
17
19
|
}
|
@@ -225,6 +225,8 @@ export type LemmyErrorType = {
|
|
225
225
|
error: "couldnt_save_post";
|
226
226
|
} | {
|
227
227
|
error: "couldnt_mark_post_as_read";
|
228
|
+
} | {
|
229
|
+
error: "couldnt_hide_post";
|
228
230
|
} | {
|
229
231
|
error: "couldnt_update_community";
|
230
232
|
} | {
|
@@ -247,6 +249,8 @@ export type LemmyErrorType = {
|
|
247
249
|
error: "couldnt_set_all_email_verified";
|
248
250
|
} | {
|
249
251
|
error: "banned";
|
252
|
+
} | {
|
253
|
+
error: "blocked_url";
|
250
254
|
} | {
|
251
255
|
error: "couldnt_get_comments";
|
252
256
|
} | {
|
@@ -1,9 +1,13 @@
|
|
1
|
+
import type { CommentId } from "./CommentId";
|
1
2
|
import type { CommunityId } from "./CommunityId";
|
2
3
|
import type { PersonId } from "./PersonId";
|
4
|
+
import type { PostId } from "./PostId";
|
3
5
|
export interface ModlogListParams {
|
4
6
|
community_id?: CommunityId;
|
5
7
|
mod_person_id?: PersonId;
|
6
8
|
other_person_id?: PersonId;
|
9
|
+
post_id?: PostId;
|
10
|
+
comment_id?: CommentId;
|
7
11
|
page?: number;
|
8
12
|
limit?: number;
|
9
13
|
hide_modlog_names: boolean;
|
package/dist/types/PostView.d.ts
CHANGED
package/package.json
CHANGED