mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-08-12 08:50:38 +00:00
perf: 更新接口定义
This commit is contained in:
parent
a8b45a8b8b
commit
8f4873f2e2
220
interface.d.ts
vendored
220
interface.d.ts
vendored
@ -37,6 +37,33 @@ export const enum SubAction {
|
||||
unsub = 0,
|
||||
}
|
||||
|
||||
export function ad_get(
|
||||
params: { type_ids?: string } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function ad_listening_rights(
|
||||
params: RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function ad_listening_rights_gain(
|
||||
params: {
|
||||
reqUid?: string
|
||||
creativeType?: string | number
|
||||
exposureTime?: string | number
|
||||
clickTime?: string | number
|
||||
rightsGainMethod?: string | number
|
||||
rightsGainDuration?: string | number
|
||||
extraRightsGainMethod?: string | number
|
||||
extraRightsGainDuration?: string | number
|
||||
nextRightsGainDuration?: string | number
|
||||
source?: string
|
||||
rightsExtJson?: string
|
||||
appInfo?: string
|
||||
installed?: string | number
|
||||
type_ids?: string
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function activate_init_profile(
|
||||
params: { nickname: string } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
@ -119,6 +146,14 @@ export function album_sublist(
|
||||
params: MultiPageConfig & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function api(
|
||||
params: {
|
||||
uri: string
|
||||
data?: string | Record<string, unknown>
|
||||
crypto?: string
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function artist_album(
|
||||
params: { id: string | number } & MultiPageConfig & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
@ -271,10 +306,21 @@ export function batch(
|
||||
params: { [index: string]: unknown } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function captcha_safe_sent(
|
||||
params: { ctcode?: number | string } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function captcha_sent(
|
||||
params: { phone: string; ctcode?: number | string } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function captcha_sent_v1(
|
||||
params: {
|
||||
phone: number | string
|
||||
ctcode?: number | string
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function captcha_verify(
|
||||
params: {
|
||||
ctcode?: number | string
|
||||
@ -387,6 +433,14 @@ export function comment(
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function comment_add(
|
||||
params: {
|
||||
id: string | number
|
||||
type: CommentType
|
||||
content: string
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function comment_album(
|
||||
params: {
|
||||
id: string | number
|
||||
@ -395,6 +449,14 @@ export function comment_album(
|
||||
RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function comment_delete(
|
||||
params: {
|
||||
id: string | number
|
||||
type: CommentType
|
||||
cid: string | number
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function comment_dj(
|
||||
params: {
|
||||
id: string | number
|
||||
@ -469,6 +531,15 @@ export function comment_playlist(
|
||||
RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function comment_reply(
|
||||
params: {
|
||||
id: string | number
|
||||
type: CommentType
|
||||
cid: string | number
|
||||
content: string
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function comment_video(
|
||||
params: {
|
||||
id: string | number
|
||||
@ -490,6 +561,21 @@ export function daily_signin(
|
||||
params: { type?: DailySigninType } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function decrypt(
|
||||
params: {
|
||||
crypto?: string
|
||||
data?: string
|
||||
hexString?: string
|
||||
isReq?: boolean | string
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function device_kickoff(
|
||||
params: { deviceKey: string | number; captcha?: string } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function device_list(params: RequestBaseConfig): Promise<Response>
|
||||
|
||||
export function digitalAlbum_ordering(
|
||||
params: {
|
||||
payment: string
|
||||
@ -618,6 +704,10 @@ export function dj_toplist_popular(
|
||||
params: { limit?: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function eapi_decrypt(
|
||||
params: { hexString: string; isReq?: boolean | string } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function event(
|
||||
params: { pagesize?: number; lasttime?: number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
@ -679,6 +769,8 @@ export function hot_topic(
|
||||
params: MultiPageConfig & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function inner_version(params: RequestBaseConfig): Promise<Response>
|
||||
|
||||
export function like(
|
||||
params: {
|
||||
like?: 'true' | 'false' | boolean
|
||||
@ -692,6 +784,10 @@ export function likelist(
|
||||
params: { uid: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function listentogether_status(
|
||||
params: RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function login(
|
||||
params: { email: string; password: string } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
@ -738,6 +834,17 @@ export function lyric_new(
|
||||
params: { id: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function middle_play_do_lottery(
|
||||
params: {
|
||||
activityId?: string | number
|
||||
drawCount?: string | number
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function middle_play_lottery_remain_chance(
|
||||
params: { activityId?: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function msg_comments(
|
||||
params: {
|
||||
uid: string | number
|
||||
@ -960,6 +1067,18 @@ export function register_cellphone(
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function register_checktoken_v2(
|
||||
params: { refresh?: boolean | string } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function register_checktoken_v3(
|
||||
params: { refresh?: boolean | string } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function register_xeapikey(
|
||||
params: { deviceId?: string; currentKeyVersion?: string } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function related_allvideo(
|
||||
params: { id: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
@ -968,6 +1087,67 @@ export function related_playlist(
|
||||
params: { id: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function relay_play_state_submit(
|
||||
params: {
|
||||
id: string | number
|
||||
sessionId?: string
|
||||
progress?: string | number
|
||||
playMode?: string
|
||||
type?: string
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function rep_ugc_activity_collect(
|
||||
params: { activityId?: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function rep_ugc_activity_get(
|
||||
params: RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function rep_ugc_exam_info_get(
|
||||
params: { examType: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function rep_ugc_exam_question_single_get(
|
||||
params: {
|
||||
examType: string | number
|
||||
taskId: string | number
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function rep_ugc_exam_result_get(
|
||||
params: {
|
||||
examType: string | number
|
||||
taskId: string | number
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function rep_ugc_exam_start(
|
||||
params: { examType: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function rep_ugc_exam_submit(
|
||||
params: {
|
||||
examType: string | number
|
||||
taskId: string | number
|
||||
questionId: string | number
|
||||
answer: string
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
declare const rep_ugc_user_collect_vip: (
|
||||
params: { activityId?: string | number } & RequestBaseConfig,
|
||||
) => Promise<Response>
|
||||
|
||||
export { rep_ugc_user_collect_vip as 'rep_ugc_user_collect-vip' }
|
||||
|
||||
export function rep_ugc_user_get(params: RequestBaseConfig): Promise<Response>
|
||||
|
||||
export function rep_ugc_user_sign(params: RequestBaseConfig): Promise<Response>
|
||||
|
||||
export function rep_ugc_user_vip(params: RequestBaseConfig): Promise<Response>
|
||||
|
||||
export const enum ResourceType {
|
||||
mv = 1,
|
||||
dj = 4,
|
||||
@ -993,6 +1173,22 @@ export function scrobble(
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function scrobble_v1(
|
||||
params: {
|
||||
id: string | number
|
||||
time: string | number
|
||||
total?: string | number
|
||||
sourceid?: string | number
|
||||
sourceId?: string | number
|
||||
source?: string
|
||||
name?: string
|
||||
artist?: string
|
||||
bitrate?: string | number
|
||||
level?: string
|
||||
vip?: boolean | string
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function search(
|
||||
params: {
|
||||
keywords: string
|
||||
@ -2325,6 +2521,10 @@ export function song_chorus(
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function song_cloud_download(
|
||||
params: { id: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function song_creators(
|
||||
params: {
|
||||
id: string | number
|
||||
@ -2436,6 +2636,18 @@ export function threshold_detail_get(
|
||||
params: RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function thinktank_audit_resource_detail(
|
||||
params: { type?: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function thinktank_audit_resource_update(
|
||||
params: {
|
||||
type?: string | number
|
||||
taskId: string | number
|
||||
judgement: string | number
|
||||
} & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function toplist_detail_v2(params: RequestBaseConfig): Promise<Response>
|
||||
|
||||
export function ugc_album_get(
|
||||
@ -2562,6 +2774,14 @@ export function verify_qrcodestatus(
|
||||
|
||||
export function vip_sign(params: RequestBaseConfig): Promise<Response>
|
||||
|
||||
export function vip_sign_detail(
|
||||
params: { timestamp: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function vip_sign_history(
|
||||
params: { type?: string | number } & RequestBaseConfig,
|
||||
): Promise<Response>
|
||||
|
||||
export function vip_sign_info(params: RequestBaseConfig): Promise<Response>
|
||||
|
||||
export function vip_tasks_v1(
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
import { banner, lyric } from '@neteasecloudmusicapienhanced/api'
|
||||
import { logger } from '../util/logger.js'
|
||||
banner({ type: 0 }).then((res) => {
|
||||
import type { Response } from '@neteasecloudmusicapienhanced/api'
|
||||
import logger from '../util/logger.js'
|
||||
banner({ type: 0 }).then((res: Response) => {
|
||||
logger.info(res)
|
||||
})
|
||||
lyric({
|
||||
id: '33894312',
|
||||
}).then((res) => {
|
||||
}).then((res: Response) => {
|
||||
logger.info(res)
|
||||
})
|
||||
|
||||
@ -1,31 +1,21 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2015",
|
||||
"module": "commonjs",
|
||||
"experimentalDecorators": true,
|
||||
"ignoreDeprecations": "6.0",
|
||||
"moduleResolution": "node",
|
||||
"lib": [
|
||||
"esnext",
|
||||
"esnext.asynciterable",
|
||||
"dom"
|
||||
],
|
||||
"esModuleInterop": true,
|
||||
"allowJs": true,
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"~/*": [
|
||||
"./*"
|
||||
],
|
||||
"@/*": [
|
||||
"./*"
|
||||
]
|
||||
},
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
"compilerOptions": {
|
||||
"target": "ES2015",
|
||||
"module": "node16",
|
||||
"experimentalDecorators": true,
|
||||
"moduleResolution": "node16",
|
||||
"lib": ["esnext", "esnext.asynciterable", "dom"],
|
||||
"esModuleInterop": true,
|
||||
"allowJs": true,
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"noEmit": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"~/*": ["./*"],
|
||||
"@/*": ["./*"],
|
||||
"@neteasecloudmusicapienhanced/api": ["./interface.d.ts"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user