From a556aacfdd1f4f53e4e941e8ba18a87147ebac45 Mon Sep 17 00:00:00 2001 From: LuanRT Date: Mon, 20 Jun 2022 02:51:19 -0300 Subject: [PATCH] chore: regenerate type declarations --- typings/lib/Innertube.d.ts | 25 +------ typings/lib/core/Feed.d.ts | 72 ++++++++++++++----- typings/lib/core/FilterableFeed.d.ts | 8 ++- typings/lib/core/TabbedFeed.d.ts | 3 +- .../lib/parser/contents/classes/Author.d.ts | 27 ++----- .../contents/classes/BackstagePost.d.ts | 10 ++- .../classes/ChannelAboutFullMetadata.d.ts | 6 +- .../classes/ChannelFeaturedContent.d.ts | 8 +++ .../contents/classes/EndScreenVideo.d.ts | 1 + .../classes/ExpandedShelfContents.d.ts | 2 +- typings/lib/parser/contents/classes/Grid.d.ts | 2 +- .../parser/contents/classes/GridChannel.d.ts | 3 +- .../parser/contents/classes/GridPlaylist.d.ts | 1 + .../contents/classes/HorizontalList.d.ts | 2 +- .../parser/contents/classes/ItemSection.d.ts | 2 +- typings/lib/parser/contents/classes/Menu.d.ts | 2 +- .../contents/classes/MerchandiseShelf.d.ts | 2 +- .../lib/parser/contents/classes/Movie.d.ts | 25 +++++++ .../contents/classes/MovingThumbnail.d.ts | 2 - .../contents/classes/NavigationEndpoint.d.ts | 3 + .../contents/classes/PlaylistSidebar.d.ts | 2 +- .../contents/classes/PlaylistVideo.d.ts | 2 + typings/lib/parser/contents/classes/Poll.d.ts | 9 +++ typings/lib/parser/contents/classes/Post.d.ts | 4 ++ .../contents/classes/ProfileColumn.d.ts | 2 +- .../contents/classes/ProfileColumnStats.d.ts | 2 +- .../parser/contents/classes/ReelShelf.d.ts | 2 +- .../lib/parser/contents/classes/RichItem.d.ts | 1 - .../parser/contents/classes/RichSection.d.ts | 2 + .../parser/contents/classes/SectionList.d.ts | 1 - .../ThumbnailOverlayPlaybackStatus.d.ts | 6 ++ .../parser/contents/classes/VerticalList.d.ts | 2 +- typings/lib/parser/youtube/Channel.d.ts | 30 +++++--- typings/lib/parser/youtube/History.d.ts | 19 ++--- typings/lib/parser/youtube/Library.d.ts | 11 ++- typings/lib/parser/youtube/Playlist.d.ts | 9 +-- typings/lib/parser/youtube/VideoInfo.d.ts | 8 ++- 37 files changed, 207 insertions(+), 111 deletions(-) create mode 100644 typings/lib/parser/contents/classes/ChannelFeaturedContent.d.ts create mode 100644 typings/lib/parser/contents/classes/Movie.d.ts create mode 100644 typings/lib/parser/contents/classes/Poll.d.ts create mode 100644 typings/lib/parser/contents/classes/Post.d.ts create mode 100644 typings/lib/parser/contents/classes/ThumbnailOverlayPlaybackStatus.d.ts diff --git a/typings/lib/Innertube.d.ts b/typings/lib/Innertube.d.ts index 80e15aca..6cc1fa39 100644 --- a/typings/lib/Innertube.d.ts +++ b/typings/lib/Innertube.d.ts @@ -216,29 +216,9 @@ declare class Innertube { * Retrieves the contents of a given playlist. * * @param {string} playlist_id - the id of the playlist. - * @param {object} options - `YOUTUBE` | `YTMUSIC` - * @param {string} options.client - client used to parse the playlist, can be: `YTMUSIC` | `YOUTUBE` - * @returns {Promise.< - * { title: string, description: string, total_items: string, last_updated: string, views: string, items: object[] } | - * { title: string, description: string, total_items: number, duration: string, year: string, items: object[] }>} + * @returns {Promise.} */ - getPlaylist(playlist_id: string, options?: { - client: string; - }): Promise<{ - title: string; - description: string; - total_items: string; - last_updated: string; - views: string; - items: object[]; - } | { - title: string; - description: string; - total_items: number; - duration: string; - year: string; - items: object[]; - }>; + getPlaylist(playlist_id: string): Promise; /** * An alternative to {@link download}. * Returns deciphered streaming data. @@ -297,4 +277,5 @@ import Library = require("./parser/youtube/Library"); import History = require("./parser/youtube/History"); import TabbedFeed = require("./core/TabbedFeed"); import Channel = require("./parser/youtube/Channel"); +import Playlist = require("./parser/youtube/Playlist"); import { PassThrough } from "stream"; diff --git a/typings/lib/core/Feed.d.ts b/typings/lib/core/Feed.d.ts index 4bce08b5..cd3a4379 100644 --- a/typings/lib/core/Feed.d.ts +++ b/typings/lib/core/Feed.d.ts @@ -15,39 +15,75 @@ declare class Feed { */ static getPlaylistsFromMemo(memo: Map): Array; constructor(actions: any, data: any, already_parsed?: boolean); - memo: any; - /** - * Get the original page data - */ - get page(): any; - get actions(): import("../core/Actions"); /** * Get all the videos in the feed */ get videos(): (import("../parser/contents/classes/Video") | import("../parser/contents/classes/GridVideo") | import("../parser/contents/classes/CompactVideo") | import("../parser/contents/classes/PlaylistVideo") | import("../parser/contents/classes/PlaylistPanelVideo") | import("../parser/contents/classes/WatchCardCompactVideo"))[]; - /** - * Get all playlists in the feed - * - * @returns {Array} - */ - get playlists(): (import("../parser/contents/classes/Playlist") | import("../parser/contents/classes/GridPlaylist"))[]; /** * Get all the community posts in the feed * - * @returns {import('../parser/contents/classes/BackstagePost')[]} + * @returns {import('../parser/contents/classes/BackstagePost')[] | import('../parser/contents/classes/Post')[]} */ - get backstage_posts(): import("../parser/contents/classes/BackstagePost")[]; + get posts(): import("../parser/contents/classes/BackstagePost")[] | import("../parser/contents/classes/Post")[]; /** * Get all the channels in the feed * * @returns {Array} */ get channels(): any[]; + /** + * Get all playlists in the feed + * + * @returns {Array} + */ + get playlists(): (import("../parser/contents/classes/Playlist") | import("../parser/contents/classes/GridPlaylist"))[]; + get memo(): any; + /** + * Returns contents from the page. + * + * @returns {*} + */ + get contents(): any; + /** + * Returns all segments/sections from the page. + * + * @returns {import('../parser/contents/Shelf')[] | import('../parser/contents/RichShelf')[] | import('../parser/contents/ReelShelf')[]} + */ + get shelves(): any[]; + /** + * Finds shelf by title. + * + * @param {string} title + */ + getShelf(title: string): any; + /** + * Returns secondary contents from the page. + * + * @returns {*} + */ + get secondary_contents(): any; + get actions(): import("../core/Actions"); + /** + * Get the original page data + */ + get page(): any; + /** + * Checks if the feed has continuation. + * + * @returns {boolean} + */ get has_continuation(): boolean; - getContinuationData(): any; - get shelves(): any; - getShelf(title: any): any; - get shelf_content(): any; + /** + * Retrieves continuation data as it is. + * + * @returns {Promise.} + */ + getContinuationData(): Promise; + /** + * Retrieves next batch of contents and returns a new {@link Feed} object. + * + * @returns {Promise.} + */ getContinuation(): Promise; #private; } diff --git a/typings/lib/core/FilterableFeed.d.ts b/typings/lib/core/FilterableFeed.d.ts index d63637d0..8cffa3d3 100644 --- a/typings/lib/core/FilterableFeed.d.ts +++ b/typings/lib/core/FilterableFeed.d.ts @@ -7,7 +7,13 @@ declare class FilterableFeed extends Feed { */ get filter_chips(): any[]; get filters(): any[]; - getFilteredFeed(name: any): Promise; + /** + * Applies given filter and returns a new {@link Feed} object. + * + * @param {string | import('../parser/contents/classes/ChipCloudChip')} filter + * @returns {Promise.} + */ + getFilteredFeed(filter: string | import('../parser/contents/classes/ChipCloudChip')): Promise; #private; } import Feed = require("./Feed"); diff --git a/typings/lib/core/TabbedFeed.d.ts b/typings/lib/core/TabbedFeed.d.ts index 4fde2e43..6620caa5 100644 --- a/typings/lib/core/TabbedFeed.d.ts +++ b/typings/lib/core/TabbedFeed.d.ts @@ -2,8 +2,7 @@ export = TabbedFeed; declare class TabbedFeed extends Feed { get tabs(): any[]; /** - * - * @param {string} title title of the tab to get + * @param {string} title * @returns {Promise} */ getTab(title: string): Promise; diff --git a/typings/lib/parser/contents/classes/Author.d.ts b/typings/lib/parser/contents/classes/Author.d.ts index 2c4d200c..b5f5f491 100644 --- a/typings/lib/parser/contents/classes/Author.d.ts +++ b/typings/lib/parser/contents/classes/Author.d.ts @@ -1,27 +1,14 @@ export = Author; declare class Author { constructor(item: any, badges: any, thumbs: any); - /** - * @type {import('./MetadataBadge')[]} - */ - badges: import('./MetadataBadge')[]; - /** - * @type {Thumbnail[]} - */ + id: any; + name: any; thumbnails: Thumbnail[]; - get url(): any; - set name(arg: any); - get name(): any; - get endpoint(): import("./NavigationEndpoint"); - get id(): any; - /** - * @type {boolean} - */ - get is_verified(): boolean; - /** - * @type {boolean} - */ - get is_verified_artist(): boolean; + endpoint: any; + badges: any; + is_verified: any; + is_verified_artist: any; + url: string; /** * @type {Thumbnail | undefined} */ diff --git a/typings/lib/parser/contents/classes/BackstagePost.d.ts b/typings/lib/parser/contents/classes/BackstagePost.d.ts index 733a9d45..c91af011 100644 --- a/typings/lib/parser/contents/classes/BackstagePost.d.ts +++ b/typings/lib/parser/contents/classes/BackstagePost.d.ts @@ -5,11 +5,17 @@ declare class BackstagePost { id: any; author: Author; content: Text; - published_at: Text; + published: Text; + poll_status: any; + vote_status: any; likes: Text; + menu: any; actions: any; + vote_button: any; + surface: any; + endpoint: NavigationEndpoint; attachment: any; - get endpoint(): any; } import Author = require("./Author"); import Text = require("./Text"); +import NavigationEndpoint = require("./NavigationEndpoint"); diff --git a/typings/lib/parser/contents/classes/ChannelAboutFullMetadata.d.ts b/typings/lib/parser/contents/classes/ChannelAboutFullMetadata.d.ts index eb531559..965d8111 100644 --- a/typings/lib/parser/contents/classes/ChannelAboutFullMetadata.d.ts +++ b/typings/lib/parser/contents/classes/ChannelAboutFullMetadata.d.ts @@ -3,15 +3,17 @@ declare class ChannelAboutFullMetadata { constructor(data: any); type: string; id: any; + name: Text; + avatar: Thumbnail[]; canonical_channel_url: any; - author: Author; views: Text; joined: Text; description: Text; email_reveal: NavigationEndpoint; can_reveal_email: boolean; country: Text; + buttons: any; } -import Author = require("./Author"); import Text = require("./Text"); +import Thumbnail = require("./Thumbnail"); import NavigationEndpoint = require("./NavigationEndpoint"); diff --git a/typings/lib/parser/contents/classes/ChannelFeaturedContent.d.ts b/typings/lib/parser/contents/classes/ChannelFeaturedContent.d.ts new file mode 100644 index 00000000..b041c691 --- /dev/null +++ b/typings/lib/parser/contents/classes/ChannelFeaturedContent.d.ts @@ -0,0 +1,8 @@ +export = ChannelFeaturedContent; +declare class ChannelFeaturedContent { + constructor(data: any); + type: string; + title: Text; + items: any; +} +import Text = require("./Text"); diff --git a/typings/lib/parser/contents/classes/EndScreenVideo.d.ts b/typings/lib/parser/contents/classes/EndScreenVideo.d.ts index 9e8eae2a..887fe66c 100644 --- a/typings/lib/parser/contents/classes/EndScreenVideo.d.ts +++ b/typings/lib/parser/contents/classes/EndScreenVideo.d.ts @@ -9,6 +9,7 @@ declare class EndScreenVideo { author: Author; endpoint: NavigationEndpoint; short_view_count_text: Text; + badges: any; duration: { text: any; seconds: any; diff --git a/typings/lib/parser/contents/classes/ExpandedShelfContents.d.ts b/typings/lib/parser/contents/classes/ExpandedShelfContents.d.ts index 35cdc4df..734cef1a 100644 --- a/typings/lib/parser/contents/classes/ExpandedShelfContents.d.ts +++ b/typings/lib/parser/contents/classes/ExpandedShelfContents.d.ts @@ -3,5 +3,5 @@ declare class ExpandedShelfContents { constructor(data: any); type: string; items: any; - contents: any; + get contents(): any; } diff --git a/typings/lib/parser/contents/classes/Grid.d.ts b/typings/lib/parser/contents/classes/Grid.d.ts index 215cec3c..14f31f84 100644 --- a/typings/lib/parser/contents/classes/Grid.d.ts +++ b/typings/lib/parser/contents/classes/Grid.d.ts @@ -3,8 +3,8 @@ declare class Grid { constructor(data: any); type: string; items: any; - contents: any; is_collapsible: any; visible_row_count: any; target_id: any; + get contents(): any; } diff --git a/typings/lib/parser/contents/classes/GridChannel.d.ts b/typings/lib/parser/contents/classes/GridChannel.d.ts index 5bae5a11..72c77786 100644 --- a/typings/lib/parser/contents/classes/GridChannel.d.ts +++ b/typings/lib/parser/contents/classes/GridChannel.d.ts @@ -5,8 +5,9 @@ declare class GridChannel { id: any; author: Author; subscribers: Text; - videos: Text; + video_count: Text; endpoint: NavigationEndpoint; + subscribe_button: any; } import Author = require("./Author"); import Text = require("./Text"); diff --git a/typings/lib/parser/contents/classes/GridPlaylist.d.ts b/typings/lib/parser/contents/classes/GridPlaylist.d.ts index 2309b3d8..b026c7fa 100644 --- a/typings/lib/parser/contents/classes/GridPlaylist.d.ts +++ b/typings/lib/parser/contents/classes/GridPlaylist.d.ts @@ -9,6 +9,7 @@ declare class GridPlaylist { endpoint: NavigationEndpoint; view_playlist: NavigatableText; thumbnails: Thumbnail[]; + thumbnail_renderer: any; sidebar_thumbnails: any[]; video_count: Text; video_count_short_text: Text; diff --git a/typings/lib/parser/contents/classes/HorizontalList.d.ts b/typings/lib/parser/contents/classes/HorizontalList.d.ts index addc3c68..56c42d70 100644 --- a/typings/lib/parser/contents/classes/HorizontalList.d.ts +++ b/typings/lib/parser/contents/classes/HorizontalList.d.ts @@ -4,5 +4,5 @@ declare class HorizontalList { type: string; visible_item_count: any; items: any; - contents: any; + get contents(): any; } diff --git a/typings/lib/parser/contents/classes/ItemSection.d.ts b/typings/lib/parser/contents/classes/ItemSection.d.ts index 30c03a2a..8b020c3a 100644 --- a/typings/lib/parser/contents/classes/ItemSection.d.ts +++ b/typings/lib/parser/contents/classes/ItemSection.d.ts @@ -3,6 +3,6 @@ declare class ItemSection { constructor(data: any); type: string; header: any; - target_id: any; contents: any; + target_id: any; } diff --git a/typings/lib/parser/contents/classes/Menu.d.ts b/typings/lib/parser/contents/classes/Menu.d.ts index be0dbf58..cdf43a20 100644 --- a/typings/lib/parser/contents/classes/Menu.d.ts +++ b/typings/lib/parser/contents/classes/Menu.d.ts @@ -3,7 +3,7 @@ declare class Menu { constructor(data: any); type: string; items: any; - contents: any; top_level_buttons: any; label: any; + get contents(): any; } diff --git a/typings/lib/parser/contents/classes/MerchandiseShelf.d.ts b/typings/lib/parser/contents/classes/MerchandiseShelf.d.ts index b0646e91..05a86ae7 100644 --- a/typings/lib/parser/contents/classes/MerchandiseShelf.d.ts +++ b/typings/lib/parser/contents/classes/MerchandiseShelf.d.ts @@ -5,5 +5,5 @@ declare class MerchandiseShelf { title: any; menu: any; items: any; - contents: any; + get contents(): any; } diff --git a/typings/lib/parser/contents/classes/Movie.d.ts b/typings/lib/parser/contents/classes/Movie.d.ts new file mode 100644 index 00000000..15fb1d3b --- /dev/null +++ b/typings/lib/parser/contents/classes/Movie.d.ts @@ -0,0 +1,25 @@ +export = Movie; +declare class Movie { + constructor(data: any); + type: string; + id: any; + title: Text; + description_snippet: Text; + top_metadata_items: Text; + thumbnails: Thumbnail[]; + thumbnail_overlays: any; + author: Author; + duration: { + text: any; + seconds: number; + }; + endpoint: NavigationEndpoint; + badges: any; + use_vertical_poster: any; + show_action_menu: any; + menu: any; +} +import Text = require("./Text"); +import Thumbnail = require("./Thumbnail"); +import Author = require("./Author"); +import NavigationEndpoint = require("./NavigationEndpoint"); diff --git a/typings/lib/parser/contents/classes/MovingThumbnail.d.ts b/typings/lib/parser/contents/classes/MovingThumbnail.d.ts index d60ec381..d7571da2 100644 --- a/typings/lib/parser/contents/classes/MovingThumbnail.d.ts +++ b/typings/lib/parser/contents/classes/MovingThumbnail.d.ts @@ -2,6 +2,4 @@ export = MovingThumbnail; declare class MovingThumbnail { constructor(data: any); type: string; - get thumbnails(): any; - #private; } diff --git a/typings/lib/parser/contents/classes/NavigationEndpoint.d.ts b/typings/lib/parser/contents/classes/NavigationEndpoint.d.ts index 7d7a3252..62c8afda 100644 --- a/typings/lib/parser/contents/classes/NavigationEndpoint.d.ts +++ b/typings/lib/parser/contents/classes/NavigationEndpoint.d.ts @@ -37,6 +37,9 @@ declare class NavigationEndpoint { }; params: any; }; + perform_comment_action: { + action: any; + }; offline_video: { video_id: any; on_add_command: { diff --git a/typings/lib/parser/contents/classes/PlaylistSidebar.d.ts b/typings/lib/parser/contents/classes/PlaylistSidebar.d.ts index 52e2281a..e985c835 100644 --- a/typings/lib/parser/contents/classes/PlaylistSidebar.d.ts +++ b/typings/lib/parser/contents/classes/PlaylistSidebar.d.ts @@ -3,5 +3,5 @@ declare class PlaylistSidebar { constructor(data: any); type: string; items: any; - contents: any; + get contents(): any; } diff --git a/typings/lib/parser/contents/classes/PlaylistVideo.d.ts b/typings/lib/parser/contents/classes/PlaylistVideo.d.ts index b7540222..5e2d4ec3 100644 --- a/typings/lib/parser/contents/classes/PlaylistVideo.d.ts +++ b/typings/lib/parser/contents/classes/PlaylistVideo.d.ts @@ -7,9 +7,11 @@ declare class PlaylistVideo { title: Text; author: PlaylistAuthor; thumbnails: Thumbnail[]; + thumbnail_overlays: any; set_video_id: any; endpoint: NavigationEndpoint; is_playable: any; + menu: any; duration: { text: any; seconds: number; diff --git a/typings/lib/parser/contents/classes/Poll.d.ts b/typings/lib/parser/contents/classes/Poll.d.ts new file mode 100644 index 00000000..3ce631d1 --- /dev/null +++ b/typings/lib/parser/contents/classes/Poll.d.ts @@ -0,0 +1,9 @@ +export = Poll; +declare class Poll { + constructor(data: any); + type: string; + choices: any; + total_votes: Text; + poll_type: any; +} +import Text = require("./Text"); diff --git a/typings/lib/parser/contents/classes/Post.d.ts b/typings/lib/parser/contents/classes/Post.d.ts new file mode 100644 index 00000000..6e3b7a74 --- /dev/null +++ b/typings/lib/parser/contents/classes/Post.d.ts @@ -0,0 +1,4 @@ +export = Post; +declare class Post extends BackstagePost { +} +import BackstagePost = require("./BackstagePost"); diff --git a/typings/lib/parser/contents/classes/ProfileColumn.d.ts b/typings/lib/parser/contents/classes/ProfileColumn.d.ts index 19530308..3df6b2b6 100644 --- a/typings/lib/parser/contents/classes/ProfileColumn.d.ts +++ b/typings/lib/parser/contents/classes/ProfileColumn.d.ts @@ -3,5 +3,5 @@ declare class ProfileColumn { constructor(data: any); type: string; items: any; - contents: any; + get contents(): any; } diff --git a/typings/lib/parser/contents/classes/ProfileColumnStats.d.ts b/typings/lib/parser/contents/classes/ProfileColumnStats.d.ts index 980b9408..3be40d74 100644 --- a/typings/lib/parser/contents/classes/ProfileColumnStats.d.ts +++ b/typings/lib/parser/contents/classes/ProfileColumnStats.d.ts @@ -3,5 +3,5 @@ declare class ProfileColumnStats { constructor(data: any); type: string; items: any; - contents: any; + get contents(): any; } diff --git a/typings/lib/parser/contents/classes/ReelShelf.d.ts b/typings/lib/parser/contents/classes/ReelShelf.d.ts index 6a79da9a..b8137c57 100644 --- a/typings/lib/parser/contents/classes/ReelShelf.d.ts +++ b/typings/lib/parser/contents/classes/ReelShelf.d.ts @@ -5,7 +5,7 @@ declare class ReelShelf { title: Text; items: any; endpoint: NavigationEndpoint; - contents: any; + get contents(): any; } import Text = require("./Text"); import NavigationEndpoint = require("./NavigationEndpoint"); diff --git a/typings/lib/parser/contents/classes/RichItem.d.ts b/typings/lib/parser/contents/classes/RichItem.d.ts index fe5249c4..7214dab2 100644 --- a/typings/lib/parser/contents/classes/RichItem.d.ts +++ b/typings/lib/parser/contents/classes/RichItem.d.ts @@ -2,5 +2,4 @@ export = RichItem; declare class RichItem { constructor(data: any); type: string; - content: any; } diff --git a/typings/lib/parser/contents/classes/RichSection.d.ts b/typings/lib/parser/contents/classes/RichSection.d.ts index 5de2f004..70afe20d 100644 --- a/typings/lib/parser/contents/classes/RichSection.d.ts +++ b/typings/lib/parser/contents/classes/RichSection.d.ts @@ -1,4 +1,6 @@ export = RichSection; declare class RichSection { + constructor(data: any); type: string; + contents: any; } diff --git a/typings/lib/parser/contents/classes/SectionList.d.ts b/typings/lib/parser/contents/classes/SectionList.d.ts index 6bd03fe6..05b17c5d 100644 --- a/typings/lib/parser/contents/classes/SectionList.d.ts +++ b/typings/lib/parser/contents/classes/SectionList.d.ts @@ -5,5 +5,4 @@ declare class SectionList { target_id: any; contents: any; continuation: any; - header: any; } diff --git a/typings/lib/parser/contents/classes/ThumbnailOverlayPlaybackStatus.d.ts b/typings/lib/parser/contents/classes/ThumbnailOverlayPlaybackStatus.d.ts new file mode 100644 index 00000000..0acf5d07 --- /dev/null +++ b/typings/lib/parser/contents/classes/ThumbnailOverlayPlaybackStatus.d.ts @@ -0,0 +1,6 @@ +export = ThumbnailOverlayPlaybackStatus; +declare class ThumbnailOverlayPlaybackStatus { + constructor(data: any); + type: string; + text: any; +} diff --git a/typings/lib/parser/contents/classes/VerticalList.d.ts b/typings/lib/parser/contents/classes/VerticalList.d.ts index f15e0e6e..1634ae31 100644 --- a/typings/lib/parser/contents/classes/VerticalList.d.ts +++ b/typings/lib/parser/contents/classes/VerticalList.d.ts @@ -3,8 +3,8 @@ declare class VerticalList { constructor(data: any); type: string; items: any; - contents: any; collapsed_item_count: any; collapsed_state_button_text: Text; + get contents(): any; } import Text = require("./Text"); diff --git a/typings/lib/parser/youtube/Channel.d.ts b/typings/lib/parser/youtube/Channel.d.ts index fa366cb2..81789c28 100644 --- a/typings/lib/parser/youtube/Channel.d.ts +++ b/typings/lib/parser/youtube/Channel.d.ts @@ -1,21 +1,29 @@ export = Channel; declare class Channel extends TabbedFeed { - /** - * @type {import('../parser/contents/ChannelMetadata')} - */ + header: { + author: any; + subscribers: any; + banner: any; + tv_banner: any; + mobile_banner: any; + header_links: any; + }; metadata: any; - title: any; - description: any; - getVideos(): Promise; - getPlaylists(): Promise; - getHome(): Promise; - getCommunity(): Promise; - getChannels(): Promise; + sponsor_button: any; + subscribe_button: any; + current_tab: any; + getVideos(): Promise; + getPlaylists(): Promise; + getHome(): Promise; + getCommunity(): Promise; + getChannels(): Promise; /** - * Get the channel about page + * Retrieves the channel about page. + * Note that this does not return a new {@link Channel} object. * * @returns {Promise} */ getAbout(): Promise; + #private; } import TabbedFeed = require("../../core/TabbedFeed"); diff --git a/typings/lib/parser/youtube/History.d.ts b/typings/lib/parser/youtube/History.d.ts index a9326ac0..26a2a4fe 100644 --- a/typings/lib/parser/youtube/History.d.ts +++ b/typings/lib/parser/youtube/History.d.ts @@ -1,16 +1,19 @@ export = History; /** @namespace */ -declare class History { +declare class History extends Feed { /** - * @param {object} page - parsed data. * @param {import('../../core/Actions')} actions - * @param {boolean} is_continuation + * @param {object} data - parsed data. + * @param {boolean} already_parsed */ - constructor(page: object, actions: import('../../core/Actions'), is_continuation: boolean); - feed_actions: any; + constructor(actions: import('../../core/Actions'), data: object, already_parsed?: boolean); sections: any; + feed_actions: any; + /** + * Retrieves next batch of contents. + * + * @returns {Promise.} + */ getContinuation(): Promise; - get has_continuation(): boolean; - get page(): any; - #private; } +import Feed = require("../../core/Feed"); diff --git a/typings/lib/parser/youtube/Library.d.ts b/typings/lib/parser/youtube/Library.d.ts index 4762e4cb..e8114448 100644 --- a/typings/lib/parser/youtube/Library.d.ts +++ b/typings/lib/parser/youtube/Library.d.ts @@ -10,7 +10,13 @@ declare class Library { stats: any; user_info: any; }; - sections: any; + /** @type {{ type: string, title: import('../contents/classes/Text'), contents: object[], getAll: Promise. }[] } */ + sections: { + type: string; + title: import('../contents/classes/Text'); + contents: object[]; + getAll: Promise; + }[]; get history(): any; get watch_later(): any; get liked_videos(): any; @@ -56,3 +62,6 @@ declare class Library { }; #private; } +import Playlist = require("./Playlist"); +import History = require("./History"); +import Feed = require("../../core/Feed"); diff --git a/typings/lib/parser/youtube/Playlist.d.ts b/typings/lib/parser/youtube/Playlist.d.ts index bc9648ae..433b4073 100644 --- a/typings/lib/parser/youtube/Playlist.d.ts +++ b/typings/lib/parser/youtube/Playlist.d.ts @@ -1,11 +1,8 @@ export = Playlist; declare class Playlist extends Feed { - primary_info: any; - get title(): any; - get description(): any; - get total_items(): any; - get views(): any; - get last_updated(): any; + info: any; + menu: any; + endpoint: any; /** * @alias videos */ diff --git a/typings/lib/parser/youtube/VideoInfo.d.ts b/typings/lib/parser/youtube/VideoInfo.d.ts index 42b18646..1616c4c2 100644 --- a/typings/lib/parser/youtube/VideoInfo.d.ts +++ b/typings/lib/parser/youtube/VideoInfo.d.ts @@ -129,14 +129,18 @@ declare class VideoInfo { on_response_received_actions_memo: Map; on_response_received_endpoints: any; on_response_received_endpoints_memo: Map; - on_response_received_commands: any; + on_response_received_commands: any; /** + * @type {import('../contents/classes/VideoPrimaryInfo')} + */ on_response_received_commands_memo: Map; continuation_contents: any; metadata: any; header: any; microformat: import("../contents/classes/PlayerMicroformat"); sidebar: any; - overlay: any; + overlay: any; /** + * @type {import('../contents/classes/ChipCloud')} + */ refinements: any; estimated_results: any; player_overlays: any;