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