@any-listen/extension-kit 0.1.2 → 0.1.4
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/package.json +1 -1
- package/types/app/api.d.ts +49 -11
package/package.json
CHANGED
package/types/app/api.d.ts
CHANGED
|
@@ -571,15 +571,22 @@ declare namespace AnyListen {
|
|
|
571
571
|
|
|
572
572
|
namespace Resource {
|
|
573
573
|
interface SongListItem {
|
|
574
|
-
play_count: string
|
|
575
574
|
id: string
|
|
576
|
-
author: string
|
|
577
575
|
name: string
|
|
576
|
+
play_count?: string
|
|
577
|
+
author?: string
|
|
578
578
|
time?: string
|
|
579
|
-
img
|
|
579
|
+
img?: string
|
|
580
580
|
// grade: basic.favorcnt / 10,
|
|
581
|
-
desc
|
|
582
|
-
total?:
|
|
581
|
+
desc?: string | null
|
|
582
|
+
total?: number
|
|
583
|
+
}
|
|
584
|
+
interface SongListDetailInfo {
|
|
585
|
+
name: string
|
|
586
|
+
img?: string
|
|
587
|
+
desc?: string
|
|
588
|
+
author?: string
|
|
589
|
+
play_count?: string
|
|
583
590
|
}
|
|
584
591
|
|
|
585
592
|
interface CommonItem {
|
|
@@ -610,6 +617,11 @@ interface CommonListParams extends CommonParams {
|
|
|
610
617
|
page: number
|
|
611
618
|
limit: number
|
|
612
619
|
}
|
|
620
|
+
interface MusicSearchParams extends CommonListParams {
|
|
621
|
+
name: string
|
|
622
|
+
artist?: string
|
|
623
|
+
albumName?: string
|
|
624
|
+
}
|
|
613
625
|
interface LyricSearchParams extends CommonParams {
|
|
614
626
|
name: string
|
|
615
627
|
artist?: string
|
|
@@ -633,10 +645,6 @@ interface PicSearchParams extends CommonParams {
|
|
|
633
645
|
interface SonglistSearchParams extends CommonListParams {
|
|
634
646
|
keyword: string
|
|
635
647
|
}
|
|
636
|
-
interface SearchParams extends CommonListParams {
|
|
637
|
-
name: string
|
|
638
|
-
artist?: string
|
|
639
|
-
}
|
|
640
648
|
interface ListDetailParams extends CommonListParams {
|
|
641
649
|
id: string
|
|
642
650
|
}
|
|
@@ -644,6 +652,9 @@ interface SonglistListParams extends CommonListParams {
|
|
|
644
652
|
sort: string
|
|
645
653
|
tag: string
|
|
646
654
|
}
|
|
655
|
+
interface SonglistDetailResult extends ListCommonResult<AnyListen.Music.MusicInfoOnline> {
|
|
656
|
+
info: AnyListen.Resource.SongListDetailInfo
|
|
657
|
+
}
|
|
647
658
|
interface LeaderboardDateParams extends CommonParams {
|
|
648
659
|
id: string
|
|
649
660
|
}
|
|
@@ -651,6 +662,26 @@ interface LeaderboardDetailParams extends CommonListParams {
|
|
|
651
662
|
id: string
|
|
652
663
|
date: string
|
|
653
664
|
}
|
|
665
|
+
interface MusicCommentParams extends CommonListParams {
|
|
666
|
+
musicInfo: AnyListen.Music.MusicInfoOnline
|
|
667
|
+
id?: string
|
|
668
|
+
type: 'hot' | 'new' | 'reply'
|
|
669
|
+
}
|
|
670
|
+
export interface MusicComment {
|
|
671
|
+
id: string
|
|
672
|
+
userId?: string
|
|
673
|
+
userName: string
|
|
674
|
+
text: string
|
|
675
|
+
time?: number
|
|
676
|
+
images?: string[]
|
|
677
|
+
location?: string
|
|
678
|
+
avatar?: string
|
|
679
|
+
likedCount?: number
|
|
680
|
+
skipPage?: boolean
|
|
681
|
+
replyTotal?: number
|
|
682
|
+
reply?: MusicComment[]
|
|
683
|
+
replySkipPage?: boolean
|
|
684
|
+
}
|
|
654
685
|
export interface ListCommonResult<T> {
|
|
655
686
|
list: T[]
|
|
656
687
|
total: number
|
|
@@ -713,6 +744,12 @@ declare global {
|
|
|
713
744
|
type Quality = '128k' | '320k' | 'flac' | 'flac24bit' | '192k' | 'wav' | 'dobly' | 'master'
|
|
714
745
|
type MusicInfo = AnyListen.Music.MusicInfo
|
|
715
746
|
type MusicInfoOnline = AnyListen.Music.MusicInfoOnline
|
|
747
|
+
type SongListItem = AnyListen.Resource.SongListItem
|
|
748
|
+
type SongListDetailInfo = AnyListen.Resource.SongListDetailInfo
|
|
749
|
+
type CommonItem = AnyListen.Resource.CommonItem
|
|
750
|
+
type TagItem = AnyListen.Resource.TagItem
|
|
751
|
+
type TagGroupItem = AnyListen.Resource.TagGroupItem
|
|
752
|
+
type BoardItem = AnyListen.Resource.BoardItem
|
|
716
753
|
|
|
717
754
|
type ParamsData = Record<string, string | number | null | undefined | boolean>
|
|
718
755
|
interface RequestOptions {
|
|
@@ -1008,7 +1045,7 @@ declare global {
|
|
|
1008
1045
|
interface ResourceAction {
|
|
1009
1046
|
tipSearch: (params: CommonParams) => Promise<string[]>
|
|
1010
1047
|
hotSearch: (params: CommonParams) => Promise<string[]>
|
|
1011
|
-
musicSearch: (params:
|
|
1048
|
+
musicSearch: (params: MusicSearchParams) => Promise<ListCommonResult<AnyListen.Music.MusicInfoOnline>>
|
|
1012
1049
|
musicPic: (params: MusicCommonParams) => Promise<string>
|
|
1013
1050
|
musicUrl: (params: MusicUrlParams) => Promise<MusicUrlInfo>
|
|
1014
1051
|
musicLyric: (params: MusicCommonParams) => Promise<AnyListen.Music.LyricInfo>
|
|
@@ -1019,10 +1056,11 @@ declare global {
|
|
|
1019
1056
|
songlistSorts: (params: CommonParams) => Promise<AnyListen.Resource.TagItem[]>
|
|
1020
1057
|
songlistTags: (params: CommonParams) => Promise<AnyListen.Resource.TagGroupItem[]>
|
|
1021
1058
|
songlist: (params: SonglistListParams) => Promise<ListCommonResult<AnyListen.Resource.SongListItem>>
|
|
1022
|
-
songlistDetail: (params: ListDetailParams) => Promise<
|
|
1059
|
+
songlistDetail: (params: ListDetailParams) => Promise<SonglistDetailResult>
|
|
1023
1060
|
leaderboard: (params: CommonParams) => Promise<AnyListen.Resource.TagGroupItem[]>
|
|
1024
1061
|
leaderboardDate: (params: LeaderboardDateParams) => Promise<AnyListen.Resource.TagItem[]>
|
|
1025
1062
|
leaderboardDetail: (params: LeaderboardDetailParams) => Promise<ListCommonResult<AnyListen.Music.MusicInfoOnline>>
|
|
1063
|
+
musicComment: (params: MusicCommentParams) => Promise<ListCommonResult<MusicComment>>
|
|
1026
1064
|
}
|
|
1027
1065
|
|
|
1028
1066
|
interface BackupDataAction {
|