Socket
Book a DemoInstallSign in
Socket

botbuilder-storage-documentdb

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

botbuilder-storage-documentdb

botbuilder and botbuilder-calling implementation of IBotStorage for DocumentDB

1.3.8
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save botbuilder-storage-documentdb

Peer dependencies

npm install --save documentdb

And one or both of

npm install --save botbuilder
npm install --save botbuilder-calling

Usage

Settings

const SETTINGS ={
  /** Database name to use for bot session storage (created if it does not exist) */
  databaseName: "myDb",
  /** Collection name to use for bot session storage (created if it does not exist) */
  collectionName: "myCollection",
  /** OPTIONAL Collection throughput for created collections (default: 10000) */
  collectionThroughput: 10000,
  /** OPTIONAL Default document time-to-live for created collections (default 1 week; null to disable) */
  defaultTtl: 604800,
  /** OPTIONAL Write all keys in a session concurrently (default true) */
  parallel: true,
}

TypeScript

import { DocumentDbBotStorage } from 'botbuilder-storage-documentdb';
import { DocumentClient } from 'documentdb';
import { UniversalBot } from 'botbuilder';
import { UniversalCallBot } from 'botbuilder-calling';

const documents = new DocumentClient(/* params */);
const storage = new DocumentDbBotStorage(documents, SETTINGS);

// use with call bot
const bot = new UniversalCallBot(connector, { storage });
// or bot.set('storage', storage);

// use with chat bot
const bot = new UniversalBot(connector, { storage });
// or bot.set('storage', storage);

FAQs

Package last updated on 21 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.