botbuilder-dialogs
Version:
A dialog stack based conversation manager for Microsoft BotBuilder.
75 lines • 2.73 kB
TypeScript
/**
* @module botbuilder-dialogs
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { DialogContext } from '../../dialogContext';
import { MemoryScope } from './memoryScope';
/**
* SettingsMemoryScope maps "settings" -> dc.context.turnState['settings']
*/
export declare class SettingsMemoryScope extends MemoryScope {
private readonly initialSettings?;
private static readonly blockingList;
/**
* Initializes a new instance of the [SettingsMemoryScope](xref:botbuilder-dialogs.SettingsMemoryScope) class.
*
* @param initialSettings initial set of settings to supply
*/
constructor(initialSettings?: Record<string, unknown>);
/**
* Gets the backing memory for this scope.
*
* @param {DialogContext} dc The [DialogContext](xref:botbuilder-dialogs.DialogContext) object for this turn.
* @returns {Record<string, ?>} The memory for the scope.
*/
getMemory(dc: DialogContext): Record<string, unknown>;
/**
* @param dc Current dialog context.
*/
load(dc: DialogContext): Promise<void>;
/**
* Build a dictionary view of configuration providers.
*
* @param {Record<string, string>} configuration The configuration that we are running with.
* @returns {Record<string, ?>} Projected dictionary for settings.
*/
protected static loadSettings(configuration: Record<string, string>): Record<string, unknown>;
/**
* Generate a node tree with the flatten settings.
* For example:
* {
* "array":["item1", "item2"],
* "object":{"array":["item1"], "2":"numberkey"}
* }
*
* Would generate a flatten settings like:
* array:0 item1
* array:1 item2
* object:array:0 item1
* object:2 numberkey
*
* After Converting it from flatten settings into node tree, would get:
*
* null
* | |
* array object
* | | | |
* 0 1 array 2
* | | | |
* item1 item2 0 numberkey
* |
* item1
* The result is a Tree.
*
* @param {Array<[string, string]>} kvs Configurations with key value pairs.
* @returns {Node} The root node of the tree.
*/
private static convertFlattenSettingToNode;
private static convertNodeToObject;
private static filterSettings;
private static deletePropertyPath;
}
//# sourceMappingURL=settingsMemoryScope.d.ts.map