Files
Homarr/src/tools/types.ts
2022-06-07 07:20:44 +02:00

63 lines
973 B
TypeScript

import { OptionValues } from '../components/modules/modules';
export interface Settings {
searchUrl: string;
title?: string;
logo?: string;
favicon?: string;
}
export interface Config {
name: string;
services: serviceItem[];
settings: Settings;
modules: {
[key: string]: ConfigModule;
};
}
interface ConfigModule {
title: string;
enabled: boolean;
options: {
[key: string]: OptionValues;
};
}
export const ServiceTypeList = [
'Other',
'Emby',
'Deluge',
'Lidarr',
'Plex',
'Radarr',
'Readarr',
'Sonarr',
'qBittorrent',
'Transmission',
];
export type ServiceType =
| 'Other'
| 'Emby'
| 'Deluge'
| 'Lidarr'
| 'Plex'
| 'Radarr'
| 'Readarr'
| 'Sonarr'
| 'qBittorrent'
| 'Transmission';
export interface serviceItem {
id: string;
name: string;
type: string;
url: string;
icon: string;
category?: string;
apiKey?: string;
password?: string;
username?: string;
openedUrl?: string;
}