Files
Homarr/src/types/service.ts

54 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 {
onClickUrl: string;
2022-12-04 17:36:30 +01:00
isOpeningNewTab: boolean;
}
interface ServiceNetworkType {
enabledStatusChecker: boolean;
okStatus: number[];
}
interface ServiceAppearanceType {
iconUrl: string;
}
2022-12-11 16:06:41 +01:00
export type ServiceIntegrationType =
2022-12-04 17:36:30 +01:00
| ServiceIntegrationApiKeyType
| ServiceIntegrationPasswordType
| ServiceIntegrationUsernamePasswordType;
2022-12-11 16:06:41 +01:00
// TODO: add nzbGet somewhere
2022-12-04 17:36:30 +01:00
export interface ServiceIntegrationApiKeyType {
type: 'readarr' | 'radarr' | 'sonarr' | 'lidarr' | 'sabnzbd' | 'jellyseerr' | 'overseerr';
properties: {
apiKey: string;
};
}
interface ServiceIntegrationPasswordType {
type: 'deluge';
properties: {
password?: string;
};
}
interface ServiceIntegrationUsernamePasswordType {
2022-12-11 16:06:41 +01:00
type: 'qBittorrent' | 'transmission' | 'nzbGet';
2022-12-04 17:36:30 +01:00
properties: {
username?: string;
password?: string;
};
}