UNPKG

2.12 kBMarkdownView Raw
1# Bot Builder Azure
2
3Azure extensions for Microsoft BotBuilder.
4
5- [Installing](#installing)
6- [Basic Use](#use)
7- [Documentation](https://docs.microsoft.com/en-us/azure/bot-service/bot-service-overview-introduction?view=azure-bot-service-4.0)
8- [Class Reference](https://docs.microsoft.com/en-us/javascript/api/botbuilder-azure/)
9- [GitHub Repo](https://github.com/Microsoft/botbuilder-js)
10- [Report Issues](https://github.com/Microsoft/botbuilder-js/issues)
11
12## Installing
13To add the latest version of this package to your bot:
14
15```bash
16npm install --save botbuilder-azure
17```
18
19#### Use the Daily Build
20
21To get access to the daily builds of this library, configure npm to use the MyGet feed before installing.
22
23```bash
24npm config set registry https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/
25```
26
27To reset the registry in order to get the latest published version, run:
28```bash
29npm config set registry https://registry.npmjs.org/
30```
31
32## What's Included
33
34This module contains interfaces to use common Azure services to back Bot Builder's state storage.
35When used with `UserState`, `ConversationState` and `BotState`, these storage interfaces will automatically
36read and write values to the associated Azure service.
37
38It currently supports Cosmos DB ([`CosmosDbStorage()`](https://docs.microsoft.com/en-us/javascript/api/botbuilder-azure/cosmosdbstorage)) and Azure Blob Storage ([`BlobStorage()`](https://docs.microsoft.com/en-us/javascript/api/botbuilder-azure/blobstorage)).
39
40Also included is an interface to store and retrieve chat transcripts in blog storage called [AzureBlobTranscriptStore()](https://docs.microsoft.com/en-us/javascript/api/botbuilder-azure/azureblobtranscriptstore)
41
42## Use
43
44Import the module into your app.
45```javascript
46const { BlobStorage } = require('botbuilder-azure');
47```
48
49Configure the storage driver to work with your Azure resources.
50```javascript
51const blobStorage = new BlobStorage(options);
52```
53
54Pass the storage driver into your state managers:
55```javascript
56const userState = new UserState(blobStorage);
57const conversationState = new ConverationState(blobStorage);
58```
\No newline at end of file