diff options
Diffstat (limited to 'shared/models/plugins/server/managers')
-rw-r--r-- | shared/models/plugins/server/managers/plugin-settings-manager.model.ts | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/shared/models/plugins/server/managers/plugin-settings-manager.model.ts b/shared/models/plugins/server/managers/plugin-settings-manager.model.ts index 3c28c0565..b628718dd 100644 --- a/shared/models/plugins/server/managers/plugin-settings-manager.model.ts +++ b/shared/models/plugins/server/managers/plugin-settings-manager.model.ts | |||
@@ -1,9 +1,17 @@ | |||
1 | export type SettingValue = string | boolean | ||
2 | |||
3 | export interface SettingEntries { | ||
4 | [settingName: string]: SettingValue | ||
5 | } | ||
6 | |||
7 | export type SettingsChangeCallback = (settings: SettingEntries) => Promise<any> | ||
8 | |||
1 | export interface PluginSettingsManager { | 9 | export interface PluginSettingsManager { |
2 | getSetting: (name: string) => Promise<string | boolean> | 10 | getSetting: (name: string) => Promise<SettingValue> |
3 | 11 | ||
4 | getSettings: (names: string[]) => Promise<{ [settingName: string]: string | boolean }> | 12 | getSettings: (names: string[]) => Promise<SettingEntries> |
5 | 13 | ||
6 | setSetting: (name: string, value: string) => Promise<any> | 14 | setSetting: (name: string, value: SettingValue) => Promise<any> |
7 | 15 | ||
8 | onSettingsChange: (cb: (names: string[]) => Promise<any>) => void | 16 | onSettingsChange: (cb: SettingsChangeCallback) => void |
9 | } | 17 | } |