Add new types for integration configuration

This commit is contained in:
Meierschlumpf
2022-12-11 19:16:31 +01:00
parent 68a97e5f27
commit ed64d138c5
10 changed files with 153 additions and 66 deletions

View File

@@ -0,0 +1,23 @@
import { ConfigType } from '../../types/config';
import { getConfig } from './getConfig';
export const getFrontendConfig = (name: string): ConfigType => {
const config = getConfig(name);
return {
...config,
services: config.services.map((s) => ({
...s,
integration: s.integration
? {
...s.integration,
properties: s.integration?.properties.map((p) => ({
...p,
value: p.type === 'private' ? null : p.value,
isDefined: p.value != null,
})),
}
: null,
})),
};
};