chore: update types

This commit is contained in:
LuanRT
2022-06-13 07:37:01 -03:00
parent 7142a63b1d
commit 79d6b84dda
11 changed files with 61 additions and 13 deletions

View File

@@ -18,6 +18,11 @@ declare class Music {
search(query: string, filters: {
type?: string;
}): Promise<Search>;
/**
* Retrieves YouTube Music home feed.
* @returns {Promise.<HomeFeed>}
*/
getHomeFeed(): Promise<HomeFeed>;
/**
* Retrieves song lyrics.
* @param {string} video_id
@@ -58,3 +63,4 @@ declare class Music {
#private;
}
import Search = require("../parser/ytmusic/Search");
import HomeFeed = require("../parser/ytmusic/HomeFeed");

View File

@@ -2,8 +2,7 @@ export = MusicCarouselShelfBasicHeader;
declare class MusicCarouselShelfBasicHeader {
constructor(data: any);
type: string;
title: Text;
label: any;
strapline: any;
title: any;
thumbnail: any;
}
import Text = require("./Text");

View File

@@ -9,12 +9,19 @@ declare class MusicTwoRowItem {
badges: any;
subscribers: any;
item_count: number;
artist: {
name: any;
channel_id: any;
endpoint: any;
};
year: any;
views: any;
author: {
name: any;
channel_id: any;
endpoint: any;
};
artists: any;
thumbnail: any;
thumbnail_overlay: any;
menu: any;

View File

@@ -15,6 +15,7 @@ declare class NavigationEndpoint {
params: any;
index: any;
supported_onesie_config: any;
music_video_type: any;
};
search: {
query: any;
@@ -70,6 +71,7 @@ declare class NavigationEndpoint {
on_response_received_actions: any;
on_response_received_endpoints: any;
on_response_received_commands: any;
continuation_contents: any;
metadata: any;
header: any;
microformat: import("./PlayerMicroformat");

View File

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

View File

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

View File

@@ -6,6 +6,8 @@ declare class Parser {
on_response_received_actions: any;
on_response_received_endpoints: any;
on_response_received_commands: any;
/** @type {*} */
continuation_contents: any;
metadata: any;
header: any;
/** @type {import('./classes/PlayerMicroformat')} **/
@@ -42,6 +44,7 @@ declare class Parser {
/** @type {import('./classes/CardCollection')} */
cards: import('./classes/CardCollection');
};
static parseCC(data: any): SectionListContinuation;
static parseRR(actions: any): any;
static parseFormats(formats: any): any;
static parse(data: any): any;
@@ -54,3 +57,10 @@ declare class Parser {
static shouldIgnore(classname: any): boolean;
}
import VideoDetails = require("./classes/VideoDetails");
/** @namespace */
declare class SectionListContinuation {
constructor(data: any);
type: string;
contents: any;
continuation: any;
}

View File

@@ -3,7 +3,6 @@ export = Analytics;
declare class Analytics {
/**
* @param {object} response - API response.
* @constructor
*/
constructor(response: object);
sections: any;
@@ -12,6 +11,7 @@ declare class Analytics {
on_response_received_actions: any;
on_response_received_endpoints: any;
on_response_received_commands: any;
continuation_contents: any;
metadata: any;
header: any;
microformat: import("../contents/classes/PlayerMicroformat");

View File

@@ -4,7 +4,6 @@ declare class Library {
/**
* @param {object} response - API response.
* @param {import('../../core/Actions')} actions
* @constructor
*/
constructor(response: object, actions: import('../../core/Actions'));
profile: {
@@ -17,6 +16,7 @@ declare class Library {
on_response_received_actions: any;
on_response_received_endpoints: any;
on_response_received_commands: any;
continuation_contents: any;
metadata: any;
header: any;
microformat: import("../contents/classes/PlayerMicroformat");

View File

@@ -1,11 +1,10 @@
export = VideoInfo;
/** namespace **/
/** namespace */
declare class VideoInfo {
/**
* @param {object} data - API response.
* @param {import('../../core/Actions')} actions
* @param {import('../../core/Player')} player
* @constructor
*/
constructor(data: object, actions: import('../../core/Actions'), player: import('../../core/Player'));
/**
@@ -88,9 +87,15 @@ declare class VideoInfo {
on_response_received_actions: any;
on_response_received_endpoints: any;
on_response_received_commands: any;
continuation_contents: any;
metadata: any;
/**
* @type {import('../contents/classes/VideoSecondaryInfo')}
*/
header: any;
microformat: import("../contents/classes/PlayerMicroformat");
microformat: import("../contents/classes/PlayerMicroformat"); /**
* @type {import('../contents/classes/MerchandiseShelf')}
*/
sidebar: any;
overlay: any;
refinements: any;
@@ -114,9 +119,6 @@ declare class VideoInfo {
annotations: any;
storyboards: any;
endscreen: import("../contents/classes/Endscreen");
/**
* @type {import('../contents/classes/PlayerAnnotationsExpanded')[]}
*/
cards: import("../contents/classes/CardCollection");
}[];
#private;

View File

@@ -0,0 +1,22 @@
export = HomeFeed;
/** @namespace */
declare class HomeFeed {
/**
* @param {object} response - API response.
* @param {import('../../core/Actions')} actions
*/
constructor(response: object, actions: import('../../core/Actions'));
/** @type {{ sections: { header: import('../contents/classes/MusicCarouselShelfBasicHeader'), items: object[] }[] }} */
sections: {
sections: {
header: import('../contents/classes/MusicCarouselShelfBasicHeader');
items: object[];
}[];
};
/**
* Retrieves home feed continuation.
* @returns {Promise.<HomeFeed>}
*/
getContinuation(): Promise<HomeFeed>;
#private;
}