Add new config format

This commit is contained in:
Meierschlumpf
2022-12-04 17:36:30 +01:00
parent b2f5149527
commit d5a3b3f3ba
76 changed files with 2461 additions and 1034 deletions

54
src/types/service.ts Normal file
View 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;
};
}