1 | # Bot Builder Azure
|
2 |
|
3 | Azure 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
|
13 | To add the latest version of this package to your bot:
|
14 |
|
15 | ```bash
|
16 | npm install --save botbuilder-azure
|
17 | ```
|
18 |
|
19 | #### Use the Daily Build
|
20 |
|
21 | To get access to the daily builds of this library, configure npm to use the MyGet feed before installing.
|
22 |
|
23 | ```bash
|
24 | npm config set registry https://botbuilder.myget.org/F/botbuilder-v4-js-daily/npm/
|
25 | ```
|
26 |
|
27 | To reset the registry in order to get the latest published version, run:
|
28 | ```bash
|
29 | npm config set registry https://registry.npmjs.org/
|
30 | ```
|
31 |
|
32 | ## What's Included
|
33 |
|
34 | This module contains interfaces to use common Azure services to back Bot Builder's state storage.
|
35 | When used with `UserState`, `ConversationState` and `BotState`, these storage interfaces will automatically
|
36 | read and write values to the associated Azure service.
|
37 |
|
38 | It 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 |
|
40 | Also 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 |
|
44 | Import the module into your app.
|
45 | ```javascript
|
46 | const { BlobStorage } = require('botbuilder-azure');
|
47 | ```
|
48 |
|
49 | Configure the storage driver to work with your Azure resources.
|
50 | ```javascript
|
51 | const blobStorage = new BlobStorage(options);
|
52 | ```
|
53 |
|
54 | Pass the storage driver into your state managers:
|
55 | ```javascript
|
56 | const userState = new UserState(blobStorage);
|
57 | const conversationState = new ConverationState(blobStorage);
|
58 | ``` |
\ | No newline at end of file |