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