export type PluginSettingsLink = { type: 'link'; url: string; label: string; }; export type PluginSettingsInput = { type: 'string' | 'number' | 'boolean' | 'password'; label: string; placeholder: string; }; export type PluginSettingsTemplate = Record< string, PluginSettingsLink | PluginSettingsInput >; export type PluginSettings = Record; export type ValidationResponse = { isValid: boolean; errors: Record; replace: Record; }; export interface SourcePlugin { name: string; getIsIndexable: () => boolean; getIndex: () => Promise< Record< number, any // | { tmdbId: number; quality: number } // | { // tmdbId: number; // seasons: Record>; // } > >; getSettingsTemplate: () => PluginSettingsTemplate; validateSettings: ( settings: Record, ) => Promise; getMovieStream: (tmdbId: string, settings: PluginSettings) => Promise; getEpisodeStream: ( tmdbId: string, season: number, episode: number, settings: PluginSettings, ) => Promise; handleProxy( request: { uri: string; headers: any }, settings: PluginSettings, ): { url: string; headers: any; }; }