@any-listen/extension-kit 0.1.2 → 0.1.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/types/app/api.d.ts +33 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@any-listen/extension-kit",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "keywords": [
5
5
  "any-listen",
6
6
  "any-listen-extension"
@@ -579,7 +579,7 @@ declare namespace AnyListen {
579
579
  img: string
580
580
  // grade: basic.favorcnt / 10,
581
581
  desc: string | null
582
- total?: string
582
+ total?: number
583
583
  }
584
584
 
585
585
  interface CommonItem {
@@ -610,6 +610,11 @@ interface CommonListParams extends CommonParams {
610
610
  page: number
611
611
  limit: number
612
612
  }
613
+ interface MusicSearchParams extends CommonListParams {
614
+ name: string
615
+ artist?: string
616
+ albumName?: string
617
+ }
613
618
  interface LyricSearchParams extends CommonParams {
614
619
  name: string
615
620
  artist?: string
@@ -633,10 +638,6 @@ interface PicSearchParams extends CommonParams {
633
638
  interface SonglistSearchParams extends CommonListParams {
634
639
  keyword: string
635
640
  }
636
- interface SearchParams extends CommonListParams {
637
- name: string
638
- artist?: string
639
- }
640
641
  interface ListDetailParams extends CommonListParams {
641
642
  id: string
642
643
  }
@@ -651,6 +652,26 @@ interface LeaderboardDetailParams extends CommonListParams {
651
652
  id: string
652
653
  date: string
653
654
  }
655
+ interface MusicCommentParams extends CommonListParams {
656
+ musicInfo: AnyListen.Music.MusicInfoOnline
657
+ id?: string
658
+ type: 'hot' | 'new' | 'reply'
659
+ }
660
+ export interface MusicComment {
661
+ id: string
662
+ userId?: string
663
+ userName: string
664
+ text: string
665
+ time?: number
666
+ images?: string[]
667
+ location?: string
668
+ avatar?: string
669
+ likedCount?: number
670
+ skipPage?: boolean
671
+ replyTotal?: number
672
+ reply?: MusicComment[]
673
+ replySkipPage?: boolean
674
+ }
654
675
  export interface ListCommonResult<T> {
655
676
  list: T[]
656
677
  total: number
@@ -713,6 +734,11 @@ declare global {
713
734
  type Quality = '128k' | '320k' | 'flac' | 'flac24bit' | '192k' | 'wav' | 'dobly' | 'master'
714
735
  type MusicInfo = AnyListen.Music.MusicInfo
715
736
  type MusicInfoOnline = AnyListen.Music.MusicInfoOnline
737
+ type SongListItem = AnyListen.Resource.SongListItem
738
+ type CommonItem = AnyListen.Resource.CommonItem
739
+ type TagItem = AnyListen.Resource.TagItem
740
+ type TagGroupItem = AnyListen.Resource.TagGroupItem
741
+ type BoardItem = AnyListen.Resource.BoardItem
716
742
 
717
743
  type ParamsData = Record<string, string | number | null | undefined | boolean>
718
744
  interface RequestOptions {
@@ -1008,7 +1034,7 @@ declare global {
1008
1034
  interface ResourceAction {
1009
1035
  tipSearch: (params: CommonParams) => Promise<string[]>
1010
1036
  hotSearch: (params: CommonParams) => Promise<string[]>
1011
- musicSearch: (params: SearchParams) => Promise<ListCommonResult<AnyListen.Music.MusicInfoOnline>>
1037
+ musicSearch: (params: MusicSearchParams) => Promise<ListCommonResult<AnyListen.Music.MusicInfoOnline>>
1012
1038
  musicPic: (params: MusicCommonParams) => Promise<string>
1013
1039
  musicUrl: (params: MusicUrlParams) => Promise<MusicUrlInfo>
1014
1040
  musicLyric: (params: MusicCommonParams) => Promise<AnyListen.Music.LyricInfo>
@@ -1023,6 +1049,7 @@ declare global {
1023
1049
  leaderboard: (params: CommonParams) => Promise<AnyListen.Resource.TagGroupItem[]>
1024
1050
  leaderboardDate: (params: LeaderboardDateParams) => Promise<AnyListen.Resource.TagItem[]>
1025
1051
  leaderboardDetail: (params: LeaderboardDetailParams) => Promise<ListCommonResult<AnyListen.Music.MusicInfoOnline>>
1052
+ musicComment: (params: MusicCommentParams) => Promise<ListCommonResult<MusicComment>>
1026
1053
  }
1027
1054
 
1028
1055
  interface BackupDataAction {