import { Storage, StoreItems } from 'botbuilder'; export interface Host { /** * Primary host address. */ primaryHost: string; /** * Secondary host address. */ secondaryHost: string; } /** * Settings for configuring an instance of `BlobStorage`. */ export interface BlobStorageSettings { /** * Root container name to use. */ containerName: string; /** * The storage account or the connection string. If this is the storage account, the storage access key must be provided. */ storageAccountOrConnectionString: string; /** * The storage access key. */ storageAccessKey?: string; /** * (Optional) azure storage host. */ host?: string | Host; } /** * Middleware that implements a BlobStorage based storage provider for a bot. * * @remarks * The BlobStorage implements its storage using a single Azure Storage Blob Container. Each entity * is serialized into a JSON string and stored in an individual text blob. Each blob * is named after the key which is encoded and ensure it conforms a valid blob name. * * @deprecated This class is deprecated in favor of [BlobsStorage](xref:botbuilder-azure-blobs.BlobsStorage) */ export declare class BlobStorage implements Storage { private settings; private client; private useEmulator; /** * Creates a new BlobStorage instance. * * @param settings Settings for configuring an instance of BlobStorage. */ constructor(settings: BlobStorageSettings); /** * Retrieve entities from the configured blob container. * * @param keys An array of entity keys. * @returns The read items. */ read(keys: string[]): Promise; /** * Store a new entity in the configured blob container. * * @param changes The changes to write to storage. */ write(changes: StoreItems): Promise; /** * Delete entity blobs from the configured container. * * @param keys An array of entity keys. */ delete(keys: string[]): Promise; /** * Get a blob name validated representation of an entity to be used as a key. * * @param key The key used to identify the entity. */ private sanitizeKey; /** * Check if a container name is valid. * * @param container String representing the container name to validate. * @returns A boolean value that indicates whether or not the name is valid. */ private checkContainerName; /** * Delay Container creation if it does not exist. */ private ensureContainerExists; /** * Create a Blob Service. * * @param storageAccountOrConnectionString Azure CloudStorageAccount instance or Connection String. * @param storageAccessKey Blob Service Access Key. * @param host Blob Service Host. * @returns The blob services created. */ private createBlobService; /** * @private * Turn a cb based azure method into a Promisified one. */ private denodeify; } //# sourceMappingURL=blobStorage.d.ts.map