chore: regenerate type declarations

This commit is contained in:
LuanRT
2022-06-20 02:51:19 -03:00
parent 9ffaaacb3e
commit a556aacfdd
37 changed files with 207 additions and 111 deletions

View File

@@ -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.<Playlist>}
*/
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<Playlist>;
/**
* 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";

View File

@@ -15,39 +15,75 @@ declare class Feed {
*/
static getPlaylistsFromMemo(memo: Map<string, any[]>): Array<import('../parser/contents/classes/Playlist') | import('../parser/contents/classes/GridPlaylist')>;
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<import('../parser/contents/classes/Playlist') | import('../parser/contents/classes/GridPlaylist')>}
*/
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<import('../parser/contents/Channel') | import('../parser/contents/GridChannel')>}
*/
get channels(): any[];
/**
* Get all playlists in the feed
*
* @returns {Array<import('../parser/contents/classes/Playlist') | import('../parser/contents/classes/GridPlaylist')>}
*/
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.<any>}
*/
getContinuationData(): Promise<any>;
/**
* Retrieves next batch of contents and returns a new {@link Feed} object.
*
* @returns {Promise.<Feed>}
*/
getContinuation(): Promise<Feed>;
#private;
}

View File

@@ -7,7 +7,13 @@ declare class FilterableFeed extends Feed {
*/
get filter_chips(): any[];
get filters(): any[];
getFilteredFeed(name: any): Promise<Feed>;
/**
* Applies given filter and returns a new {@link Feed} object.
*
* @param {string | import('../parser/contents/classes/ChipCloudChip')} filter
* @returns {Promise.<Feed>}
*/
getFilteredFeed(filter: string | import('../parser/contents/classes/ChipCloudChip')): Promise<Feed>;
#private;
}
import Feed = require("./Feed");

View File

@@ -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<TabbedFeed>}
*/
getTab(title: string): Promise<TabbedFeed>;

View File

@@ -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}
*/

View File

@@ -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");

View File

@@ -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");

View File

@@ -0,0 +1,8 @@
export = ChannelFeaturedContent;
declare class ChannelFeaturedContent {
constructor(data: any);
type: string;
title: Text;
items: any;
}
import Text = require("./Text");

View File

@@ -9,6 +9,7 @@ declare class EndScreenVideo {
author: Author;
endpoint: NavigationEndpoint;
short_view_count_text: Text;
badges: any;
duration: {
text: any;
seconds: any;

View File

@@ -3,5 +3,5 @@ declare class ExpandedShelfContents {
constructor(data: any);
type: string;
items: any;
contents: any;
get contents(): any;
}

View File

@@ -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;
}

View File

@@ -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");

View File

@@ -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;

View File

@@ -4,5 +4,5 @@ declare class HorizontalList {
type: string;
visible_item_count: any;
items: any;
contents: any;
get contents(): any;
}

View File

@@ -3,6 +3,6 @@ declare class ItemSection {
constructor(data: any);
type: string;
header: any;
target_id: any;
contents: any;
target_id: any;
}

View File

@@ -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;
}

View File

@@ -5,5 +5,5 @@ declare class MerchandiseShelf {
title: any;
menu: any;
items: any;
contents: any;
get contents(): any;
}

View File

@@ -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");

View File

@@ -2,6 +2,4 @@ export = MovingThumbnail;
declare class MovingThumbnail {
constructor(data: any);
type: string;
get thumbnails(): any;
#private;
}

View File

@@ -37,6 +37,9 @@ declare class NavigationEndpoint {
};
params: any;
};
perform_comment_action: {
action: any;
};
offline_video: {
video_id: any;
on_add_command: {

View File

@@ -3,5 +3,5 @@ declare class PlaylistSidebar {
constructor(data: any);
type: string;
items: any;
contents: any;
get contents(): any;
}

View File

@@ -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;

View File

@@ -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");

View File

@@ -0,0 +1,4 @@
export = Post;
declare class Post extends BackstagePost {
}
import BackstagePost = require("./BackstagePost");

View File

@@ -3,5 +3,5 @@ declare class ProfileColumn {
constructor(data: any);
type: string;
items: any;
contents: any;
get contents(): any;
}

View File

@@ -3,5 +3,5 @@ declare class ProfileColumnStats {
constructor(data: any);
type: string;
items: any;
contents: any;
get contents(): any;
}

View File

@@ -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");

View File

@@ -2,5 +2,4 @@ export = RichItem;
declare class RichItem {
constructor(data: any);
type: string;
content: any;
}

View File

@@ -1,4 +1,6 @@
export = RichSection;
declare class RichSection {
constructor(data: any);
type: string;
contents: any;
}

View File

@@ -5,5 +5,4 @@ declare class SectionList {
target_id: any;
contents: any;
continuation: any;
header: any;
}

View File

@@ -0,0 +1,6 @@
export = ThumbnailOverlayPlaybackStatus;
declare class ThumbnailOverlayPlaybackStatus {
constructor(data: any);
type: string;
text: any;
}

View File

@@ -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");

View File

@@ -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<TabbedFeed>;
getPlaylists(): Promise<TabbedFeed>;
getHome(): Promise<TabbedFeed>;
getCommunity(): Promise<TabbedFeed>;
getChannels(): Promise<TabbedFeed>;
sponsor_button: any;
subscribe_button: any;
current_tab: any;
getVideos(): Promise<Channel>;
getPlaylists(): Promise<Channel>;
getHome(): Promise<Channel>;
getCommunity(): Promise<Channel>;
getChannels(): Promise<Channel>;
/**
* Get the channel about page
* Retrieves the channel about page.
* Note that this does not return a new {@link Channel} object.
*
* @returns {Promise<import('../parser/contents/ChannelAboutFullMetadata')>}
*/
getAbout(): Promise<any>;
#private;
}
import TabbedFeed = require("../../core/TabbedFeed");

View File

@@ -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.<History>}
*/
getContinuation(): Promise<History>;
get has_continuation(): boolean;
get page(): any;
#private;
}
import Feed = require("../../core/Feed");

View File

@@ -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.<Playlist | History | Feed> }[] } */
sections: {
type: string;
title: import('../contents/classes/Text');
contents: object[];
getAll: Promise<Playlist | History | Feed>;
}[];
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");

View File

@@ -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
*/

View File

@@ -129,14 +129,18 @@ declare class VideoInfo {
on_response_received_actions_memo: Map<any, any>;
on_response_received_endpoints: any;
on_response_received_endpoints_memo: Map<any, any>;
on_response_received_commands: any;
on_response_received_commands: any; /**
* @type {import('../contents/classes/VideoPrimaryInfo')}
*/
on_response_received_commands_memo: Map<any, any>;
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;