lemmy-js-client 1.0.0-media-fixes.0 → 1.0.0-media-fixes.1
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 +22 -0
- package/dist/http.js +362 -577
- package/dist/index.d.ts +4 -0
- package/dist/types/CommentReplyView.d.ts +2 -0
- package/dist/types/CommentView.d.ts +2 -0
- package/dist/types/CommunityView.d.ts +2 -0
- package/dist/types/CreateCommunityTag.d.ts +8 -0
- package/dist/types/CreateCommunityTag.js +2 -0
- package/dist/types/DeleteCommunityTag.d.ts +7 -0
- package/dist/types/DeleteCommunityTag.js +2 -0
- package/dist/types/EditPost.d.ts +1 -1
- package/dist/types/LemmyErrorType.d.ts +4 -0
- package/dist/types/PersonPostMentionView.d.ts +2 -0
- package/dist/types/PostView.d.ts +2 -0
- package/dist/types/Tag.d.ts +8 -6
- package/dist/types/TagsView.d.ts +5 -0
- package/dist/types/TagsView.js +2 -0
- package/dist/types/UpdateCommunityTag.d.ts +8 -0
- package/dist/types/UpdateCommunityTag.js +2 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
@@ -72,6 +72,7 @@ export { CreateCommentLike } from "./types/CreateCommentLike";
|
|
72
72
|
export { CreateCommentReport } from "./types/CreateCommentReport";
|
73
73
|
export { CreateCommunity } from "./types/CreateCommunity";
|
74
74
|
export { CreateCommunityReport } from "./types/CreateCommunityReport";
|
75
|
+
export { CreateCommunityTag } from "./types/CreateCommunityTag";
|
75
76
|
export { CreateCustomEmoji } from "./types/CreateCustomEmoji";
|
76
77
|
export { CreateOAuthProvider } from "./types/CreateOAuthProvider";
|
77
78
|
export { CreatePost } from "./types/CreatePost";
|
@@ -90,6 +91,7 @@ export { DbUrl } from "./types/DbUrl";
|
|
90
91
|
export { DeleteAccount } from "./types/DeleteAccount";
|
91
92
|
export { DeleteComment } from "./types/DeleteComment";
|
92
93
|
export { DeleteCommunity } from "./types/DeleteCommunity";
|
94
|
+
export { DeleteCommunityTag } from "./types/DeleteCommunityTag";
|
93
95
|
export { DeleteCustomEmoji } from "./types/DeleteCustomEmoji";
|
94
96
|
export { DeleteImageParams } from "./types/DeleteImageParams";
|
95
97
|
export { DeleteOAuthProvider } from "./types/DeleteOAuthProvider";
|
@@ -321,7 +323,9 @@ export { TagId } from "./types/TagId";
|
|
321
323
|
export { Tagline } from "./types/Tagline";
|
322
324
|
export { TaglineId } from "./types/TaglineId";
|
323
325
|
export { TaglineResponse } from "./types/TaglineResponse";
|
326
|
+
export { TagsView } from "./types/TagsView";
|
324
327
|
export { TransferCommunity } from "./types/TransferCommunity";
|
328
|
+
export { UpdateCommunityTag } from "./types/UpdateCommunityTag";
|
325
329
|
export { UpdateTagline } from "./types/UpdateTagline";
|
326
330
|
export { UpdateTotp } from "./types/UpdateTotp";
|
327
331
|
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
@@ -7,6 +7,7 @@ import type { InstanceActions } from "./InstanceActions";
|
|
7
7
|
import type { Person } from "./Person";
|
8
8
|
import type { PersonActions } from "./PersonActions";
|
9
9
|
import type { Post } from "./Post";
|
10
|
+
import type { TagsView } from "./TagsView";
|
10
11
|
/**
|
11
12
|
* A comment reply view.
|
12
13
|
*/
|
@@ -25,6 +26,7 @@ export type CommentReplyView = {
|
|
25
26
|
creator_local_instance_actions?: InstanceActions;
|
26
27
|
creator_community_actions?: CommunityActions;
|
27
28
|
creator_is_admin: boolean;
|
29
|
+
post_tags: TagsView;
|
28
30
|
can_mod: boolean;
|
29
31
|
creator_banned: boolean;
|
30
32
|
};
|
@@ -6,6 +6,7 @@ import type { InstanceActions } from "./InstanceActions";
|
|
6
6
|
import type { Person } from "./Person";
|
7
7
|
import type { PersonActions } from "./PersonActions";
|
8
8
|
import type { Post } from "./Post";
|
9
|
+
import type { TagsView } from "./TagsView";
|
9
10
|
/**
|
10
11
|
* A comment view.
|
11
12
|
*/
|
@@ -22,6 +23,7 @@ export type CommentView = {
|
|
22
23
|
creator_local_instance_actions?: InstanceActions;
|
23
24
|
creator_community_actions?: CommunityActions;
|
24
25
|
creator_is_admin: boolean;
|
26
|
+
post_tags: TagsView;
|
25
27
|
can_mod: boolean;
|
26
28
|
creator_banned: boolean;
|
27
29
|
};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { Community } from "./Community";
|
2
2
|
import type { CommunityActions } from "./CommunityActions";
|
3
3
|
import type { InstanceActions } from "./InstanceActions";
|
4
|
+
import type { TagsView } from "./TagsView";
|
4
5
|
/**
|
5
6
|
* A community view.
|
6
7
|
*/
|
@@ -9,4 +10,5 @@ export type CommunityView = {
|
|
9
10
|
community_actions?: CommunityActions;
|
10
11
|
instance_actions?: InstanceActions;
|
11
12
|
can_mod: boolean;
|
13
|
+
post_tags: TagsView;
|
12
14
|
};
|
package/dist/types/EditPost.d.ts
CHANGED
@@ -22,9 +22,9 @@ export type EditPost = {
|
|
22
22
|
* Instead of fetching a thumbnail, use a custom one.
|
23
23
|
*/
|
24
24
|
custom_thumbnail?: string;
|
25
|
-
tags?: Array<TagId>;
|
26
25
|
/**
|
27
26
|
* Time when this post should be scheduled. Null means publish immediately.
|
28
27
|
*/
|
29
28
|
scheduled_publish_time?: number;
|
29
|
+
tags?: Array<TagId>;
|
30
30
|
};
|
@@ -253,6 +253,10 @@ export type LemmyErrorType = {
|
|
253
253
|
error: "invalid_unix_time";
|
254
254
|
} | {
|
255
255
|
error: "invalid_bot_action";
|
256
|
+
} | {
|
257
|
+
error: "invalid_tag_name";
|
258
|
+
} | {
|
259
|
+
error: "tag_not_in_community";
|
256
260
|
} | {
|
257
261
|
error: "cant_block_local_instance";
|
258
262
|
} | {
|
@@ -7,6 +7,7 @@ import type { PersonActions } from "./PersonActions";
|
|
7
7
|
import type { PersonPostMention } from "./PersonPostMention";
|
8
8
|
import type { Post } from "./Post";
|
9
9
|
import type { PostActions } from "./PostActions";
|
10
|
+
import type { TagsView } from "./TagsView";
|
10
11
|
/**
|
11
12
|
* A person post mention view.
|
12
13
|
*/
|
@@ -24,6 +25,7 @@ export type PersonPostMentionView = {
|
|
24
25
|
creator_home_instance_actions?: InstanceActions;
|
25
26
|
creator_local_instance_actions?: InstanceActions;
|
26
27
|
creator_community_actions?: CommunityActions;
|
28
|
+
post_tags: TagsView;
|
27
29
|
creator_is_admin: boolean;
|
28
30
|
can_mod: boolean;
|
29
31
|
creator_banned: boolean;
|
package/dist/types/PostView.d.ts
CHANGED
@@ -6,6 +6,7 @@ import type { Person } from "./Person";
|
|
6
6
|
import type { PersonActions } from "./PersonActions";
|
7
7
|
import type { Post } from "./Post";
|
8
8
|
import type { PostActions } from "./PostActions";
|
9
|
+
import type { TagsView } from "./TagsView";
|
9
10
|
/**
|
10
11
|
* A post view.
|
11
12
|
*/
|
@@ -22,6 +23,7 @@ export type PostView = {
|
|
22
23
|
creator_local_instance_actions?: InstanceActions;
|
23
24
|
creator_community_actions?: CommunityActions;
|
24
25
|
creator_is_admin: boolean;
|
26
|
+
tags: TagsView;
|
25
27
|
can_mod: boolean;
|
26
28
|
creator_banned: boolean;
|
27
29
|
};
|
package/dist/types/Tag.d.ts
CHANGED
@@ -7,16 +7,18 @@ import type { TagId } from "./TagId";
|
|
7
7
|
* The assignment happens by the post creator and can be updated by the community moderators.
|
8
8
|
*
|
9
9
|
* A tag is a federatable object that gives additional context to another object, which can be
|
10
|
-
* displayed and filtered on
|
11
|
-
* created by
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
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.
|
15
17
|
*/
|
16
18
|
export type Tag = {
|
17
19
|
id: TagId;
|
18
20
|
ap_id: DbUrl;
|
19
|
-
|
21
|
+
display_name: string;
|
20
22
|
/**
|
21
23
|
* the community that owns this tag
|
22
24
|
*/
|
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": "1.0.0-media-fixes.
|
4
|
+
"version": "1.0.0-media-fixes.1",
|
5
5
|
"author": "Dessalines",
|
6
6
|
"license": "AGPL-3.0",
|
7
7
|
"main": "./dist/index.js",
|
@@ -43,7 +43,7 @@
|
|
43
43
|
"typescript": "^5.5.4",
|
44
44
|
"typescript-eslint": "^8.7.0"
|
45
45
|
},
|
46
|
-
"packageManager": "pnpm@10.7.
|
46
|
+
"packageManager": "pnpm@10.7.1",
|
47
47
|
"types": "./dist/index.d.ts",
|
48
48
|
"lint-staged": {
|
49
49
|
"*.{ts,tsx,js}": [
|