Files
NewTube/src/app/search/api.v1.ts
T

22 lines
466 B
TypeScript

export type ProviderId = 'yt' | 'dm' | 'tw' | 'pt' | 'od' | 'ru';
export interface SuggestionItemV1 {
title: string;
id: string;
duration?: number;
isShort?: boolean;
thumbnail?: string;
uploaderName?: string;
url?: string;
type?: string;
}
export interface SearchResponseV1 {
q: string;
providers: ProviderId[];
groups: Record<ProviderId, SuggestionItemV1[]>;
page?: number;
pageSize?: number;
sort?: 'relevance' | 'date' | 'views';
}