mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-10 23:45:48 +01:00
55 lines
1.2 KiB
TypeScript
55 lines
1.2 KiB
TypeScript
|
|
import { TileBaseType } from './tile';
|
||
|
|
|
||
|
|
export interface ServiceType extends TileBaseType {
|
||
|
|
id: string;
|
||
|
|
name: string;
|
||
|
|
url: string;
|
||
|
|
behaviour: ServiceBehaviourType;
|
||
|
|
network: ServiceNetworkType;
|
||
|
|
appearance: ServiceAppearanceType;
|
||
|
|
integration?: ServiceIntegrationType; //TODO: make this nullable
|
||
|
|
}
|
||
|
|
|
||
|
|
interface ServiceBehaviourType {
|
||
|
|
onClickUrl: string;
|
||
|
|
isMoveable: boolean; //TODO: remove this proeprty
|
||
|
|
isSticky: boolean; //TODO: remove this property
|
||
|
|
isOpeningNewTab: boolean;
|
||
|
|
}
|
||
|
|
|
||
|
|
interface ServiceNetworkType {
|
||
|
|
enabledStatusChecker: boolean;
|
||
|
|
okStatus: number[];
|
||
|
|
}
|
||
|
|
|
||
|
|
interface ServiceAppearanceType {
|
||
|
|
iconUrl: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
type ServiceIntegrationType =
|
||
|
|
| ServiceIntegrationApiKeyType
|
||
|
|
| ServiceIntegrationPasswordType
|
||
|
|
| ServiceIntegrationUsernamePasswordType;
|
||
|
|
|
||
|
|
export interface ServiceIntegrationApiKeyType {
|
||
|
|
type: 'readarr' | 'radarr' | 'sonarr' | 'lidarr' | 'sabnzbd' | 'jellyseerr' | 'overseerr';
|
||
|
|
properties: {
|
||
|
|
apiKey: string;
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
interface ServiceIntegrationPasswordType {
|
||
|
|
type: 'deluge';
|
||
|
|
properties: {
|
||
|
|
password?: string;
|
||
|
|
};
|
||
|
|
}
|
||
|
|
|
||
|
|
interface ServiceIntegrationUsernamePasswordType {
|
||
|
|
type: 'qBittorrent' | 'transmission';
|
||
|
|
properties: {
|
||
|
|
username?: string;
|
||
|
|
password?: string;
|
||
|
|
};
|
||
|
|
}
|