/** * API to manage Custom Widget state. */ export interface WidgetAPI { /** * Gets all options stored by the widget. Options are stored as plain JSON object. */ getOptions(): Promise; /** * Replaces all options stored by the widget. */ setOptions(options: {[key: string]: any}): Promise; /** * Clears all the options. */ clearOptions(): Promise; /** * Store single value in the Widget options object (and create it if necessary). */ setOption(key: string, value: any): Promise; /** * Get single value from Widget options object. */ getOption(key: string): Promise; }