LuanRT / YouTube.js

A wrapper around YouTube's internal API — reverse engineering InnerTube
https://www.npmjs.com/package/youtubei.js
MIT License
3.5k stars 221 forks source link

10.4.0: `SearchFilters` no longer accessible as a named export #750

Open kellenmace opened 5 days ago

kellenmace commented 5 days ago

Steps to reproduce

In previous versions of YouTube.js, I was able to access SearchFilters as a named export and use it in my TypeScript app like this:

import { Innertube, type SearchFilters } from 'youtubei.js';

const youtube = await Innertube.create({
    lang: 'en',
    location: 'US',
});

const filters: SearchFilters = {
    type: 'video',
    // Conditionally add other filters here.
};

const response = await youtube.search("tech news", filters);

In the current version, it is no longer available as a named export though. Is there a way to access SearchFilters that I'm unaware of, or does it need to be exposed once again for library consumers to use?

Failure Logs

Module '"youtubei.js"' has no exported member 'SearchFilters'.

Expected behavior

I expected to be able to access the type of SearchFilters in my TypeScript app.

Current behavior

The type of SearchFilters is not accessible in my TypeScript app.

Version

Default

Anything else?

No response

Checklist

hextor1 commented 5 days ago

@kellenmace Hello When New version is released via NPM?

kellenmace commented 2 days ago

@kellenmace Hello When New version is released via NPM?

LuanRT commented 2 days ago

@kellenmace It is still accessible:

import { Types } from 'youtubei.js';

const filters: Types.SearchFilters = {
  duration: 'all',
  features: ['hd'],
  sort_by: 'view_count',
  upload_date: 'all'
}