diff --git a/src/types/playlist-channel.ts b/src/types/playlist-channel.ts index 411ef6e..5beadb3 100644 --- a/src/types/playlist-channel.ts +++ b/src/types/playlist-channel.ts @@ -14,25 +14,46 @@ interface nativeAdsType { weight: number; // 1 } +type itemType = 'album' | 'playlist' | 'radio' | 'show' | 'livestream'; + export interface playlistChannelItemsType { item_id: string; // 'page_id=channels/dance,render_id=608a93738223d615200e6390ea48f8f3,version=channel-cms.1.0,section_id=long-card-horizontal-grid,section_position=0,module_id=be55d60e-e3c3-421a-9ea9-aef6f0c63c6c,module_type=playlists,layout=playlists_layout_long-card-horizontal-grid,content_source=playlists_content-source_custom,content_source_count=0,content_programming_count=8,section_content=playlist%3A1291471565%3Bplaylist%3A2249258602%3Bplaylist%3A2113355604%3Bplaylist%3A1950512362%3Bplaylist%3A1495242491%3Bplaylist%3A6090195324%3Bplaylist%3A706093725%3Bplaylist%3A7837492422,item_type=playlist,item_id=1291471565,item_position=0' id: string; // '1291471565' - type: 'playlist'; - data: { - NB_FAN: number; // 231133 - NB_SONG: number; // 50 - PARENT_USER_ID: string; // '2834392844' - PICTURE_TYPE: 'playlist'; - PLAYLIST_ID: string; // '1291471565' - PLAYLIST_PICTURE: string; // 'c5eb1bf10a83734c032e983ef190105e' - STATUS: number; // 0 - TITLE: string; // 'Dance Party' - TYPE: string; // '0' - DATE_MOD: string; // '2021-04-02 19:57:27' - DATE_ADD: string; // '2020-12-15 19:31:07' - DESCRIPTION: string; // 'The biggest dance hits to keep the party going!' - __TYPE__: 'playlist'; - } | null; + type: itemType; + data: + | { + NB_FAN: number; // 231133 + NB_SONG: number; // 50 + PARENT_USER_ID: string; // '2834392844' + PICTURE_TYPE: string; // 'playlist'; + PLAYLIST_ID: string; // '1291471565' + PLAYLIST_PICTURE: string; // 'c5eb1bf10a83734c032e983ef190105e' + STATUS: number; // 0 + TITLE: string; // 'Dance Party' + TYPE: string; // '0' + DATE_MOD: string; // '2021-04-02 19:57:27' + DATE_ADD: string; // '2020-12-15 19:31:07' + DESCRIPTION: string; // 'The biggest dance hits to keep the party going!' + __TYPE__: itemType; + } + | { + __TYPE__: itemType; + background_color: string; // '#ffffff'; + description: string | null; + id: string; // '75092dd5-4857-4219-be1d-89074a716982'; + logo: string | null; // '440dc61fe940f0e20b78a540d1484c3c'; + name: string; // 'NBC News'; + pictures: [ + { + md5: string; + type: string; + }, + ]; + slug: string; // 'nbcnews'; + title: string; // 'NBC News'; + type: itemType; + } + | null; target: string; // '/playlist/1291471565' title: string; // 'Dance Party' subtitle: string; // '50 tracks'