mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 16:05:47 +01:00
✨ Add new config format
This commit is contained in:
54
src/types/service.ts
Normal file
54
src/types/service.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user