Skip to content

Commit c54b03f

Browse files
authored
port: [#4272] SDK uses deprecated Microsoft.Azure.DocumentDB.Core library (#6370) (#4292)
* Remove CosmosDbStorage class and related code * Update CosmosDbStorage compat and doc * Remove CosmosDbStorage TestData
1 parent 38627fc commit c54b03f

21 files changed

+7
-7011
lines changed

libraries/botbuilder-azure/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ This module contains interfaces to use common Azure services to back Bot Builder
3535
When used with `UserState`, `ConversationState` and `BotState`, these storage interfaces will automatically
3636
read and write values to the associated Azure service.
3737

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)).
38+
It currently supports Cosmos DB ([`CosmosDbPartitionedStorage()`](https://docs.microsoft.com/en-us/javascript/api/botbuilder-azure/cosmosdbpartitionedstorage)) and Azure Blob Storage ([`BlobStorage()`](https://docs.microsoft.com/en-us/javascript/api/botbuilder-azure/blobstorage)).
3939

4040
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)
4141

@@ -55,4 +55,4 @@ Pass the storage driver into your state managers:
5555
```javascript
5656
const userState = new UserState(blobStorage);
5757
const conversationState = new ConverationState(blobStorage);
58-
```
58+
```

libraries/botbuilder-azure/etc/botbuilder-azure.api.md

-24
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
```ts
66

77
import { Activity } from 'botbuilder';
8-
import type { Agent } from 'http';
9-
import { ConnectionPolicy } from 'documentdb';
108
import { CosmosClientOptions } from '@azure/cosmos';
119
import { PagedResult } from 'botbuilder';
12-
import { RequestOptions } from 'documentdb';
1310
import { Storage as Storage_2 } from 'botbuilder';
1411
import { StoreItems } from 'botbuilder';
1512
import { TranscriptInfo } from 'botbuilder';
@@ -69,27 +66,6 @@ export interface CosmosDbPartitionedStorageOptions {
6966
keySuffix?: string;
7067
}
7168

72-
// @public @deprecated
73-
export class CosmosDbStorage implements Storage_2 {
74-
constructor(settings: CosmosDbStorageSettings, connectionPolicyConfigurator?: (policy: ConnectionPolicy) => void);
75-
delete(keys: string[]): Promise<void>;
76-
read(keys: string[]): Promise<StoreItems>;
77-
write(changes: StoreItems): Promise<void>;
78-
}
79-
80-
// @public @deprecated
81-
export interface CosmosDbStorageSettings {
82-
agent?: Agent;
83-
authKey: string;
84-
collectionId: string;
85-
databaseCreationRequestOptions?: RequestOptions;
86-
databaseId: string;
87-
documentCollectionRequestOptions?: RequestOptions;
88-
// @deprecated
89-
partitionKey?: string;
90-
serviceEndpoint: string;
91-
}
92-
9369
// @public (undocumented)
9470
export interface Host {
9571
primaryHost: string;

libraries/botbuilder-azure/package.json

+1-5
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,11 @@
2929
},
3030
"dependencies": {
3131
"@azure/cosmos": "^3.3.1",
32-
"@types/documentdb": "^1.10.5",
3332
"azure-storage": "2.10.2",
3433
"botbuilder": "4.1.6",
35-
"documentdb": "1.14.5",
36-
"lodash": "^4.17.20",
37-
"semaphore": "^1.1.0"
34+
"lodash": "^4.17.20"
3835
},
3936
"devDependencies": {
40-
"@types/semaphore": "^1.1.0",
4137
"fs-extra": "^7.0.1",
4238
"nock": "^11.9.1",
4339
"node-fetch": "^2.6.7"

0 commit comments

Comments
 (0)