lemmy-js-client 1.0.0-post-tags.1 → 1.0.0-post-tags.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/http.d.ts +10 -0
- package/dist/http.js +26 -0
- package/dist/index.d.ts +2 -0
- package/dist/types/CreateCommunityTag.d.ts +2 -0
- package/dist/types/ModEditPost.d.ts +10 -0
- package/dist/types/ModEditPost.js +2 -0
- package/dist/types/Tag.d.ts +5 -13
- package/dist/types/TagsView.d.ts +1 -1
- package/dist/types/UpdateCommunityTag.d.ts +9 -0
- package/dist/types/UpdateCommunityTag.js +2 -0
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -25,6 +25,7 @@ import { CreateCommentReport } from "./types/CreateCommentReport";
|
|
25
25
|
import { CreateCommunity } from "./types/CreateCommunity";
|
26
26
|
import { CreateCommunityReport } from "./types/CreateCommunityReport";
|
27
27
|
import { CreateCommunityTag } from "./types/CreateCommunityTag";
|
28
|
+
import { UpdateCommunityTag } from "./types/UpdateCommunityTag";
|
28
29
|
import { CreateCustomEmoji } from "./types/CreateCustomEmoji";
|
29
30
|
import { CreateOAuthProvider } from "./types/CreateOAuthProvider";
|
30
31
|
import { CreatePost } from "./types/CreatePost";
|
@@ -143,6 +144,7 @@ import { ListLoginsResponse } from "./types/ListLoginsResponse";
|
|
143
144
|
import { ListPersonLikedResponse } from "./types/ListPersonLikedResponse";
|
144
145
|
import { MarkNotificationAsRead } from "./types/MarkNotificationAsRead";
|
145
146
|
import { ListNotificationsResponse } from "./types/ListNotificationsResponse";
|
147
|
+
import { ModEditPost } from "./types/ModEditPost";
|
146
148
|
type RequestOptions = Pick<RequestInit, "signal">;
|
147
149
|
/**
|
148
150
|
* Helps build lemmy HTTP requests.
|
@@ -326,6 +328,10 @@ export declare class LemmyHttp extends Controller {
|
|
326
328
|
* @summary Edit a post.
|
327
329
|
*/
|
328
330
|
editPost(form: EditPost, options?: RequestOptions): Promise<PostResponse>;
|
331
|
+
/**
|
332
|
+
* @summary Mods can change nsfw flag and tags for a post
|
333
|
+
*/
|
334
|
+
modEditPost(form: ModEditPost, options?: RequestOptions): Promise<PostResponse>;
|
329
335
|
/**
|
330
336
|
* @summary Delete a post.
|
331
337
|
*/
|
@@ -630,6 +636,10 @@ export declare class LemmyHttp extends Controller {
|
|
630
636
|
* @summary Create a community post tag.
|
631
637
|
*/
|
632
638
|
createCommunityTag(form: CreateCommunityTag, options?: RequestOptions): Promise<Tag>;
|
639
|
+
/**
|
640
|
+
* @summary Edit a community post tag.
|
641
|
+
*/
|
642
|
+
updateCommunityTag(form: UpdateCommunityTag, options?: RequestOptions): Promise<Tag>;
|
633
643
|
/**
|
634
644
|
* @summary Delete a post tag in a community.
|
635
645
|
*/
|
package/dist/http.js
CHANGED
@@ -298,6 +298,12 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
298
298
|
async editPost(form, options) {
|
299
299
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post", form, options);
|
300
300
|
}
|
301
|
+
/**
|
302
|
+
* @summary Mods can change nsfw flag and tags for a post
|
303
|
+
*/
|
304
|
+
async modEditPost(form, options) {
|
305
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Put, "/post/mod_update", form, options);
|
306
|
+
}
|
301
307
|
/**
|
302
308
|
* @summary Delete a post.
|
303
309
|
*/
|
@@ -754,6 +760,12 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
|
|
754
760
|
createCommunityTag(form, options) {
|
755
761
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
756
762
|
}
|
763
|
+
/**
|
764
|
+
* @summary Edit a community post tag.
|
765
|
+
*/
|
766
|
+
updateCommunityTag(form, options) {
|
767
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/tag", form, options);
|
768
|
+
}
|
757
769
|
/**
|
758
770
|
* @summary Delete a post tag in a community.
|
759
771
|
*/
|
@@ -1264,6 +1276,13 @@ __decorate([
|
|
1264
1276
|
__param(0, (0, runtime_1.Body)()),
|
1265
1277
|
__param(1, (0, runtime_1.Inject)())
|
1266
1278
|
], LemmyHttp.prototype, "editPost", null);
|
1279
|
+
__decorate([
|
1280
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1281
|
+
(0, runtime_1.Put)("/post/mod_update"),
|
1282
|
+
(0, runtime_1.Tags)("Post"),
|
1283
|
+
__param(0, (0, runtime_1.Body)()),
|
1284
|
+
__param(1, (0, runtime_1.Inject)())
|
1285
|
+
], LemmyHttp.prototype, "modEditPost", null);
|
1267
1286
|
__decorate([
|
1268
1287
|
(0, runtime_1.Security)("bearerAuth"),
|
1269
1288
|
(0, runtime_1.Post)("/post/delete"),
|
@@ -1794,6 +1813,13 @@ __decorate([
|
|
1794
1813
|
__param(0, (0, runtime_1.Body)()),
|
1795
1814
|
__param(1, (0, runtime_1.Inject)())
|
1796
1815
|
], LemmyHttp.prototype, "createCommunityTag", null);
|
1816
|
+
__decorate([
|
1817
|
+
(0, runtime_1.Security)("bearerAuth"),
|
1818
|
+
(0, runtime_1.Put)("/community/tag"),
|
1819
|
+
(0, runtime_1.Tags)("Community"),
|
1820
|
+
__param(0, (0, runtime_1.Body)()),
|
1821
|
+
__param(1, (0, runtime_1.Inject)())
|
1822
|
+
], LemmyHttp.prototype, "updateCommunityTag", null);
|
1797
1823
|
__decorate([
|
1798
1824
|
(0, runtime_1.Security)("bearerAuth"),
|
1799
1825
|
(0, runtime_1.Delete)("/community/tag"),
|
package/dist/index.d.ts
CHANGED
@@ -229,6 +229,7 @@ export { ModBanView } from "./types/ModBanView";
|
|
229
229
|
export { ModChangeCommunityVisibility } from "./types/ModChangeCommunityVisibility";
|
230
230
|
export { ModChangeCommunityVisibilityId } from "./types/ModChangeCommunityVisibilityId";
|
231
231
|
export { ModChangeCommunityVisibilityView } from "./types/ModChangeCommunityVisibilityView";
|
232
|
+
export { ModEditPost } from "./types/ModEditPost";
|
232
233
|
export { ModFeaturePost } from "./types/ModFeaturePost";
|
233
234
|
export { ModFeaturePostId } from "./types/ModFeaturePostId";
|
234
235
|
export { ModFeaturePostView } from "./types/ModFeaturePostView";
|
@@ -351,6 +352,7 @@ export { TaglineResponse } from "./types/TaglineResponse";
|
|
351
352
|
export { TagsView } from "./types/TagsView";
|
352
353
|
export { TransferCommunity } from "./types/TransferCommunity";
|
353
354
|
export { UpdateCommunityNotifications } from "./types/UpdateCommunityNotifications";
|
355
|
+
export { UpdateCommunityTag } from "./types/UpdateCommunityTag";
|
354
356
|
export { UpdateMultiCommunity } from "./types/UpdateMultiCommunity";
|
355
357
|
export { UpdatePostNotifications } from "./types/UpdatePostNotifications";
|
356
358
|
export { UpdateTagline } from "./types/UpdateTagline";
|
package/dist/types/Tag.d.ts
CHANGED
@@ -2,25 +2,17 @@ import type { CommunityId } from "./CommunityId";
|
|
2
2
|
import type { DbUrl } from "./DbUrl";
|
3
3
|
import type { TagId } from "./TagId";
|
4
4
|
/**
|
5
|
-
* A tag that
|
6
|
-
*
|
7
|
-
* The assignment happens by the post creator and can be updated by the community moderators.
|
8
|
-
*
|
9
|
-
* A tag is a federated object that gives additional context to another object, which can be
|
10
|
-
* displayed and filtered on. Currently, we only have community post tags, which is a tag that is
|
11
|
-
* created by the mods of a community, then assigned to posts by post authors as well as mods of a
|
12
|
-
* community, to categorize a post.
|
13
|
-
*
|
14
|
-
* In the future we may add more tag types, depending on the requirements, this will lead to either
|
15
|
-
* expansion of this table (community_id optional, addition of tag_type enum) or split of this
|
16
|
-
* table / creation of new tables.
|
5
|
+
* A tag that is created by community moderators, and assigned to posts by the creator
|
6
|
+
* or by mods.
|
17
7
|
*/
|
18
8
|
export type Tag = {
|
19
9
|
id: TagId;
|
20
10
|
ap_id: DbUrl;
|
21
11
|
name: string;
|
12
|
+
display_name?: string;
|
13
|
+
description?: string;
|
22
14
|
/**
|
23
|
-
*
|
15
|
+
* The community that this tag belongs to
|
24
16
|
*/
|
25
17
|
community_id: CommunityId;
|
26
18
|
published_at: string;
|
package/dist/types/TagsView.d.ts
CHANGED
package/package.json
CHANGED