🎨 Rename "services" to "apps" in entire project

This commit is contained in:
Manuel Ruwe
2022-12-18 22:27:01 +01:00
parent 1e0a90f2ac
commit 661c05bc50
69 changed files with 661 additions and 495 deletions

View File

@@ -1,31 +1,31 @@
import { IconKey, IconPassword, IconUser, TablerIcon } from '@tabler/icons';
import { TileBaseType } from './tile';
export interface ServiceType extends TileBaseType {
export interface AppType extends TileBaseType {
id: string;
name: string;
url: string;
behaviour: ServiceBehaviourType;
network: ServiceNetworkType;
appearance: ServiceAppearanceType;
integration: ServiceIntegrationType;
behaviour: AppBehaviourType;
network: AppNetworkType;
appearance: AppAppearanceType;
integration: AppIntegrationType;
}
export type ConfigServiceType = Omit<ServiceType, 'integration'> & {
integration?: ConfigServiceIntegrationType | null;
export type ConfigAppType = Omit<AppType, 'integration'> & {
integration?: ConfigAppIntegrationType | null;
};
interface ServiceBehaviourType {
interface AppBehaviourType {
onClickUrl: string;
isOpeningNewTab: boolean;
}
interface ServiceNetworkType {
interface AppNetworkType {
enabledStatusChecker: boolean;
okStatus: number[];
}
interface ServiceAppearanceType {
interface AppAppearanceType {
iconUrl: string;
}
@@ -42,28 +42,28 @@ export type IntegrationType =
| 'transmission'
| 'nzbGet';
export type ServiceIntegrationType = {
export type AppIntegrationType = {
type: IntegrationType | null;
properties: ServiceIntegrationPropertyType[];
properties: AppIntegrationPropertyType[];
};
export type ConfigServiceIntegrationType = Omit<ServiceIntegrationType, 'properties'> & {
properties: ConfigServiceIntegrationPropertyType[];
export type ConfigAppIntegrationType = Omit<AppIntegrationType, 'properties'> & {
properties: ConfigAppIntegrationPropertyType[];
};
export type ServiceIntegrationPropertyType = {
export type AppIntegrationPropertyType = {
type: 'private' | 'public';
field: IntegrationField;
value?: string | undefined;
isDefined: boolean;
};
type ConfigServiceIntegrationPropertyType = Omit<ServiceIntegrationPropertyType, 'isDefined'>;
type ConfigAppIntegrationPropertyType = Omit<AppIntegrationPropertyType, 'isDefined'>;
export type IntegrationField = 'apiKey' | 'password' | 'username';
export const integrationFieldProperties: {
[key in ServiceIntegrationType['type']]: IntegrationField[];
[key in AppIntegrationType['type']]: IntegrationField[];
} = {
lidarr: ['apiKey'],
radarr: ['apiKey'],

View File

@@ -1,6 +1,6 @@
import { CategoryType } from './category';
import { WrapperType } from './wrapper';
import { ConfigServiceType, ServiceType } from './service';
import { ConfigAppType, AppType } from './app';
import { IntegrationsType } from './integration';
import { SettingsType } from './settings';
@@ -9,13 +9,13 @@ export interface ConfigType {
configProperties: ConfigPropertiesType;
categories: CategoryType[];
wrappers: WrapperType[];
services: ServiceType[];
apps: AppType[];
integrations: IntegrationsType;
settings: SettingsType;
}
export type BackendConfigType = Omit<ConfigType, 'services'> & {
services: ConfigServiceType[];
export type BackendConfigType = Omit<ConfigType, 'apps'> & {
apps: ConfigAppType[];
};
export interface ConfigPropertiesType {