@qodestack/dl-yt-playlist
Version:
Download all videos (or audio only) from a YouTube playlist!
113 lines (110 loc) • 5.91 kB
TypeScript
// Generated by dts-bundle-generator v9.5.1
/**
* This schema is used to parse the response from the YouTube
* [PlaylistItems API](https://developers.google.com/youtube/v3/docs/playlistItems).
* Optional properties are marked so as to accommodate videos no longer
* available.
*/
export declare const PlaylistItemSchema: import("valibot").ObjectSchema<{
readonly id: import("valibot").StringSchema<undefined>;
readonly snippet: import("valibot").ObjectSchema<{
readonly resourceId: import("valibot").ObjectSchema<{
readonly videoId: import("valibot").StringSchema<undefined>;
}, undefined>;
readonly title: import("valibot").StringSchema<undefined>;
readonly description: import("valibot").StringSchema<undefined>;
readonly videoOwnerChannelId: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
readonly videoOwnerChannelTitle: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
readonly publishedAt: import("valibot").StringSchema<undefined>;
readonly thumbnails: import("valibot").ObjectSchema<{
readonly maxres: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
readonly url: import("valibot").StringSchema<undefined>;
}, undefined>, never>;
readonly standard: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
readonly url: import("valibot").StringSchema<undefined>;
}, undefined>, never>;
readonly high: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
readonly url: import("valibot").StringSchema<undefined>;
}, undefined>, never>;
readonly medium: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
readonly url: import("valibot").StringSchema<undefined>;
}, undefined>, never>;
readonly default: import("valibot").OptionalSchema<import("valibot").ObjectSchema<{
readonly url: import("valibot").StringSchema<undefined>;
}, undefined>, never>;
}, undefined>;
}, undefined>;
readonly contentDetails: import("valibot").ObjectSchema<{
readonly videoPublishedAt: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, "">;
}, undefined>;
}, undefined>;
/**
* This is used to validate the response from the YouTube
* [VideosList API](https://developers.google.com/youtube/v3/docs/videos/list).
*/
export declare const VideosListItemSchema: import("valibot").ObjectSchema<{
readonly id: import("valibot").StringSchema<undefined>;
readonly contentDetails: import("valibot").ObjectSchema<{
readonly duration: import("valibot").StringSchema<undefined>;
}, undefined>;
}, undefined>;
/**
* `yt-dlp` provides it's own metadata for videos. While this project relies
* mainly on the Youtube APIs for metadata, we use metadata from `yt-dlp` for
* individual videos downloaded with `downloadVideo`. File extensions are also
* parsed from the `yt-dlp` metadata.
*/
export declare const YtDlpJsonSchema: import("valibot").ObjectSchema<{
readonly id: import("valibot").StringSchema<undefined>;
readonly title: import("valibot").StringSchema<undefined>;
readonly description: import("valibot").StringSchema<undefined>;
readonly duration: import("valibot").NumberSchema<undefined>;
readonly channel_url: import("valibot").StringSchema<undefined>;
readonly channel_id: import("valibot").StringSchema<undefined>;
readonly upload_date: import("valibot").StringSchema<undefined>;
readonly channel: import("valibot").StringSchema<undefined>;
readonly ext: import("valibot").StringSchema<undefined>;
readonly requested_downloads: import("valibot").SchemaWithPipe<[
import("valibot").ArraySchema<import("valibot").ObjectSchema<{
readonly ext: import("valibot").StringSchema<undefined>;
}, undefined>, undefined>,
import("valibot").MinLengthAction<{
ext: string;
}[], 1, undefined>
]>;
}, undefined>;
export declare const VideoSchema: import("valibot").ObjectSchema<{
/** listApi.snippet.resourceId.videoId */
readonly id: import("valibot").StringSchema<undefined>;
/** listApi.id */
readonly playlistItemId: import("valibot").StringSchema<undefined>;
/** listApi.snippet.title */
readonly title: import("valibot").StringSchema<undefined>;
/** listApi.snippet.description */
readonly description: import("valibot").StringSchema<undefined>;
/** listApi.snippet.videoOwnerChannelId */
readonly channelId: import("valibot").StringSchema<undefined>;
/** listApi.snippet.videoOwnerChannelTitle */
readonly channelName: import("valibot").StringSchema<undefined>;
/** listApi.contentDetails.videoPublishedAt */
readonly dateCreated: import("valibot").StringSchema<undefined>;
/** listApi.snippet.publishedAt */
readonly dateAddedToPlaylist: import("valibot").StringSchema<undefined>;
/** listApi.snippet.thumbnails[maxres | standard | high | medium | default].url */
readonly thumbnailUrls: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
/** videosApi.contentDetails.duration */
readonly durationInSeconds: import("valibot").NumberSchema<undefined>;
/** Constructed from `id` - URL to the video */
readonly url: import("valibot").StringSchema<undefined>;
/** Constructed from `channelId` - URL to the video owner's channel */
readonly channelUrl: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, never>;
/** Derived from yt-dlp */
readonly audioFileExtension: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, never>;
/** Derived from yt-dlp */
readonly videoFileExtension: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, never>;
/** Derived from the listApi missing certain fields */
readonly isUnavailable: import("valibot").BooleanSchema<undefined>;
/** LUFS value, as calculated by ffmpeg */
readonly lufs: import("valibot").NullableSchema<import("valibot").NumberSchema<undefined>, never>;
}, undefined>;
export {};