You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
671 B

import { Video } from "../video";
export type VideoResult = Video & { type: "video" };
export interface ChannelResult {
type: "channel";
name: string;
id: string;
thumbnail: string;
subscribers: number;
videos: number;
description: string;
}
export interface PlaylistResult {
type: "playlist";
title: string;
id: string;
author: {
name: string;
id: string;
};
numberOfVideos: number;
thumbnail: string;
videos?: {
title: string;
id: string;
duration: number;
thumbnail: string;
}[];
}
export type SearchItems = (VideoResult | ChannelResult | PlaylistResult)[];
export interface SearchResults {
items: SearchItems;
nextCursor: string;
}