lxns-rhythm-api 0.1.11 → 0.1.13
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.cjs +461 -2
- package/dist/index.d.cts +572 -12
- package/dist/index.d.mts +572 -12
- package/dist/index.mjs +461 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare namespace models_d_exports {
|
|
2
|
-
export { Alias$
|
|
2
|
+
export { Alias$3 as Alias, AssetType$1 as AssetType, Character, ClassEmblem, ClearType, Collection$1 as Collection, CollectionRequired$1 as CollectionRequired, CollectionRequiredSong$1 as CollectionRequiredSong, FullChainType, FullComboType, Genre$1 as Genre, LevelIndex$1 as LevelIndex, MapIcon, NamePlate$1 as NamePlate, Notes$1 as Notes, Player$1 as Player, RankType, RatingTrend$1 as RatingTrend, Score$1 as Score, SimpleScore$1 as SimpleScore, Song$2 as Song, SongDifficulty$1 as SongDifficulty, SongType$1 as SongType, Team, Trophy$1 as Trophy, TrophyColor, Version$1 as Version };
|
|
3
3
|
}
|
|
4
4
|
interface Notes$1 {
|
|
5
5
|
total: number;
|
|
@@ -61,7 +61,7 @@ interface Version$1 {
|
|
|
61
61
|
title: string;
|
|
62
62
|
version: number;
|
|
63
63
|
}
|
|
64
|
-
interface Alias$
|
|
64
|
+
interface Alias$3 {
|
|
65
65
|
song_id: number;
|
|
66
66
|
aliases: string[];
|
|
67
67
|
}
|
|
@@ -155,7 +155,7 @@ interface NamePlate$1 extends Collection$1 {}
|
|
|
155
155
|
interface MapIcon extends Collection$1 {}
|
|
156
156
|
type AssetType$1 = "character" | "trophy" | "plate" | "icon" | "jacket" | "music";
|
|
157
157
|
declare namespace models_d_exports$1 {
|
|
158
|
-
export { Alias, AssetType, BuddyNotes, Collection, CollectionGenre, CollectionRequired, CollectionRequiredSong, FCType, FSType, Frame, Genre, Icon, LevelIndex, NamePlate, Notes, Player, RateType, RatingTrend, Score, SimpleScore, Song$1 as Song, SongDifficulties, SongDifficulty, SongDifficultyUtage, SongType, Trophy, Version };
|
|
158
|
+
export { Alias$2 as Alias, AssetType, BuddyNotes, Collection, CollectionGenre, CollectionRequired, CollectionRequiredSong, FCType, FSType, Frame, Genre, Icon, LevelIndex, NamePlate, Notes, Player, RateType, RatingTrend, Score, SimpleScore, Song$1 as Song, SongDifficulties, SongDifficulty, SongDifficultyUtage, SongType, Trophy, Version };
|
|
159
159
|
}
|
|
160
160
|
interface Notes {
|
|
161
161
|
total: number;
|
|
@@ -260,7 +260,7 @@ interface Version {
|
|
|
260
260
|
/** 主要版本 ID */
|
|
261
261
|
version: number;
|
|
262
262
|
}
|
|
263
|
-
interface Alias {
|
|
263
|
+
interface Alias$2 {
|
|
264
264
|
/** 歌曲 ID */
|
|
265
265
|
song_id: number;
|
|
266
266
|
/** 别名 */
|
|
@@ -395,12 +395,12 @@ interface SimpleScore {
|
|
|
395
395
|
interface RatingTrend {
|
|
396
396
|
/** 总 DX Rating */
|
|
397
397
|
total: number;
|
|
398
|
-
/** 旧版本谱面总 DX Rating */
|
|
399
|
-
|
|
400
|
-
/** 现版本谱面总 DX Rating */
|
|
401
|
-
|
|
398
|
+
/** 旧版本谱面总 DX Rating (B35) */
|
|
399
|
+
standard_total: number;
|
|
400
|
+
/** 现版本谱面总 DX Rating (B15) */
|
|
401
|
+
dx_total: number;
|
|
402
402
|
/** 日期 */
|
|
403
|
-
date: string;
|
|
403
|
+
date: string | number;
|
|
404
404
|
}
|
|
405
405
|
interface Trophy extends Collection {}
|
|
406
406
|
interface Icon extends Collection {}
|
|
@@ -929,7 +929,128 @@ declare class HTTPError<T = unknown> extends Error {
|
|
|
929
929
|
}
|
|
930
930
|
//#endregion
|
|
931
931
|
//#region src/api/chunithm/types/personal-types.d.ts
|
|
932
|
+
type PlayerUpdate$1 = Partial<Player$1>;
|
|
932
933
|
type PlayerScores$1 = Score$1[];
|
|
934
|
+
interface Bests$3 {
|
|
935
|
+
bests: Score$1[];
|
|
936
|
+
selections: Score$1[];
|
|
937
|
+
new_bests: Score$1[];
|
|
938
|
+
recents?: Score$1[];
|
|
939
|
+
}
|
|
940
|
+
interface ScoreQuery$1 {
|
|
941
|
+
songId?: number;
|
|
942
|
+
songType?: SongType$1;
|
|
943
|
+
levelIndex?: LevelIndex$1 | number;
|
|
944
|
+
}
|
|
945
|
+
interface ScoreKey$1 {
|
|
946
|
+
songId: number;
|
|
947
|
+
songType?: SongType$1;
|
|
948
|
+
levelIndex: LevelIndex$1 | number;
|
|
949
|
+
}
|
|
950
|
+
interface RankingScore$1 {
|
|
951
|
+
ranking: number;
|
|
952
|
+
player_name?: string;
|
|
953
|
+
score?: number;
|
|
954
|
+
upload_time: string;
|
|
955
|
+
}
|
|
956
|
+
type ScoreHistory$3 = Score$1[];
|
|
957
|
+
type Heatmap$3 = Record<string, number>;
|
|
958
|
+
type PlayerCollectionListType$1 = "trophies" | "characters" | "plates" | "icons";
|
|
959
|
+
type PlayerCollectionType$1 = "trophy" | "character" | "plate" | "icon";
|
|
960
|
+
type PlayerCollectionList$1 = Collection$1[];
|
|
961
|
+
interface UserConfig$1 {
|
|
962
|
+
allow_crawl_scores?: boolean;
|
|
963
|
+
allow_crawl_name_plate?: boolean;
|
|
964
|
+
allow_crawl_frame?: boolean;
|
|
965
|
+
allow_crawl_map_icon?: boolean;
|
|
966
|
+
crawl_scores_method?: string;
|
|
967
|
+
crawl_scores_difficulty?: string[];
|
|
968
|
+
allow_third_party_fetch_player?: boolean;
|
|
969
|
+
allow_third_party_fetch_scores?: boolean;
|
|
970
|
+
allow_third_party_fetch_history?: boolean;
|
|
971
|
+
allow_third_party_write_data?: boolean;
|
|
972
|
+
show_player_name_in_score_ranking?: boolean;
|
|
973
|
+
}
|
|
974
|
+
type UserConfigUpdate$1 = Partial<UserConfig$1>;
|
|
975
|
+
interface YearInReview$3 {
|
|
976
|
+
game: string;
|
|
977
|
+
year: number;
|
|
978
|
+
latest_version: number;
|
|
979
|
+
player_name: string;
|
|
980
|
+
player_avatar_id: number;
|
|
981
|
+
[key: string]: unknown;
|
|
982
|
+
}
|
|
983
|
+
interface CreateYearInReviewShareRequest$1 {
|
|
984
|
+
public?: boolean;
|
|
985
|
+
}
|
|
986
|
+
interface YearInReviewShare$1 {
|
|
987
|
+
share_token: string;
|
|
988
|
+
[key: string]: unknown;
|
|
989
|
+
}
|
|
990
|
+
type ScoreExportType$1 = "csv" | (string & {});
|
|
991
|
+
interface AliasListOptions$1 {
|
|
992
|
+
page?: number;
|
|
993
|
+
sort?: string;
|
|
994
|
+
approved?: boolean;
|
|
995
|
+
songId?: number;
|
|
996
|
+
}
|
|
997
|
+
interface AliasList$3 {
|
|
998
|
+
aliases: Alias$1[];
|
|
999
|
+
page_count: number;
|
|
1000
|
+
page_size: number;
|
|
1001
|
+
}
|
|
1002
|
+
interface Alias$1 {
|
|
1003
|
+
alias_id: number;
|
|
1004
|
+
song: {
|
|
1005
|
+
id: number;
|
|
1006
|
+
name: string;
|
|
1007
|
+
};
|
|
1008
|
+
song_type: string;
|
|
1009
|
+
difficulty: number;
|
|
1010
|
+
alias: string;
|
|
1011
|
+
approved: boolean;
|
|
1012
|
+
weight: {
|
|
1013
|
+
up: number;
|
|
1014
|
+
down: number;
|
|
1015
|
+
total: number;
|
|
1016
|
+
};
|
|
1017
|
+
uploader: {
|
|
1018
|
+
id: number;
|
|
1019
|
+
name: string;
|
|
1020
|
+
};
|
|
1021
|
+
upload_time: string;
|
|
1022
|
+
vote?: AliasVote$1;
|
|
1023
|
+
}
|
|
1024
|
+
interface AliasVote$1 {
|
|
1025
|
+
alias_id?: number;
|
|
1026
|
+
vote_id?: number;
|
|
1027
|
+
weight: number;
|
|
1028
|
+
}
|
|
1029
|
+
interface CreateAliasRequest$1 {
|
|
1030
|
+
song_id: number;
|
|
1031
|
+
alias: string;
|
|
1032
|
+
}
|
|
1033
|
+
interface CommentQuery$1 extends ScoreKey$1 {}
|
|
1034
|
+
interface Comment$1 {
|
|
1035
|
+
comment_id: number;
|
|
1036
|
+
comment?: string;
|
|
1037
|
+
rating?: number;
|
|
1038
|
+
is_liked: boolean;
|
|
1039
|
+
like_count: number;
|
|
1040
|
+
upload_time: string;
|
|
1041
|
+
uploader: {
|
|
1042
|
+
id: number;
|
|
1043
|
+
name: string;
|
|
1044
|
+
avatar_id?: number;
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
interface CreateCommentRequest$1 {
|
|
1048
|
+
song_id: number;
|
|
1049
|
+
song_type?: SongType$1 | null;
|
|
1050
|
+
difficulty: LevelIndex$1 | number;
|
|
1051
|
+
comment?: string;
|
|
1052
|
+
rating?: number;
|
|
1053
|
+
}
|
|
933
1054
|
//#endregion
|
|
934
1055
|
//#region src/api/chunithm/personal-api.d.ts
|
|
935
1056
|
/**
|
|
@@ -943,6 +1064,16 @@ declare class ChunithmPersonalApi {
|
|
|
943
1064
|
* GET /api/v0/user/chunithm/player
|
|
944
1065
|
*/
|
|
945
1066
|
getPlayer(): Promise<Player$1>;
|
|
1067
|
+
/**
|
|
1068
|
+
* 更新玩家信息
|
|
1069
|
+
* PUT /api/v0/user/chunithm/player
|
|
1070
|
+
*/
|
|
1071
|
+
updatePlayer(player: PlayerUpdate$1): Promise<Player$1>;
|
|
1072
|
+
/**
|
|
1073
|
+
* 解绑玩家信息
|
|
1074
|
+
* DELETE /api/v0/user/chunithm/player
|
|
1075
|
+
*/
|
|
1076
|
+
deletePlayer(): Promise<unknown>;
|
|
946
1077
|
/**
|
|
947
1078
|
* 获取玩家所有成绩
|
|
948
1079
|
* GET /api/v0/user/chunithm/player/scores
|
|
@@ -953,10 +1084,265 @@ declare class ChunithmPersonalApi {
|
|
|
953
1084
|
* POST /api/v0/user/chunithm/player/scores
|
|
954
1085
|
*/
|
|
955
1086
|
postScores(scores: Score$1[]): Promise<unknown>;
|
|
1087
|
+
/**
|
|
1088
|
+
* 删除玩家成绩。不传参数时删除全部成绩,传参数时删除匹配的历史成绩。
|
|
1089
|
+
* DELETE /api/v0/user/chunithm/player/scores
|
|
1090
|
+
*/
|
|
1091
|
+
deleteScores(options?: ScoreQuery$1): Promise<unknown>;
|
|
1092
|
+
/**
|
|
1093
|
+
* 删除单条最佳成绩
|
|
1094
|
+
* DELETE /api/v0/user/chunithm/player/score
|
|
1095
|
+
*/
|
|
1096
|
+
deleteScore(options: ScoreKey$1): Promise<unknown>;
|
|
1097
|
+
/**
|
|
1098
|
+
* 获取玩家 Best 成绩。传 songId 时返回指定曲目的最佳成绩列表。
|
|
1099
|
+
* GET /api/v0/user/chunithm/player/bests
|
|
1100
|
+
*/
|
|
1101
|
+
getBests(): Promise<Bests$3>;
|
|
1102
|
+
getBests(options: ScoreQuery$1): Promise<PlayerScores$1>;
|
|
1103
|
+
/**
|
|
1104
|
+
* 获取单谱面成绩排行
|
|
1105
|
+
* GET /api/v0/user/chunithm/player/score/ranking
|
|
1106
|
+
*/
|
|
1107
|
+
getScoreRanking(options: ScoreKey$1): Promise<RankingScore$1[]>;
|
|
1108
|
+
/**
|
|
1109
|
+
* 获取单谱面成绩历史
|
|
1110
|
+
* GET /api/v0/user/chunithm/player/score/history
|
|
1111
|
+
*/
|
|
1112
|
+
getScoreHistory(options: ScoreKey$1): Promise<ScoreHistory$3>;
|
|
1113
|
+
/**
|
|
1114
|
+
* 获取成绩上传热力图
|
|
1115
|
+
* GET /api/v0/user/chunithm/player/heatmap
|
|
1116
|
+
*/
|
|
1117
|
+
getHeatmap(): Promise<Heatmap$3>;
|
|
1118
|
+
/**
|
|
1119
|
+
* 获取 Rating 趋势
|
|
1120
|
+
* GET /api/v0/user/chunithm/player/trend
|
|
1121
|
+
*/
|
|
1122
|
+
getTrend(version?: number): Promise<RatingTrend$1[]>;
|
|
1123
|
+
/**
|
|
1124
|
+
* 获取玩家已获得的收藏品列表
|
|
1125
|
+
* GET /api/v0/user/chunithm/player/{collectionType}
|
|
1126
|
+
*/
|
|
1127
|
+
getPlayerCollectionList(collectionType: PlayerCollectionListType$1): Promise<PlayerCollectionList$1>;
|
|
1128
|
+
/**
|
|
1129
|
+
* 获取玩家收藏品进度
|
|
1130
|
+
* GET /api/v0/user/chunithm/player/{collectionType}/{id}
|
|
1131
|
+
*/
|
|
1132
|
+
getPlayerCollection(collectionType: PlayerCollectionType$1, id: number): Promise<Collection$1>;
|
|
1133
|
+
/**
|
|
1134
|
+
* 通过 NET 的 HTML 源代码同步玩家数据
|
|
1135
|
+
* POST /api/v0/user/chunithm/player/html
|
|
1136
|
+
*/
|
|
1137
|
+
postHtml(htmlSource: string): Promise<unknown>;
|
|
1138
|
+
/**
|
|
1139
|
+
* 导出玩家成绩
|
|
1140
|
+
* GET /api/v0/user/chunithm/player/scores/export/{type}
|
|
1141
|
+
*/
|
|
1142
|
+
exportScores(type?: ScoreExportType$1): Promise<Uint8Array<ArrayBuffer>>;
|
|
1143
|
+
/**
|
|
1144
|
+
* 导入玩家成绩
|
|
1145
|
+
* POST /api/v0/user/chunithm/player/scores/import
|
|
1146
|
+
*/
|
|
1147
|
+
importScores(file: Blob, fileName?: string): Promise<unknown>;
|
|
1148
|
+
/**
|
|
1149
|
+
* 获取玩家年度总结
|
|
1150
|
+
* GET /api/v0/user/chunithm/player/year-in-review/{year}
|
|
1151
|
+
*/
|
|
1152
|
+
getYearInReview(year: number, options?: {
|
|
1153
|
+
agree?: boolean;
|
|
1154
|
+
}): Promise<YearInReview$3>;
|
|
1155
|
+
/**
|
|
1156
|
+
* 生成年度总结分享链接
|
|
1157
|
+
* POST /api/v0/user/chunithm/player/year-in-review/{year}/share
|
|
1158
|
+
*/
|
|
1159
|
+
createYearInReviewShare(year: number, body?: CreateYearInReviewShareRequest$1): Promise<YearInReviewShare$1>;
|
|
1160
|
+
/**
|
|
1161
|
+
* 获取游戏个人配置
|
|
1162
|
+
* GET /api/v0/user/chunithm/config
|
|
1163
|
+
*/
|
|
1164
|
+
getConfig(): Promise<UserConfig$1>;
|
|
1165
|
+
/**
|
|
1166
|
+
* 更新游戏个人配置
|
|
1167
|
+
* POST /api/v0/user/chunithm/config
|
|
1168
|
+
*/
|
|
1169
|
+
updateConfig(config: UserConfigUpdate$1): Promise<UserConfig$1>;
|
|
1170
|
+
/**
|
|
1171
|
+
* 获取登录用户可见的别名列表
|
|
1172
|
+
* GET /api/v0/user/chunithm/alias/list
|
|
1173
|
+
*/
|
|
1174
|
+
getAliasList(options?: AliasListOptions$1): Promise<AliasList$3>;
|
|
1175
|
+
/**
|
|
1176
|
+
* 获取登录用户的别名投票记录
|
|
1177
|
+
* GET /api/v0/user/chunithm/alias/votes
|
|
1178
|
+
*/
|
|
1179
|
+
getAliasVotes(): Promise<AliasVote$1[]>;
|
|
1180
|
+
/**
|
|
1181
|
+
* 创建曲目别名
|
|
1182
|
+
* POST /api/v0/user/chunithm/alias
|
|
1183
|
+
*/
|
|
1184
|
+
createAlias(body: CreateAliasRequest$1): Promise<unknown>;
|
|
1185
|
+
/**
|
|
1186
|
+
* 为曲目别名投票
|
|
1187
|
+
* POST /api/v0/user/chunithm/alias/{aliasId}/vote/{up|down}
|
|
1188
|
+
*/
|
|
1189
|
+
voteAlias(aliasId: number, vote: "up" | "down" | boolean): Promise<unknown>;
|
|
1190
|
+
/**
|
|
1191
|
+
* 删除当前用户创建的曲目别名
|
|
1192
|
+
* DELETE /api/v0/user/chunithm/alias/{aliasId}
|
|
1193
|
+
*/
|
|
1194
|
+
deleteAlias(aliasId: number): Promise<unknown>;
|
|
1195
|
+
/**
|
|
1196
|
+
* 获取谱面评论
|
|
1197
|
+
* GET /api/v0/user/chunithm/comment/list
|
|
1198
|
+
*/
|
|
1199
|
+
getComments(options: CommentQuery$1): Promise<Comment$1[]>;
|
|
1200
|
+
/**
|
|
1201
|
+
* 创建或更新谱面评论
|
|
1202
|
+
* POST /api/v0/user/chunithm/comment
|
|
1203
|
+
*/
|
|
1204
|
+
createComment(body: CreateCommentRequest$1): Promise<unknown>;
|
|
1205
|
+
/**
|
|
1206
|
+
* 删除谱面评论
|
|
1207
|
+
* DELETE /api/v0/user/chunithm/comment/{commentId}
|
|
1208
|
+
*/
|
|
1209
|
+
deleteComment(commentId: number): Promise<unknown>;
|
|
1210
|
+
/**
|
|
1211
|
+
* 点赞谱面评论
|
|
1212
|
+
* POST /api/v0/user/chunithm/comment/{commentId}/like
|
|
1213
|
+
*/
|
|
1214
|
+
likeComment(commentId: number): Promise<unknown>;
|
|
1215
|
+
/**
|
|
1216
|
+
* 取消点赞谱面评论
|
|
1217
|
+
* DELETE /api/v0/user/chunithm/comment/{commentId}/like
|
|
1218
|
+
*/
|
|
1219
|
+
unlikeComment(commentId: number): Promise<unknown>;
|
|
956
1220
|
}
|
|
957
1221
|
//#endregion
|
|
958
1222
|
//#region src/api/maimai/types/personal-types.d.ts
|
|
1223
|
+
type PlayerUpdate = Partial<Player>;
|
|
959
1224
|
type PlayerScores = Score[];
|
|
1225
|
+
interface Bests$2 {
|
|
1226
|
+
standard: Score[];
|
|
1227
|
+
dx: Score[];
|
|
1228
|
+
standard_total: number;
|
|
1229
|
+
dx_total: number;
|
|
1230
|
+
}
|
|
1231
|
+
interface ScoreQuery {
|
|
1232
|
+
songId?: number;
|
|
1233
|
+
songType?: SongType;
|
|
1234
|
+
levelIndex?: LevelIndex | number;
|
|
1235
|
+
}
|
|
1236
|
+
interface ScoreKey {
|
|
1237
|
+
songId: number;
|
|
1238
|
+
songType?: SongType;
|
|
1239
|
+
levelIndex: LevelIndex | number;
|
|
1240
|
+
}
|
|
1241
|
+
interface RankingScore {
|
|
1242
|
+
ranking: number;
|
|
1243
|
+
player_name?: string;
|
|
1244
|
+
achievements?: number;
|
|
1245
|
+
dx_score?: number;
|
|
1246
|
+
upload_time: string;
|
|
1247
|
+
}
|
|
1248
|
+
type ScoreHistory$2 = Score[];
|
|
1249
|
+
type Heatmap$2 = Record<string, number>;
|
|
1250
|
+
type PlayerCollectionListType = "trophies" | "icons" | "plates" | "frames";
|
|
1251
|
+
type PlayerCollectionType = "trophy" | "icon" | "plate" | "frame";
|
|
1252
|
+
type PlayerCollectionList = Collection[];
|
|
1253
|
+
interface UserConfig {
|
|
1254
|
+
allow_crawl_scores?: boolean;
|
|
1255
|
+
allow_crawl_name_plate?: boolean;
|
|
1256
|
+
allow_crawl_frame?: boolean;
|
|
1257
|
+
allow_crawl_map_icon?: boolean;
|
|
1258
|
+
crawl_scores_method?: string;
|
|
1259
|
+
crawl_scores_difficulty?: string[];
|
|
1260
|
+
allow_third_party_fetch_player?: boolean;
|
|
1261
|
+
allow_third_party_fetch_scores?: boolean;
|
|
1262
|
+
allow_third_party_fetch_history?: boolean;
|
|
1263
|
+
allow_third_party_write_data?: boolean;
|
|
1264
|
+
show_player_name_in_score_ranking?: boolean;
|
|
1265
|
+
}
|
|
1266
|
+
type UserConfigUpdate = Partial<UserConfig>;
|
|
1267
|
+
interface YearInReview$2 {
|
|
1268
|
+
game: string;
|
|
1269
|
+
year: number;
|
|
1270
|
+
latest_version: number;
|
|
1271
|
+
player_name: string;
|
|
1272
|
+
player_avatar_id: number;
|
|
1273
|
+
[key: string]: unknown;
|
|
1274
|
+
}
|
|
1275
|
+
interface CreateYearInReviewShareRequest {
|
|
1276
|
+
public?: boolean;
|
|
1277
|
+
}
|
|
1278
|
+
interface YearInReviewShare {
|
|
1279
|
+
share_token: string;
|
|
1280
|
+
[key: string]: unknown;
|
|
1281
|
+
}
|
|
1282
|
+
type ScoreExportType = "csv" | (string & {});
|
|
1283
|
+
interface AliasListOptions {
|
|
1284
|
+
page?: number;
|
|
1285
|
+
sort?: string;
|
|
1286
|
+
approved?: boolean;
|
|
1287
|
+
songId?: number;
|
|
1288
|
+
}
|
|
1289
|
+
interface AliasList$2 {
|
|
1290
|
+
aliases: Alias[];
|
|
1291
|
+
page_count: number;
|
|
1292
|
+
page_size: number;
|
|
1293
|
+
}
|
|
1294
|
+
interface Alias {
|
|
1295
|
+
alias_id: number;
|
|
1296
|
+
song: {
|
|
1297
|
+
id: number;
|
|
1298
|
+
name: string;
|
|
1299
|
+
};
|
|
1300
|
+
song_type: string;
|
|
1301
|
+
difficulty: number;
|
|
1302
|
+
alias: string;
|
|
1303
|
+
approved: boolean;
|
|
1304
|
+
weight: {
|
|
1305
|
+
up: number;
|
|
1306
|
+
down: number;
|
|
1307
|
+
total: number;
|
|
1308
|
+
};
|
|
1309
|
+
uploader: {
|
|
1310
|
+
id: number;
|
|
1311
|
+
name: string;
|
|
1312
|
+
};
|
|
1313
|
+
upload_time: string;
|
|
1314
|
+
vote?: AliasVote;
|
|
1315
|
+
}
|
|
1316
|
+
interface AliasVote {
|
|
1317
|
+
alias_id?: number;
|
|
1318
|
+
vote_id?: number;
|
|
1319
|
+
weight: number;
|
|
1320
|
+
}
|
|
1321
|
+
interface CreateAliasRequest {
|
|
1322
|
+
song_id: number;
|
|
1323
|
+
alias: string;
|
|
1324
|
+
}
|
|
1325
|
+
interface CommentQuery extends ScoreKey {}
|
|
1326
|
+
interface Comment {
|
|
1327
|
+
comment_id: number;
|
|
1328
|
+
comment?: string;
|
|
1329
|
+
rating?: number;
|
|
1330
|
+
is_liked: boolean;
|
|
1331
|
+
like_count: number;
|
|
1332
|
+
upload_time: string;
|
|
1333
|
+
uploader: {
|
|
1334
|
+
id: number;
|
|
1335
|
+
name: string;
|
|
1336
|
+
avatar_id?: number;
|
|
1337
|
+
};
|
|
1338
|
+
}
|
|
1339
|
+
interface CreateCommentRequest {
|
|
1340
|
+
song_id: number;
|
|
1341
|
+
song_type?: SongType | null;
|
|
1342
|
+
difficulty: LevelIndex | number;
|
|
1343
|
+
comment?: string;
|
|
1344
|
+
rating?: number;
|
|
1345
|
+
}
|
|
960
1346
|
//#endregion
|
|
961
1347
|
//#region src/api/maimai/personal-api.d.ts
|
|
962
1348
|
/**
|
|
@@ -971,6 +1357,16 @@ declare class MaimaiPersonalApi {
|
|
|
971
1357
|
* @returns PlayerInfo
|
|
972
1358
|
*/
|
|
973
1359
|
getPlayer(): Promise<Player>;
|
|
1360
|
+
/**
|
|
1361
|
+
* 更新玩家信息
|
|
1362
|
+
* PUT /api/v0/user/maimai/player
|
|
1363
|
+
*/
|
|
1364
|
+
updatePlayer(player: PlayerUpdate): Promise<Player>;
|
|
1365
|
+
/**
|
|
1366
|
+
* 解绑玩家信息
|
|
1367
|
+
* DELETE /api/v0/user/maimai/player
|
|
1368
|
+
*/
|
|
1369
|
+
deletePlayer(): Promise<unknown>;
|
|
974
1370
|
/**
|
|
975
1371
|
* 获取玩家所有成绩
|
|
976
1372
|
* GET /api/v0/user/maimai/player/scores
|
|
@@ -984,6 +1380,139 @@ declare class MaimaiPersonalApi {
|
|
|
984
1380
|
* @returns 上传结果
|
|
985
1381
|
*/
|
|
986
1382
|
postScores(scores: Score[]): Promise<unknown>;
|
|
1383
|
+
/**
|
|
1384
|
+
* 删除玩家成绩。不传参数时删除全部成绩,传参数时删除匹配的历史成绩。
|
|
1385
|
+
* DELETE /api/v0/user/maimai/player/scores
|
|
1386
|
+
*/
|
|
1387
|
+
deleteScores(options?: ScoreQuery): Promise<unknown>;
|
|
1388
|
+
/**
|
|
1389
|
+
* 删除单条最佳成绩
|
|
1390
|
+
* DELETE /api/v0/user/maimai/player/score
|
|
1391
|
+
*/
|
|
1392
|
+
deleteScore(options: ScoreKey): Promise<unknown>;
|
|
1393
|
+
/**
|
|
1394
|
+
* 获取玩家 Best 成绩。传 songId 时返回指定曲目的最佳成绩列表。
|
|
1395
|
+
* GET /api/v0/user/maimai/player/bests
|
|
1396
|
+
*/
|
|
1397
|
+
getBests(): Promise<Bests$2>;
|
|
1398
|
+
getBests(options: ScoreQuery): Promise<PlayerScores>;
|
|
1399
|
+
/**
|
|
1400
|
+
* 获取单谱面成绩排行
|
|
1401
|
+
* GET /api/v0/user/maimai/player/score/ranking
|
|
1402
|
+
*/
|
|
1403
|
+
getScoreRanking(options: ScoreKey): Promise<RankingScore[]>;
|
|
1404
|
+
/**
|
|
1405
|
+
* 获取单谱面成绩历史
|
|
1406
|
+
* GET /api/v0/user/maimai/player/score/history
|
|
1407
|
+
*/
|
|
1408
|
+
getScoreHistory(options: ScoreKey): Promise<ScoreHistory$2>;
|
|
1409
|
+
/**
|
|
1410
|
+
* 获取成绩上传热力图
|
|
1411
|
+
* GET /api/v0/user/maimai/player/heatmap
|
|
1412
|
+
*/
|
|
1413
|
+
getHeatmap(): Promise<Heatmap$2>;
|
|
1414
|
+
/**
|
|
1415
|
+
* 获取 DX Rating 趋势
|
|
1416
|
+
* GET /api/v0/user/maimai/player/trend
|
|
1417
|
+
*/
|
|
1418
|
+
getTrend(version?: number): Promise<RatingTrend[]>;
|
|
1419
|
+
/**
|
|
1420
|
+
* 获取玩家已获得的收藏品列表
|
|
1421
|
+
* GET /api/v0/user/maimai/player/{collectionType}
|
|
1422
|
+
*/
|
|
1423
|
+
getPlayerCollectionList(collectionType: PlayerCollectionListType): Promise<PlayerCollectionList>;
|
|
1424
|
+
/**
|
|
1425
|
+
* 获取玩家收藏品进度
|
|
1426
|
+
* GET /api/v0/user/maimai/player/{collectionType}/{id}
|
|
1427
|
+
*/
|
|
1428
|
+
getPlayerCollection(collectionType: PlayerCollectionType, id: number): Promise<Collection>;
|
|
1429
|
+
/**
|
|
1430
|
+
* 通过 NET 的 HTML 源代码同步玩家数据
|
|
1431
|
+
* POST /api/v0/user/maimai/player/html
|
|
1432
|
+
*/
|
|
1433
|
+
postHtml(htmlSource: string): Promise<unknown>;
|
|
1434
|
+
/**
|
|
1435
|
+
* 导出玩家成绩
|
|
1436
|
+
* GET /api/v0/user/maimai/player/scores/export/{type}
|
|
1437
|
+
*/
|
|
1438
|
+
exportScores(type?: ScoreExportType): Promise<Uint8Array<ArrayBuffer>>;
|
|
1439
|
+
/**
|
|
1440
|
+
* 导入玩家成绩
|
|
1441
|
+
* POST /api/v0/user/maimai/player/scores/import
|
|
1442
|
+
*/
|
|
1443
|
+
importScores(file: Blob, fileName?: string): Promise<unknown>;
|
|
1444
|
+
/**
|
|
1445
|
+
* 获取玩家年度总结
|
|
1446
|
+
* GET /api/v0/user/maimai/player/year-in-review/{year}
|
|
1447
|
+
*/
|
|
1448
|
+
getYearInReview(year: number, options?: {
|
|
1449
|
+
agree?: boolean;
|
|
1450
|
+
}): Promise<YearInReview$2>;
|
|
1451
|
+
/**
|
|
1452
|
+
* 生成年度总结分享链接
|
|
1453
|
+
* POST /api/v0/user/maimai/player/year-in-review/{year}/share
|
|
1454
|
+
*/
|
|
1455
|
+
createYearInReviewShare(year: number, body?: CreateYearInReviewShareRequest): Promise<YearInReviewShare>;
|
|
1456
|
+
/**
|
|
1457
|
+
* 获取游戏个人配置
|
|
1458
|
+
* GET /api/v0/user/maimai/config
|
|
1459
|
+
*/
|
|
1460
|
+
getConfig(): Promise<UserConfig>;
|
|
1461
|
+
/**
|
|
1462
|
+
* 更新游戏个人配置
|
|
1463
|
+
* POST /api/v0/user/maimai/config
|
|
1464
|
+
*/
|
|
1465
|
+
updateConfig(config: UserConfigUpdate): Promise<UserConfig>;
|
|
1466
|
+
/**
|
|
1467
|
+
* 获取登录用户可见的别名列表
|
|
1468
|
+
* GET /api/v0/user/maimai/alias/list
|
|
1469
|
+
*/
|
|
1470
|
+
getAliasList(options?: AliasListOptions): Promise<AliasList$2>;
|
|
1471
|
+
/**
|
|
1472
|
+
* 获取登录用户的别名投票记录
|
|
1473
|
+
* GET /api/v0/user/maimai/alias/votes
|
|
1474
|
+
*/
|
|
1475
|
+
getAliasVotes(): Promise<AliasVote[]>;
|
|
1476
|
+
/**
|
|
1477
|
+
* 创建曲目别名
|
|
1478
|
+
* POST /api/v0/user/maimai/alias
|
|
1479
|
+
*/
|
|
1480
|
+
createAlias(body: CreateAliasRequest): Promise<unknown>;
|
|
1481
|
+
/**
|
|
1482
|
+
* 为曲目别名投票
|
|
1483
|
+
* POST /api/v0/user/maimai/alias/{aliasId}/vote/{up|down}
|
|
1484
|
+
*/
|
|
1485
|
+
voteAlias(aliasId: number, vote: "up" | "down" | boolean): Promise<unknown>;
|
|
1486
|
+
/**
|
|
1487
|
+
* 删除当前用户创建的曲目别名
|
|
1488
|
+
* DELETE /api/v0/user/maimai/alias/{aliasId}
|
|
1489
|
+
*/
|
|
1490
|
+
deleteAlias(aliasId: number): Promise<unknown>;
|
|
1491
|
+
/**
|
|
1492
|
+
* 获取谱面评论
|
|
1493
|
+
* GET /api/v0/user/maimai/comment/list
|
|
1494
|
+
*/
|
|
1495
|
+
getComments(options: CommentQuery): Promise<Comment[]>;
|
|
1496
|
+
/**
|
|
1497
|
+
* 创建或更新谱面评论
|
|
1498
|
+
* POST /api/v0/user/maimai/comment
|
|
1499
|
+
*/
|
|
1500
|
+
createComment(body: CreateCommentRequest): Promise<unknown>;
|
|
1501
|
+
/**
|
|
1502
|
+
* 删除谱面评论
|
|
1503
|
+
* DELETE /api/v0/user/maimai/comment/{commentId}
|
|
1504
|
+
*/
|
|
1505
|
+
deleteComment(commentId: number): Promise<unknown>;
|
|
1506
|
+
/**
|
|
1507
|
+
* 点赞谱面评论
|
|
1508
|
+
* POST /api/v0/user/maimai/comment/{commentId}/like
|
|
1509
|
+
*/
|
|
1510
|
+
likeComment(commentId: number): Promise<unknown>;
|
|
1511
|
+
/**
|
|
1512
|
+
* 取消点赞谱面评论
|
|
1513
|
+
* DELETE /api/v0/user/maimai/comment/{commentId}/like
|
|
1514
|
+
*/
|
|
1515
|
+
unlikeComment(commentId: number): Promise<unknown>;
|
|
987
1516
|
}
|
|
988
1517
|
//#endregion
|
|
989
1518
|
//#region src/api/oauth/user.d.ts
|
|
@@ -1179,7 +1708,15 @@ interface SongList$1 {
|
|
|
1179
1708
|
versions: Version$1[];
|
|
1180
1709
|
}
|
|
1181
1710
|
interface AliasList$1 {
|
|
1182
|
-
aliases: Alias$
|
|
1711
|
+
aliases: Alias$3[];
|
|
1712
|
+
}
|
|
1713
|
+
interface YearInReview$1 {
|
|
1714
|
+
game: string;
|
|
1715
|
+
year: number;
|
|
1716
|
+
latest_version: number;
|
|
1717
|
+
player_name: string;
|
|
1718
|
+
player_avatar_id: number;
|
|
1719
|
+
[key: string]: unknown;
|
|
1183
1720
|
}
|
|
1184
1721
|
//#endregion
|
|
1185
1722
|
//#region src/api/chunithm/public-api.d.ts
|
|
@@ -1209,6 +1746,13 @@ declare class ChunithmPublicApi {
|
|
|
1209
1746
|
* 获取收藏品信息
|
|
1210
1747
|
*/
|
|
1211
1748
|
getCollectionInfo(collectionType: "trophy" | "character" | "plate" | "icon", id: number, version?: number): Promise<Collection$1>;
|
|
1749
|
+
/**
|
|
1750
|
+
* 获取公开分享的年度总结
|
|
1751
|
+
* GET /api/v0/chunithm/year-in-review/{year}/share/{shareToken}
|
|
1752
|
+
*/
|
|
1753
|
+
getYearInReviewShare(year: number, shareToken: string, options?: {
|
|
1754
|
+
agree?: boolean;
|
|
1755
|
+
}): Promise<YearInReview$1>;
|
|
1212
1756
|
}
|
|
1213
1757
|
//#endregion
|
|
1214
1758
|
//#region src/api/maimai/types/dev-types.d.ts
|
|
@@ -1282,9 +1826,10 @@ declare class MaimaiDevApi {
|
|
|
1282
1826
|
/**
|
|
1283
1827
|
* DX Rating 趋势
|
|
1284
1828
|
* @param friendCode 好友码
|
|
1829
|
+
* @param version 游戏版本(可选)
|
|
1285
1830
|
* @returns TrendList
|
|
1286
1831
|
*/
|
|
1287
|
-
getTrend(friendCode: number): Promise<TrendList>;
|
|
1832
|
+
getTrend(friendCode: number, version?: number): Promise<TrendList>;
|
|
1288
1833
|
/**
|
|
1289
1834
|
* 成绩游玩历史记录(仅返回带有 play_time 的成绩)
|
|
1290
1835
|
* @param friendCode 好友码
|
|
@@ -1352,11 +1897,19 @@ interface SongList {
|
|
|
1352
1897
|
versions: Version[];
|
|
1353
1898
|
}
|
|
1354
1899
|
interface AliasList {
|
|
1355
|
-
aliases: Alias[];
|
|
1900
|
+
aliases: Alias$2[];
|
|
1356
1901
|
}
|
|
1357
1902
|
interface CollectionGenreList {
|
|
1358
1903
|
collectionGenres: CollectionGenre[];
|
|
1359
1904
|
}
|
|
1905
|
+
interface YearInReview {
|
|
1906
|
+
game: string;
|
|
1907
|
+
year: number;
|
|
1908
|
+
latest_version: number;
|
|
1909
|
+
player_name: string;
|
|
1910
|
+
player_avatar_id: number;
|
|
1911
|
+
[key: string]: unknown;
|
|
1912
|
+
}
|
|
1360
1913
|
//#endregion
|
|
1361
1914
|
//#region src/api/maimai/public-api.d.ts
|
|
1362
1915
|
/**
|
|
@@ -1421,6 +1974,13 @@ declare class MaimaiPublicApi {
|
|
|
1421
1974
|
getCollectionGenreInfo(id: number, options?: {
|
|
1422
1975
|
version?: number;
|
|
1423
1976
|
}): Promise<CollectionGenre>;
|
|
1977
|
+
/**
|
|
1978
|
+
* 获取公开分享的年度总结
|
|
1979
|
+
* GET /api/v0/maimai/year-in-review/{year}/share/{shareToken}
|
|
1980
|
+
*/
|
|
1981
|
+
getYearInReviewShare(year: number, shareToken: string, options?: {
|
|
1982
|
+
agree?: boolean;
|
|
1983
|
+
}): Promise<YearInReview>;
|
|
1424
1984
|
}
|
|
1425
1985
|
//#endregion
|
|
1426
1986
|
//#region src/client/lxns-api-client-types.d.ts
|