@azure/cosmos 4.9.1 → 4.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/PartitionKeyRangeFailoverInfo.d.ts +1 -1
- package/dist/browser/PartitionKeyRangeFailoverInfo.d.ts.map +1 -1
- package/dist/browser/PartitionKeyRangeFailoverInfo.js +0 -2
- package/dist/browser/PartitionKeyRangeFailoverInfo.js.map +1 -1
- package/dist/browser/bulk/index.d.ts +1 -1
- package/dist/browser/bulk/index.d.ts.map +1 -1
- package/dist/browser/bulk/index.js.map +1 -1
- package/dist/browser/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts +2 -2
- package/dist/browser/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist/browser/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +1 -1
- package/dist/browser/client/ChangeFeed/buildChangeFeedIterator.js.map +1 -1
- package/dist/browser/client/ChangeFeed/changeFeedUtils.d.ts +4 -4
- package/dist/browser/client/ChangeFeed/changeFeedUtils.d.ts.map +1 -1
- package/dist/browser/client/ChangeFeed/changeFeedUtils.js.map +1 -1
- package/dist/browser/client/ChangeFeed/index.d.ts +2 -2
- package/dist/browser/client/ChangeFeed/index.d.ts.map +1 -1
- package/dist/browser/client/ChangeFeed/index.js.map +1 -1
- package/dist/browser/client/ClientUtils.d.ts +1 -1
- package/dist/browser/client/ClientUtils.d.ts.map +1 -1
- package/dist/browser/client/ClientUtils.js.map +1 -1
- package/dist/browser/client/Conflict/index.d.ts +2 -2
- package/dist/browser/client/Conflict/index.d.ts.map +1 -1
- package/dist/browser/client/Conflict/index.js.map +1 -1
- package/dist/browser/client/Container/ContainerDefinition.d.ts +1 -1
- package/dist/browser/client/Container/ContainerDefinition.d.ts.map +1 -1
- package/dist/browser/client/Container/ContainerDefinition.js.map +1 -1
- package/dist/browser/client/Container/index.d.ts +4 -4
- package/dist/browser/client/Container/index.d.ts.map +1 -1
- package/dist/browser/client/Container/index.js.map +1 -1
- package/dist/browser/client/Database/index.d.ts +2 -2
- package/dist/browser/client/Database/index.d.ts.map +1 -1
- package/dist/browser/client/Database/index.js.map +1 -1
- package/dist/browser/client/Item/Items.d.ts.map +1 -1
- package/dist/browser/client/Item/Items.js.map +1 -1
- package/dist/browser/client/Item/index.d.ts +1 -1
- package/dist/browser/client/Item/index.d.ts.map +1 -1
- package/dist/browser/client/Item/index.js.map +1 -1
- package/dist/browser/client/Offer/index.d.ts +1 -1
- package/dist/browser/client/Offer/index.d.ts.map +1 -1
- package/dist/browser/client/Offer/index.js.map +1 -1
- package/dist/browser/client/Permission/index.d.ts +2 -2
- package/dist/browser/client/Permission/index.d.ts.map +1 -1
- package/dist/browser/client/Permission/index.js.map +1 -1
- package/dist/browser/client/StoredProcedure/index.d.ts +1 -1
- package/dist/browser/client/StoredProcedure/index.d.ts.map +1 -1
- package/dist/browser/client/StoredProcedure/index.js.map +1 -1
- package/dist/browser/client/Trigger/index.d.ts +1 -1
- package/dist/browser/client/Trigger/index.d.ts.map +1 -1
- package/dist/browser/client/Trigger/index.js.map +1 -1
- package/dist/browser/client/User/index.d.ts +1 -1
- package/dist/browser/client/User/index.d.ts.map +1 -1
- package/dist/browser/client/User/index.js.map +1 -1
- package/dist/browser/client/UserDefinedFunction/index.d.ts +1 -1
- package/dist/browser/client/UserDefinedFunction/index.d.ts.map +1 -1
- package/dist/browser/client/UserDefinedFunction/index.js.map +1 -1
- package/dist/browser/client/index.d.ts +1 -1
- package/dist/browser/client/index.d.ts.map +1 -1
- package/dist/browser/client/index.js +0 -1
- package/dist/browser/client/index.js.map +1 -1
- package/dist/browser/common/constants.js +1 -1
- package/dist/browser/common/constants.js.map +1 -1
- package/dist/browser/common/helper.d.ts +4 -4
- package/dist/browser/common/helper.d.ts.map +1 -1
- package/dist/browser/common/helper.js.map +1 -1
- package/dist/browser/common/platform.d.ts +1 -1
- package/dist/browser/common/platform.d.ts.map +1 -1
- package/dist/browser/common/platform.js.map +1 -1
- package/dist/browser/diagnostics/DiagnosticNodeInternal.d.ts +1 -1
- package/dist/browser/diagnostics/DiagnosticNodeInternal.d.ts.map +1 -1
- package/dist/browser/diagnostics/DiagnosticNodeInternal.js.map +1 -1
- package/dist/browser/documents/index.d.ts +4 -4
- package/dist/browser/documents/index.d.ts.map +1 -1
- package/dist/browser/documents/index.js +0 -4
- package/dist/browser/documents/index.js.map +1 -1
- package/dist/browser/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts +6 -2
- package/dist/browser/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts.map +1 -0
- package/dist/browser/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js +8 -3
- package/dist/browser/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js.map +1 -0
- package/dist/browser/encryption/Cache/ProtectedDataEncryptionKeyCache.d.ts +5 -1
- package/dist/browser/encryption/Cache/ProtectedDataEncryptionKeyCache.d.ts.map +1 -0
- package/dist/browser/encryption/Cache/ProtectedDataEncryptionKeyCache.js +5 -2
- package/dist/browser/encryption/Cache/ProtectedDataEncryptionKeyCache.js.map +1 -0
- package/dist/browser/encryption/ClientEncryptionIncludedPath.d.ts +1 -1
- package/dist/browser/encryption/ClientEncryptionIncludedPath.d.ts.map +1 -1
- package/dist/browser/encryption/ClientEncryptionIncludedPath.js.map +1 -1
- package/dist/browser/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts +4 -4
- package/dist/browser/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts.map +1 -1
- package/dist/browser/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.js.map +1 -1
- package/dist/browser/encryption/ClientEncryptionKey/index.d.ts +2 -2
- package/dist/browser/encryption/ClientEncryptionKey/index.d.ts.map +1 -1
- package/dist/browser/encryption/ClientEncryptionKey/index.js.map +1 -1
- package/dist/browser/encryption/EncryptionKey/DataEncryptionKey.d.ts +6 -1
- package/dist/browser/encryption/EncryptionKey/DataEncryptionKey.d.ts.map +1 -0
- package/dist/browser/encryption/EncryptionKey/DataEncryptionKey.js +8 -2
- package/dist/browser/encryption/EncryptionKey/DataEncryptionKey.js.map +1 -0
- package/dist/browser/encryption/EncryptionKeyResolver/index.d.ts +1 -1
- package/dist/browser/encryption/EncryptionKeyResolver/index.d.ts.map +1 -1
- package/dist/browser/encryption/EncryptionKeyResolver/index.js.map +1 -1
- package/dist/browser/encryption/EncryptionQueryBuilder.d.ts +2 -2
- package/dist/browser/encryption/EncryptionQueryBuilder.d.ts.map +1 -1
- package/dist/browser/encryption/EncryptionQueryBuilder.js.map +1 -1
- package/dist/browser/encryption/Serializers/BooleanSerializer.d.ts +1 -1
- package/dist/browser/encryption/Serializers/BooleanSerializer.d.ts.map +1 -1
- package/dist/browser/encryption/Serializers/BooleanSerializer.js.map +1 -1
- package/dist/browser/encryption/Serializers/FloatSerializer.d.ts +1 -1
- package/dist/browser/encryption/Serializers/FloatSerializer.d.ts.map +1 -1
- package/dist/browser/encryption/Serializers/FloatSerializer.js.map +1 -1
- package/dist/browser/encryption/Serializers/StringSerializer.d.ts +1 -1
- package/dist/browser/encryption/Serializers/StringSerializer.d.ts.map +1 -1
- package/dist/browser/encryption/Serializers/StringSerializer.js.map +1 -1
- package/dist/browser/encryption/Serializers/index.d.ts +1 -1
- package/dist/browser/encryption/Serializers/index.d.ts.map +1 -1
- package/dist/browser/encryption/Serializers/index.js.map +1 -1
- package/dist/browser/encryption/index.d.ts +5 -5
- package/dist/browser/encryption/index.d.ts.map +1 -1
- package/dist/browser/encryption/index.js.map +1 -1
- package/dist/browser/globalPartitionEndpointManager.d.ts +2 -1
- package/dist/browser/globalPartitionEndpointManager.d.ts.map +1 -1
- package/dist/browser/globalPartitionEndpointManager.js.map +1 -1
- package/dist/browser/index.d.ts +16 -16
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/queryExecutionContext/Aggregators/index.d.ts +1 -1
- package/dist/browser/queryExecutionContext/Aggregators/index.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/Aggregators/index.js.map +1 -1
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +26 -18
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -1
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +48 -25
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -1
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +17 -26
- package/dist/browser/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -1
- package/dist/browser/queryExecutionContext/PartitionRangeManager.d.ts +8 -7
- package/dist/browser/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/PartitionRangeManager.js +13 -12
- package/dist/browser/queryExecutionContext/PartitionRangeManager.js.map +1 -1
- package/dist/browser/queryExecutionContext/index.d.ts +2 -2
- package/dist/browser/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/index.js +0 -2
- package/dist/browser/queryExecutionContext/index.js.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +0 -4
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +2 -10
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -1
- package/dist/browser/request/defaultAgent.d.ts +1 -1
- package/dist/browser/request/defaultAgent.d.ts.map +1 -0
- package/dist/browser/request/defaultAgent.js +1 -1
- package/dist/browser/request/defaultAgent.js.map +1 -0
- package/dist/browser/request/hybridSearchQueryResult.d.ts +1 -1
- package/dist/browser/request/hybridSearchQueryResult.d.ts.map +1 -1
- package/dist/browser/request/hybridSearchQueryResult.js.map +1 -1
- package/dist/browser/request/index.d.ts +8 -8
- package/dist/browser/request/index.d.ts.map +1 -1
- package/dist/browser/request/index.js +0 -1
- package/dist/browser/request/index.js.map +1 -1
- package/dist/browser/retry/endpointDiscoveryRetryPolicy.d.ts +1 -1
- package/dist/browser/retry/endpointDiscoveryRetryPolicy.d.ts.map +1 -1
- package/dist/browser/retry/endpointDiscoveryRetryPolicy.js.map +1 -1
- package/dist/browser/retry/index.d.ts +1 -1
- package/dist/browser/retry/index.d.ts.map +1 -1
- package/dist/browser/retry/index.js +0 -3
- package/dist/browser/retry/index.js.map +1 -1
- package/dist/browser/retry/timeoutFailoverRetryPolicy.d.ts +1 -1
- package/dist/browser/retry/timeoutFailoverRetryPolicy.d.ts.map +1 -1
- package/dist/browser/retry/timeoutFailoverRetryPolicy.js.map +1 -1
- package/dist/browser/utils/atob.d.ts +1 -1
- package/dist/browser/utils/atob.d.ts.map +1 -0
- package/dist/browser/utils/atob.js +1 -1
- package/dist/browser/utils/atob.js.map +1 -0
- package/dist/browser/utils/digest.d.ts +1 -1
- package/dist/browser/utils/digest.d.ts.map +1 -0
- package/dist/browser/utils/digest.js +1 -1
- package/dist/browser/utils/digest.js.map +1 -0
- package/dist/browser/utils/envUtils.d.ts +1 -1
- package/dist/browser/utils/envUtils.d.ts.map +1 -0
- package/dist/browser/utils/envUtils.js +1 -1
- package/dist/browser/utils/envUtils.js.map +1 -0
- package/dist/browser/utils/hashing/hash.d.ts +1 -1
- package/dist/browser/utils/hashing/hash.d.ts.map +1 -1
- package/dist/browser/utils/hashing/hash.js.map +1 -1
- package/dist/browser/utils/hmac.d.ts +1 -1
- package/dist/browser/utils/hmac.d.ts.map +1 -0
- package/dist/browser/utils/hmac.js +1 -1
- package/dist/browser/utils/hmac.js.map +1 -0
- package/dist/commonjs/ChangeFeedIterator.js +125 -110
- package/dist/commonjs/ChangeFeedIterator.js.map +7 -1
- package/dist/commonjs/ChangeFeedOptions.js +15 -3
- package/dist/commonjs/ChangeFeedOptions.js.map +7 -1
- package/dist/commonjs/ChangeFeedResponse.js +80 -78
- package/dist/commonjs/ChangeFeedResponse.js.map +7 -1
- package/dist/commonjs/ClientContext.js +867 -761
- package/dist/commonjs/ClientContext.js.map +7 -1
- package/dist/commonjs/CosmosClient.js +293 -286
- package/dist/commonjs/CosmosClient.js.map +7 -1
- package/dist/commonjs/CosmosClientOptions.js +15 -3
- package/dist/commonjs/CosmosClientOptions.js.map +7 -1
- package/dist/commonjs/CosmosDiagnostics.js +51 -55
- package/dist/commonjs/CosmosDiagnostics.js.map +7 -1
- package/dist/commonjs/GlobalEndpointManagerOptions.js +15 -3
- package/dist/commonjs/GlobalEndpointManagerOptions.js.map +7 -1
- package/dist/commonjs/PartitionKeyRangeFailoverInfo.d.ts +1 -1
- package/dist/commonjs/PartitionKeyRangeFailoverInfo.d.ts.map +1 -1
- package/dist/commonjs/PartitionKeyRangeFailoverInfo.js +148 -134
- package/dist/commonjs/PartitionKeyRangeFailoverInfo.js.map +7 -1
- package/dist/commonjs/auth.js +91 -84
- package/dist/commonjs/auth.js.map +7 -1
- package/dist/commonjs/bulk/Batcher.js +177 -149
- package/dist/commonjs/bulk/Batcher.js.map +7 -1
- package/dist/commonjs/bulk/BulkHelper.js +320 -289
- package/dist/commonjs/bulk/BulkHelper.js.map +7 -1
- package/dist/commonjs/bulk/BulkResponse.js +140 -118
- package/dist/commonjs/bulk/BulkResponse.js.map +7 -1
- package/dist/commonjs/bulk/CongestionAlgorithm.js +71 -66
- package/dist/commonjs/bulk/CongestionAlgorithm.js.map +7 -1
- package/dist/commonjs/bulk/HelperPerPartition.js +167 -130
- package/dist/commonjs/bulk/HelperPerPartition.js.map +7 -1
- package/dist/commonjs/bulk/ItemOperation.js +15 -5
- package/dist/commonjs/bulk/ItemOperation.js.map +7 -1
- package/dist/commonjs/bulk/ItemOperationContext.js +53 -38
- package/dist/commonjs/bulk/ItemOperationContext.js.map +7 -1
- package/dist/commonjs/bulk/Limiter.js +198 -212
- package/dist/commonjs/bulk/Limiter.js.map +7 -1
- package/dist/commonjs/bulk/PartitionMetric.js +58 -35
- package/dist/commonjs/bulk/PartitionMetric.js.map +7 -1
- package/dist/commonjs/bulk/index.d.ts +1 -1
- package/dist/commonjs/bulk/index.d.ts.map +1 -1
- package/dist/commonjs/bulk/index.js +30 -10
- package/dist/commonjs/bulk/index.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedEnums.js +31 -14
- package/dist/commonjs/client/ChangeFeed/ChangeFeedEnums.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForEpkRange.js +374 -327
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForEpkRange.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts +2 -2
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForPartitionKey.js +180 -146
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorBuilder.js +78 -63
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorBuilder.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorOptions.js +15 -5
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorOptions.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorResponse.js +67 -78
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorResponse.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedMode.js +31 -11
- package/dist/commonjs/client/ChangeFeed/ChangeFeedMode.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedPolicy.js +30 -12
- package/dist/commonjs/client/ChangeFeed/ChangeFeedPolicy.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedPullModelIterator.js +15 -3
- package/dist/commonjs/client/ChangeFeed/ChangeFeedPullModelIterator.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedRange.js +53 -38
- package/dist/commonjs/client/ChangeFeed/ChangeFeedRange.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedRetentionTimeSpan.js +52 -36
- package/dist/commonjs/client/ChangeFeed/ChangeFeedRetentionTimeSpan.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFrom.js +70 -54
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFrom.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromBeginning.js +33 -16
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromBeginning.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromContinuation.js +47 -38
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromContinuation.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromNow.js +33 -18
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromNow.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromTime.js +38 -21
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromTime.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/CompositeContinuationToken.js +38 -21
- package/dist/commonjs/client/ChangeFeed/CompositeContinuationToken.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ContinuationTokenForPartitionKey.js +43 -26
- package/dist/commonjs/client/ChangeFeed/ContinuationTokenForPartitionKey.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/FeedRange.js +50 -38
- package/dist/commonjs/client/ChangeFeed/FeedRange.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/FeedRangeQueue.js +68 -49
- package/dist/commonjs/client/ChangeFeed/FeedRangeQueue.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/InternalChangeFeedOptions.js +15 -5
- package/dist/commonjs/client/ChangeFeed/InternalChangeFeedOptions.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/buildChangeFeedIterator.js +143 -71
- package/dist/commonjs/client/ChangeFeed/buildChangeFeedIterator.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/changeFeedUtils.d.ts +4 -4
- package/dist/commonjs/client/ChangeFeed/changeFeedUtils.d.ts.map +1 -1
- package/dist/commonjs/client/ChangeFeed/changeFeedUtils.js +160 -188
- package/dist/commonjs/client/ChangeFeed/changeFeedUtils.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/index.d.ts +2 -2
- package/dist/commonjs/client/ChangeFeed/index.d.ts.map +1 -1
- package/dist/commonjs/client/ChangeFeed/index.js +59 -29
- package/dist/commonjs/client/ChangeFeed/index.js.map +7 -1
- package/dist/commonjs/client/ClientUtils.d.ts +1 -1
- package/dist/commonjs/client/ClientUtils.d.ts.map +1 -1
- package/dist/commonjs/client/ClientUtils.js +42 -16
- package/dist/commonjs/client/ClientUtils.js.map +7 -1
- package/dist/commonjs/client/Conflict/Conflict.js +127 -100
- package/dist/commonjs/client/Conflict/Conflict.js.map +7 -1
- package/dist/commonjs/client/Conflict/ConflictDefinition.js +15 -3
- package/dist/commonjs/client/Conflict/ConflictDefinition.js.map +7 -1
- package/dist/commonjs/client/Conflict/ConflictResolutionMode.js +31 -11
- package/dist/commonjs/client/Conflict/ConflictResolutionMode.js.map +7 -1
- package/dist/commonjs/client/Conflict/ConflictResolutionPolicy.js +15 -3
- package/dist/commonjs/client/Conflict/ConflictResolutionPolicy.js.map +7 -1
- package/dist/commonjs/client/Conflict/ConflictResponse.js +34 -13
- package/dist/commonjs/client/Conflict/ConflictResponse.js.map +7 -1
- package/dist/commonjs/client/Conflict/Conflicts.js +70 -51
- package/dist/commonjs/client/Conflict/Conflicts.js.map +7 -1
- package/dist/commonjs/client/Conflict/index.d.ts +2 -2
- package/dist/commonjs/client/Conflict/index.d.ts.map +1 -1
- package/dist/commonjs/client/Conflict/index.js +36 -14
- package/dist/commonjs/client/Conflict/index.js.map +7 -1
- package/dist/commonjs/client/Container/Container.js +664 -599
- package/dist/commonjs/client/Container/Container.js.map +7 -1
- package/dist/commonjs/client/Container/ContainerDefinition.d.ts +1 -1
- package/dist/commonjs/client/Container/ContainerDefinition.d.ts.map +1 -1
- package/dist/commonjs/client/Container/ContainerDefinition.js +15 -3
- package/dist/commonjs/client/Container/ContainerDefinition.js.map +7 -1
- package/dist/commonjs/client/Container/ContainerRequest.js +15 -3
- package/dist/commonjs/client/Container/ContainerRequest.js.map +7 -1
- package/dist/commonjs/client/Container/ContainerResponse.js +34 -14
- package/dist/commonjs/client/Container/ContainerResponse.js.map +7 -1
- package/dist/commonjs/client/Container/Containers.js +232 -218
- package/dist/commonjs/client/Container/Containers.js.map +7 -1
- package/dist/commonjs/client/Container/PartitionKeyRange.js +15 -3
- package/dist/commonjs/client/Container/PartitionKeyRange.js.map +7 -1
- package/dist/commonjs/client/Container/UniqueKeyPolicy.js +15 -3
- package/dist/commonjs/client/Container/UniqueKeyPolicy.js.map +7 -1
- package/dist/commonjs/client/Container/index.d.ts +4 -4
- package/dist/commonjs/client/Container/index.d.ts.map +1 -1
- package/dist/commonjs/client/Container/index.js +33 -12
- package/dist/commonjs/client/Container/index.js.map +7 -1
- package/dist/commonjs/client/Database/Database.js +528 -448
- package/dist/commonjs/client/Database/Database.js.map +7 -1
- package/dist/commonjs/client/Database/DatabaseDefinition.js +15 -3
- package/dist/commonjs/client/Database/DatabaseDefinition.js.map +7 -1
- package/dist/commonjs/client/Database/DatabaseRequest.js +15 -3
- package/dist/commonjs/client/Database/DatabaseRequest.js.map +7 -1
- package/dist/commonjs/client/Database/DatabaseResponse.js +34 -14
- package/dist/commonjs/client/Database/DatabaseResponse.js.map +7 -1
- package/dist/commonjs/client/Database/Databases.js +197 -188
- package/dist/commonjs/client/Database/Databases.js.map +7 -1
- package/dist/commonjs/client/Database/index.d.ts +2 -2
- package/dist/commonjs/client/Database/index.d.ts.map +1 -1
- package/dist/commonjs/client/Database/index.js +33 -12
- package/dist/commonjs/client/Database/index.js.map +7 -1
- package/dist/commonjs/client/Item/Item.js +506 -383
- package/dist/commonjs/client/Item/Item.js.map +7 -1
- package/dist/commonjs/client/Item/ItemDefinition.js +15 -5
- package/dist/commonjs/client/Item/ItemDefinition.js.map +7 -1
- package/dist/commonjs/client/Item/ItemResponse.js +34 -13
- package/dist/commonjs/client/Item/ItemResponse.js.map +7 -1
- package/dist/commonjs/client/Item/Items.d.ts.map +1 -1
- package/dist/commonjs/client/Item/Items.js +888 -717
- package/dist/commonjs/client/Item/Items.js.map +7 -1
- package/dist/commonjs/client/Item/index.d.ts +1 -1
- package/dist/commonjs/client/Item/index.d.ts.map +1 -1
- package/dist/commonjs/client/Item/index.js +33 -12
- package/dist/commonjs/client/Item/index.js.map +7 -1
- package/dist/commonjs/client/Offer/Offer.js +115 -90
- package/dist/commonjs/client/Offer/Offer.js.map +7 -1
- package/dist/commonjs/client/Offer/OfferDefinition.js +15 -3
- package/dist/commonjs/client/Offer/OfferDefinition.js.map +7 -1
- package/dist/commonjs/client/Offer/OfferResponse.js +34 -13
- package/dist/commonjs/client/Offer/OfferResponse.js.map +7 -1
- package/dist/commonjs/client/Offer/Offers.js +65 -51
- package/dist/commonjs/client/Offer/Offers.js.map +7 -1
- package/dist/commonjs/client/Offer/index.d.ts +1 -1
- package/dist/commonjs/client/Offer/index.d.ts.map +1 -1
- package/dist/commonjs/client/Offer/index.js +33 -12
- package/dist/commonjs/client/Offer/index.js.map +7 -1
- package/dist/commonjs/client/Permission/Permission.js +158 -127
- package/dist/commonjs/client/Permission/Permission.js.map +7 -1
- package/dist/commonjs/client/Permission/PermissionBody.js +15 -3
- package/dist/commonjs/client/Permission/PermissionBody.js.map +7 -1
- package/dist/commonjs/client/Permission/PermissionDefinition.js +15 -3
- package/dist/commonjs/client/Permission/PermissionDefinition.js.map +7 -1
- package/dist/commonjs/client/Permission/PermissionResponse.js +34 -13
- package/dist/commonjs/client/Permission/PermissionResponse.js.map +7 -1
- package/dist/commonjs/client/Permission/Permissions.js +170 -144
- package/dist/commonjs/client/Permission/Permissions.js.map +7 -1
- package/dist/commonjs/client/Permission/index.d.ts +2 -2
- package/dist/commonjs/client/Permission/index.d.ts.map +1 -1
- package/dist/commonjs/client/Permission/index.js +33 -12
- package/dist/commonjs/client/Permission/index.js.map +7 -1
- package/dist/commonjs/client/Resource.js +15 -3
- package/dist/commonjs/client/Resource.js.map +7 -1
- package/dist/commonjs/client/SasToken/PermissionScopeValues.js +91 -80
- package/dist/commonjs/client/SasToken/PermissionScopeValues.js.map +7 -1
- package/dist/commonjs/client/SasToken/SasTokenProperties.js +43 -24
- package/dist/commonjs/client/SasToken/SasTokenProperties.js.map +7 -1
- package/dist/commonjs/client/Script/Scripts.js +97 -80
- package/dist/commonjs/client/Script/Scripts.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/StoredProcedure.js +224 -185
- package/dist/commonjs/client/StoredProcedure/StoredProcedure.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/StoredProcedureDefinition.js +15 -3
- package/dist/commonjs/client/StoredProcedure/StoredProcedureDefinition.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/StoredProcedureResponse.js +44 -23
- package/dist/commonjs/client/StoredProcedure/StoredProcedureResponse.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/StoredProcedures.js +131 -111
- package/dist/commonjs/client/StoredProcedure/StoredProcedures.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/index.d.ts +1 -1
- package/dist/commonjs/client/StoredProcedure/index.d.ts.map +1 -1
- package/dist/commonjs/client/StoredProcedure/index.js +33 -12
- package/dist/commonjs/client/StoredProcedure/index.js.map +7 -1
- package/dist/commonjs/client/Trigger/Trigger.js +169 -138
- package/dist/commonjs/client/Trigger/Trigger.js.map +7 -1
- package/dist/commonjs/client/Trigger/TriggerDefinition.js +15 -3
- package/dist/commonjs/client/Trigger/TriggerDefinition.js.map +7 -1
- package/dist/commonjs/client/Trigger/TriggerResponse.js +34 -13
- package/dist/commonjs/client/Trigger/TriggerResponse.js.map +7 -1
- package/dist/commonjs/client/Trigger/Triggers.js +130 -110
- package/dist/commonjs/client/Trigger/Triggers.js.map +7 -1
- package/dist/commonjs/client/Trigger/index.d.ts +1 -1
- package/dist/commonjs/client/Trigger/index.d.ts.map +1 -1
- package/dist/commonjs/client/Trigger/index.js +33 -12
- package/dist/commonjs/client/Trigger/index.js.map +7 -1
- package/dist/commonjs/client/User/User.js +170 -141
- package/dist/commonjs/client/User/User.js.map +7 -1
- package/dist/commonjs/client/User/UserDefinition.js +15 -3
- package/dist/commonjs/client/User/UserDefinition.js.map +7 -1
- package/dist/commonjs/client/User/UserResponse.js +34 -13
- package/dist/commonjs/client/User/UserResponse.js.map +7 -1
- package/dist/commonjs/client/User/Users.js +154 -128
- package/dist/commonjs/client/User/Users.js.map +7 -1
- package/dist/commonjs/client/User/index.d.ts +1 -1
- package/dist/commonjs/client/User/index.d.ts.map +1 -1
- package/dist/commonjs/client/User/index.js +33 -12
- package/dist/commonjs/client/User/index.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunction.js +168 -137
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunction.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctionDefinition.js +15 -3
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctionDefinition.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctionResponse.js +42 -21
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctionResponse.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctions.js +127 -107
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctions.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/index.d.ts +1 -1
- package/dist/commonjs/client/UserDefinedFunction/index.d.ts.map +1 -1
- package/dist/commonjs/client/UserDefinedFunction/index.js +33 -12
- package/dist/commonjs/client/UserDefinedFunction/index.js.map +7 -1
- package/dist/commonjs/client/index.d.ts +1 -1
- package/dist/commonjs/client/index.d.ts.map +1 -1
- package/dist/commonjs/client/index.js +41 -18
- package/dist/commonjs/client/index.js.map +7 -1
- package/dist/commonjs/common/constants.js +514 -500
- package/dist/commonjs/common/constants.js.map +7 -1
- package/dist/commonjs/common/helper.d.ts +4 -4
- package/dist/commonjs/common/helper.d.ts.map +1 -1
- package/dist/commonjs/common/helper.js +349 -412
- package/dist/commonjs/common/helper.js.map +7 -1
- package/dist/commonjs/common/index.js +27 -10
- package/dist/commonjs/common/index.js.map +7 -1
- package/dist/commonjs/common/logger.js +28 -9
- package/dist/commonjs/common/logger.js.map +7 -1
- package/dist/commonjs/common/partitionKeys.js +27 -7
- package/dist/commonjs/common/partitionKeys.js.map +7 -1
- package/dist/commonjs/common/platform.d.ts +1 -1
- package/dist/commonjs/common/platform.d.ts.map +1 -1
- package/dist/commonjs/common/platform.js +54 -42
- package/dist/commonjs/common/platform.js.map +7 -1
- package/dist/commonjs/common/statusCodes.js +76 -60
- package/dist/commonjs/common/statusCodes.js.map +7 -1
- package/dist/commonjs/common/uriFactory.js +79 -195
- package/dist/commonjs/common/uriFactory.js.map +7 -1
- package/dist/commonjs/diagnostics/CosmosDbDiagnosticLevel.js +32 -15
- package/dist/commonjs/diagnostics/CosmosDbDiagnosticLevel.js.map +7 -1
- package/dist/commonjs/diagnostics/CosmosDiagnosticsContext.js +145 -126
- package/dist/commonjs/diagnostics/CosmosDiagnosticsContext.js.map +7 -1
- package/dist/commonjs/diagnostics/DiagnosticFormatter.js +29 -10
- package/dist/commonjs/diagnostics/DiagnosticFormatter.js.map +7 -1
- package/dist/commonjs/diagnostics/DiagnosticNodeInternal.d.ts +1 -1
- package/dist/commonjs/diagnostics/DiagnosticNodeInternal.d.ts.map +1 -1
- package/dist/commonjs/diagnostics/DiagnosticNodeInternal.js +316 -305
- package/dist/commonjs/diagnostics/DiagnosticNodeInternal.js.map +7 -1
- package/dist/commonjs/diagnostics/DiagnosticWriter.js +35 -25
- package/dist/commonjs/diagnostics/DiagnosticWriter.js.map +7 -1
- package/dist/commonjs/diagnostics/diagnosticLevelComparator.js +39 -24
- package/dist/commonjs/diagnostics/diagnosticLevelComparator.js.map +7 -1
- package/dist/commonjs/diagnostics/index.js +67 -34
- package/dist/commonjs/diagnostics/index.js.map +7 -1
- package/dist/commonjs/documents/ComputedProperty.js +15 -3
- package/dist/commonjs/documents/ComputedProperty.js.map +7 -1
- package/dist/commonjs/documents/ConnectionMode.js +30 -12
- package/dist/commonjs/documents/ConnectionMode.js.map +7 -1
- package/dist/commonjs/documents/ConnectionPolicy.js +43 -26
- package/dist/commonjs/documents/ConnectionPolicy.js.map +7 -1
- package/dist/commonjs/documents/ConsistencyLevel.js +34 -43
- package/dist/commonjs/documents/ConsistencyLevel.js.map +7 -1
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.js +76 -79
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.js.map +7 -1
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.js +48 -38
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.js.map +7 -1
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.js +15 -5
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.js.map +7 -1
- package/dist/commonjs/documents/DataType.js +35 -22
- package/dist/commonjs/documents/DataType.js.map +7 -1
- package/dist/commonjs/documents/DatabaseAccount.js +109 -100
- package/dist/commonjs/documents/DatabaseAccount.js.map +7 -1
- package/dist/commonjs/documents/Document.js +15 -3
- package/dist/commonjs/documents/Document.js.map +7 -1
- package/dist/commonjs/documents/FullTextPolicy.js +15 -5
- package/dist/commonjs/documents/FullTextPolicy.js.map +7 -1
- package/dist/commonjs/documents/GeospatialType.js +31 -13
- package/dist/commonjs/documents/GeospatialType.js.map +7 -1
- package/dist/commonjs/documents/IndexKind.js +31 -20
- package/dist/commonjs/documents/IndexKind.js.map +7 -1
- package/dist/commonjs/documents/IndexingMode.js +32 -27
- package/dist/commonjs/documents/IndexingMode.js.map +7 -1
- package/dist/commonjs/documents/IndexingPolicy.js +41 -30
- package/dist/commonjs/documents/IndexingPolicy.js.map +7 -1
- package/dist/commonjs/documents/PartitionKey.js +43 -27
- package/dist/commonjs/documents/PartitionKey.js.map +7 -1
- package/dist/commonjs/documents/PartitionKeyDefinition.js +15 -3
- package/dist/commonjs/documents/PartitionKeyDefinition.js.map +7 -1
- package/dist/commonjs/documents/PartitionKeyDefinitionVersion.js +31 -14
- package/dist/commonjs/documents/PartitionKeyDefinitionVersion.js.map +7 -1
- package/dist/commonjs/documents/PartitionKeyInternal.js +35 -28
- package/dist/commonjs/documents/PartitionKeyInternal.js.map +7 -1
- package/dist/commonjs/documents/PartitionKeyKind.js +31 -14
- package/dist/commonjs/documents/PartitionKeyKind.js.map +7 -1
- package/dist/commonjs/documents/PermissionMode.js +32 -18
- package/dist/commonjs/documents/PermissionMode.js.map +7 -1
- package/dist/commonjs/documents/PriorityLevel.js +31 -25
- package/dist/commonjs/documents/PriorityLevel.js.map +7 -1
- package/dist/commonjs/documents/TriggerOperation.js +34 -23
- package/dist/commonjs/documents/TriggerOperation.js.map +7 -1
- package/dist/commonjs/documents/TriggerType.js +31 -17
- package/dist/commonjs/documents/TriggerType.js.map +7 -1
- package/dist/commonjs/documents/UserDefinedFunctionType.js +30 -15
- package/dist/commonjs/documents/UserDefinedFunctionType.js.map +7 -1
- package/dist/commonjs/documents/VectorEmbeddingPolicy.js +41 -44
- package/dist/commonjs/documents/VectorEmbeddingPolicy.js.map +7 -1
- package/dist/commonjs/documents/index.d.ts +4 -4
- package/dist/commonjs/documents/index.d.ts.map +1 -1
- package/dist/commonjs/documents/index.js +57 -29
- package/dist/commonjs/documents/index.js.map +7 -1
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts +1 -1
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts.map +1 -1
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js +97 -71
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js.map +7 -1
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/index.js +27 -8
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/index.js.map +7 -1
- package/dist/commonjs/encryption/Cache/ClientEncryptionKeyPropertiesCache.js +37 -23
- package/dist/commonjs/encryption/Cache/ClientEncryptionKeyPropertiesCache.js.map +7 -1
- package/dist/commonjs/encryption/Cache/EncryptionSettingsCache.js +52 -36
- package/dist/commonjs/encryption/Cache/EncryptionSettingsCache.js.map +7 -1
- package/dist/commonjs/encryption/Cache/KeyEncryptionKeyCache.js +46 -32
- package/dist/commonjs/encryption/Cache/KeyEncryptionKeyCache.js.map +7 -1
- package/dist/commonjs/encryption/Cache/ProtectedDataEncryptionKeyCache.js +98 -86
- package/dist/commonjs/encryption/Cache/ProtectedDataEncryptionKeyCache.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionIncludedPath.d.ts +1 -1
- package/dist/commonjs/encryption/ClientEncryptionIncludedPath.d.ts.map +1 -1
- package/dist/commonjs/encryption/ClientEncryptionIncludedPath.js +15 -5
- package/dist/commonjs/encryption/ClientEncryptionIncludedPath.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyProperties.js +15 -5
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyProperties.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyRequest.js +15 -5
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyRequest.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts +4 -4
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts.map +1 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.js +34 -16
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/index.d.ts +2 -2
- package/dist/commonjs/encryption/ClientEncryptionKey/index.d.ts.map +1 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/index.js +27 -8
- package/dist/commonjs/encryption/ClientEncryptionKey/index.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionOptions.js +15 -5
- package/dist/commonjs/encryption/ClientEncryptionOptions.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionPolicy.js +15 -5
- package/dist/commonjs/encryption/ClientEncryptionPolicy.js.map +7 -1
- package/dist/commonjs/encryption/CosmosEncryptedNumber.js +31 -20
- package/dist/commonjs/encryption/CosmosEncryptedNumber.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionItemQueryIterator.js +129 -106
- package/dist/commonjs/encryption/EncryptionItemQueryIterator.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKey/DataEncryptionKey.js +51 -32
- package/dist/commonjs/encryption/EncryptionKey/DataEncryptionKey.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKey/ProtectedDataEncryptionKey.js +36 -23
- package/dist/commonjs/encryption/EncryptionKey/ProtectedDataEncryptionKey.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKey/index.js +30 -10
- package/dist/commonjs/encryption/EncryptionKey/index.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyResolver/AzureKeyVaultEncryptionKeyResolver.js +112 -94
- package/dist/commonjs/encryption/EncryptionKeyResolver/AzureKeyVaultEncryptionKeyResolver.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyResolver/EncryptionKeyResolver.js +15 -5
- package/dist/commonjs/encryption/EncryptionKeyResolver/EncryptionKeyResolver.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyResolver/index.d.ts +1 -1
- package/dist/commonjs/encryption/EncryptionKeyResolver/index.d.ts.map +1 -1
- package/dist/commonjs/encryption/EncryptionKeyResolver/index.js +27 -8
- package/dist/commonjs/encryption/EncryptionKeyResolver/index.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyStoreProvider.js +80 -55
- package/dist/commonjs/encryption/EncryptionKeyStoreProvider.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyWrapMetadata.js +15 -5
- package/dist/commonjs/encryption/EncryptionKeyWrapMetadata.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionManager.js +57 -42
- package/dist/commonjs/encryption/EncryptionManager.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionProcessor.js +340 -284
- package/dist/commonjs/encryption/EncryptionProcessor.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionQueryBuilder.d.ts +2 -2
- package/dist/commonjs/encryption/EncryptionQueryBuilder.d.ts.map +1 -1
- package/dist/commonjs/encryption/EncryptionQueryBuilder.js +109 -99
- package/dist/commonjs/encryption/EncryptionQueryBuilder.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionSettingForProperty.js +64 -33
- package/dist/commonjs/encryption/EncryptionSettingForProperty.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionSettings.js +45 -30
- package/dist/commonjs/encryption/EncryptionSettings.js.map +7 -1
- package/dist/commonjs/encryption/KeyEncryptionKey.js +51 -28
- package/dist/commonjs/encryption/KeyEncryptionKey.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/BooleanSerializer.d.ts +1 -1
- package/dist/commonjs/encryption/Serializers/BooleanSerializer.d.ts.map +1 -1
- package/dist/commonjs/encryption/Serializers/BooleanSerializer.js +37 -18
- package/dist/commonjs/encryption/Serializers/BooleanSerializer.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/FloatSerializer.d.ts +1 -1
- package/dist/commonjs/encryption/Serializers/FloatSerializer.d.ts.map +1 -1
- package/dist/commonjs/encryption/Serializers/FloatSerializer.js +39 -20
- package/dist/commonjs/encryption/Serializers/FloatSerializer.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/NumberSerializer.js +38 -19
- package/dist/commonjs/encryption/Serializers/NumberSerializer.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/Serializer.js +15 -5
- package/dist/commonjs/encryption/Serializers/Serializer.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/StringSerializer.d.ts +1 -1
- package/dist/commonjs/encryption/Serializers/StringSerializer.d.ts.map +1 -1
- package/dist/commonjs/encryption/Serializers/StringSerializer.js +33 -14
- package/dist/commonjs/encryption/Serializers/StringSerializer.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/index.d.ts +1 -1
- package/dist/commonjs/encryption/Serializers/index.d.ts.map +1 -1
- package/dist/commonjs/encryption/Serializers/index.js +36 -14
- package/dist/commonjs/encryption/Serializers/index.js.map +7 -1
- package/dist/commonjs/encryption/enums/EncryptionAlgorithm.js +30 -13
- package/dist/commonjs/encryption/enums/EncryptionAlgorithm.js.map +7 -1
- package/dist/commonjs/encryption/enums/EncryptionKeyResolverName.js +30 -12
- package/dist/commonjs/encryption/enums/EncryptionKeyResolverName.js.map +7 -1
- package/dist/commonjs/encryption/enums/EncryptionType.js +31 -16
- package/dist/commonjs/encryption/enums/EncryptionType.js.map +7 -1
- package/dist/commonjs/encryption/enums/KeyEncryptionAlgorithm.js +30 -12
- package/dist/commonjs/encryption/enums/KeyEncryptionAlgorithm.js.map +7 -1
- package/dist/commonjs/encryption/enums/TypeMarker.js +34 -14
- package/dist/commonjs/encryption/enums/TypeMarker.js.map +7 -1
- package/dist/commonjs/encryption/enums/index.js +36 -14
- package/dist/commonjs/encryption/enums/index.js.map +7 -1
- package/dist/commonjs/encryption/index.d.ts +5 -5
- package/dist/commonjs/encryption/index.d.ts.map +1 -1
- package/dist/commonjs/encryption/index.js +55 -26
- package/dist/commonjs/encryption/index.js.map +7 -1
- package/dist/commonjs/extractPartitionKey.js +92 -91
- package/dist/commonjs/extractPartitionKey.js.map +7 -1
- package/dist/commonjs/globalEndpointManager.js +364 -357
- package/dist/commonjs/globalEndpointManager.js.map +7 -1
- package/dist/commonjs/globalPartitionEndpointManager.d.ts +2 -1
- package/dist/commonjs/globalPartitionEndpointManager.d.ts.map +1 -1
- package/dist/commonjs/globalPartitionEndpointManager.js +322 -297
- package/dist/commonjs/globalPartitionEndpointManager.js.map +7 -1
- package/dist/commonjs/index.d.ts +16 -16
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +177 -96
- package/dist/commonjs/index.js.map +7 -1
- package/dist/commonjs/plugins/Plugin.js +50 -44
- package/dist/commonjs/plugins/Plugin.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/Aggregator.js +15 -3
- package/dist/commonjs/queryExecutionContext/Aggregators/Aggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/AverageAggregator.js +49 -29
- package/dist/commonjs/queryExecutionContext/Aggregators/AverageAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/CountAggregator.js +46 -26
- package/dist/commonjs/queryExecutionContext/Aggregators/CountAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/GlobalStatisticsAggregator.js +64 -54
- package/dist/commonjs/queryExecutionContext/Aggregators/GlobalStatisticsAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MakeListAggregator.js +38 -18
- package/dist/commonjs/queryExecutionContext/Aggregators/MakeListAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MakeSetAggregator.js +46 -29
- package/dist/commonjs/queryExecutionContext/Aggregators/MakeSetAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MaxAggregator.js +54 -38
- package/dist/commonjs/queryExecutionContext/Aggregators/MaxAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MinAggregator.js +58 -43
- package/dist/commonjs/queryExecutionContext/Aggregators/MinAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/StaticValueAggregator.js +34 -14
- package/dist/commonjs/queryExecutionContext/Aggregators/StaticValueAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/SumAggregator.js +44 -25
- package/dist/commonjs/queryExecutionContext/Aggregators/SumAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/index.d.ts +1 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/index.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/index.js +63 -39
- package/dist/commonjs/queryExecutionContext/Aggregators/index.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +181 -166
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js +45 -30
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +146 -124
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +70 -65
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.js +38 -24
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/CosmosHeaders.js +15 -3
- package/dist/commonjs/queryExecutionContext/CosmosHeaders.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js +110 -107
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js +115 -107
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js +164 -155
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js +152 -143
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js +81 -64
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js +79 -58
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js +70 -48
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js +59 -42
- package/dist/commonjs/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/emptyGroup.js +30 -13
- package/dist/commonjs/queryExecutionContext/EndpointComponent/emptyGroup.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ExecutionContext.js +15 -3
- package/dist/commonjs/queryExecutionContext/ExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/FetchResult.js +55 -38
- package/dist/commonjs/queryExecutionContext/FetchResult.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.js +59 -55
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.d.ts +8 -7
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.js +151 -155
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.js +93 -102
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.js +110 -89
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.js +63 -66
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/SqlQuerySpec.js +15 -3
- package/dist/commonjs/queryExecutionContext/SqlQuerySpec.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.js +219 -191
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/documentProducer.js +284 -276
- package/dist/commonjs/queryExecutionContext/documentProducer.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/headerUtils.js +94 -89
- package/dist/commonjs/queryExecutionContext/headerUtils.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.js +491 -481
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/index.d.ts +2 -2
- package/dist/commonjs/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/index.js +61 -29
- package/dist/commonjs/queryExecutionContext/index.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResponse.js +15 -5
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResponse.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResult.js +15 -5
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResult.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/orderByComparator.js +105 -113
- package/dist/commonjs/queryExecutionContext/orderByComparator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.js +143 -134
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.js +90 -61
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.js +85 -68
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.js +832 -788
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.js +35 -24
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.js +278 -228
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js +15 -5
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +261 -299
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +0 -4
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +93 -98
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js +147 -177
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js +104 -92
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js +15 -5
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js +66 -55
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js +51 -36
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js +15 -5
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.js +15 -5
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.js.map +7 -1
- package/dist/commonjs/queryIterator.js +404 -354
- package/dist/commonjs/queryIterator.js.map +7 -1
- package/dist/commonjs/queryMetrics/clientSideMetrics.js +47 -29
- package/dist/commonjs/queryMetrics/clientSideMetrics.js.map +7 -1
- package/dist/commonjs/queryMetrics/index.js +52 -19
- package/dist/commonjs/queryMetrics/index.js.map +7 -1
- package/dist/commonjs/queryMetrics/queryMetrics.js +175 -159
- package/dist/commonjs/queryMetrics/queryMetrics.js.map +7 -1
- package/dist/commonjs/queryMetrics/queryMetricsConstants.js +74 -57
- package/dist/commonjs/queryMetrics/queryMetricsConstants.js.map +7 -1
- package/dist/commonjs/queryMetrics/queryMetricsUtils.js +51 -38
- package/dist/commonjs/queryMetrics/queryMetricsUtils.js.map +7 -1
- package/dist/commonjs/queryMetrics/queryPreparationTime.js +105 -65
- package/dist/commonjs/queryMetrics/queryPreparationTime.js.map +7 -1
- package/dist/commonjs/queryMetrics/runtimeExecutionTimes.js +116 -68
- package/dist/commonjs/queryMetrics/runtimeExecutionTimes.js.map +7 -1
- package/dist/commonjs/queryMetrics/timeSpan.js +205 -217
- package/dist/commonjs/queryMetrics/timeSpan.js.map +7 -1
- package/dist/commonjs/request/ErrorResponse.js +45 -27
- package/dist/commonjs/request/ErrorResponse.js.map +7 -1
- package/dist/commonjs/request/FeedOptions.js +15 -3
- package/dist/commonjs/request/FeedOptions.js.map +7 -1
- package/dist/commonjs/request/FeedResponse.js +55 -40
- package/dist/commonjs/request/FeedResponse.js.map +7 -1
- package/dist/commonjs/request/RequestContext.js +15 -3
- package/dist/commonjs/request/RequestContext.js.map +7 -1
- package/dist/commonjs/request/RequestHandler.js +172 -153
- package/dist/commonjs/request/RequestHandler.js.map +7 -1
- package/dist/commonjs/request/RequestOptions.js +15 -3
- package/dist/commonjs/request/RequestOptions.js.map +7 -1
- package/dist/commonjs/request/ResourceResponse.js +43 -27
- package/dist/commonjs/request/ResourceResponse.js.map +7 -1
- package/dist/commonjs/request/Response.js +15 -3
- package/dist/commonjs/request/Response.js.map +7 -1
- package/dist/commonjs/request/SharedOptions.js +15 -3
- package/dist/commonjs/request/SharedOptions.js.map +7 -1
- package/dist/commonjs/request/StatusCodes.js +15 -5
- package/dist/commonjs/request/StatusCodes.js.map +7 -1
- package/dist/commonjs/request/TimeoutError.js +34 -16
- package/dist/commonjs/request/TimeoutError.js.map +7 -1
- package/dist/commonjs/request/defaultAgent.js +45 -18
- package/dist/commonjs/request/defaultAgent.js.map +7 -1
- package/dist/commonjs/request/globalStatistics.js +15 -5
- package/dist/commonjs/request/globalStatistics.js.map +7 -1
- package/dist/commonjs/request/hybridSearchQueryResult.d.ts +1 -1
- package/dist/commonjs/request/hybridSearchQueryResult.d.ts.map +1 -1
- package/dist/commonjs/request/hybridSearchQueryResult.js +61 -45
- package/dist/commonjs/request/hybridSearchQueryResult.js.map +7 -1
- package/dist/commonjs/request/index.d.ts +8 -8
- package/dist/commonjs/request/index.d.ts.map +1 -1
- package/dist/commonjs/request/index.js +36 -16
- package/dist/commonjs/request/index.js.map +7 -1
- package/dist/commonjs/request/request.js +187 -186
- package/dist/commonjs/request/request.js.map +7 -1
- package/dist/commonjs/retry/RetryContext.js +15 -3
- package/dist/commonjs/retry/RetryContext.js.map +7 -1
- package/dist/commonjs/retry/RetryPolicy.js +15 -3
- package/dist/commonjs/retry/RetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/bulkExecutionRetryPolicy.js +64 -56
- package/dist/commonjs/retry/bulkExecutionRetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/defaultRetryPolicy.js +66 -115
- package/dist/commonjs/retry/defaultRetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/endpointDiscoveryRetryPolicy.d.ts +1 -1
- package/dist/commonjs/retry/endpointDiscoveryRetryPolicy.d.ts.map +1 -1
- package/dist/commonjs/retry/endpointDiscoveryRetryPolicy.js +93 -73
- package/dist/commonjs/retry/endpointDiscoveryRetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/index.d.ts +1 -1
- package/dist/commonjs/retry/index.d.ts.map +1 -1
- package/dist/commonjs/retry/index.js +29 -12
- package/dist/commonjs/retry/index.js.map +7 -1
- package/dist/commonjs/retry/resourceThrottleRetryPolicy.js +73 -61
- package/dist/commonjs/retry/resourceThrottleRetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/retryOptions.js +15 -3
- package/dist/commonjs/retry/retryOptions.js.map +7 -1
- package/dist/commonjs/retry/retryUtility.js +168 -133
- package/dist/commonjs/retry/retryUtility.js.map +7 -1
- package/dist/commonjs/retry/sessionRetryPolicy.js +79 -73
- package/dist/commonjs/retry/sessionRetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/timeoutFailoverRetryPolicy.d.ts +1 -1
- package/dist/commonjs/retry/timeoutFailoverRetryPolicy.d.ts.map +1 -1
- package/dist/commonjs/retry/timeoutFailoverRetryPolicy.js +116 -119
- package/dist/commonjs/retry/timeoutFailoverRetryPolicy.js.map +7 -1
- package/dist/commonjs/routing/CollectionRoutingMapFactory.js +69 -67
- package/dist/commonjs/routing/CollectionRoutingMapFactory.js.map +7 -1
- package/dist/commonjs/routing/QueryRange.js +92 -66
- package/dist/commonjs/routing/QueryRange.js.map +7 -1
- package/dist/commonjs/routing/inMemoryCollectionRoutingMap.js +111 -84
- package/dist/commonjs/routing/inMemoryCollectionRoutingMap.js.map +7 -1
- package/dist/commonjs/routing/index.js +27 -10
- package/dist/commonjs/routing/index.js.map +7 -1
- package/dist/commonjs/routing/partitionKeyRangeCache.js +81 -56
- package/dist/commonjs/routing/partitionKeyRangeCache.js.map +7 -1
- package/dist/commonjs/routing/smartRoutingMapProvider.js +130 -110
- package/dist/commonjs/routing/smartRoutingMapProvider.js.map +7 -1
- package/dist/commonjs/session/SessionContext.js +15 -3
- package/dist/commonjs/session/SessionContext.js.map +7 -1
- package/dist/commonjs/session/VectorSessionToken.js +125 -125
- package/dist/commonjs/session/VectorSessionToken.js.map +7 -1
- package/dist/commonjs/session/sessionContainer.js +132 -127
- package/dist/commonjs/session/sessionContainer.js.map +7 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/utils/SasToken.js +100 -120
- package/dist/commonjs/utils/SasToken.js.map +7 -1
- package/dist/commonjs/utils/atob.js +23 -7
- package/dist/commonjs/utils/atob.js.map +7 -1
- package/dist/commonjs/utils/batch.js +195 -197
- package/dist/commonjs/utils/batch.js.map +7 -1
- package/dist/commonjs/utils/cachedClient.js +31 -11
- package/dist/commonjs/utils/cachedClient.js.map +7 -1
- package/dist/commonjs/utils/checkURL.js +33 -14
- package/dist/commonjs/utils/checkURL.js.map +7 -1
- package/dist/commonjs/utils/diagnostics.js +106 -118
- package/dist/commonjs/utils/diagnostics.js.map +7 -1
- package/dist/commonjs/utils/digest.js +30 -10
- package/dist/commonjs/utils/digest.js.map +7 -1
- package/dist/commonjs/utils/encode.js +43 -23
- package/dist/commonjs/utils/encode.js.map +7 -1
- package/dist/commonjs/utils/envUtils.js +39 -10
- package/dist/commonjs/utils/envUtils.js.map +7 -1
- package/dist/commonjs/utils/fixedSizePriorityQueue.js +85 -55
- package/dist/commonjs/utils/fixedSizePriorityQueue.js.map +7 -1
- package/dist/commonjs/utils/globalCrypto.js +28 -10
- package/dist/commonjs/utils/globalCrypto.js.map +7 -1
- package/dist/commonjs/utils/hashObject.js +40 -11
- package/dist/commonjs/utils/hashObject.js.map +7 -1
- package/dist/commonjs/utils/hashing/encoding/number.js +72 -56
- package/dist/commonjs/utils/hashing/encoding/number.js.map +7 -1
- package/dist/commonjs/utils/hashing/encoding/prefix.js +49 -29
- package/dist/commonjs/utils/hashing/encoding/prefix.js.map +7 -1
- package/dist/commonjs/utils/hashing/encoding/string.js +44 -27
- package/dist/commonjs/utils/hashing/encoding/string.js.map +7 -1
- package/dist/commonjs/utils/hashing/hash.d.ts +1 -1
- package/dist/commonjs/utils/hashing/hash.d.ts.map +1 -1
- package/dist/commonjs/utils/hashing/hash.js +54 -43
- package/dist/commonjs/utils/hashing/hash.js.map +7 -1
- package/dist/commonjs/utils/hashing/multiHash.js +28 -11
- package/dist/commonjs/utils/hashing/multiHash.js.map +7 -1
- package/dist/commonjs/utils/hashing/murmurHash.js +361 -412
- package/dist/commonjs/utils/hashing/murmurHash.js.map +7 -1
- package/dist/commonjs/utils/hashing/v1.js +100 -71
- package/dist/commonjs/utils/hashing/v1.js.map +7 -1
- package/dist/commonjs/utils/hashing/v2.js +83 -63
- package/dist/commonjs/utils/hashing/v2.js.map +7 -1
- package/dist/commonjs/utils/headers.js +44 -33
- package/dist/commonjs/utils/headers.js.map +7 -1
- package/dist/commonjs/utils/hmac.js +28 -8
- package/dist/commonjs/utils/hmac.js.map +7 -1
- package/dist/commonjs/utils/nonStreamingOrderByMap.js +63 -52
- package/dist/commonjs/utils/nonStreamingOrderByMap.js.map +7 -1
- package/dist/commonjs/utils/offers.js +35 -13
- package/dist/commonjs/utils/offers.js.map +7 -1
- package/dist/commonjs/utils/patch.js +32 -12
- package/dist/commonjs/utils/patch.js.map +7 -1
- package/dist/commonjs/utils/strings.js +27 -7
- package/dist/commonjs/utils/strings.js.map +7 -1
- package/dist/commonjs/utils/supportedQueryFeaturesBuilder.js +36 -16
- package/dist/commonjs/utils/supportedQueryFeaturesBuilder.js.map +7 -1
- package/dist/commonjs/utils/time.js +38 -30
- package/dist/commonjs/utils/time.js.map +7 -1
- package/dist/commonjs/utils/tracing.js +32 -17
- package/dist/commonjs/utils/tracing.js.map +7 -1
- package/dist/commonjs/utils/typeChecks.js +49 -60
- package/dist/commonjs/utils/typeChecks.js.map +7 -1
- package/dist/commonjs/utils/types.js +15 -5
- package/dist/commonjs/utils/types.js.map +7 -1
- package/dist/commonjs/utils/uint8.js +44 -24
- package/dist/commonjs/utils/uint8.js.map +7 -1
- package/dist/esm/PartitionKeyRangeFailoverInfo.d.ts +1 -1
- package/dist/esm/PartitionKeyRangeFailoverInfo.d.ts.map +1 -1
- package/dist/esm/PartitionKeyRangeFailoverInfo.js +0 -2
- package/dist/esm/PartitionKeyRangeFailoverInfo.js.map +1 -1
- package/dist/esm/bulk/index.d.ts +1 -1
- package/dist/esm/bulk/index.d.ts.map +1 -1
- package/dist/esm/bulk/index.js.map +1 -1
- package/dist/esm/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts +2 -2
- package/dist/esm/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist/esm/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +1 -1
- package/dist/esm/client/ChangeFeed/buildChangeFeedIterator.js.map +1 -1
- package/dist/esm/client/ChangeFeed/changeFeedUtils.d.ts +4 -4
- package/dist/esm/client/ChangeFeed/changeFeedUtils.d.ts.map +1 -1
- package/dist/esm/client/ChangeFeed/changeFeedUtils.js.map +1 -1
- package/dist/esm/client/ChangeFeed/index.d.ts +2 -2
- package/dist/esm/client/ChangeFeed/index.d.ts.map +1 -1
- package/dist/esm/client/ChangeFeed/index.js.map +1 -1
- package/dist/esm/client/ClientUtils.d.ts +1 -1
- package/dist/esm/client/ClientUtils.d.ts.map +1 -1
- package/dist/esm/client/ClientUtils.js.map +1 -1
- package/dist/esm/client/Conflict/index.d.ts +2 -2
- package/dist/esm/client/Conflict/index.d.ts.map +1 -1
- package/dist/esm/client/Conflict/index.js.map +1 -1
- package/dist/esm/client/Container/ContainerDefinition.d.ts +1 -1
- package/dist/esm/client/Container/ContainerDefinition.d.ts.map +1 -1
- package/dist/esm/client/Container/ContainerDefinition.js.map +1 -1
- package/dist/esm/client/Container/index.d.ts +4 -4
- package/dist/esm/client/Container/index.d.ts.map +1 -1
- package/dist/esm/client/Container/index.js.map +1 -1
- package/dist/esm/client/Database/index.d.ts +2 -2
- package/dist/esm/client/Database/index.d.ts.map +1 -1
- package/dist/esm/client/Database/index.js.map +1 -1
- package/dist/esm/client/Item/Items.d.ts.map +1 -1
- package/dist/esm/client/Item/Items.js.map +1 -1
- package/dist/esm/client/Item/index.d.ts +1 -1
- package/dist/esm/client/Item/index.d.ts.map +1 -1
- package/dist/esm/client/Item/index.js.map +1 -1
- package/dist/esm/client/Offer/index.d.ts +1 -1
- package/dist/esm/client/Offer/index.d.ts.map +1 -1
- package/dist/esm/client/Offer/index.js.map +1 -1
- package/dist/esm/client/Permission/index.d.ts +2 -2
- package/dist/esm/client/Permission/index.d.ts.map +1 -1
- package/dist/esm/client/Permission/index.js.map +1 -1
- package/dist/esm/client/StoredProcedure/index.d.ts +1 -1
- package/dist/esm/client/StoredProcedure/index.d.ts.map +1 -1
- package/dist/esm/client/StoredProcedure/index.js.map +1 -1
- package/dist/esm/client/Trigger/index.d.ts +1 -1
- package/dist/esm/client/Trigger/index.d.ts.map +1 -1
- package/dist/esm/client/Trigger/index.js.map +1 -1
- package/dist/esm/client/User/index.d.ts +1 -1
- package/dist/esm/client/User/index.d.ts.map +1 -1
- package/dist/esm/client/User/index.js.map +1 -1
- package/dist/esm/client/UserDefinedFunction/index.d.ts +1 -1
- package/dist/esm/client/UserDefinedFunction/index.d.ts.map +1 -1
- package/dist/esm/client/UserDefinedFunction/index.js.map +1 -1
- package/dist/esm/client/index.d.ts +1 -1
- package/dist/esm/client/index.d.ts.map +1 -1
- package/dist/esm/client/index.js +0 -1
- package/dist/esm/client/index.js.map +1 -1
- package/dist/esm/common/constants.js +1 -1
- package/dist/esm/common/constants.js.map +1 -1
- package/dist/esm/common/helper.d.ts +4 -4
- package/dist/esm/common/helper.d.ts.map +1 -1
- package/dist/esm/common/helper.js.map +1 -1
- package/dist/esm/common/platform.d.ts +1 -1
- package/dist/esm/common/platform.d.ts.map +1 -1
- package/dist/esm/common/platform.js.map +1 -1
- package/dist/esm/diagnostics/DiagnosticNodeInternal.d.ts +1 -1
- package/dist/esm/diagnostics/DiagnosticNodeInternal.d.ts.map +1 -1
- package/dist/esm/diagnostics/DiagnosticNodeInternal.js.map +1 -1
- package/dist/esm/documents/index.d.ts +4 -4
- package/dist/esm/documents/index.d.ts.map +1 -1
- package/dist/esm/documents/index.js +0 -4
- package/dist/esm/documents/index.js.map +1 -1
- package/dist/esm/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts +1 -1
- package/dist/esm/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts.map +1 -1
- package/dist/esm/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js.map +1 -1
- package/dist/esm/encryption/ClientEncryptionIncludedPath.d.ts +1 -1
- package/dist/esm/encryption/ClientEncryptionIncludedPath.d.ts.map +1 -1
- package/dist/esm/encryption/ClientEncryptionIncludedPath.js.map +1 -1
- package/dist/esm/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts +4 -4
- package/dist/esm/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts.map +1 -1
- package/dist/esm/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.js.map +1 -1
- package/dist/esm/encryption/ClientEncryptionKey/index.d.ts +2 -2
- package/dist/esm/encryption/ClientEncryptionKey/index.d.ts.map +1 -1
- package/dist/esm/encryption/ClientEncryptionKey/index.js.map +1 -1
- package/dist/esm/encryption/EncryptionKeyResolver/index.d.ts +1 -1
- package/dist/esm/encryption/EncryptionKeyResolver/index.d.ts.map +1 -1
- package/dist/esm/encryption/EncryptionKeyResolver/index.js.map +1 -1
- package/dist/esm/encryption/EncryptionQueryBuilder.d.ts +2 -2
- package/dist/esm/encryption/EncryptionQueryBuilder.d.ts.map +1 -1
- package/dist/esm/encryption/EncryptionQueryBuilder.js.map +1 -1
- package/dist/esm/encryption/Serializers/BooleanSerializer.d.ts +1 -1
- package/dist/esm/encryption/Serializers/BooleanSerializer.d.ts.map +1 -1
- package/dist/esm/encryption/Serializers/BooleanSerializer.js.map +1 -1
- package/dist/esm/encryption/Serializers/FloatSerializer.d.ts +1 -1
- package/dist/esm/encryption/Serializers/FloatSerializer.d.ts.map +1 -1
- package/dist/esm/encryption/Serializers/FloatSerializer.js.map +1 -1
- package/dist/esm/encryption/Serializers/StringSerializer.d.ts +1 -1
- package/dist/esm/encryption/Serializers/StringSerializer.d.ts.map +1 -1
- package/dist/esm/encryption/Serializers/StringSerializer.js.map +1 -1
- package/dist/esm/encryption/Serializers/index.d.ts +1 -1
- package/dist/esm/encryption/Serializers/index.d.ts.map +1 -1
- package/dist/esm/encryption/Serializers/index.js.map +1 -1
- package/dist/esm/encryption/index.d.ts +5 -5
- package/dist/esm/encryption/index.d.ts.map +1 -1
- package/dist/esm/encryption/index.js.map +1 -1
- package/dist/esm/globalPartitionEndpointManager.d.ts +2 -1
- package/dist/esm/globalPartitionEndpointManager.d.ts.map +1 -1
- package/dist/esm/globalPartitionEndpointManager.js.map +1 -1
- package/dist/esm/index.d.ts +16 -16
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/queryExecutionContext/Aggregators/index.d.ts +1 -1
- package/dist/esm/queryExecutionContext/Aggregators/index.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/Aggregators/index.js.map +1 -1
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +26 -18
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -1
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +48 -25
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -1
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +17 -26
- package/dist/esm/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -1
- package/dist/esm/queryExecutionContext/PartitionRangeManager.d.ts +8 -7
- package/dist/esm/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/PartitionRangeManager.js +13 -12
- package/dist/esm/queryExecutionContext/PartitionRangeManager.js.map +1 -1
- package/dist/esm/queryExecutionContext/index.d.ts +2 -2
- package/dist/esm/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/index.js +0 -2
- package/dist/esm/queryExecutionContext/index.js.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +0 -4
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +2 -10
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -1
- package/dist/esm/request/hybridSearchQueryResult.d.ts +1 -1
- package/dist/esm/request/hybridSearchQueryResult.d.ts.map +1 -1
- package/dist/esm/request/hybridSearchQueryResult.js.map +1 -1
- package/dist/esm/request/index.d.ts +8 -8
- package/dist/esm/request/index.d.ts.map +1 -1
- package/dist/esm/request/index.js +0 -1
- package/dist/esm/request/index.js.map +1 -1
- package/dist/esm/retry/endpointDiscoveryRetryPolicy.d.ts +1 -1
- package/dist/esm/retry/endpointDiscoveryRetryPolicy.d.ts.map +1 -1
- package/dist/esm/retry/endpointDiscoveryRetryPolicy.js.map +1 -1
- package/dist/esm/retry/index.d.ts +1 -1
- package/dist/esm/retry/index.d.ts.map +1 -1
- package/dist/esm/retry/index.js +0 -3
- package/dist/esm/retry/index.js.map +1 -1
- package/dist/esm/retry/timeoutFailoverRetryPolicy.d.ts +1 -1
- package/dist/esm/retry/timeoutFailoverRetryPolicy.d.ts.map +1 -1
- package/dist/esm/retry/timeoutFailoverRetryPolicy.js.map +1 -1
- package/dist/esm/utils/hashing/hash.d.ts +1 -1
- package/dist/esm/utils/hashing/hash.d.ts.map +1 -1
- package/dist/esm/utils/hashing/hash.js.map +1 -1
- package/dist/react-native/PartitionKeyRangeFailoverInfo.d.ts +1 -1
- package/dist/react-native/PartitionKeyRangeFailoverInfo.d.ts.map +1 -1
- package/dist/react-native/PartitionKeyRangeFailoverInfo.js +0 -2
- package/dist/react-native/PartitionKeyRangeFailoverInfo.js.map +1 -1
- package/dist/react-native/bulk/index.d.ts +1 -1
- package/dist/react-native/bulk/index.d.ts.map +1 -1
- package/dist/react-native/bulk/index.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts +2 -2
- package/dist/react-native/client/ChangeFeed/ChangeFeedForPartitionKey.d.ts.map +1 -1
- package/dist/react-native/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/buildChangeFeedIterator.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/changeFeedUtils.d.ts +4 -4
- package/dist/react-native/client/ChangeFeed/changeFeedUtils.d.ts.map +1 -1
- package/dist/react-native/client/ChangeFeed/changeFeedUtils.js.map +1 -1
- package/dist/react-native/client/ChangeFeed/index.d.ts +2 -2
- package/dist/react-native/client/ChangeFeed/index.d.ts.map +1 -1
- package/dist/react-native/client/ChangeFeed/index.js.map +1 -1
- package/dist/react-native/client/ClientUtils.d.ts +1 -1
- package/dist/react-native/client/ClientUtils.d.ts.map +1 -1
- package/dist/react-native/client/ClientUtils.js.map +1 -1
- package/dist/react-native/client/Conflict/index.d.ts +2 -2
- package/dist/react-native/client/Conflict/index.d.ts.map +1 -1
- package/dist/react-native/client/Conflict/index.js.map +1 -1
- package/dist/react-native/client/Container/ContainerDefinition.d.ts +1 -1
- package/dist/react-native/client/Container/ContainerDefinition.d.ts.map +1 -1
- package/dist/react-native/client/Container/ContainerDefinition.js.map +1 -1
- package/dist/react-native/client/Container/index.d.ts +4 -4
- package/dist/react-native/client/Container/index.d.ts.map +1 -1
- package/dist/react-native/client/Container/index.js.map +1 -1
- package/dist/react-native/client/Database/index.d.ts +2 -2
- package/dist/react-native/client/Database/index.d.ts.map +1 -1
- package/dist/react-native/client/Database/index.js.map +1 -1
- package/dist/react-native/client/Item/Items.d.ts.map +1 -1
- package/dist/react-native/client/Item/Items.js.map +1 -1
- package/dist/react-native/client/Item/index.d.ts +1 -1
- package/dist/react-native/client/Item/index.d.ts.map +1 -1
- package/dist/react-native/client/Item/index.js.map +1 -1
- package/dist/react-native/client/Offer/index.d.ts +1 -1
- package/dist/react-native/client/Offer/index.d.ts.map +1 -1
- package/dist/react-native/client/Offer/index.js.map +1 -1
- package/dist/react-native/client/Permission/index.d.ts +2 -2
- package/dist/react-native/client/Permission/index.d.ts.map +1 -1
- package/dist/react-native/client/Permission/index.js.map +1 -1
- package/dist/react-native/client/StoredProcedure/index.d.ts +1 -1
- package/dist/react-native/client/StoredProcedure/index.d.ts.map +1 -1
- package/dist/react-native/client/StoredProcedure/index.js.map +1 -1
- package/dist/react-native/client/Trigger/index.d.ts +1 -1
- package/dist/react-native/client/Trigger/index.d.ts.map +1 -1
- package/dist/react-native/client/Trigger/index.js.map +1 -1
- package/dist/react-native/client/User/index.d.ts +1 -1
- package/dist/react-native/client/User/index.d.ts.map +1 -1
- package/dist/react-native/client/User/index.js.map +1 -1
- package/dist/react-native/client/UserDefinedFunction/index.d.ts +1 -1
- package/dist/react-native/client/UserDefinedFunction/index.d.ts.map +1 -1
- package/dist/react-native/client/UserDefinedFunction/index.js.map +1 -1
- package/dist/react-native/client/index.d.ts +1 -1
- package/dist/react-native/client/index.d.ts.map +1 -1
- package/dist/react-native/client/index.js +0 -1
- package/dist/react-native/client/index.js.map +1 -1
- package/dist/react-native/common/constants.js +1 -1
- package/dist/react-native/common/constants.js.map +1 -1
- package/dist/react-native/common/helper.d.ts +4 -4
- package/dist/react-native/common/helper.d.ts.map +1 -1
- package/dist/react-native/common/helper.js.map +1 -1
- package/dist/react-native/common/platform.d.ts +1 -1
- package/dist/react-native/common/platform.d.ts.map +1 -1
- package/dist/react-native/common/platform.js.map +1 -1
- package/dist/react-native/diagnostics/DiagnosticNodeInternal.d.ts +1 -1
- package/dist/react-native/diagnostics/DiagnosticNodeInternal.d.ts.map +1 -1
- package/dist/react-native/diagnostics/DiagnosticNodeInternal.js.map +1 -1
- package/dist/react-native/documents/index.d.ts +4 -4
- package/dist/react-native/documents/index.d.ts.map +1 -1
- package/dist/react-native/documents/index.js +0 -4
- package/dist/react-native/documents/index.js.map +1 -1
- package/dist/react-native/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts +1 -1
- package/dist/react-native/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.d.ts.map +1 -1
- package/dist/react-native/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js.map +1 -1
- package/dist/react-native/encryption/ClientEncryptionIncludedPath.d.ts +1 -1
- package/dist/react-native/encryption/ClientEncryptionIncludedPath.d.ts.map +1 -1
- package/dist/react-native/encryption/ClientEncryptionIncludedPath.js.map +1 -1
- package/dist/react-native/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts +4 -4
- package/dist/react-native/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts.map +1 -1
- package/dist/react-native/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.js.map +1 -1
- package/dist/react-native/encryption/ClientEncryptionKey/index.d.ts +2 -2
- package/dist/react-native/encryption/ClientEncryptionKey/index.d.ts.map +1 -1
- package/dist/react-native/encryption/ClientEncryptionKey/index.js.map +1 -1
- package/dist/react-native/encryption/EncryptionKeyResolver/index.d.ts +1 -1
- package/dist/react-native/encryption/EncryptionKeyResolver/index.d.ts.map +1 -1
- package/dist/react-native/encryption/EncryptionKeyResolver/index.js.map +1 -1
- package/dist/react-native/encryption/EncryptionQueryBuilder.d.ts +2 -2
- package/dist/react-native/encryption/EncryptionQueryBuilder.d.ts.map +1 -1
- package/dist/react-native/encryption/EncryptionQueryBuilder.js.map +1 -1
- package/dist/react-native/encryption/Serializers/BooleanSerializer.d.ts +1 -1
- package/dist/react-native/encryption/Serializers/BooleanSerializer.d.ts.map +1 -1
- package/dist/react-native/encryption/Serializers/BooleanSerializer.js.map +1 -1
- package/dist/react-native/encryption/Serializers/FloatSerializer.d.ts +1 -1
- package/dist/react-native/encryption/Serializers/FloatSerializer.d.ts.map +1 -1
- package/dist/react-native/encryption/Serializers/FloatSerializer.js.map +1 -1
- package/dist/react-native/encryption/Serializers/StringSerializer.d.ts +1 -1
- package/dist/react-native/encryption/Serializers/StringSerializer.d.ts.map +1 -1
- package/dist/react-native/encryption/Serializers/StringSerializer.js.map +1 -1
- package/dist/react-native/encryption/Serializers/index.d.ts +1 -1
- package/dist/react-native/encryption/Serializers/index.d.ts.map +1 -1
- package/dist/react-native/encryption/Serializers/index.js.map +1 -1
- package/dist/react-native/encryption/index.d.ts +5 -5
- package/dist/react-native/encryption/index.d.ts.map +1 -1
- package/dist/react-native/encryption/index.js.map +1 -1
- package/dist/react-native/globalPartitionEndpointManager.d.ts +2 -1
- package/dist/react-native/globalPartitionEndpointManager.d.ts.map +1 -1
- package/dist/react-native/globalPartitionEndpointManager.js.map +1 -1
- package/dist/react-native/index.d.ts +16 -16
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/queryExecutionContext/Aggregators/index.d.ts +1 -1
- package/dist/react-native/queryExecutionContext/Aggregators/index.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/Aggregators/index.js.map +1 -1
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +26 -18
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +1 -1
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +48 -25
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +1 -1
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +17 -26
- package/dist/react-native/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +1 -1
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.d.ts +8 -7
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.js +13 -12
- package/dist/react-native/queryExecutionContext/PartitionRangeManager.js.map +1 -1
- package/dist/react-native/queryExecutionContext/index.d.ts +2 -2
- package/dist/react-native/queryExecutionContext/index.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/index.js +0 -2
- package/dist/react-native/queryExecutionContext/index.js.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.d.ts +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/parallelQueryExecutionContextBase.js.map +1 -1
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts +0 -4
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js +2 -10
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +1 -1
- package/dist/react-native/request/hybridSearchQueryResult.d.ts +1 -1
- package/dist/react-native/request/hybridSearchQueryResult.d.ts.map +1 -1
- package/dist/react-native/request/hybridSearchQueryResult.js.map +1 -1
- package/dist/react-native/request/index.d.ts +8 -8
- package/dist/react-native/request/index.d.ts.map +1 -1
- package/dist/react-native/request/index.js +0 -1
- package/dist/react-native/request/index.js.map +1 -1
- package/dist/react-native/retry/endpointDiscoveryRetryPolicy.d.ts +1 -1
- package/dist/react-native/retry/endpointDiscoveryRetryPolicy.d.ts.map +1 -1
- package/dist/react-native/retry/endpointDiscoveryRetryPolicy.js.map +1 -1
- package/dist/react-native/retry/index.d.ts +1 -1
- package/dist/react-native/retry/index.d.ts.map +1 -1
- package/dist/react-native/retry/index.js +0 -3
- package/dist/react-native/retry/index.js.map +1 -1
- package/dist/react-native/retry/timeoutFailoverRetryPolicy.d.ts +1 -1
- package/dist/react-native/retry/timeoutFailoverRetryPolicy.d.ts.map +1 -1
- package/dist/react-native/retry/timeoutFailoverRetryPolicy.js.map +1 -1
- package/dist/react-native/utils/globalCrypto.d.ts +1 -1
- package/dist/react-native/utils/globalCrypto.d.ts.map +1 -0
- package/dist/react-native/utils/globalCrypto.js +1 -1
- package/dist/react-native/utils/globalCrypto.js.map +1 -0
- package/dist/react-native/utils/hashing/hash.d.ts +1 -1
- package/dist/react-native/utils/hashing/hash.d.ts.map +1 -1
- package/dist/react-native/utils/hashing/hash.js.map +1 -1
- package/package.json +3 -20
- package/dist/browser/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm-browser.d.mts.map +0 -1
- package/dist/browser/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm-browser.mjs.map +0 -1
- package/dist/browser/encryption/Cache/ProtectedDataEncryptionKeyCache-browser.d.mts.map +0 -1
- package/dist/browser/encryption/Cache/ProtectedDataEncryptionKeyCache-browser.mjs.map +0 -1
- package/dist/browser/encryption/EncryptionKey/DataEncryptionKey-browser.d.mts.map +0 -1
- package/dist/browser/encryption/EncryptionKey/DataEncryptionKey-browser.mjs.map +0 -1
- package/dist/browser/request/defaultAgent-browser.d.mts.map +0 -1
- package/dist/browser/request/defaultAgent-browser.mjs.map +0 -1
- package/dist/browser/utils/atob-browser.d.mts.map +0 -1
- package/dist/browser/utils/atob-browser.mjs.map +0 -1
- package/dist/browser/utils/digest-browser.d.mts.map +0 -1
- package/dist/browser/utils/digest-browser.mjs.map +0 -1
- package/dist/browser/utils/envUtils-browser.d.mts.map +0 -1
- package/dist/browser/utils/envUtils-browser.mjs.map +0 -1
- package/dist/browser/utils/hmac-browser.d.mts.map +0 -1
- package/dist/browser/utils/hmac-browser.mjs.map +0 -1
- package/dist/react-native/utils/globalCrypto-react-native.d.mts.map +0 -1
- package/dist/react-native/utils/globalCrypto-react-native.mjs.map +0 -1
|
@@ -1,461 +1,541 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var Database_exports = {};
|
|
19
|
+
__export(Database_exports, {
|
|
20
|
+
Database: () => Database
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(Database_exports);
|
|
23
|
+
var import_common = require("../../common/index.js");
|
|
24
|
+
var import_request = require("../../request/index.js");
|
|
25
|
+
var import_Container = require("../Container/index.js");
|
|
26
|
+
var import_User = require("../User/index.js");
|
|
27
|
+
var import_DatabaseResponse = require("./DatabaseResponse.js");
|
|
28
|
+
var import_Offer = require("../Offer/index.js");
|
|
29
|
+
var import_diagnostics = require("../../utils/diagnostics.js");
|
|
30
|
+
var import_CosmosDiagnostics = require("../../CosmosDiagnostics.js");
|
|
31
|
+
var import_encryption = require("../../encryption/index.js");
|
|
23
32
|
class Database {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
33
|
+
/** Returns a new {@link Database} instance.
|
|
34
|
+
*
|
|
35
|
+
* Note: the intention is to get this object from {@link CosmosClient} via `client.database(id)`, not to instantiate it yourself.
|
|
36
|
+
* @hidden
|
|
37
|
+
*/
|
|
38
|
+
constructor(client, id, clientContext, encryptionManager, _rid) {
|
|
39
|
+
this.client = client;
|
|
40
|
+
this.id = id;
|
|
41
|
+
this.clientContext = clientContext;
|
|
42
|
+
this.encryptionManager = encryptionManager;
|
|
43
|
+
this.containers = new import_Container.Containers(this, this.clientContext, this.encryptionManager);
|
|
44
|
+
this.users = new import_User.Users(this, this.clientContext);
|
|
45
|
+
this._rid = _rid;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Used for creating new containers, or querying/reading all containers.
|
|
49
|
+
*
|
|
50
|
+
* Use `.database(id)` to read, replace, or delete a specific, existing {@link Database} by id.
|
|
51
|
+
*
|
|
52
|
+
* @example Create a new container
|
|
53
|
+
* ```ts snippet:DatabaseCreateContainer
|
|
54
|
+
* import { CosmosClient } from "@azure/cosmos";
|
|
55
|
+
*
|
|
56
|
+
* const endpoint = "https://your-account.documents.azure.com";
|
|
57
|
+
* const key = "<database account masterkey>";
|
|
58
|
+
* const client = new CosmosClient({ endpoint, key });
|
|
59
|
+
*
|
|
60
|
+
* const { body: containerDefinition, container } = await client
|
|
61
|
+
* .database("<db id>")
|
|
62
|
+
* .containers.create({ id: "<container id>" });
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
containers;
|
|
66
|
+
/**
|
|
67
|
+
* Used for creating new users, or querying/reading all users.
|
|
68
|
+
*
|
|
69
|
+
* Use `.user(id)` to read, replace, or delete a specific, existing {@link User} by id.
|
|
70
|
+
*/
|
|
71
|
+
users;
|
|
72
|
+
/**
|
|
73
|
+
* Returns a reference URL to the resource. Used for linking in Permissions.
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts snippet:DatabaseGetUrl
|
|
76
|
+
* import { CosmosClient } from "@azure/cosmos";
|
|
77
|
+
*
|
|
78
|
+
* const endpoint = "https://your-account.documents.azure.com";
|
|
79
|
+
* const key = "<database account masterkey>";
|
|
80
|
+
* const client = new CosmosClient({ endpoint, key });
|
|
81
|
+
*
|
|
82
|
+
* const { database } = await client.databases.createIfNotExists({ id: "Test Database" });
|
|
83
|
+
*
|
|
84
|
+
* const url = database.url;
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
get url() {
|
|
88
|
+
return (0, import_common.createDatabaseUri)(this.id);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
_rid;
|
|
94
|
+
/**
|
|
95
|
+
* Used to read, replace, or delete a specific, existing {@link Database} by id.
|
|
96
|
+
*
|
|
97
|
+
* Use `.containers` creating new containers, or querying/reading all containers.
|
|
98
|
+
*
|
|
99
|
+
* @example Delete a container
|
|
100
|
+
* ```ts snippet:DatabaseDeleteContainer
|
|
101
|
+
* import { CosmosClient } from "@azure/cosmos";
|
|
102
|
+
*
|
|
103
|
+
* const endpoint = "https://your-account.documents.azure.com";
|
|
104
|
+
* const key = "<database account masterkey>";
|
|
105
|
+
* const client = new CosmosClient({ endpoint, key });
|
|
106
|
+
*
|
|
107
|
+
* await client.database("<db id>").container("<container id>").delete();
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
container(id) {
|
|
111
|
+
return new import_Container.Container(this, id, this.clientContext, this.encryptionManager);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Used to read, replace, or delete a specific, existing {@link User} by id.
|
|
115
|
+
*
|
|
116
|
+
* Use `.users` for creating new users, or querying/reading all users.
|
|
117
|
+
* @example Delete a user
|
|
118
|
+
* ```ts snippet:DatabaseDeleteUser
|
|
119
|
+
* import { CosmosClient } from "@azure/cosmos";
|
|
120
|
+
*
|
|
121
|
+
* const endpoint = "https://your-account.documents.azure.com";
|
|
122
|
+
* const key = "<database account masterkey>";
|
|
123
|
+
* const client = new CosmosClient({ endpoint, key });
|
|
124
|
+
* await client.database("<db id>").user("<user id>").delete();
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
user(id) {
|
|
128
|
+
return new import_User.User(this, id, this.clientContext);
|
|
129
|
+
}
|
|
130
|
+
/** Read the definition of the given Database.
|
|
131
|
+
* @example
|
|
132
|
+
* ```ts snippet:DatabaseRead
|
|
133
|
+
* import { CosmosClient } from "@azure/cosmos";
|
|
134
|
+
*
|
|
135
|
+
* const endpoint = "https://your-account.documents.azure.com";
|
|
136
|
+
* const key = "<database account masterkey>";
|
|
137
|
+
* const client = new CosmosClient({ endpoint, key });
|
|
138
|
+
*
|
|
139
|
+
* const { resource: database } = await client.database("<db id>").read();
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
async read(options) {
|
|
143
|
+
return (0, import_diagnostics.withDiagnostics)(async (diagnosticNode) => {
|
|
144
|
+
return this.readInternal(diagnosticNode, options);
|
|
145
|
+
}, this.clientContext);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* @hidden
|
|
149
|
+
*/
|
|
150
|
+
async readInternal(diagnosticNode, options) {
|
|
151
|
+
const path = (0, import_common.getPathFromLink)(this.url);
|
|
152
|
+
const id = (0, import_common.getIdFromLink)(this.url);
|
|
153
|
+
const response = await this.clientContext.read({
|
|
154
|
+
path,
|
|
155
|
+
resourceType: import_common.ResourceType.database,
|
|
156
|
+
resourceId: id,
|
|
157
|
+
options,
|
|
158
|
+
diagnosticNode
|
|
159
|
+
});
|
|
160
|
+
return new import_DatabaseResponse.DatabaseResponse(
|
|
161
|
+
response.result,
|
|
162
|
+
response.headers,
|
|
163
|
+
response.code,
|
|
164
|
+
this,
|
|
165
|
+
(0, import_diagnostics.getEmptyCosmosDiagnostics)()
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
/** Delete the given Database.
|
|
169
|
+
* @example
|
|
170
|
+
* ```ts snippet:CosmosClientDatabaseDelete
|
|
171
|
+
* import { CosmosClient } from "@azure/cosmos";
|
|
172
|
+
*
|
|
173
|
+
* const endpoint = "https://your-account.documents.azure.com";
|
|
174
|
+
* const key = "<database account masterkey>";
|
|
175
|
+
* const client = new CosmosClient({ endpoint, key });
|
|
176
|
+
* await client.database("<id here>").delete();
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
async delete(options) {
|
|
180
|
+
return (0, import_diagnostics.withDiagnostics)(async (diagnosticNode) => {
|
|
181
|
+
const path = (0, import_common.getPathFromLink)(this.url);
|
|
182
|
+
const id = (0, import_common.getIdFromLink)(this.url);
|
|
183
|
+
const response = await this.clientContext.delete({
|
|
184
|
+
path,
|
|
185
|
+
resourceType: import_common.ResourceType.database,
|
|
186
|
+
resourceId: id,
|
|
187
|
+
options,
|
|
188
|
+
diagnosticNode
|
|
189
|
+
});
|
|
190
|
+
return new import_DatabaseResponse.DatabaseResponse(
|
|
191
|
+
response.result,
|
|
192
|
+
response.headers,
|
|
193
|
+
response.code,
|
|
194
|
+
this,
|
|
195
|
+
(0, import_diagnostics.getEmptyCosmosDiagnostics)()
|
|
196
|
+
);
|
|
197
|
+
}, this.clientContext);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Gets offer on database. If none exists, returns an OfferResponse with undefined.
|
|
201
|
+
* @example Read the offer on the database
|
|
202
|
+
* ```ts snippet:DatabaseReadOffer
|
|
203
|
+
* import { CosmosClient } from "@azure/cosmos";
|
|
204
|
+
*
|
|
205
|
+
* const endpoint = "https://your-account.documents.azure.com";
|
|
206
|
+
* const key = "<database account masterkey>";
|
|
207
|
+
* const client = new CosmosClient({ endpoint, key });
|
|
208
|
+
*
|
|
209
|
+
* const { resource: offer } = await client.database("<db id>").readOffer();
|
|
210
|
+
* ```
|
|
211
|
+
*/
|
|
212
|
+
async readOffer(options = {}) {
|
|
213
|
+
return (0, import_diagnostics.withDiagnostics)(async (diagnosticNode) => {
|
|
214
|
+
const { resource: record } = await (0, import_diagnostics.withMetadataDiagnostics)(
|
|
215
|
+
async (node) => {
|
|
216
|
+
return this.readInternal(node);
|
|
217
|
+
},
|
|
218
|
+
diagnosticNode,
|
|
219
|
+
import_CosmosDiagnostics.MetadataLookUpType.DatabaseLookUp
|
|
220
|
+
);
|
|
221
|
+
const path = "/offers";
|
|
222
|
+
const url = record._self;
|
|
223
|
+
const response = await this.clientContext.queryFeed({
|
|
224
|
+
path,
|
|
225
|
+
resourceId: "",
|
|
226
|
+
resourceType: import_common.ResourceType.offer,
|
|
227
|
+
query: `SELECT * from root where root.resource = "${url}"`,
|
|
228
|
+
resultFn: (result) => result.Offers,
|
|
229
|
+
options,
|
|
230
|
+
diagnosticNode
|
|
231
|
+
});
|
|
232
|
+
const offer = response.result[0] ? new import_Offer.Offer(this.client, response.result[0].id, this.clientContext) : void 0;
|
|
233
|
+
return new import_Offer.OfferResponse(
|
|
234
|
+
response.result[0],
|
|
235
|
+
response.headers,
|
|
236
|
+
response.code,
|
|
237
|
+
(0, import_diagnostics.getEmptyCosmosDiagnostics)(),
|
|
238
|
+
offer
|
|
239
|
+
);
|
|
240
|
+
}, this.clientContext);
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Create Encryption key for database account
|
|
244
|
+
* @example
|
|
245
|
+
* ```ts snippet:DatabaseCreateClientEncryptionKey
|
|
246
|
+
* import { ClientSecretCredential } from "@azure/identity";
|
|
247
|
+
* import {
|
|
248
|
+
* AzureKeyVaultEncryptionKeyResolver,
|
|
249
|
+
* CosmosClient,
|
|
250
|
+
* EncryptionKeyWrapMetadata,
|
|
251
|
+
* EncryptionKeyResolverName,
|
|
252
|
+
* KeyEncryptionAlgorithm,
|
|
253
|
+
* EncryptionAlgorithm,
|
|
254
|
+
* } from "@azure/cosmos";
|
|
255
|
+
*
|
|
256
|
+
* const endpoint = "https://your-account.documents.azure.com";
|
|
257
|
+
* const key = "<database account masterkey>";
|
|
258
|
+
* const credentials = new ClientSecretCredential("<tenant-id>", "<client-id>", "<app-secret>");
|
|
259
|
+
* const keyResolver = new AzureKeyVaultEncryptionKeyResolver(credentials);
|
|
260
|
+
* const client = new CosmosClient({
|
|
261
|
+
* endpoint,
|
|
262
|
+
* key,
|
|
263
|
+
* clientEncryptionOptions: {
|
|
264
|
+
* keyEncryptionKeyResolver: keyResolver,
|
|
265
|
+
* },
|
|
266
|
+
* });
|
|
267
|
+
* const { database } = await client.databases.createIfNotExists({ id: "<db id>" });
|
|
268
|
+
* const metadata: EncryptionKeyWrapMetadata = {
|
|
269
|
+
* type: EncryptionKeyResolverName.AzureKeyVault,
|
|
270
|
+
* name: "<key-name>",
|
|
271
|
+
* value: "<key-vault-url>",
|
|
272
|
+
* algorithm: KeyEncryptionAlgorithm.RSA_OAEP,
|
|
273
|
+
* };
|
|
274
|
+
*
|
|
275
|
+
* await database.createClientEncryptionKey(
|
|
276
|
+
* "<cek-id>",
|
|
277
|
+
* EncryptionAlgorithm.AEAD_AES_256_CBC_HMAC_SHA256,
|
|
278
|
+
* metadata,
|
|
279
|
+
* );
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
async createClientEncryptionKey(clientEncryptionKeyId, encryptionAlgorithm, keyWrapMetadata) {
|
|
283
|
+
if (clientEncryptionKeyId == null || !clientEncryptionKeyId.trim()) {
|
|
284
|
+
throw new Error("encryption key id cannot be null or empty");
|
|
70
285
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
*/
|
|
74
|
-
_rid;
|
|
75
|
-
/** Returns a new {@link Database} instance.
|
|
76
|
-
*
|
|
77
|
-
* Note: the intention is to get this object from {@link CosmosClient} via `client.database(id)`, not to instantiate it yourself.
|
|
78
|
-
* @hidden
|
|
79
|
-
*/
|
|
80
|
-
constructor(client, id, clientContext, encryptionManager, _rid) {
|
|
81
|
-
this.client = client;
|
|
82
|
-
this.id = id;
|
|
83
|
-
this.clientContext = clientContext;
|
|
84
|
-
this.encryptionManager = encryptionManager;
|
|
85
|
-
this.containers = new index_js_3.Containers(this, this.clientContext, this.encryptionManager);
|
|
86
|
-
this.users = new index_js_4.Users(this, this.clientContext);
|
|
87
|
-
this._rid = _rid;
|
|
286
|
+
if (encryptionAlgorithm !== import_encryption.EncryptionAlgorithm.AEAD_AES_256_CBC_HMAC_SHA256) {
|
|
287
|
+
throw new Error(`Invalid encryption algorithm '${encryptionAlgorithm}' passed.`);
|
|
88
288
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
-
* Use `.containers` creating new containers, or querying/reading all containers.
|
|
93
|
-
*
|
|
94
|
-
* @example Delete a container
|
|
95
|
-
* ```ts snippet:DatabaseDeleteContainer
|
|
96
|
-
* import { CosmosClient } from "@azure/cosmos";
|
|
97
|
-
*
|
|
98
|
-
* const endpoint = "https://your-account.documents.azure.com";
|
|
99
|
-
* const key = "<database account masterkey>";
|
|
100
|
-
* const client = new CosmosClient({ endpoint, key });
|
|
101
|
-
*
|
|
102
|
-
* await client.database("<db id>").container("<container id>").delete();
|
|
103
|
-
* ```
|
|
104
|
-
*/
|
|
105
|
-
container(id) {
|
|
106
|
-
return new index_js_3.Container(this, id, this.clientContext, this.encryptionManager);
|
|
289
|
+
if (!keyWrapMetadata) {
|
|
290
|
+
throw new Error("encryptionKeyWrapMetadata cannot be null.");
|
|
107
291
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
*
|
|
111
|
-
* Use `.users` for creating new users, or querying/reading all users.
|
|
112
|
-
* @example Delete a user
|
|
113
|
-
* ```ts snippet:DatabaseDeleteUser
|
|
114
|
-
* import { CosmosClient } from "@azure/cosmos";
|
|
115
|
-
*
|
|
116
|
-
* const endpoint = "https://your-account.documents.azure.com";
|
|
117
|
-
* const key = "<database account masterkey>";
|
|
118
|
-
* const client = new CosmosClient({ endpoint, key });
|
|
119
|
-
* await client.database("<db id>").user("<user id>").delete();
|
|
120
|
-
* ```
|
|
121
|
-
*/
|
|
122
|
-
user(id) {
|
|
123
|
-
return new index_js_4.User(this, id, this.clientContext);
|
|
292
|
+
if (keyWrapMetadata.algorithm !== import_encryption.KeyEncryptionAlgorithm.RSA_OAEP) {
|
|
293
|
+
throw new Error(`Invalid key wrap algorithm '${keyWrapMetadata.algorithm}' passed.`);
|
|
124
294
|
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
*
|
|
130
|
-
* const endpoint = "https://your-account.documents.azure.com";
|
|
131
|
-
* const key = "<database account masterkey>";
|
|
132
|
-
* const client = new CosmosClient({ endpoint, key });
|
|
133
|
-
*
|
|
134
|
-
* const { resource: database } = await client.database("<db id>").read();
|
|
135
|
-
* ```
|
|
136
|
-
*/
|
|
137
|
-
async read(options) {
|
|
138
|
-
return (0, diagnostics_js_1.withDiagnostics)(async (diagnosticNode) => {
|
|
139
|
-
return this.readInternal(diagnosticNode, options);
|
|
140
|
-
}, this.clientContext);
|
|
295
|
+
if (!this.clientContext.enableEncryption) {
|
|
296
|
+
throw new Error(
|
|
297
|
+
"Creating a client encryption key requires the use of an encryption-enabled client."
|
|
298
|
+
);
|
|
141
299
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
300
|
+
const keyEncryptionKey = this.encryptionManager.keyEncryptionKeyCache.getOrCreate(
|
|
301
|
+
keyWrapMetadata.name,
|
|
302
|
+
keyWrapMetadata.value,
|
|
303
|
+
this.encryptionManager.encryptionKeyStoreProvider
|
|
304
|
+
);
|
|
305
|
+
const protectedDataEncryptionKey = await this.encryptionManager.protectedDataEncryptionKeyCache.getOrCreate(
|
|
306
|
+
clientEncryptionKeyId,
|
|
307
|
+
keyEncryptionKey
|
|
308
|
+
);
|
|
309
|
+
const wrappedDataEncryptionKey = protectedDataEncryptionKey.encryptedValue;
|
|
310
|
+
const body = {
|
|
311
|
+
id: clientEncryptionKeyId,
|
|
312
|
+
encryptionAlgorithm,
|
|
313
|
+
keyWrapMetadata,
|
|
314
|
+
wrappedDataEncryptionKey: wrappedDataEncryptionKey.toString("base64")
|
|
315
|
+
};
|
|
316
|
+
return (0, import_diagnostics.withDiagnostics)(async (diagnosticNode) => {
|
|
317
|
+
const path = (0, import_common.getPathFromLink)(this.url, import_common.ResourceType.clientencryptionkey);
|
|
318
|
+
const databaseId = (0, import_common.getIdFromLink)(this.url);
|
|
319
|
+
const response = await this.clientContext.create({
|
|
320
|
+
body,
|
|
321
|
+
path,
|
|
322
|
+
resourceType: import_common.ResourceType.clientencryptionkey,
|
|
323
|
+
resourceId: databaseId,
|
|
324
|
+
diagnosticNode
|
|
325
|
+
});
|
|
326
|
+
const ref = {
|
|
327
|
+
id: response.result.id,
|
|
328
|
+
encryptionAlgorithm: response.result.encryptionAlgorithm,
|
|
329
|
+
etag: response.result._etag,
|
|
330
|
+
wrappedDataEncryptionKey: new Uint8Array(
|
|
331
|
+
Buffer.from(response.result.wrappedDataEncryptionKey, "base64")
|
|
332
|
+
),
|
|
333
|
+
encryptionKeyWrapMetadata: response.result.keyWrapMetadata
|
|
334
|
+
};
|
|
335
|
+
return new import_encryption.ClientEncryptionKeyResponse(
|
|
336
|
+
response.result,
|
|
337
|
+
response.headers,
|
|
338
|
+
response.code,
|
|
339
|
+
ref,
|
|
340
|
+
(0, import_diagnostics.getEmptyCosmosDiagnostics)()
|
|
341
|
+
);
|
|
342
|
+
}, this.clientContext);
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Read Encryption key for database account
|
|
346
|
+
* @example
|
|
347
|
+
* ```ts snippet:DatabaseReadClientEncryptionKey
|
|
348
|
+
* import { ClientSecretCredential } from "@azure/identity";
|
|
349
|
+
* import { AzureKeyVaultEncryptionKeyResolver, CosmosClient } from "@azure/cosmos";
|
|
350
|
+
*
|
|
351
|
+
* const endpoint = "https://your-account.documents.azure.com";
|
|
352
|
+
* const key = "<database account masterkey>";
|
|
353
|
+
* const credentials = new ClientSecretCredential("<tenant-id>", "<client-id>", "<app-secret>");
|
|
354
|
+
* const keyResolver = new AzureKeyVaultEncryptionKeyResolver(credentials);
|
|
355
|
+
* const client = new CosmosClient({
|
|
356
|
+
* endpoint,
|
|
357
|
+
* key,
|
|
358
|
+
* clientEncryptionOptions: {
|
|
359
|
+
* keyEncryptionKeyResolver: keyResolver,
|
|
360
|
+
* },
|
|
361
|
+
* });
|
|
362
|
+
* const { database } = await client.databases.createIfNotExists({ id: "<db id>" });
|
|
363
|
+
*
|
|
364
|
+
* const { resource: clientEncryptionKey } = await database.readClientEncryptionKey("<cek-id>");
|
|
365
|
+
* ```
|
|
366
|
+
*/
|
|
367
|
+
async readClientEncryptionKey(clientEncryptionKeyId) {
|
|
368
|
+
if (clientEncryptionKeyId == null || !clientEncryptionKeyId.trim()) {
|
|
369
|
+
throw new import_request.ErrorResponse("encryption key id cannot be null or empty");
|
|
156
370
|
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
371
|
+
return (0, import_diagnostics.withDiagnostics)(async (diagnosticNode) => {
|
|
372
|
+
if (!this._rid) {
|
|
373
|
+
const databaseResponse = await this.readInternal(diagnosticNode);
|
|
374
|
+
if (!databaseResponse || !databaseResponse.resource) {
|
|
375
|
+
throw new import_request.ErrorResponse(`Error reading database with id ${clientEncryptionKeyId}`);
|
|
376
|
+
}
|
|
377
|
+
this._rid = databaseResponse.resource._rid;
|
|
378
|
+
}
|
|
379
|
+
const path = (0, import_common.getPathFromLink)(this.url, import_common.ResourceType.clientencryptionkey);
|
|
380
|
+
const resourceid = (0, import_common.getIdFromLink)(this.url);
|
|
381
|
+
const response = await this.clientContext.read({
|
|
382
|
+
path: path + `/${clientEncryptionKeyId}`,
|
|
383
|
+
resourceType: import_common.ResourceType.clientencryptionkey,
|
|
384
|
+
resourceId: resourceid + `/${import_common.ResourceType.clientencryptionkey}/${clientEncryptionKeyId}`,
|
|
385
|
+
options: { databaseRid: this._rid },
|
|
386
|
+
diagnosticNode
|
|
387
|
+
});
|
|
388
|
+
if (!response || !response.result) {
|
|
389
|
+
throw new import_request.ErrorResponse(
|
|
390
|
+
`Error reading client encryption key with id ${clientEncryptionKeyId}`
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
const ref = {
|
|
394
|
+
id: response.result.id,
|
|
395
|
+
encryptionAlgorithm: response.result.encryptionAlgorithm,
|
|
396
|
+
etag: response.result._etag,
|
|
397
|
+
wrappedDataEncryptionKey: new Uint8Array(
|
|
398
|
+
Buffer.from(response.result.wrappedDataEncryptionKey, "base64")
|
|
399
|
+
),
|
|
400
|
+
encryptionKeyWrapMetadata: response.result.keyWrapMetadata
|
|
401
|
+
};
|
|
402
|
+
return new import_encryption.ClientEncryptionKeyResponse(
|
|
403
|
+
response.result,
|
|
404
|
+
response.headers,
|
|
405
|
+
response.code,
|
|
406
|
+
ref,
|
|
407
|
+
(0, import_diagnostics.getEmptyCosmosDiagnostics)()
|
|
408
|
+
);
|
|
409
|
+
}, this.clientContext);
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* rewraps a client encryption key with new key encryption key
|
|
413
|
+
* @param id - client encryption key id
|
|
414
|
+
* @param newKeyWrapMetadata - new encryption key wrap metadata
|
|
415
|
+
* @returns rewrapped client encryption key with new customer managed key
|
|
416
|
+
* @example
|
|
417
|
+
* ```ts snippet:DatabaseRewrapClientEncryptionKey
|
|
418
|
+
* import { ClientSecretCredential } from "@azure/identity";
|
|
419
|
+
* import {
|
|
420
|
+
* AzureKeyVaultEncryptionKeyResolver,
|
|
421
|
+
* CosmosClient,
|
|
422
|
+
* EncryptionKeyWrapMetadata,
|
|
423
|
+
* EncryptionKeyResolverName,
|
|
424
|
+
* KeyEncryptionAlgorithm,
|
|
425
|
+
* } from "@azure/cosmos";
|
|
426
|
+
*
|
|
427
|
+
* const endpoint = "https://your-account.documents.azure.com";
|
|
428
|
+
* const key = "<database account masterkey>";
|
|
429
|
+
* const credentials = new ClientSecretCredential("<tenant-id>", "<client-id>", "<app-secret>");
|
|
430
|
+
* const keyResolver = new AzureKeyVaultEncryptionKeyResolver(credentials);
|
|
431
|
+
* const client = new CosmosClient({
|
|
432
|
+
* endpoint,
|
|
433
|
+
* key,
|
|
434
|
+
* clientEncryptionOptions: {
|
|
435
|
+
* keyEncryptionKeyResolver: keyResolver,
|
|
436
|
+
* },
|
|
437
|
+
* });
|
|
438
|
+
* const { database } = await client.databases.createIfNotExists({ id: "<db id>" });
|
|
439
|
+
* const newMetadata: EncryptionKeyWrapMetadata = {
|
|
440
|
+
* type: EncryptionKeyResolverName.AzureKeyVault,
|
|
441
|
+
* name: "<key-name>",
|
|
442
|
+
* value: "<key-vault-url>",
|
|
443
|
+
* algorithm: KeyEncryptionAlgorithm.RSA_OAEP,
|
|
444
|
+
* };
|
|
445
|
+
*
|
|
446
|
+
* await database.rewrapClientEncryptionKey("<new-cek-id>", newMetadata);
|
|
447
|
+
* ```
|
|
448
|
+
*/
|
|
449
|
+
async rewrapClientEncryptionKey(clientEncryptionKeyId, newKeyWrapMetadata) {
|
|
450
|
+
if (clientEncryptionKeyId == null || !clientEncryptionKeyId.trim()) {
|
|
451
|
+
throw new import_request.ErrorResponse("encryption key id cannot be null or empty");
|
|
181
452
|
}
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
* @example Read the offer on the database
|
|
185
|
-
* ```ts snippet:DatabaseReadOffer
|
|
186
|
-
* import { CosmosClient } from "@azure/cosmos";
|
|
187
|
-
*
|
|
188
|
-
* const endpoint = "https://your-account.documents.azure.com";
|
|
189
|
-
* const key = "<database account masterkey>";
|
|
190
|
-
* const client = new CosmosClient({ endpoint, key });
|
|
191
|
-
*
|
|
192
|
-
* const { resource: offer } = await client.database("<db id>").readOffer();
|
|
193
|
-
* ```
|
|
194
|
-
*/
|
|
195
|
-
async readOffer(options = {}) {
|
|
196
|
-
return (0, diagnostics_js_1.withDiagnostics)(async (diagnosticNode) => {
|
|
197
|
-
const { resource: record } = await (0, diagnostics_js_1.withMetadataDiagnostics)(async (node) => {
|
|
198
|
-
return this.readInternal(node);
|
|
199
|
-
}, diagnosticNode, CosmosDiagnostics_js_1.MetadataLookUpType.DatabaseLookUp);
|
|
200
|
-
const path = "/offers";
|
|
201
|
-
const url = record._self;
|
|
202
|
-
const response = await this.clientContext.queryFeed({
|
|
203
|
-
path,
|
|
204
|
-
resourceId: "",
|
|
205
|
-
resourceType: index_js_1.ResourceType.offer,
|
|
206
|
-
query: `SELECT * from root where root.resource = "${url}"`,
|
|
207
|
-
resultFn: (result) => result.Offers,
|
|
208
|
-
options,
|
|
209
|
-
diagnosticNode,
|
|
210
|
-
});
|
|
211
|
-
const offer = response.result[0]
|
|
212
|
-
? new index_js_5.Offer(this.client, response.result[0].id, this.clientContext)
|
|
213
|
-
: undefined;
|
|
214
|
-
return new index_js_5.OfferResponse(response.result[0], response.headers, response.code, (0, diagnostics_js_1.getEmptyCosmosDiagnostics)(), offer);
|
|
215
|
-
}, this.clientContext);
|
|
453
|
+
if (!newKeyWrapMetadata) {
|
|
454
|
+
throw new import_request.ErrorResponse("encryptionKeyWrapMetadata cannot be null.");
|
|
216
455
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
* import { ClientSecretCredential } from "@azure/identity";
|
|
222
|
-
* import {
|
|
223
|
-
* AzureKeyVaultEncryptionKeyResolver,
|
|
224
|
-
* CosmosClient,
|
|
225
|
-
* EncryptionKeyWrapMetadata,
|
|
226
|
-
* EncryptionKeyResolverName,
|
|
227
|
-
* KeyEncryptionAlgorithm,
|
|
228
|
-
* EncryptionAlgorithm,
|
|
229
|
-
* } from "@azure/cosmos";
|
|
230
|
-
*
|
|
231
|
-
* const endpoint = "https://your-account.documents.azure.com";
|
|
232
|
-
* const key = "<database account masterkey>";
|
|
233
|
-
* const credentials = new ClientSecretCredential("<tenant-id>", "<client-id>", "<app-secret>");
|
|
234
|
-
* const keyResolver = new AzureKeyVaultEncryptionKeyResolver(credentials);
|
|
235
|
-
* const client = new CosmosClient({
|
|
236
|
-
* endpoint,
|
|
237
|
-
* key,
|
|
238
|
-
* clientEncryptionOptions: {
|
|
239
|
-
* keyEncryptionKeyResolver: keyResolver,
|
|
240
|
-
* },
|
|
241
|
-
* });
|
|
242
|
-
* const { database } = await client.databases.createIfNotExists({ id: "<db id>" });
|
|
243
|
-
* const metadata: EncryptionKeyWrapMetadata = {
|
|
244
|
-
* type: EncryptionKeyResolverName.AzureKeyVault,
|
|
245
|
-
* name: "<key-name>",
|
|
246
|
-
* value: "<key-vault-url>",
|
|
247
|
-
* algorithm: KeyEncryptionAlgorithm.RSA_OAEP,
|
|
248
|
-
* };
|
|
249
|
-
*
|
|
250
|
-
* await database.createClientEncryptionKey(
|
|
251
|
-
* "<cek-id>",
|
|
252
|
-
* EncryptionAlgorithm.AEAD_AES_256_CBC_HMAC_SHA256,
|
|
253
|
-
* metadata,
|
|
254
|
-
* );
|
|
255
|
-
* ```
|
|
256
|
-
*/
|
|
257
|
-
async createClientEncryptionKey(clientEncryptionKeyId, encryptionAlgorithm, keyWrapMetadata) {
|
|
258
|
-
if (clientEncryptionKeyId == null || !clientEncryptionKeyId.trim()) {
|
|
259
|
-
throw new Error("encryption key id cannot be null or empty");
|
|
260
|
-
}
|
|
261
|
-
if (encryptionAlgorithm !== index_js_6.EncryptionAlgorithm.AEAD_AES_256_CBC_HMAC_SHA256) {
|
|
262
|
-
throw new Error(`Invalid encryption algorithm '${encryptionAlgorithm}' passed.`);
|
|
263
|
-
}
|
|
264
|
-
if (!keyWrapMetadata) {
|
|
265
|
-
throw new Error("encryptionKeyWrapMetadata cannot be null.");
|
|
266
|
-
}
|
|
267
|
-
if (keyWrapMetadata.algorithm !== index_js_6.KeyEncryptionAlgorithm.RSA_OAEP) {
|
|
268
|
-
throw new Error(`Invalid key wrap algorithm '${keyWrapMetadata.algorithm}' passed.`);
|
|
269
|
-
}
|
|
270
|
-
if (!this.clientContext.enableEncryption) {
|
|
271
|
-
throw new Error("Creating a client encryption key requires the use of an encryption-enabled client.");
|
|
272
|
-
}
|
|
273
|
-
const keyEncryptionKey = this.encryptionManager.keyEncryptionKeyCache.getOrCreate(keyWrapMetadata.name, keyWrapMetadata.value, this.encryptionManager.encryptionKeyStoreProvider);
|
|
274
|
-
const protectedDataEncryptionKey = await this.encryptionManager.protectedDataEncryptionKeyCache.getOrCreate(clientEncryptionKeyId, keyEncryptionKey);
|
|
275
|
-
const wrappedDataEncryptionKey = protectedDataEncryptionKey.encryptedValue;
|
|
276
|
-
const body = {
|
|
277
|
-
id: clientEncryptionKeyId,
|
|
278
|
-
encryptionAlgorithm: encryptionAlgorithm,
|
|
279
|
-
keyWrapMetadata: keyWrapMetadata,
|
|
280
|
-
wrappedDataEncryptionKey: wrappedDataEncryptionKey.toString("base64"),
|
|
281
|
-
};
|
|
282
|
-
return (0, diagnostics_js_1.withDiagnostics)(async (diagnosticNode) => {
|
|
283
|
-
const path = (0, index_js_1.getPathFromLink)(this.url, index_js_1.ResourceType.clientencryptionkey);
|
|
284
|
-
const databaseId = (0, index_js_1.getIdFromLink)(this.url);
|
|
285
|
-
const response = await this.clientContext.create({
|
|
286
|
-
body,
|
|
287
|
-
path: path,
|
|
288
|
-
resourceType: index_js_1.ResourceType.clientencryptionkey,
|
|
289
|
-
resourceId: databaseId,
|
|
290
|
-
diagnosticNode,
|
|
291
|
-
});
|
|
292
|
-
const ref = {
|
|
293
|
-
id: response.result.id,
|
|
294
|
-
encryptionAlgorithm: response.result.encryptionAlgorithm,
|
|
295
|
-
etag: response.result._etag,
|
|
296
|
-
wrappedDataEncryptionKey: new Uint8Array(Buffer.from(response.result.wrappedDataEncryptionKey, "base64")),
|
|
297
|
-
encryptionKeyWrapMetadata: response.result.keyWrapMetadata,
|
|
298
|
-
};
|
|
299
|
-
return new index_js_6.ClientEncryptionKeyResponse(response.result, response.headers, response.code, ref, (0, diagnostics_js_1.getEmptyCosmosDiagnostics)());
|
|
300
|
-
}, this.clientContext);
|
|
456
|
+
if (newKeyWrapMetadata.algorithm !== import_encryption.KeyEncryptionAlgorithm.RSA_OAEP) {
|
|
457
|
+
throw new import_request.ErrorResponse(
|
|
458
|
+
`Invalid key wrap algorithm '${newKeyWrapMetadata.algorithm}' passed.`
|
|
459
|
+
);
|
|
301
460
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
* import { ClientSecretCredential } from "@azure/identity";
|
|
307
|
-
* import { AzureKeyVaultEncryptionKeyResolver, CosmosClient } from "@azure/cosmos";
|
|
308
|
-
*
|
|
309
|
-
* const endpoint = "https://your-account.documents.azure.com";
|
|
310
|
-
* const key = "<database account masterkey>";
|
|
311
|
-
* const credentials = new ClientSecretCredential("<tenant-id>", "<client-id>", "<app-secret>");
|
|
312
|
-
* const keyResolver = new AzureKeyVaultEncryptionKeyResolver(credentials);
|
|
313
|
-
* const client = new CosmosClient({
|
|
314
|
-
* endpoint,
|
|
315
|
-
* key,
|
|
316
|
-
* clientEncryptionOptions: {
|
|
317
|
-
* keyEncryptionKeyResolver: keyResolver,
|
|
318
|
-
* },
|
|
319
|
-
* });
|
|
320
|
-
* const { database } = await client.databases.createIfNotExists({ id: "<db id>" });
|
|
321
|
-
*
|
|
322
|
-
* const { resource: clientEncryptionKey } = await database.readClientEncryptionKey("<cek-id>");
|
|
323
|
-
* ```
|
|
324
|
-
*/
|
|
325
|
-
async readClientEncryptionKey(clientEncryptionKeyId) {
|
|
326
|
-
if (clientEncryptionKeyId == null || !clientEncryptionKeyId.trim()) {
|
|
327
|
-
throw new index_js_2.ErrorResponse("encryption key id cannot be null or empty");
|
|
328
|
-
}
|
|
329
|
-
return (0, diagnostics_js_1.withDiagnostics)(async (diagnosticNode) => {
|
|
330
|
-
if (!this._rid) {
|
|
331
|
-
const databaseResponse = await this.readInternal(diagnosticNode);
|
|
332
|
-
if (!databaseResponse || !databaseResponse.resource) {
|
|
333
|
-
throw new index_js_2.ErrorResponse(`Error reading database with id ${clientEncryptionKeyId}`);
|
|
334
|
-
}
|
|
335
|
-
this._rid = databaseResponse.resource._rid;
|
|
336
|
-
}
|
|
337
|
-
const path = (0, index_js_1.getPathFromLink)(this.url, index_js_1.ResourceType.clientencryptionkey);
|
|
338
|
-
const resourceid = (0, index_js_1.getIdFromLink)(this.url);
|
|
339
|
-
const response = await this.clientContext.read({
|
|
340
|
-
path: path + `/${clientEncryptionKeyId}`,
|
|
341
|
-
resourceType: index_js_1.ResourceType.clientencryptionkey,
|
|
342
|
-
resourceId: resourceid + `/${index_js_1.ResourceType.clientencryptionkey}/${clientEncryptionKeyId}`,
|
|
343
|
-
options: { databaseRid: this._rid },
|
|
344
|
-
diagnosticNode,
|
|
345
|
-
});
|
|
346
|
-
if (!response || !response.result) {
|
|
347
|
-
throw new index_js_2.ErrorResponse(`Error reading client encryption key with id ${clientEncryptionKeyId}`);
|
|
348
|
-
}
|
|
349
|
-
const ref = {
|
|
350
|
-
id: response.result.id,
|
|
351
|
-
encryptionAlgorithm: response.result.encryptionAlgorithm,
|
|
352
|
-
etag: response.result._etag,
|
|
353
|
-
wrappedDataEncryptionKey: new Uint8Array(Buffer.from(response.result.wrappedDataEncryptionKey, "base64")),
|
|
354
|
-
encryptionKeyWrapMetadata: response.result.keyWrapMetadata,
|
|
355
|
-
};
|
|
356
|
-
return new index_js_6.ClientEncryptionKeyResponse(response.result, response.headers, response.code, ref, (0, diagnostics_js_1.getEmptyCosmosDiagnostics)());
|
|
357
|
-
}, this.clientContext);
|
|
461
|
+
if (!this.clientContext.enableEncryption) {
|
|
462
|
+
throw new import_request.ErrorResponse(
|
|
463
|
+
"Rewrapping a client encryption key requires the use of an encryption-enabled client."
|
|
464
|
+
);
|
|
358
465
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
* @example
|
|
365
|
-
* ```ts snippet:DatabaseRewrapClientEncryptionKey
|
|
366
|
-
* import { ClientSecretCredential } from "@azure/identity";
|
|
367
|
-
* import {
|
|
368
|
-
* AzureKeyVaultEncryptionKeyResolver,
|
|
369
|
-
* CosmosClient,
|
|
370
|
-
* EncryptionKeyWrapMetadata,
|
|
371
|
-
* EncryptionKeyResolverName,
|
|
372
|
-
* KeyEncryptionAlgorithm,
|
|
373
|
-
* } from "@azure/cosmos";
|
|
374
|
-
*
|
|
375
|
-
* const endpoint = "https://your-account.documents.azure.com";
|
|
376
|
-
* const key = "<database account masterkey>";
|
|
377
|
-
* const credentials = new ClientSecretCredential("<tenant-id>", "<client-id>", "<app-secret>");
|
|
378
|
-
* const keyResolver = new AzureKeyVaultEncryptionKeyResolver(credentials);
|
|
379
|
-
* const client = new CosmosClient({
|
|
380
|
-
* endpoint,
|
|
381
|
-
* key,
|
|
382
|
-
* clientEncryptionOptions: {
|
|
383
|
-
* keyEncryptionKeyResolver: keyResolver,
|
|
384
|
-
* },
|
|
385
|
-
* });
|
|
386
|
-
* const { database } = await client.databases.createIfNotExists({ id: "<db id>" });
|
|
387
|
-
* const newMetadata: EncryptionKeyWrapMetadata = {
|
|
388
|
-
* type: EncryptionKeyResolverName.AzureKeyVault,
|
|
389
|
-
* name: "<key-name>",
|
|
390
|
-
* value: "<key-vault-url>",
|
|
391
|
-
* algorithm: KeyEncryptionAlgorithm.RSA_OAEP,
|
|
392
|
-
* };
|
|
393
|
-
*
|
|
394
|
-
* await database.rewrapClientEncryptionKey("<new-cek-id>", newMetadata);
|
|
395
|
-
* ```
|
|
396
|
-
*/
|
|
397
|
-
async rewrapClientEncryptionKey(clientEncryptionKeyId, newKeyWrapMetadata) {
|
|
398
|
-
if (clientEncryptionKeyId == null || !clientEncryptionKeyId.trim()) {
|
|
399
|
-
throw new index_js_2.ErrorResponse("encryption key id cannot be null or empty");
|
|
400
|
-
}
|
|
401
|
-
if (!newKeyWrapMetadata) {
|
|
402
|
-
throw new index_js_2.ErrorResponse("encryptionKeyWrapMetadata cannot be null.");
|
|
403
|
-
}
|
|
404
|
-
if (newKeyWrapMetadata.algorithm !== index_js_6.KeyEncryptionAlgorithm.RSA_OAEP) {
|
|
405
|
-
throw new index_js_2.ErrorResponse(`Invalid key wrap algorithm '${newKeyWrapMetadata.algorithm}' passed.`);
|
|
406
|
-
}
|
|
407
|
-
if (!this.clientContext.enableEncryption) {
|
|
408
|
-
throw new index_js_2.ErrorResponse("Rewrapping a client encryption key requires the use of an encryption-enabled client.");
|
|
409
|
-
}
|
|
410
|
-
const res = await this.readClientEncryptionKey(clientEncryptionKeyId);
|
|
411
|
-
if (!res || !res.clientEncryptionKeyProperties) {
|
|
412
|
-
throw new index_js_2.ErrorResponse(`Error reading client encryption key with id ${clientEncryptionKeyId}`);
|
|
413
|
-
}
|
|
414
|
-
let clientEncryptionKeyProperties = res.clientEncryptionKeyProperties;
|
|
415
|
-
let keyEncryptionKey = this.encryptionManager.keyEncryptionKeyCache.getOrCreate(clientEncryptionKeyProperties.encryptionKeyWrapMetadata.name, clientEncryptionKeyProperties.encryptionKeyWrapMetadata.value, this.encryptionManager.encryptionKeyStoreProvider);
|
|
416
|
-
const unwrappedKey = await keyEncryptionKey.unwrapEncryptionKey(Buffer.from(clientEncryptionKeyProperties.wrappedDataEncryptionKey));
|
|
417
|
-
keyEncryptionKey = this.encryptionManager.keyEncryptionKeyCache.getOrCreate(newKeyWrapMetadata.name, newKeyWrapMetadata.value, this.encryptionManager.encryptionKeyStoreProvider);
|
|
418
|
-
const rewrappedKey = await keyEncryptionKey.wrapEncryptionKey(unwrappedKey);
|
|
419
|
-
clientEncryptionKeyProperties = {
|
|
420
|
-
id: clientEncryptionKeyId,
|
|
421
|
-
encryptionAlgorithm: clientEncryptionKeyProperties.encryptionAlgorithm,
|
|
422
|
-
etag: clientEncryptionKeyProperties.etag,
|
|
423
|
-
wrappedDataEncryptionKey: rewrappedKey,
|
|
424
|
-
encryptionKeyWrapMetadata: newKeyWrapMetadata,
|
|
425
|
-
};
|
|
426
|
-
const body = {
|
|
427
|
-
id: clientEncryptionKeyId,
|
|
428
|
-
encryptionAlgorithm: clientEncryptionKeyProperties.encryptionAlgorithm,
|
|
429
|
-
keyWrapMetadata: newKeyWrapMetadata,
|
|
430
|
-
wrappedDataEncryptionKey: rewrappedKey.toString("base64"),
|
|
431
|
-
};
|
|
432
|
-
return (0, diagnostics_js_1.withDiagnostics)(async (diagnosticNode) => {
|
|
433
|
-
const path = (0, index_js_1.getPathFromLink)(this.url, index_js_1.ResourceType.clientencryptionkey);
|
|
434
|
-
const resourceid = (0, index_js_1.getIdFromLink)(this.url);
|
|
435
|
-
const options = {
|
|
436
|
-
accessCondition: { type: "IfMatch", condition: clientEncryptionKeyProperties.etag },
|
|
437
|
-
};
|
|
438
|
-
const response = await this.clientContext.replace({
|
|
439
|
-
body,
|
|
440
|
-
path: path + `/${clientEncryptionKeyId}`,
|
|
441
|
-
resourceType: index_js_1.ResourceType.clientencryptionkey,
|
|
442
|
-
resourceId: resourceid + `/${index_js_1.ResourceType.clientencryptionkey}/${clientEncryptionKeyId}`,
|
|
443
|
-
options,
|
|
444
|
-
diagnosticNode,
|
|
445
|
-
});
|
|
446
|
-
if (!response || !response.result) {
|
|
447
|
-
throw new index_js_2.ErrorResponse(`Error rewrapping client encryption key with id ${clientEncryptionKeyId}`);
|
|
448
|
-
}
|
|
449
|
-
const ref = {
|
|
450
|
-
id: response.result.id,
|
|
451
|
-
encryptionAlgorithm: response.result.encryptionAlgorithm,
|
|
452
|
-
etag: response.result._etag,
|
|
453
|
-
wrappedDataEncryptionKey: new Uint8Array(Buffer.from(response.result.wrappedDataEncryptionKey, "base64")),
|
|
454
|
-
encryptionKeyWrapMetadata: response.result.keyWrapMetadata,
|
|
455
|
-
};
|
|
456
|
-
return new index_js_6.ClientEncryptionKeyResponse(response.result, response.headers, response.code, ref, (0, diagnostics_js_1.getEmptyCosmosDiagnostics)());
|
|
457
|
-
}, this.clientContext);
|
|
466
|
+
const res = await this.readClientEncryptionKey(clientEncryptionKeyId);
|
|
467
|
+
if (!res || !res.clientEncryptionKeyProperties) {
|
|
468
|
+
throw new import_request.ErrorResponse(
|
|
469
|
+
`Error reading client encryption key with id ${clientEncryptionKeyId}`
|
|
470
|
+
);
|
|
458
471
|
}
|
|
472
|
+
let clientEncryptionKeyProperties = res.clientEncryptionKeyProperties;
|
|
473
|
+
let keyEncryptionKey = this.encryptionManager.keyEncryptionKeyCache.getOrCreate(
|
|
474
|
+
clientEncryptionKeyProperties.encryptionKeyWrapMetadata.name,
|
|
475
|
+
clientEncryptionKeyProperties.encryptionKeyWrapMetadata.value,
|
|
476
|
+
this.encryptionManager.encryptionKeyStoreProvider
|
|
477
|
+
);
|
|
478
|
+
const unwrappedKey = await keyEncryptionKey.unwrapEncryptionKey(
|
|
479
|
+
Buffer.from(clientEncryptionKeyProperties.wrappedDataEncryptionKey)
|
|
480
|
+
);
|
|
481
|
+
keyEncryptionKey = this.encryptionManager.keyEncryptionKeyCache.getOrCreate(
|
|
482
|
+
newKeyWrapMetadata.name,
|
|
483
|
+
newKeyWrapMetadata.value,
|
|
484
|
+
this.encryptionManager.encryptionKeyStoreProvider
|
|
485
|
+
);
|
|
486
|
+
const rewrappedKey = await keyEncryptionKey.wrapEncryptionKey(unwrappedKey);
|
|
487
|
+
clientEncryptionKeyProperties = {
|
|
488
|
+
id: clientEncryptionKeyId,
|
|
489
|
+
encryptionAlgorithm: clientEncryptionKeyProperties.encryptionAlgorithm,
|
|
490
|
+
etag: clientEncryptionKeyProperties.etag,
|
|
491
|
+
wrappedDataEncryptionKey: rewrappedKey,
|
|
492
|
+
encryptionKeyWrapMetadata: newKeyWrapMetadata
|
|
493
|
+
};
|
|
494
|
+
const body = {
|
|
495
|
+
id: clientEncryptionKeyId,
|
|
496
|
+
encryptionAlgorithm: clientEncryptionKeyProperties.encryptionAlgorithm,
|
|
497
|
+
keyWrapMetadata: newKeyWrapMetadata,
|
|
498
|
+
wrappedDataEncryptionKey: rewrappedKey.toString("base64")
|
|
499
|
+
};
|
|
500
|
+
return (0, import_diagnostics.withDiagnostics)(async (diagnosticNode) => {
|
|
501
|
+
const path = (0, import_common.getPathFromLink)(this.url, import_common.ResourceType.clientencryptionkey);
|
|
502
|
+
const resourceid = (0, import_common.getIdFromLink)(this.url);
|
|
503
|
+
const options = {
|
|
504
|
+
accessCondition: { type: "IfMatch", condition: clientEncryptionKeyProperties.etag }
|
|
505
|
+
};
|
|
506
|
+
const response = await this.clientContext.replace({
|
|
507
|
+
body,
|
|
508
|
+
path: path + `/${clientEncryptionKeyId}`,
|
|
509
|
+
resourceType: import_common.ResourceType.clientencryptionkey,
|
|
510
|
+
resourceId: resourceid + `/${import_common.ResourceType.clientencryptionkey}/${clientEncryptionKeyId}`,
|
|
511
|
+
options,
|
|
512
|
+
diagnosticNode
|
|
513
|
+
});
|
|
514
|
+
if (!response || !response.result) {
|
|
515
|
+
throw new import_request.ErrorResponse(
|
|
516
|
+
`Error rewrapping client encryption key with id ${clientEncryptionKeyId}`
|
|
517
|
+
);
|
|
518
|
+
}
|
|
519
|
+
const ref = {
|
|
520
|
+
id: response.result.id,
|
|
521
|
+
encryptionAlgorithm: response.result.encryptionAlgorithm,
|
|
522
|
+
etag: response.result._etag,
|
|
523
|
+
wrappedDataEncryptionKey: new Uint8Array(
|
|
524
|
+
Buffer.from(response.result.wrappedDataEncryptionKey, "base64")
|
|
525
|
+
),
|
|
526
|
+
encryptionKeyWrapMetadata: response.result.keyWrapMetadata
|
|
527
|
+
};
|
|
528
|
+
return new import_encryption.ClientEncryptionKeyResponse(
|
|
529
|
+
response.result,
|
|
530
|
+
response.headers,
|
|
531
|
+
response.code,
|
|
532
|
+
ref,
|
|
533
|
+
(0, import_diagnostics.getEmptyCosmosDiagnostics)()
|
|
534
|
+
);
|
|
535
|
+
}, this.clientContext);
|
|
536
|
+
}
|
|
459
537
|
}
|
|
460
|
-
|
|
461
|
-
|
|
538
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
539
|
+
0 && (module.exports = {
|
|
540
|
+
Database
|
|
541
|
+
});
|