import type Session from './Session.js'; import type { IBrowseResponse, IGetNotificationsMenuResponse, INextResponse, IPlayerResponse, IResolveURLResponse, ISearchResponse, IUpdatedMetadataResponse, IParsedResponse, IRawResponse } from '../parser/types/index.js'; export interface ApiResponse { success: boolean; status_code: number; data: IRawResponse; } export type InnertubeEndpoint = '/player' | '/search' | '/browse' | '/next' | '/reel' | '/updated_metadata' | '/notification/get_notification_menu' | string; export type ParsedResponse = T extends '/player' ? IPlayerResponse : T extends '/search' ? ISearchResponse : T extends '/browse' ? IBrowseResponse : T extends '/next' ? INextResponse : T extends '/updated_metadata' ? IUpdatedMetadataResponse : T extends '/navigation/resolve_url' ? IResolveURLResponse : T extends '/notification/get_notification_menu' ? IGetNotificationsMenuResponse : IParsedResponse; export default class Actions { #private; constructor(session: Session); get session(): Session; /** * Makes calls to the playback tracking API. * @param url - The URL to call. * @param client - The client to use. * @param params - Call parameters. */ stats(url: string, client: { client_name: string; client_version: string; }, params: { [key: string]: any; }): Promise; /** * Executes an API call. * @param endpoint - The endpoint to call. * @param args - Call arguments */ execute(endpoint: T, args: { [key: string]: any; parse: true; protobuf?: false; serialized_data?: any; }): Promise>; execute(endpoint: T, args?: { [key: string]: any; parse?: false; protobuf?: true; serialized_data?: any; }): Promise; }