@rocket.chat/apps-engine
Version:
The engine code for the Rocket.Chat Apps which manages, runs, translates, coordinates and all of that.
29 lines (28 loc) • 1.23 kB
TypeScript
import type { ISettingUpdater } from '../../definition/accessors/ISettingUpdater';
import type { ISetting } from '../../definition/settings';
import type { ProxiedApp } from '../ProxiedApp';
import type { AppSettingsManager } from '../managers';
/**
* Implementation of ISettingUpdater that provides methods to update app settings.
*/
export declare class SettingUpdater implements ISettingUpdater {
private readonly app;
private readonly manager;
constructor(app: ProxiedApp, manager: AppSettingsManager);
/**
* Updates a single setting value
* @param id The setting ID to update
* @param value The new value to set
* @returns Promise that resolves when the update is complete
* @throws Error if the setting doesn't exist
*/
updateValue(id: ISetting['id'], value: ISetting['value']): Promise<void>;
/**
* Updates the values for a multi-value setting by overwriting them
* @param id The setting ID to update
* @param values The new values to set
* @returns Promise that resolves when the update is complete
* @throws Error if the setting doesn't exist
*/
updateSelectOptions(id: ISetting['id'], values: ISetting['values']): Promise<void>;
}