2022-01-20 12:07:15 +01:00
|
|
|
export type SettingValue = string | boolean
|
|
|
|
|
|
|
|
export interface SettingEntries {
|
|
|
|
[settingName: string]: SettingValue
|
|
|
|
}
|
|
|
|
|
|
|
|
export type SettingsChangeCallback = (settings: SettingEntries) => Promise<any>
|
|
|
|
|
2019-07-10 16:59:53 +02:00
|
|
|
export interface PluginSettingsManager {
|
2022-01-20 12:07:15 +01:00
|
|
|
getSetting: (name: string) => Promise<SettingValue>
|
2020-04-27 10:19:14 +02:00
|
|
|
|
2022-01-20 12:07:15 +01:00
|
|
|
getSettings: (names: string[]) => Promise<SettingEntries>
|
2019-07-10 16:59:53 +02:00
|
|
|
|
2022-01-20 12:07:15 +01:00
|
|
|
setSetting: (name: string, value: SettingValue) => Promise<any>
|
2020-04-30 09:28:39 +02:00
|
|
|
|
2022-01-20 12:07:15 +01:00
|
|
|
onSettingsChange: (cb: SettingsChangeCallback) => void
|
2019-07-10 16:59:53 +02:00
|
|
|
}
|