dna-api 0.6.1 → 0.6.2
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 +17 -17
- package/dist/index.js +4 -4
- package/dist/index.js.map +8 -8
- package/dist/modules/home.d.ts +16 -16
- package/dist/modules/profile.d.ts +2 -2
- package/dist/modules/trend.d.ts +2 -2
- package/dist/modules/utils.d.ts +8 -0
- package/dist/type-generated.d.ts +6 -6
- package/package.json +10 -3
package/dist/modules/home.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import type { DNAActivityListBean, DNABlockBean, DNACommentListResponse, DNACreateCommentResponse, DNADiscussAreaResponse, DNAFollowBean, DNAFraternityResponse, DNAGameBannerBean, DNAGameSignInResultBean, DNAGameSignInShowDataBean, DNAHomeOffWaterResponse, DNAIsRedPointBean, DNAPostDetailResponse, DNAPostListBean, DNAReceiveRecord, DNARecommendBean, DNAReplayCommentResponse, DNAReplyListResponse, DNASearchPostBean, DNASearchTopicBean, DNASearchUserBean, DNASignCenterBean, DNASignInBean, DNASoulTaskBean, DNAStatisticsBean, DNATipsBean, DNATopicListResponse, DNAUserTaskProcessEntity } from "../type-generated";
|
|
2
2
|
import { DNASubModule } from "./base";
|
|
3
3
|
export declare class HomeAPI extends DNASubModule {
|
|
4
|
-
adminAdjustScore(postId:
|
|
4
|
+
adminAdjustScore(postId: string, gameForumId: number, weight: string, gameId?: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
5
5
|
adminDelete(post: {
|
|
6
|
-
postId:
|
|
6
|
+
postId: string;
|
|
7
7
|
gameId?: number;
|
|
8
8
|
gameForumId: number;
|
|
9
9
|
}, content: string, reasonCode: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
10
10
|
adminMovePost(post: {
|
|
11
|
-
postId:
|
|
11
|
+
postId: string;
|
|
12
12
|
gameId?: number;
|
|
13
13
|
gameForumId: number;
|
|
14
14
|
}, newGameId: number, newForumId: number, newTopicIdStr: string): Promise<import("..").TimeBasicResponse<any>>;
|
|
15
15
|
adminRefreshTime(post: {
|
|
16
|
-
postId:
|
|
16
|
+
postId: string;
|
|
17
17
|
gameId?: number;
|
|
18
18
|
gameForumId: number;
|
|
19
19
|
}, refresh: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
20
20
|
blockList(): Promise<import("..").TimeBasicResponse<DNABlockBean>>;
|
|
21
|
-
blockOther(blockPostId:
|
|
22
|
-
collect(postId:
|
|
21
|
+
blockOther(blockPostId: string, blockUserId: string, type: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
22
|
+
collect(postId: string, toUserId: string, operateType?: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
23
23
|
commentDelete(comment: {
|
|
24
24
|
id: number;
|
|
25
25
|
gameId: number;
|
|
@@ -52,12 +52,12 @@ export declare class HomeAPI extends DNASubModule {
|
|
|
52
52
|
getExchange(forumId: number): Promise<import("..").TimeBasicResponse<DNADiscussAreaResponse>>;
|
|
53
53
|
getGameBanner(gameId?: number): Promise<import("..").TimeBasicResponse<DNAGameBannerBean>>;
|
|
54
54
|
getPostByTopic(topicId?: number, pageIndex?: number, pageSize?: number, searchType?: number, timeType?: number): Promise<import("..").TimeBasicResponse<DNATopicListResponse>>;
|
|
55
|
-
getPostCommentList(postId:
|
|
56
|
-
getPostDetail(postId: string
|
|
55
|
+
getPostCommentList(postId: string, pageIndex?: number, pageSize?: number, isOnlyPublisher?: number, showOrderType?: number): Promise<import("..").TimeBasicResponse<DNACommentListResponse>>;
|
|
56
|
+
getPostDetail(postId: string): Promise<import("..").TimeBasicResponse<DNAPostDetailResponse>>;
|
|
57
57
|
getPostList(forumId?: number, pageIndex?: number, pageSize?: number, searchType?: number, timeType?: number): Promise<import("..").TimeBasicResponse<DNADiscussAreaResponse>>;
|
|
58
58
|
getRankList(forumId: number): Promise<import("..").TimeBasicResponse<DNAFraternityResponse>>;
|
|
59
59
|
getRecommendPosts(gameId?: number, pageIndex?: number, pageSize?: number): Promise<import("..").TimeBasicResponse<DNAHomeOffWaterResponse>>;
|
|
60
|
-
getReplyList(postId:
|
|
60
|
+
getReplyList(postId: string, postCommentId: number, pageIndex?: number, pageSize?: number): Promise<import("..").TimeBasicResponse<DNAReplyListResponse>>;
|
|
61
61
|
getStatistics(gameId?: number): Promise<import("..").TimeBasicResponse<DNAStatisticsBean>>;
|
|
62
62
|
getTips(): Promise<import("..").TimeBasicResponse<DNATipsBean>>;
|
|
63
63
|
getWalkthrough(forumId: number): Promise<import("..").TimeBasicResponse<DNADiscussAreaResponse>>;
|
|
@@ -73,27 +73,27 @@ export declare class HomeAPI extends DNASubModule {
|
|
|
73
73
|
userId: string;
|
|
74
74
|
}): Promise<import("..").TimeBasicResponse<any>>;
|
|
75
75
|
lockPost(post: {
|
|
76
|
-
postId:
|
|
76
|
+
postId: string;
|
|
77
77
|
gameId?: number;
|
|
78
78
|
gameForumId: number;
|
|
79
79
|
}, operateType: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
80
80
|
postDownOrUp(post: {
|
|
81
|
-
postId:
|
|
81
|
+
postId: string;
|
|
82
82
|
gameId?: number;
|
|
83
83
|
gameForumId: number;
|
|
84
84
|
}, operateType: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
85
85
|
postElite(post: {
|
|
86
|
-
postId:
|
|
86
|
+
postId: string;
|
|
87
87
|
gameId?: number;
|
|
88
88
|
gameForumId: number;
|
|
89
89
|
}, operateType: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
90
90
|
postHide(post: {
|
|
91
|
-
postId:
|
|
91
|
+
postId: string;
|
|
92
92
|
gameId?: number;
|
|
93
93
|
gameForumId: number;
|
|
94
94
|
}, operateType: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
95
95
|
reRank(post: {
|
|
96
|
-
postId:
|
|
96
|
+
postId: string;
|
|
97
97
|
gameId?: number;
|
|
98
98
|
gameForumId: number;
|
|
99
99
|
}, weight: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
@@ -110,12 +110,12 @@ export declare class HomeAPI extends DNASubModule {
|
|
|
110
110
|
shareTask(): Promise<import("..").TimeBasicResponse<any>>;
|
|
111
111
|
bbsSign(): Promise<import("..").TimeBasicResponse<DNASignInBean>>;
|
|
112
112
|
strongRecommend(post: {
|
|
113
|
-
postId:
|
|
113
|
+
postId: string;
|
|
114
114
|
gameId?: number;
|
|
115
115
|
gameForumId: number;
|
|
116
116
|
}, operateType?: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
117
117
|
viewCommunity(): Promise<import("..").TimeBasicResponse<any>>;
|
|
118
|
-
viewCount(postId:
|
|
118
|
+
viewCount(postId: string, gameId?: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
119
119
|
getTaskProcess(): Promise<import("..").TimeBasicResponse<DNAUserTaskProcessEntity>>;
|
|
120
120
|
soulTask(): Promise<import("..").TimeBasicResponse<DNASoulTaskBean>>;
|
|
121
121
|
}
|
|
@@ -3,7 +3,7 @@ import { DNASubModule } from "./base";
|
|
|
3
3
|
export declare class ProfileAPI extends DNASubModule {
|
|
4
4
|
blackUser(toUserId: string, type: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
5
5
|
cleanFansNew(type: number, userFollowId: string): Promise<import("..").TimeBasicResponse<any>>;
|
|
6
|
-
collect(postId:
|
|
6
|
+
collect(postId: string, toUserId: string, operateType?: number): Promise<import("..").TimeBasicResponse<any>>;
|
|
7
7
|
defaultRole(otherUserId?: string, type?: number): Promise<import("..").TimeBasicResponse<DNARoleEntityForTrend>>;
|
|
8
8
|
deleteRole(roleBoundId: string): Promise<import("..").TimeBasicResponse<DNARoleListBean>>;
|
|
9
9
|
draftDelete(draftId: string): Promise<import("..").TimeBasicResponse<any>>;
|
|
@@ -24,7 +24,7 @@ export declare class ProfileAPI extends DNASubModule {
|
|
|
24
24
|
operateType: number;
|
|
25
25
|
postCommentId: number;
|
|
26
26
|
postCommentReplyId: number;
|
|
27
|
-
postId:
|
|
27
|
+
postId: string;
|
|
28
28
|
postType: number;
|
|
29
29
|
toUserId: string;
|
|
30
30
|
}): Promise<import("..").TimeBasicResponse<any>>;
|
package/dist/modules/trend.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare class TrendAPI extends DNASubModule {
|
|
|
8
8
|
getRecommend(history: string, pageSize: number): Promise<import("..").TimeBasicResponse<DNARecomdBean>>;
|
|
9
9
|
getTips(): Promise<import("..").TimeBasicResponse<DNATipsBean>>;
|
|
10
10
|
getVodToken(fileName: string, title: string): Promise<import("..").TimeBasicResponse<DNAVodTokenBean>>;
|
|
11
|
-
like(forumId: number, gameId: number, likeType: number, operateType: number, postCommentId: number, postCommentReplyId: number, postId:
|
|
11
|
+
like(forumId: number, gameId: number, likeType: number, operateType: number, postCommentId: number, postCommentReplyId: number, postId: string, postType: number, toUserId: string): Promise<import("..").TimeBasicResponse<any>>;
|
|
12
12
|
list(pageIndex: number, pageSize: number, userId: string): Promise<import("..").TimeBasicResponse<DNATrendPostBean>>;
|
|
13
13
|
parseLink(link: string): Promise<import("..").TimeBasicResponse<DNAParseLinkBean>>;
|
|
14
14
|
posAdminEdit(content: string, gameForumId: number, h5Content: string, postId: string, postTitle: string, topics: string, postType: number, gameId: number, videoReUpload: number): Promise<import("..").TimeBasicResponse<DNAPublishPostResponse>>;
|
|
@@ -20,5 +20,5 @@ export declare class TrendAPI extends DNASubModule {
|
|
|
20
20
|
*/
|
|
21
21
|
uploadImage(file: File): Promise<import("..").TimeBasicResponse<string[]>>;
|
|
22
22
|
videoPostPublish(content: string, draftId: string, gameForumId: number, gameId: number, h5Content: string, postTitle: string, postType: number, topics: string): Promise<import("..").TimeBasicResponse<DNAPublishPostResponse>>;
|
|
23
|
-
viewCount(gameId: number, postId:
|
|
23
|
+
viewCount(gameId: number, postId: string): Promise<import("..").TimeBasicResponse<any>>;
|
|
24
24
|
}
|
package/dist/modules/utils.d.ts
CHANGED
|
@@ -38,6 +38,14 @@ export declare function sign_shuffled(params: Record<string, any>, app_key: stri
|
|
|
38
38
|
export declare function xor_encode(text: string, key: string): string;
|
|
39
39
|
export declare function build_signature120(pk: string, payload: Record<string, any>, token?: string): Record<string, any>;
|
|
40
40
|
export declare function build_signature122(pk: string, payload: Record<string, any>, token?: string): Record<string, any>;
|
|
41
|
+
/**
|
|
42
|
+
* 生成 1.3.0 版本的请求签名。
|
|
43
|
+
* @param pk RSA 公钥
|
|
44
|
+
* @param payload 请求参数
|
|
45
|
+
* @param token 可选 token
|
|
46
|
+
* @returns 包含 rk、tn、sa 的签名数据
|
|
47
|
+
*/
|
|
48
|
+
export declare function build_signature130(pk: string, payload: Record<string, any>, token?: string): Record<string, any>;
|
|
41
49
|
export declare function build_upload_signature(public_key: string): {
|
|
42
50
|
signature: string;
|
|
43
51
|
key: string;
|
package/dist/type-generated.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export interface DNAPostListBean {
|
|
|
48
48
|
postContent: string;
|
|
49
49
|
postCover: string;
|
|
50
50
|
postCoverVo: DNAPostCoverVoEntity;
|
|
51
|
-
postId:
|
|
51
|
+
postId: string;
|
|
52
52
|
postStatus: number;
|
|
53
53
|
postTitle: string;
|
|
54
54
|
postType: number;
|
|
@@ -623,7 +623,8 @@ export interface DNACharDetailBean {
|
|
|
623
623
|
charName: string;
|
|
624
624
|
conWeaponEid?: string;
|
|
625
625
|
conWeaponId?: number;
|
|
626
|
-
|
|
626
|
+
sumVolume: number;
|
|
627
|
+
currentVolume: number;
|
|
627
628
|
elementIcon: string;
|
|
628
629
|
elementName: string;
|
|
629
630
|
gradeLevel: number;
|
|
@@ -632,7 +633,6 @@ export interface DNACharDetailBean {
|
|
|
632
633
|
modes: DNAModesBean[];
|
|
633
634
|
paint: string;
|
|
634
635
|
skills: DNASkillBean[];
|
|
635
|
-
sumVolume: string;
|
|
636
636
|
traces: DNATraceBean[];
|
|
637
637
|
}
|
|
638
638
|
export interface DNAPostCommentListBean {
|
|
@@ -686,7 +686,7 @@ export interface DNACreatorSelectGameBean {
|
|
|
686
686
|
}
|
|
687
687
|
export interface DNARankListEntity {
|
|
688
688
|
postCoverVo: DNAPostCoverVoRankBean;
|
|
689
|
-
postId:
|
|
689
|
+
postId: string;
|
|
690
690
|
userHeadUrl: string;
|
|
691
691
|
userName: string;
|
|
692
692
|
}
|
|
@@ -761,7 +761,7 @@ export interface DNAActiveBannerListEntity {
|
|
|
761
761
|
commentCount: number;
|
|
762
762
|
content: string;
|
|
763
763
|
id: string;
|
|
764
|
-
postId:
|
|
764
|
+
postId: string;
|
|
765
765
|
title: string;
|
|
766
766
|
url: string;
|
|
767
767
|
}
|
|
@@ -1244,7 +1244,7 @@ export interface DNASearchCardBean {
|
|
|
1244
1244
|
name: string;
|
|
1245
1245
|
needNav: number;
|
|
1246
1246
|
picUrl: string;
|
|
1247
|
-
postId:
|
|
1247
|
+
postId: string;
|
|
1248
1248
|
}
|
|
1249
1249
|
export interface DNATopicListEntity {
|
|
1250
1250
|
gameForumId: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dna-api",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "dna bbs api",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "pa001024",
|
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
"default": "./dist/index.js",
|
|
19
19
|
"types": "./dist/index.d.ts"
|
|
20
20
|
},
|
|
21
|
-
"keywords": [
|
|
21
|
+
"keywords": [
|
|
22
|
+
"dna",
|
|
23
|
+
"api"
|
|
24
|
+
],
|
|
22
25
|
"homepage": "https://github.com/pa001024/dna-builder",
|
|
23
26
|
"repository": {
|
|
24
27
|
"type": "git",
|
|
@@ -42,5 +45,9 @@
|
|
|
42
45
|
"rimraf": "6.1.2",
|
|
43
46
|
"typescript": "^5.1.6"
|
|
44
47
|
},
|
|
45
|
-
"files": [
|
|
48
|
+
"files": [
|
|
49
|
+
"dist/**/*",
|
|
50
|
+
"README.md",
|
|
51
|
+
"LICENSE"
|
|
52
|
+
]
|
|
46
53
|
}
|