Files
Homarr/src/types/service.ts

53 lines
1.1 KiB
TypeScript
Raw Normal View History

2022-12-04 17:36:30 +01:00
import { TileBaseType } from './tile';
export interface ServiceType extends TileBaseType {
id: string;
name: string;
url: string;
behaviour: ServiceBehaviourType;
network: ServiceNetworkType;
appearance: ServiceAppearanceType;
2022-12-04 22:02:10 +01:00
integration?: ServiceIntegrationType;
2022-12-04 17:36:30 +01:00
}
interface ServiceBehaviourType {
2022-12-04 22:02:10 +01:00
onClickUrl?: string;
2022-12-04 17:36:30 +01:00
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;
};
}