From 857eb66831ebd06167c8c7cddfb33154666608a8 Mon Sep 17 00:00:00 2001 From: Sayem Chowdhury Date: Wed, 3 Mar 2021 02:13:58 +0600 Subject: [PATCH] update user search type --- src/types/profile.ts | 10 ++++++++++ src/types/search.ts | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/types/profile.ts b/src/types/profile.ts index 0696aba..1adb316 100644 --- a/src/types/profile.ts +++ b/src/types/profile.ts @@ -1,5 +1,15 @@ import type {albumTracksType} from './album'; +export interface profileTypeMinimal { + USER_ID: string; + FIRSTNAME: string; + LASTNAME: string; + BLOG_NAME: string; + USER_PICTURE?: string; + IS_FOLLOW: boolean; + __TYPE__: 'user'; +} + export interface profileType { IS_FOLLOW: boolean; NB_ARTISTS: number; diff --git a/src/types/search.ts b/src/types/search.ts index cfc0279..7ca4037 100644 --- a/src/types/search.ts +++ b/src/types/search.ts @@ -2,6 +2,7 @@ import type {albumType, albumTypeMinimal} from './album'; import type {artistInfoTypeMinimal, artistType} from './artist'; import type {playlistInfo, playlistInfoMinimal} from './playlist'; import type {trackType} from './tracks'; +import type {profileTypeMinimal} from './profile'; import type {channelSearchType} from './channel'; import type {radioType} from './radio'; @@ -28,6 +29,11 @@ interface playlistSearchType extends searchTypeCommon { interface trackSearchType extends searchTypeCommon { data: trackType[]; } + +interface profileSearchType extends searchTypeCommon { + data: profileTypeMinimal[]; +} + interface radioSearchType extends searchTypeCommon { data: radioType[]; } @@ -76,7 +82,7 @@ export interface searchType { PLAYLIST: playlistSearchType; RADIO: radioSearchType; SHOW: showSearchType; - USER: trackSearchType; + USER: profileSearchType; LIVESTREAM: liveSearchType; CHANNEL: channelSearchType; }