@azure/cosmos 4.9.1 → 4.9.3
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/OrderByQueryRangeStrategy.d.ts +2 -1
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -1
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +6 -5
- package/dist/browser/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.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 +131 -110
- package/dist/commonjs/ChangeFeedIterator.js.map +7 -1
- package/dist/commonjs/ChangeFeedOptions.js +16 -3
- package/dist/commonjs/ChangeFeedOptions.js.map +7 -1
- package/dist/commonjs/ChangeFeedResponse.js +85 -78
- package/dist/commonjs/ChangeFeedResponse.js.map +7 -1
- package/dist/commonjs/ClientContext.js +873 -761
- package/dist/commonjs/ClientContext.js.map +7 -1
- package/dist/commonjs/CosmosClient.js +294 -286
- package/dist/commonjs/CosmosClient.js.map +7 -1
- package/dist/commonjs/CosmosClientOptions.js +16 -3
- package/dist/commonjs/CosmosClientOptions.js.map +7 -1
- package/dist/commonjs/CosmosDiagnostics.js +52 -55
- package/dist/commonjs/CosmosDiagnostics.js.map +7 -1
- package/dist/commonjs/GlobalEndpointManagerOptions.js +16 -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 +149 -134
- package/dist/commonjs/PartitionKeyRangeFailoverInfo.js.map +7 -1
- package/dist/commonjs/auth.js +92 -84
- package/dist/commonjs/auth.js.map +7 -1
- package/dist/commonjs/bulk/Batcher.js +178 -149
- package/dist/commonjs/bulk/Batcher.js.map +7 -1
- package/dist/commonjs/bulk/BulkHelper.js +321 -289
- package/dist/commonjs/bulk/BulkHelper.js.map +7 -1
- package/dist/commonjs/bulk/BulkResponse.js +141 -118
- package/dist/commonjs/bulk/BulkResponse.js.map +7 -1
- package/dist/commonjs/bulk/CongestionAlgorithm.js +72 -66
- package/dist/commonjs/bulk/CongestionAlgorithm.js.map +7 -1
- package/dist/commonjs/bulk/HelperPerPartition.js +168 -130
- package/dist/commonjs/bulk/HelperPerPartition.js.map +7 -1
- package/dist/commonjs/bulk/ItemOperation.js +16 -5
- package/dist/commonjs/bulk/ItemOperation.js.map +7 -1
- package/dist/commonjs/bulk/ItemOperationContext.js +54 -38
- package/dist/commonjs/bulk/ItemOperationContext.js.map +7 -1
- package/dist/commonjs/bulk/Limiter.js +199 -212
- package/dist/commonjs/bulk/Limiter.js.map +7 -1
- package/dist/commonjs/bulk/PartitionMetric.js +59 -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 +31 -10
- package/dist/commonjs/bulk/index.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedEnums.js +32 -14
- package/dist/commonjs/client/ChangeFeed/ChangeFeedEnums.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForEpkRange.js +383 -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 +187 -146
- package/dist/commonjs/client/ChangeFeed/ChangeFeedForPartitionKey.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorBuilder.js +83 -63
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorBuilder.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorOptions.js +16 -5
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorOptions.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorResponse.js +73 -78
- package/dist/commonjs/client/ChangeFeed/ChangeFeedIteratorResponse.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedMode.js +32 -11
- package/dist/commonjs/client/ChangeFeed/ChangeFeedMode.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedPolicy.js +31 -12
- package/dist/commonjs/client/ChangeFeed/ChangeFeedPolicy.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedPullModelIterator.js +16 -3
- package/dist/commonjs/client/ChangeFeed/ChangeFeedPullModelIterator.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedRange.js +54 -38
- package/dist/commonjs/client/ChangeFeed/ChangeFeedRange.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedRetentionTimeSpan.js +53 -36
- package/dist/commonjs/client/ChangeFeed/ChangeFeedRetentionTimeSpan.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFrom.js +71 -54
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFrom.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromBeginning.js +34 -16
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromBeginning.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromContinuation.js +48 -38
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromContinuation.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromNow.js +34 -18
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromNow.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromTime.js +39 -21
- package/dist/commonjs/client/ChangeFeed/ChangeFeedStartFromTime.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/CompositeContinuationToken.js +39 -21
- package/dist/commonjs/client/ChangeFeed/CompositeContinuationToken.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/ContinuationTokenForPartitionKey.js +44 -26
- package/dist/commonjs/client/ChangeFeed/ContinuationTokenForPartitionKey.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/FeedRange.js +51 -38
- package/dist/commonjs/client/ChangeFeed/FeedRange.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/FeedRangeQueue.js +69 -49
- package/dist/commonjs/client/ChangeFeed/FeedRangeQueue.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/InternalChangeFeedOptions.js +16 -5
- package/dist/commonjs/client/ChangeFeed/InternalChangeFeedOptions.js.map +7 -1
- package/dist/commonjs/client/ChangeFeed/buildChangeFeedIterator.js +144 -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 +161 -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 +60 -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 +43 -16
- package/dist/commonjs/client/ClientUtils.js.map +7 -1
- package/dist/commonjs/client/Conflict/Conflict.js +132 -100
- package/dist/commonjs/client/Conflict/Conflict.js.map +7 -1
- package/dist/commonjs/client/Conflict/ConflictDefinition.js +16 -3
- package/dist/commonjs/client/Conflict/ConflictDefinition.js.map +7 -1
- package/dist/commonjs/client/Conflict/ConflictResolutionMode.js +32 -11
- package/dist/commonjs/client/Conflict/ConflictResolutionMode.js.map +7 -1
- package/dist/commonjs/client/Conflict/ConflictResolutionPolicy.js +16 -3
- package/dist/commonjs/client/Conflict/ConflictResolutionPolicy.js.map +7 -1
- package/dist/commonjs/client/Conflict/ConflictResponse.js +35 -13
- package/dist/commonjs/client/Conflict/ConflictResponse.js.map +7 -1
- package/dist/commonjs/client/Conflict/Conflicts.js +73 -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 +37 -14
- package/dist/commonjs/client/Conflict/index.js.map +7 -1
- package/dist/commonjs/client/Container/Container.js +669 -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 +16 -3
- package/dist/commonjs/client/Container/ContainerDefinition.js.map +7 -1
- package/dist/commonjs/client/Container/ContainerRequest.js +16 -3
- package/dist/commonjs/client/Container/ContainerRequest.js.map +7 -1
- package/dist/commonjs/client/Container/ContainerResponse.js +35 -14
- package/dist/commonjs/client/Container/ContainerResponse.js.map +7 -1
- package/dist/commonjs/client/Container/Containers.js +236 -218
- package/dist/commonjs/client/Container/Containers.js.map +7 -1
- package/dist/commonjs/client/Container/PartitionKeyRange.js +16 -3
- package/dist/commonjs/client/Container/PartitionKeyRange.js.map +7 -1
- package/dist/commonjs/client/Container/UniqueKeyPolicy.js +16 -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 +34 -12
- package/dist/commonjs/client/Container/index.js.map +7 -1
- package/dist/commonjs/client/Database/Database.js +533 -448
- package/dist/commonjs/client/Database/Database.js.map +7 -1
- package/dist/commonjs/client/Database/DatabaseDefinition.js +16 -3
- package/dist/commonjs/client/Database/DatabaseDefinition.js.map +7 -1
- package/dist/commonjs/client/Database/DatabaseRequest.js +16 -3
- package/dist/commonjs/client/Database/DatabaseRequest.js.map +7 -1
- package/dist/commonjs/client/Database/DatabaseResponse.js +35 -14
- package/dist/commonjs/client/Database/DatabaseResponse.js.map +7 -1
- package/dist/commonjs/client/Database/Databases.js +201 -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 +34 -12
- package/dist/commonjs/client/Database/index.js.map +7 -1
- package/dist/commonjs/client/Item/Item.js +510 -383
- package/dist/commonjs/client/Item/Item.js.map +7 -1
- package/dist/commonjs/client/Item/ItemDefinition.js +16 -5
- package/dist/commonjs/client/Item/ItemDefinition.js.map +7 -1
- package/dist/commonjs/client/Item/ItemResponse.js +35 -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 +891 -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 +34 -12
- package/dist/commonjs/client/Item/index.js.map +7 -1
- package/dist/commonjs/client/Offer/Offer.js +119 -90
- package/dist/commonjs/client/Offer/Offer.js.map +7 -1
- package/dist/commonjs/client/Offer/OfferDefinition.js +16 -3
- package/dist/commonjs/client/Offer/OfferDefinition.js.map +7 -1
- package/dist/commonjs/client/Offer/OfferResponse.js +35 -13
- package/dist/commonjs/client/Offer/OfferResponse.js.map +7 -1
- package/dist/commonjs/client/Offer/Offers.js +68 -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 +34 -12
- package/dist/commonjs/client/Offer/index.js.map +7 -1
- package/dist/commonjs/client/Permission/Permission.js +162 -127
- package/dist/commonjs/client/Permission/Permission.js.map +7 -1
- package/dist/commonjs/client/Permission/PermissionBody.js +16 -3
- package/dist/commonjs/client/Permission/PermissionBody.js.map +7 -1
- package/dist/commonjs/client/Permission/PermissionDefinition.js +16 -3
- package/dist/commonjs/client/Permission/PermissionDefinition.js.map +7 -1
- package/dist/commonjs/client/Permission/PermissionResponse.js +35 -13
- package/dist/commonjs/client/Permission/PermissionResponse.js.map +7 -1
- package/dist/commonjs/client/Permission/Permissions.js +173 -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 +34 -12
- package/dist/commonjs/client/Permission/index.js.map +7 -1
- package/dist/commonjs/client/Resource.js +16 -3
- package/dist/commonjs/client/Resource.js.map +7 -1
- package/dist/commonjs/client/SasToken/PermissionScopeValues.js +92 -80
- package/dist/commonjs/client/SasToken/PermissionScopeValues.js.map +7 -1
- package/dist/commonjs/client/SasToken/SasTokenProperties.js +44 -24
- package/dist/commonjs/client/SasToken/SasTokenProperties.js.map +7 -1
- package/dist/commonjs/client/Script/Scripts.js +100 -80
- package/dist/commonjs/client/Script/Scripts.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/StoredProcedure.js +228 -185
- package/dist/commonjs/client/StoredProcedure/StoredProcedure.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/StoredProcedureDefinition.js +16 -3
- package/dist/commonjs/client/StoredProcedure/StoredProcedureDefinition.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/StoredProcedureResponse.js +45 -23
- package/dist/commonjs/client/StoredProcedure/StoredProcedureResponse.js.map +7 -1
- package/dist/commonjs/client/StoredProcedure/StoredProcedures.js +134 -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 +34 -12
- package/dist/commonjs/client/StoredProcedure/index.js.map +7 -1
- package/dist/commonjs/client/Trigger/Trigger.js +173 -138
- package/dist/commonjs/client/Trigger/Trigger.js.map +7 -1
- package/dist/commonjs/client/Trigger/TriggerDefinition.js +16 -3
- package/dist/commonjs/client/Trigger/TriggerDefinition.js.map +7 -1
- package/dist/commonjs/client/Trigger/TriggerResponse.js +35 -13
- package/dist/commonjs/client/Trigger/TriggerResponse.js.map +7 -1
- package/dist/commonjs/client/Trigger/Triggers.js +133 -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 +34 -12
- package/dist/commonjs/client/Trigger/index.js.map +7 -1
- package/dist/commonjs/client/User/User.js +174 -141
- package/dist/commonjs/client/User/User.js.map +7 -1
- package/dist/commonjs/client/User/UserDefinition.js +16 -3
- package/dist/commonjs/client/User/UserDefinition.js.map +7 -1
- package/dist/commonjs/client/User/UserResponse.js +35 -13
- package/dist/commonjs/client/User/UserResponse.js.map +7 -1
- package/dist/commonjs/client/User/Users.js +157 -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 +34 -12
- package/dist/commonjs/client/User/index.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunction.js +172 -137
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunction.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctionDefinition.js +16 -3
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctionDefinition.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctionResponse.js +43 -21
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctionResponse.js.map +7 -1
- package/dist/commonjs/client/UserDefinedFunction/UserDefinedFunctions.js +130 -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 +34 -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 +42 -18
- package/dist/commonjs/client/index.js.map +7 -1
- package/dist/commonjs/common/constants.js +515 -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 +350 -412
- package/dist/commonjs/common/helper.js.map +7 -1
- package/dist/commonjs/common/index.js +28 -10
- package/dist/commonjs/common/index.js.map +7 -1
- package/dist/commonjs/common/logger.js +29 -9
- package/dist/commonjs/common/logger.js.map +7 -1
- package/dist/commonjs/common/partitionKeys.js +28 -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 +55 -42
- package/dist/commonjs/common/platform.js.map +7 -1
- package/dist/commonjs/common/statusCodes.js +77 -60
- package/dist/commonjs/common/statusCodes.js.map +7 -1
- package/dist/commonjs/common/uriFactory.js +80 -195
- package/dist/commonjs/common/uriFactory.js.map +7 -1
- package/dist/commonjs/diagnostics/CosmosDbDiagnosticLevel.js +33 -15
- package/dist/commonjs/diagnostics/CosmosDbDiagnosticLevel.js.map +7 -1
- package/dist/commonjs/diagnostics/CosmosDiagnosticsContext.js +146 -126
- package/dist/commonjs/diagnostics/CosmosDiagnosticsContext.js.map +7 -1
- package/dist/commonjs/diagnostics/DiagnosticFormatter.js +30 -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 +317 -305
- package/dist/commonjs/diagnostics/DiagnosticNodeInternal.js.map +7 -1
- package/dist/commonjs/diagnostics/DiagnosticWriter.js +36 -25
- package/dist/commonjs/diagnostics/DiagnosticWriter.js.map +7 -1
- package/dist/commonjs/diagnostics/diagnosticLevelComparator.js +40 -24
- package/dist/commonjs/diagnostics/diagnosticLevelComparator.js.map +7 -1
- package/dist/commonjs/diagnostics/index.js +68 -34
- package/dist/commonjs/diagnostics/index.js.map +7 -1
- package/dist/commonjs/documents/ComputedProperty.js +16 -3
- package/dist/commonjs/documents/ComputedProperty.js.map +7 -1
- package/dist/commonjs/documents/ConnectionMode.js +31 -12
- package/dist/commonjs/documents/ConnectionMode.js.map +7 -1
- package/dist/commonjs/documents/ConnectionPolicy.js +44 -26
- package/dist/commonjs/documents/ConnectionPolicy.js.map +7 -1
- package/dist/commonjs/documents/ConsistencyLevel.js +35 -43
- package/dist/commonjs/documents/ConsistencyLevel.js.map +7 -1
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.js +77 -79
- package/dist/commonjs/documents/ContinuationToken/CompositeQueryContinuationToken.js.map +7 -1
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.js +49 -38
- package/dist/commonjs/documents/ContinuationToken/OrderByQueryContinuationToken.js.map +7 -1
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.js +16 -5
- package/dist/commonjs/documents/ContinuationToken/PartitionRangeUpdate.js.map +7 -1
- package/dist/commonjs/documents/DataType.js +36 -22
- package/dist/commonjs/documents/DataType.js.map +7 -1
- package/dist/commonjs/documents/DatabaseAccount.js +110 -100
- package/dist/commonjs/documents/DatabaseAccount.js.map +7 -1
- package/dist/commonjs/documents/Document.js +16 -3
- package/dist/commonjs/documents/Document.js.map +7 -1
- package/dist/commonjs/documents/FullTextPolicy.js +16 -5
- package/dist/commonjs/documents/FullTextPolicy.js.map +7 -1
- package/dist/commonjs/documents/GeospatialType.js +32 -13
- package/dist/commonjs/documents/GeospatialType.js.map +7 -1
- package/dist/commonjs/documents/IndexKind.js +32 -20
- package/dist/commonjs/documents/IndexKind.js.map +7 -1
- package/dist/commonjs/documents/IndexingMode.js +33 -27
- package/dist/commonjs/documents/IndexingMode.js.map +7 -1
- package/dist/commonjs/documents/IndexingPolicy.js +42 -30
- package/dist/commonjs/documents/IndexingPolicy.js.map +7 -1
- package/dist/commonjs/documents/PartitionKey.js +44 -27
- package/dist/commonjs/documents/PartitionKey.js.map +7 -1
- package/dist/commonjs/documents/PartitionKeyDefinition.js +16 -3
- package/dist/commonjs/documents/PartitionKeyDefinition.js.map +7 -1
- package/dist/commonjs/documents/PartitionKeyDefinitionVersion.js +32 -14
- package/dist/commonjs/documents/PartitionKeyDefinitionVersion.js.map +7 -1
- package/dist/commonjs/documents/PartitionKeyInternal.js +36 -28
- package/dist/commonjs/documents/PartitionKeyInternal.js.map +7 -1
- package/dist/commonjs/documents/PartitionKeyKind.js +32 -14
- package/dist/commonjs/documents/PartitionKeyKind.js.map +7 -1
- package/dist/commonjs/documents/PermissionMode.js +33 -18
- package/dist/commonjs/documents/PermissionMode.js.map +7 -1
- package/dist/commonjs/documents/PriorityLevel.js +32 -25
- package/dist/commonjs/documents/PriorityLevel.js.map +7 -1
- package/dist/commonjs/documents/TriggerOperation.js +35 -23
- package/dist/commonjs/documents/TriggerOperation.js.map +7 -1
- package/dist/commonjs/documents/TriggerType.js +32 -17
- package/dist/commonjs/documents/TriggerType.js.map +7 -1
- package/dist/commonjs/documents/UserDefinedFunctionType.js +31 -15
- package/dist/commonjs/documents/UserDefinedFunctionType.js.map +7 -1
- package/dist/commonjs/documents/VectorEmbeddingPolicy.js +42 -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 +58 -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 +98 -71
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.js.map +7 -1
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/index.js +28 -8
- package/dist/commonjs/encryption/AeadAes256CbcHmacSha256Algorithm/index.js.map +7 -1
- package/dist/commonjs/encryption/Cache/ClientEncryptionKeyPropertiesCache.js +38 -23
- package/dist/commonjs/encryption/Cache/ClientEncryptionKeyPropertiesCache.js.map +7 -1
- package/dist/commonjs/encryption/Cache/EncryptionSettingsCache.js +53 -36
- package/dist/commonjs/encryption/Cache/EncryptionSettingsCache.js.map +7 -1
- package/dist/commonjs/encryption/Cache/KeyEncryptionKeyCache.js +47 -32
- package/dist/commonjs/encryption/Cache/KeyEncryptionKeyCache.js.map +7 -1
- package/dist/commonjs/encryption/Cache/ProtectedDataEncryptionKeyCache.js +100 -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 +16 -5
- package/dist/commonjs/encryption/ClientEncryptionIncludedPath.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyProperties.js +16 -5
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyProperties.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionKey/ClientEncryptionKeyRequest.js +16 -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 +35 -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 +28 -8
- package/dist/commonjs/encryption/ClientEncryptionKey/index.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionOptions.js +16 -5
- package/dist/commonjs/encryption/ClientEncryptionOptions.js.map +7 -1
- package/dist/commonjs/encryption/ClientEncryptionPolicy.js +16 -5
- package/dist/commonjs/encryption/ClientEncryptionPolicy.js.map +7 -1
- package/dist/commonjs/encryption/CosmosEncryptedNumber.js +32 -20
- package/dist/commonjs/encryption/CosmosEncryptedNumber.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionItemQueryIterator.js +130 -106
- package/dist/commonjs/encryption/EncryptionItemQueryIterator.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKey/DataEncryptionKey.js +52 -32
- package/dist/commonjs/encryption/EncryptionKey/DataEncryptionKey.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKey/ProtectedDataEncryptionKey.js +37 -23
- package/dist/commonjs/encryption/EncryptionKey/ProtectedDataEncryptionKey.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKey/index.js +31 -10
- package/dist/commonjs/encryption/EncryptionKey/index.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyResolver/AzureKeyVaultEncryptionKeyResolver.js +113 -94
- package/dist/commonjs/encryption/EncryptionKeyResolver/AzureKeyVaultEncryptionKeyResolver.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyResolver/EncryptionKeyResolver.js +16 -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 +28 -8
- package/dist/commonjs/encryption/EncryptionKeyResolver/index.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyStoreProvider.js +83 -55
- package/dist/commonjs/encryption/EncryptionKeyStoreProvider.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionKeyWrapMetadata.js +16 -5
- package/dist/commonjs/encryption/EncryptionKeyWrapMetadata.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionManager.js +58 -42
- package/dist/commonjs/encryption/EncryptionManager.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionProcessor.js +346 -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 +110 -99
- package/dist/commonjs/encryption/EncryptionQueryBuilder.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionSettingForProperty.js +65 -33
- package/dist/commonjs/encryption/EncryptionSettingForProperty.js.map +7 -1
- package/dist/commonjs/encryption/EncryptionSettings.js +46 -30
- package/dist/commonjs/encryption/EncryptionSettings.js.map +7 -1
- package/dist/commonjs/encryption/KeyEncryptionKey.js +52 -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 +38 -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 +40 -20
- package/dist/commonjs/encryption/Serializers/FloatSerializer.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/NumberSerializer.js +39 -19
- package/dist/commonjs/encryption/Serializers/NumberSerializer.js.map +7 -1
- package/dist/commonjs/encryption/Serializers/Serializer.js +16 -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 +34 -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 +37 -14
- package/dist/commonjs/encryption/Serializers/index.js.map +7 -1
- package/dist/commonjs/encryption/enums/EncryptionAlgorithm.js +31 -13
- package/dist/commonjs/encryption/enums/EncryptionAlgorithm.js.map +7 -1
- package/dist/commonjs/encryption/enums/EncryptionKeyResolverName.js +31 -12
- package/dist/commonjs/encryption/enums/EncryptionKeyResolverName.js.map +7 -1
- package/dist/commonjs/encryption/enums/EncryptionType.js +32 -16
- package/dist/commonjs/encryption/enums/EncryptionType.js.map +7 -1
- package/dist/commonjs/encryption/enums/KeyEncryptionAlgorithm.js +31 -12
- package/dist/commonjs/encryption/enums/KeyEncryptionAlgorithm.js.map +7 -1
- package/dist/commonjs/encryption/enums/TypeMarker.js +35 -14
- package/dist/commonjs/encryption/enums/TypeMarker.js.map +7 -1
- package/dist/commonjs/encryption/enums/index.js +37 -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 +56 -26
- package/dist/commonjs/encryption/index.js.map +7 -1
- package/dist/commonjs/extractPartitionKey.js +93 -91
- package/dist/commonjs/extractPartitionKey.js.map +7 -1
- package/dist/commonjs/globalEndpointManager.js +366 -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 +324 -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 +178 -96
- package/dist/commonjs/index.js.map +7 -1
- package/dist/commonjs/plugins/Plugin.js +51 -44
- package/dist/commonjs/plugins/Plugin.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/Aggregator.js +16 -3
- package/dist/commonjs/queryExecutionContext/Aggregators/Aggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/AverageAggregator.js +50 -29
- package/dist/commonjs/queryExecutionContext/Aggregators/AverageAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/CountAggregator.js +47 -26
- package/dist/commonjs/queryExecutionContext/Aggregators/CountAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/GlobalStatisticsAggregator.js +65 -54
- package/dist/commonjs/queryExecutionContext/Aggregators/GlobalStatisticsAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MakeListAggregator.js +39 -18
- package/dist/commonjs/queryExecutionContext/Aggregators/MakeListAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MakeSetAggregator.js +47 -29
- package/dist/commonjs/queryExecutionContext/Aggregators/MakeSetAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MaxAggregator.js +55 -38
- package/dist/commonjs/queryExecutionContext/Aggregators/MaxAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/MinAggregator.js +59 -43
- package/dist/commonjs/queryExecutionContext/Aggregators/MinAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/StaticValueAggregator.js +35 -14
- package/dist/commonjs/queryExecutionContext/Aggregators/StaticValueAggregator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/Aggregators/SumAggregator.js +45 -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 +64 -39
- package/dist/commonjs/queryExecutionContext/Aggregators/index.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js +182 -166
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/BaseContinuationTokenManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js +46 -30
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ContinuationTokenManagerFactory.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js +147 -124
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/OrderByQueryContinuationTokenManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js +71 -65
- package/dist/commonjs/queryExecutionContext/ContinuationTokenManager/ParallelQueryContinuationTokenManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.js +39 -24
- package/dist/commonjs/queryExecutionContext/ContinuationTokenParser.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/CosmosHeaders.js +16 -3
- package/dist/commonjs/queryExecutionContext/CosmosHeaders.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js +113 -107
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js +118 -107
- package/dist/commonjs/queryExecutionContext/EndpointComponent/GroupByValueEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js +169 -155
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByDistinctEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js +158 -143
- package/dist/commonjs/queryExecutionContext/EndpointComponent/NonStreamingOrderByEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js +85 -64
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js +82 -58
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js +72 -48
- package/dist/commonjs/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js +61 -42
- package/dist/commonjs/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/EndpointComponent/emptyGroup.js +31 -13
- package/dist/commonjs/queryExecutionContext/EndpointComponent/emptyGroup.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/ExecutionContext.js +16 -3
- package/dist/commonjs/queryExecutionContext/ExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/FetchResult.js +56 -38
- package/dist/commonjs/queryExecutionContext/FetchResult.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/LegacyFetchImplementation.js +62 -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 +152 -155
- package/dist/commonjs/queryExecutionContext/PartitionRangeManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.js +94 -102
- package/dist/commonjs/queryExecutionContext/PartitionRangeUtils.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.js +113 -89
- package/dist/commonjs/queryExecutionContext/QueryControlFetchImplementation.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.js +64 -66
- package/dist/commonjs/queryExecutionContext/QueryValidationHelper.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/SqlQuerySpec.js +16 -3
- package/dist/commonjs/queryExecutionContext/SqlQuerySpec.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.js +220 -191
- package/dist/commonjs/queryExecutionContext/defaultQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/documentProducer.js +286 -276
- package/dist/commonjs/queryExecutionContext/documentProducer.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/headerUtils.js +95 -89
- package/dist/commonjs/queryExecutionContext/headerUtils.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/hybridQueryExecutionContext.js +499 -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 +62 -29
- package/dist/commonjs/queryExecutionContext/index.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResponse.js +16 -5
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResponse.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResult.js +16 -5
- package/dist/commonjs/queryExecutionContext/nonStreamingOrderByResult.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/orderByComparator.js +107 -113
- package/dist/commonjs/queryExecutionContext/orderByComparator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.js +145 -134
- package/dist/commonjs/queryExecutionContext/orderByDocumentProducerComparator.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.js +91 -61
- package/dist/commonjs/queryExecutionContext/orderByQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContext.js +86 -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 +842 -788
- package/dist/commonjs/queryExecutionContext/parallelQueryExecutionContextBase.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.js +36 -24
- package/dist/commonjs/queryExecutionContext/parallelQueryResult.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.js +286 -228
- package/dist/commonjs/queryExecutionContext/pipelinedQueryExecutionContext.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js +16 -5
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/FilterStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts +2 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +263 -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 +94 -98
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/ParallelQueryRangeStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js +149 -177
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/RidSkipCountFilter.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js +105 -92
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeManager.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js +16 -5
- package/dist/commonjs/queryExecutionContext/queryFilteringStrategy/TargetPartitionRangeStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js +68 -55
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/OrderByQueryProcessingStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js +52 -36
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/ParallelQueryProcessingStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js +16 -5
- package/dist/commonjs/queryExecutionContext/queryProcessingStrategy/QueryProcessingStrategy.js.map +7 -1
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.js +16 -5
- package/dist/commonjs/queryExecutionContext/queryRangeMapping.js.map +7 -1
- package/dist/commonjs/queryIterator.js +411 -354
- package/dist/commonjs/queryIterator.js.map +7 -1
- package/dist/commonjs/queryMetrics/clientSideMetrics.js +49 -29
- package/dist/commonjs/queryMetrics/clientSideMetrics.js.map +7 -1
- package/dist/commonjs/queryMetrics/index.js +53 -19
- package/dist/commonjs/queryMetrics/index.js.map +7 -1
- package/dist/commonjs/queryMetrics/queryMetrics.js +189 -159
- package/dist/commonjs/queryMetrics/queryMetrics.js.map +7 -1
- package/dist/commonjs/queryMetrics/queryMetricsConstants.js +75 -57
- package/dist/commonjs/queryMetrics/queryMetricsConstants.js.map +7 -1
- package/dist/commonjs/queryMetrics/queryMetricsUtils.js +52 -38
- package/dist/commonjs/queryMetrics/queryMetricsUtils.js.map +7 -1
- package/dist/commonjs/queryMetrics/queryPreparationTime.js +110 -65
- package/dist/commonjs/queryMetrics/queryPreparationTime.js.map +7 -1
- package/dist/commonjs/queryMetrics/runtimeExecutionTimes.js +120 -68
- package/dist/commonjs/queryMetrics/runtimeExecutionTimes.js.map +7 -1
- package/dist/commonjs/queryMetrics/timeSpan.js +206 -217
- package/dist/commonjs/queryMetrics/timeSpan.js.map +7 -1
- package/dist/commonjs/request/ErrorResponse.js +46 -27
- package/dist/commonjs/request/ErrorResponse.js.map +7 -1
- package/dist/commonjs/request/FeedOptions.js +16 -3
- package/dist/commonjs/request/FeedOptions.js.map +7 -1
- package/dist/commonjs/request/FeedResponse.js +60 -40
- package/dist/commonjs/request/FeedResponse.js.map +7 -1
- package/dist/commonjs/request/RequestContext.js +16 -3
- package/dist/commonjs/request/RequestContext.js.map +7 -1
- package/dist/commonjs/request/RequestHandler.js +173 -153
- package/dist/commonjs/request/RequestHandler.js.map +7 -1
- package/dist/commonjs/request/RequestOptions.js +16 -3
- package/dist/commonjs/request/RequestOptions.js.map +7 -1
- package/dist/commonjs/request/ResourceResponse.js +49 -27
- package/dist/commonjs/request/ResourceResponse.js.map +7 -1
- package/dist/commonjs/request/Response.js +16 -3
- package/dist/commonjs/request/Response.js.map +7 -1
- package/dist/commonjs/request/SharedOptions.js +16 -3
- package/dist/commonjs/request/SharedOptions.js.map +7 -1
- package/dist/commonjs/request/StatusCodes.js +16 -5
- package/dist/commonjs/request/StatusCodes.js.map +7 -1
- package/dist/commonjs/request/TimeoutError.js +35 -16
- package/dist/commonjs/request/TimeoutError.js.map +7 -1
- package/dist/commonjs/request/defaultAgent.js +46 -18
- package/dist/commonjs/request/defaultAgent.js.map +7 -1
- package/dist/commonjs/request/globalStatistics.js +16 -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 +62 -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 +37 -16
- package/dist/commonjs/request/index.js.map +7 -1
- package/dist/commonjs/request/request.js +188 -186
- package/dist/commonjs/request/request.js.map +7 -1
- package/dist/commonjs/retry/RetryContext.js +16 -3
- package/dist/commonjs/retry/RetryContext.js.map +7 -1
- package/dist/commonjs/retry/RetryPolicy.js +16 -3
- package/dist/commonjs/retry/RetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/bulkExecutionRetryPolicy.js +65 -56
- package/dist/commonjs/retry/bulkExecutionRetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/defaultRetryPolicy.js +68 -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 +98 -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 +30 -12
- package/dist/commonjs/retry/index.js.map +7 -1
- package/dist/commonjs/retry/resourceThrottleRetryPolicy.js +74 -61
- package/dist/commonjs/retry/resourceThrottleRetryPolicy.js.map +7 -1
- package/dist/commonjs/retry/retryOptions.js +16 -3
- package/dist/commonjs/retry/retryOptions.js.map +7 -1
- package/dist/commonjs/retry/retryUtility.js +169 -133
- package/dist/commonjs/retry/retryUtility.js.map +7 -1
- package/dist/commonjs/retry/sessionRetryPolicy.js +84 -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 +124 -119
- package/dist/commonjs/retry/timeoutFailoverRetryPolicy.js.map +7 -1
- package/dist/commonjs/routing/CollectionRoutingMapFactory.js +70 -67
- package/dist/commonjs/routing/CollectionRoutingMapFactory.js.map +7 -1
- package/dist/commonjs/routing/QueryRange.js +93 -66
- package/dist/commonjs/routing/QueryRange.js.map +7 -1
- package/dist/commonjs/routing/inMemoryCollectionRoutingMap.js +112 -84
- package/dist/commonjs/routing/inMemoryCollectionRoutingMap.js.map +7 -1
- package/dist/commonjs/routing/index.js +28 -10
- package/dist/commonjs/routing/index.js.map +7 -1
- package/dist/commonjs/routing/partitionKeyRangeCache.js +83 -56
- package/dist/commonjs/routing/partitionKeyRangeCache.js.map +7 -1
- package/dist/commonjs/routing/smartRoutingMapProvider.js +131 -110
- package/dist/commonjs/routing/smartRoutingMapProvider.js.map +7 -1
- package/dist/commonjs/session/SessionContext.js +16 -3
- package/dist/commonjs/session/SessionContext.js.map +7 -1
- package/dist/commonjs/session/VectorSessionToken.js +130 -125
- package/dist/commonjs/session/VectorSessionToken.js.map +7 -1
- package/dist/commonjs/session/sessionContainer.js +135 -127
- package/dist/commonjs/session/sessionContainer.js.map +7 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/utils/SasToken.js +101 -120
- package/dist/commonjs/utils/SasToken.js.map +7 -1
- package/dist/commonjs/utils/atob.js +24 -7
- package/dist/commonjs/utils/atob.js.map +7 -1
- package/dist/commonjs/utils/batch.js +196 -197
- package/dist/commonjs/utils/batch.js.map +7 -1
- package/dist/commonjs/utils/cachedClient.js +32 -11
- package/dist/commonjs/utils/cachedClient.js.map +7 -1
- package/dist/commonjs/utils/checkURL.js +34 -14
- package/dist/commonjs/utils/checkURL.js.map +7 -1
- package/dist/commonjs/utils/diagnostics.js +107 -118
- package/dist/commonjs/utils/diagnostics.js.map +7 -1
- package/dist/commonjs/utils/digest.js +31 -10
- package/dist/commonjs/utils/digest.js.map +7 -1
- package/dist/commonjs/utils/encode.js +44 -23
- package/dist/commonjs/utils/encode.js.map +7 -1
- package/dist/commonjs/utils/envUtils.js +40 -10
- package/dist/commonjs/utils/envUtils.js.map +7 -1
- package/dist/commonjs/utils/fixedSizePriorityQueue.js +86 -55
- package/dist/commonjs/utils/fixedSizePriorityQueue.js.map +7 -1
- package/dist/commonjs/utils/globalCrypto.js +29 -10
- package/dist/commonjs/utils/globalCrypto.js.map +7 -1
- package/dist/commonjs/utils/hashObject.js +41 -11
- package/dist/commonjs/utils/hashObject.js.map +7 -1
- package/dist/commonjs/utils/hashing/encoding/number.js +73 -56
- package/dist/commonjs/utils/hashing/encoding/number.js.map +7 -1
- package/dist/commonjs/utils/hashing/encoding/prefix.js +50 -29
- package/dist/commonjs/utils/hashing/encoding/prefix.js.map +7 -1
- package/dist/commonjs/utils/hashing/encoding/string.js +45 -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 +55 -43
- package/dist/commonjs/utils/hashing/hash.js.map +7 -1
- package/dist/commonjs/utils/hashing/multiHash.js +29 -11
- package/dist/commonjs/utils/hashing/multiHash.js.map +7 -1
- package/dist/commonjs/utils/hashing/murmurHash.js +362 -412
- package/dist/commonjs/utils/hashing/murmurHash.js.map +7 -1
- package/dist/commonjs/utils/hashing/v1.js +101 -71
- package/dist/commonjs/utils/hashing/v1.js.map +7 -1
- package/dist/commonjs/utils/hashing/v2.js +84 -63
- package/dist/commonjs/utils/hashing/v2.js.map +7 -1
- package/dist/commonjs/utils/headers.js +45 -33
- package/dist/commonjs/utils/headers.js.map +7 -1
- package/dist/commonjs/utils/hmac.js +29 -8
- package/dist/commonjs/utils/hmac.js.map +7 -1
- package/dist/commonjs/utils/nonStreamingOrderByMap.js +64 -52
- package/dist/commonjs/utils/nonStreamingOrderByMap.js.map +7 -1
- package/dist/commonjs/utils/offers.js +36 -13
- package/dist/commonjs/utils/offers.js.map +7 -1
- package/dist/commonjs/utils/patch.js +33 -12
- package/dist/commonjs/utils/patch.js.map +7 -1
- package/dist/commonjs/utils/strings.js +28 -7
- package/dist/commonjs/utils/strings.js.map +7 -1
- package/dist/commonjs/utils/supportedQueryFeaturesBuilder.js +37 -16
- package/dist/commonjs/utils/supportedQueryFeaturesBuilder.js.map +7 -1
- package/dist/commonjs/utils/time.js +39 -30
- package/dist/commonjs/utils/time.js.map +7 -1
- package/dist/commonjs/utils/tracing.js +33 -17
- package/dist/commonjs/utils/tracing.js.map +7 -1
- package/dist/commonjs/utils/typeChecks.js +50 -60
- package/dist/commonjs/utils/typeChecks.js.map +7 -1
- package/dist/commonjs/utils/types.js +16 -5
- package/dist/commonjs/utils/types.js.map +7 -1
- package/dist/commonjs/utils/uint8.js +45 -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/OrderByQueryRangeStrategy.d.ts +2 -1
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -1
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +6 -5
- package/dist/esm/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.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/OrderByQueryRangeStrategy.d.ts +2 -1
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.d.ts.map +1 -1
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.js +6 -5
- package/dist/react-native/queryExecutionContext/queryFilteringStrategy/OrderByQueryRangeStrategy.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 +6 -23
- 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,5 +1,5 @@
|
|
|
1
1
|
import { EncryptionType } from "../enums/index.js";
|
|
2
|
-
import { DataEncryptionKey } from "../EncryptionKey/index.js";
|
|
2
|
+
import type { DataEncryptionKey } from "../EncryptionKey/index.js";
|
|
3
3
|
export declare class AeadAes256CbcHmacSha256Algorithm {
|
|
4
4
|
private algoVersion;
|
|
5
5
|
private blockSizeInBytes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AeadAes256CbcHmacSha256Algorithm.d.ts","sourceRoot":"","sources":["../../../../src/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"AeadAes256CbcHmacSha256Algorithm.d.ts","sourceRoot":"","sources":["../../../../src/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,qBAAa,gCAAgC;IAC3C,OAAO,CAAC,WAAW,CAAO;IAC1B,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,uBAAuB,CAAS;gBAE5B,iBAAiB,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc;IASzE,OAAO,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM;IAiBxC,OAAO,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM;IAoChD,OAAO,CAAC,yBAAyB;IAKjC,OAAO,CAAC,yBAAyB;CAMlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AeadAes256CbcHmacSha256Algorithm.js","sourceRoot":"","sources":["../../../../src/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGxF,MAAM,OAAO,gCAAgC;IACnC,WAAW,GAAG,GAAG,CAAC;IAClB,gBAAgB,GAAG,EAAE,CAAC;IACtB,cAAc,CAAiB;IAC/B,iBAAiB,CAAoB;IACrC,OAAO,CAAS;IAChB,WAAW,CAAS;IACpB,cAAc,CAAS;IACvB,uBAAuB,CAAS;IAExC,YAAY,iBAAoC,EAAE,cAA8B;QAC9E,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;QAC/C,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpC,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,uBAAuB,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC;IACrF,CAAC;IAEM,OAAO,CAAC,eAAuB;QACpC,IAAI,EAAU,CAAC;QACf,+BAA+B;QAC/B,IAAI,IAAI,CAAC,cAAc,KAAK,cAAc,CAAC,UAAU,EAAE,CAAC;YACtD,EAAE,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;QACvB,CAAC;aAAM,CAAC;YACN,MAAM,MAAM,GAAG,UAA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B;QACzF,MAAM,eAAe,GAAG,IAAI,CAAC,yBAAyB,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QACvE,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC;YAC/C,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { EncryptionType } from \"../enums/index.js\";\nimport { createCipheriv, randomBytes, createHmac, createDecipheriv } from \"node:crypto\";\nimport { DataEncryptionKey } from \"../EncryptionKey/index.js\";\n\nexport class AeadAes256CbcHmacSha256Algorithm {\n private algoVersion = 0x1;\n private blockSizeInBytes = 16;\n private encryptionType: EncryptionType;\n private dataEncryptionKey: DataEncryptionKey;\n private version: Buffer;\n private versionSize: Buffer;\n private keySizeInBytes: number;\n private minimumCipherTextLength: number;\n\n constructor(dataEncryptionKey: DataEncryptionKey, encryptionType: EncryptionType) {\n this.dataEncryptionKey = dataEncryptionKey;\n this.encryptionType = encryptionType;\n this.version = Buffer.from([this.algoVersion]);\n this.versionSize = Buffer.from([1]);\n this.keySizeInBytes = 32;\n this.minimumCipherTextLength = 1 + 2 * this.blockSizeInBytes + this.keySizeInBytes;\n }\n\n public encrypt(plainTextBuffer: Buffer): Buffer {\n let iv: Buffer;\n // create initialization vector\n if (this.encryptionType === EncryptionType.RANDOMIZED) {\n iv = randomBytes(16);\n } else {\n const ivHmac = createHmac(\"sha256\", this.dataEncryptionKey.ivKeyBuffer);\n ivHmac.update(plainTextBuffer);\n iv = ivHmac.digest().slice(0, this.blockSizeInBytes);\n }\n // create cipher text\n const cipher = createCipheriv(\"aes-256-cbc\", this.dataEncryptionKey.encryptionKeyBuffer, iv);\n const cipherTextBuffer = Buffer.concat([cipher.update(plainTextBuffer), cipher.final()]);\n const authTagBuffer = this.generateAuthenticationTag(iv, cipherTextBuffer);\n return Buffer.concat([Buffer.from([this.algoVersion]), authTagBuffer, iv, cipherTextBuffer]);\n }\n\n public decrypt(cipherTextBuffer: Buffer): Buffer {\n if (cipherTextBuffer.length < this.minimumCipherTextLength) {\n throw new Error(\"Invalid cipher text length\");\n }\n if (cipherTextBuffer[0] !== this.algoVersion) {\n throw new Error(\"Invalid cipher text version\");\n }\n const authTagStartIndex = 1;\n const authTagLength = this.keySizeInBytes;\n const ivStartIndex = authTagStartIndex + authTagLength;\n const ivLength = this.blockSizeInBytes;\n const cipherTextStartIndex = ivStartIndex + ivLength;\n const cipherTextLength = cipherTextBuffer.length - cipherTextStartIndex;\n\n const authenticationTag = cipherTextBuffer.slice(\n authTagStartIndex,\n authTagStartIndex + authTagLength,\n );\n const iv = cipherTextBuffer.slice(ivStartIndex, ivStartIndex + ivLength);\n const cipherText = cipherTextBuffer.slice(\n cipherTextStartIndex,\n cipherTextStartIndex + cipherTextLength,\n );\n\n this.validateAuthenticationTag(authenticationTag, iv, cipherText);\n\n const decipher = createDecipheriv(\n \"aes-256-cbc\",\n this.dataEncryptionKey.encryptionKeyBuffer,\n iv,\n );\n const decrypted = decipher.update(cipherText);\n const result = Buffer.concat([decrypted, decipher.final()]);\n return result;\n }\n\n private generateAuthenticationTag(iv: Buffer, cipherTextBuffer: Buffer): Buffer {\n const hmac = createHmac(\"sha256\", this.dataEncryptionKey.macKeyBuffer);\n const buffer = Buffer.concat([this.version, iv, cipherTextBuffer, this.versionSize]);\n return hmac.update(buffer).digest();\n }\n private validateAuthenticationTag(authenticationTag: Buffer, iv: Buffer, cipherText: Buffer) {\n const expectedAuthTag = this.generateAuthenticationTag(iv, cipherText);\n if (!authenticationTag.equals(expectedAuthTag)) {\n throw new Error(\"Invalid authentication tag\");\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AeadAes256CbcHmacSha256Algorithm.js","sourceRoot":"","sources":["../../../../src/encryption/AeadAes256CbcHmacSha256Algorithm/AeadAes256CbcHmacSha256Algorithm.ts"],"names":[],"mappings":"AAAA,u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,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { EncryptionType } from \"../enums/index.js\";\nimport { createCipheriv, randomBytes, createHmac, createDecipheriv } from \"node:crypto\";\nimport type { DataEncryptionKey } from \"../EncryptionKey/index.js\";\n\nexport class AeadAes256CbcHmacSha256Algorithm {\n private algoVersion = 0x1;\n private blockSizeInBytes = 16;\n private encryptionType: EncryptionType;\n private dataEncryptionKey: DataEncryptionKey;\n private version: Buffer;\n private versionSize: Buffer;\n private keySizeInBytes: number;\n private minimumCipherTextLength: number;\n\n constructor(dataEncryptionKey: DataEncryptionKey, encryptionType: EncryptionType) {\n this.dataEncryptionKey = dataEncryptionKey;\n this.encryptionType = encryptionType;\n this.version = Buffer.from([this.algoVersion]);\n this.versionSize = Buffer.from([1]);\n this.keySizeInBytes = 32;\n this.minimumCipherTextLength = 1 + 2 * this.blockSizeInBytes + this.keySizeInBytes;\n }\n\n public encrypt(plainTextBuffer: Buffer): Buffer {\n let iv: Buffer;\n // create initialization vector\n if (this.encryptionType === EncryptionType.RANDOMIZED) {\n iv = randomBytes(16);\n } else {\n const ivHmac = createHmac(\"sha256\", this.dataEncryptionKey.ivKeyBuffer);\n ivHmac.update(plainTextBuffer);\n iv = ivHmac.digest().slice(0, this.blockSizeInBytes);\n }\n // create cipher text\n const cipher = createCipheriv(\"aes-256-cbc\", this.dataEncryptionKey.encryptionKeyBuffer, iv);\n const cipherTextBuffer = Buffer.concat([cipher.update(plainTextBuffer), cipher.final()]);\n const authTagBuffer = this.generateAuthenticationTag(iv, cipherTextBuffer);\n return Buffer.concat([Buffer.from([this.algoVersion]), authTagBuffer, iv, cipherTextBuffer]);\n }\n\n public decrypt(cipherTextBuffer: Buffer): Buffer {\n if (cipherTextBuffer.length < this.minimumCipherTextLength) {\n throw new Error(\"Invalid cipher text length\");\n }\n if (cipherTextBuffer[0] !== this.algoVersion) {\n throw new Error(\"Invalid cipher text version\");\n }\n const authTagStartIndex = 1;\n const authTagLength = this.keySizeInBytes;\n const ivStartIndex = authTagStartIndex + authTagLength;\n const ivLength = this.blockSizeInBytes;\n const cipherTextStartIndex = ivStartIndex + ivLength;\n const cipherTextLength = cipherTextBuffer.length - cipherTextStartIndex;\n\n const authenticationTag = cipherTextBuffer.slice(\n authTagStartIndex,\n authTagStartIndex + authTagLength,\n );\n const iv = cipherTextBuffer.slice(ivStartIndex, ivStartIndex + ivLength);\n const cipherText = cipherTextBuffer.slice(\n cipherTextStartIndex,\n cipherTextStartIndex + cipherTextLength,\n );\n\n this.validateAuthenticationTag(authenticationTag, iv, cipherText);\n\n const decipher = createDecipheriv(\n \"aes-256-cbc\",\n this.dataEncryptionKey.encryptionKeyBuffer,\n iv,\n );\n const decrypted = decipher.update(cipherText);\n const result = Buffer.concat([decrypted, decipher.final()]);\n return result;\n }\n\n private generateAuthenticationTag(iv: Buffer, cipherTextBuffer: Buffer): Buffer {\n const hmac = createHmac(\"sha256\", this.dataEncryptionKey.macKeyBuffer);\n const buffer = Buffer.concat([this.version, iv, cipherTextBuffer, this.versionSize]);\n return hmac.update(buffer).digest();\n }\n private validateAuthenticationTag(authenticationTag: Buffer, iv: Buffer, cipherText: Buffer) {\n const expectedAuthTag = this.generateAuthenticationTag(iv, cipherText);\n if (!authenticationTag.equals(expectedAuthTag)) {\n throw new Error(\"Invalid authentication tag\");\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientEncryptionIncludedPath.d.ts","sourceRoot":"","sources":["../../../src/encryption/ClientEncryptionIncludedPath.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ClientEncryptionIncludedPath.d.ts","sourceRoot":"","sources":["../../../src/encryption/ClientEncryptionIncludedPath.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5E;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,cAAc,EAAE,cAAc,CAAC;IAC/B;;;OAGG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientEncryptionIncludedPath.js","sourceRoot":"","sources":["../../../src/encryption/ClientEncryptionIncludedPath.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { EncryptionType, EncryptionAlgorithm } from \"./enums/index.js\";\n\n/**\n * Represents a path for encryption and its associated settings.\n */\nexport interface ClientEncryptionIncludedPath {\n /**\n * name of the path to be encrypted\n */\n path: string;\n /**\n * identifier of the client encryption key to use to encrypt the path\n */\n clientEncryptionKeyId: string;\n /**\n * type of encryption to be performed (Deterministic or Randomized)\n */\n encryptionType: EncryptionType;\n /**\n * encryption algorithm to be used\n * currently only AEAD_AES_256_CBC_HMAC_SHA256 algo is supported\n */\n encryptionAlgorithm: EncryptionAlgorithm;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ClientEncryptionIncludedPath.js","sourceRoot":"","sources":["../../../src/encryption/ClientEncryptionIncludedPath.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { EncryptionType, EncryptionAlgorithm } from \"./enums/index.js\";\n\n/**\n * Represents a path for encryption and its associated settings.\n */\nexport interface ClientEncryptionIncludedPath {\n /**\n * name of the path to be encrypted\n */\n path: string;\n /**\n * identifier of the client encryption key to use to encrypt the path\n */\n clientEncryptionKeyId: string;\n /**\n * type of encryption to be performed (Deterministic or Randomized)\n */\n encryptionType: EncryptionType;\n /**\n * encryption algorithm to be used\n * currently only AEAD_AES_256_CBC_HMAC_SHA256 algo is supported\n */\n encryptionAlgorithm: EncryptionAlgorithm;\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CosmosDiagnostics } from "../../CosmosDiagnostics.js";
|
|
2
|
-
import { CosmosHeaders } from "../../queryExecutionContext/index.js";
|
|
1
|
+
import type { CosmosDiagnostics } from "../../CosmosDiagnostics.js";
|
|
2
|
+
import type { CosmosHeaders } from "../../queryExecutionContext/index.js";
|
|
3
3
|
import { ResourceResponse } from "../../request/ResourceResponse.js";
|
|
4
|
-
import { Resource } from "../../client/Resource.js";
|
|
5
|
-
import { ClientEncryptionKeyProperties } from "./ClientEncryptionKeyProperties.js";
|
|
4
|
+
import type { Resource } from "../../client/Resource.js";
|
|
5
|
+
import type { ClientEncryptionKeyProperties } from "./ClientEncryptionKeyProperties.js";
|
|
6
6
|
/** Response object for ClientEncryptionKey operations */
|
|
7
7
|
export declare class ClientEncryptionKeyResponse extends ResourceResponse<Resource> {
|
|
8
8
|
constructor(resource: Resource, headers: CosmosHeaders, statusCode: number, clientEncryptionKeyProperties: ClientEncryptionKeyProperties, diagnostics: CosmosDiagnostics);
|
package/dist/react-native/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientEncryptionKeyResponse.d.ts","sourceRoot":"","sources":["../../../../src/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"ClientEncryptionKeyResponse.d.ts","sourceRoot":"","sources":["../../../../src/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAExF,yDAAyD;AACzD,qBAAa,2BAA4B,SAAQ,gBAAgB,CAAC,QAAQ,CAAC;gBAEvE,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,aAAa,EACtB,UAAU,EAAE,MAAM,EAClB,6BAA6B,EAAE,6BAA6B,EAC5D,WAAW,EAAE,iBAAiB;IAKhC,8CAA8C;IAC9C,SAAgB,6BAA6B,EAAE,6BAA6B,CAAC;CAC9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientEncryptionKeyResponse.js","sourceRoot":"","sources":["../../../../src/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAIrE,yDAAyD;AACzD,MAAM,OAAO,2BAA4B,SAAQ,gBAA0B;IACzE,YACE,QAAkB,EAClB,OAAsB,EACtB,UAAkB,EAClB,6BAA4D,EAC5D,WAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QAClD,IAAI,CAAC,6BAA6B,GAAG,6BAA6B,CAAC;IACrE,CAAC;IACD,8CAA8C;IAC9B,6BAA6B,CAAgC;CAC9E","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CosmosDiagnostics } from \"../../CosmosDiagnostics.js\";\nimport { CosmosHeaders } from \"../../queryExecutionContext/index.js\";\nimport { ResourceResponse } from \"../../request/ResourceResponse.js\";\nimport { Resource } from \"../../client/Resource.js\";\nimport { ClientEncryptionKeyProperties } from \"./ClientEncryptionKeyProperties.js\";\n\n/** Response object for ClientEncryptionKey operations */\nexport class ClientEncryptionKeyResponse extends ResourceResponse<Resource> {\n constructor(\n resource: Resource,\n headers: CosmosHeaders,\n statusCode: number,\n clientEncryptionKeyProperties: ClientEncryptionKeyProperties,\n diagnostics: CosmosDiagnostics,\n ) {\n super(resource, headers, statusCode, diagnostics);\n this.clientEncryptionKeyProperties = clientEncryptionKeyProperties;\n }\n /** Properties of the client encryption key */\n public readonly clientEncryptionKeyProperties: ClientEncryptionKeyProperties;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ClientEncryptionKeyResponse.js","sourceRoot":"","sources":["../../../../src/encryption/ClientEncryptionKey/ClientEncryptionKeyResponse.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAIrE,yDAAyD;AACzD,MAAM,OAAO,2BAA4B,SAAQ,gBAA0B;IACzE,YACE,QAAkB,EAClB,OAAsB,EACtB,UAAkB,EAClB,6BAA4D,EAC5D,WAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QAClD,IAAI,CAAC,6BAA6B,GAAG,6BAA6B,CAAC;IACrE,CAAC;IACD,8CAA8C;IAC9B,6BAA6B,CAAgC;CAC9E","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CosmosDiagnostics } from \"../../CosmosDiagnostics.js\";\nimport type { CosmosHeaders } from \"../../queryExecutionContext/index.js\";\nimport { ResourceResponse } from \"../../request/ResourceResponse.js\";\nimport type { Resource } from \"../../client/Resource.js\";\nimport type { ClientEncryptionKeyProperties } from \"./ClientEncryptionKeyProperties.js\";\n\n/** Response object for ClientEncryptionKey operations */\nexport class ClientEncryptionKeyResponse extends ResourceResponse<Resource> {\n constructor(\n resource: Resource,\n headers: CosmosHeaders,\n statusCode: number,\n clientEncryptionKeyProperties: ClientEncryptionKeyProperties,\n diagnostics: CosmosDiagnostics,\n ) {\n super(resource, headers, statusCode, diagnostics);\n this.clientEncryptionKeyProperties = clientEncryptionKeyProperties;\n }\n /** Properties of the client encryption key */\n public readonly clientEncryptionKeyProperties: ClientEncryptionKeyProperties;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ClientEncryptionKeyProperties } from "./ClientEncryptionKeyProperties.js";
|
|
1
|
+
export type { ClientEncryptionKeyProperties } from "./ClientEncryptionKeyProperties.js";
|
|
2
2
|
export { ClientEncryptionKeyResponse } from "./ClientEncryptionKeyResponse.js";
|
|
3
|
-
export { ClientEncryptionKeyRequest } from "./ClientEncryptionKeyRequest.js";
|
|
3
|
+
export type { ClientEncryptionKeyRequest } from "./ClientEncryptionKeyRequest.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/encryption/ClientEncryptionKey/index.ts"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/encryption/ClientEncryptionKey/index.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACxF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,YAAY,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/encryption/ClientEncryptionKey/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { ClientEncryptionKeyProperties } from \"./ClientEncryptionKeyProperties.js\";\nexport { ClientEncryptionKeyResponse } from \"./ClientEncryptionKeyResponse.js\";\nexport { ClientEncryptionKeyRequest } from \"./ClientEncryptionKeyRequest.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/encryption/ClientEncryptionKey/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport type { ClientEncryptionKeyProperties } from \"./ClientEncryptionKeyProperties.js\";\nexport { ClientEncryptionKeyResponse } from \"./ClientEncryptionKeyResponse.js\";\nexport type { ClientEncryptionKeyRequest } from \"./ClientEncryptionKeyRequest.js\";\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { AzureKeyVaultEncryptionKeyResolver } from "./AzureKeyVaultEncryptionKeyResolver.js";
|
|
2
|
-
export { EncryptionKeyResolver } from "./EncryptionKeyResolver.js";
|
|
2
|
+
export type { EncryptionKeyResolver } from "./EncryptionKeyResolver.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/encryption/EncryptionKeyResolver/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7F,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/encryption/EncryptionKeyResolver/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7F,YAAY,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/encryption/EncryptionKeyResolver/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { AzureKeyVaultEncryptionKeyResolver } from \"./AzureKeyVaultEncryptionKeyResolver.js\";\nexport { EncryptionKeyResolver } from \"./EncryptionKeyResolver.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/encryption/EncryptionKeyResolver/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { AzureKeyVaultEncryptionKeyResolver } from \"./AzureKeyVaultEncryptionKeyResolver.js\";\nexport type { EncryptionKeyResolver } from \"./EncryptionKeyResolver.js\";\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SqlParameter, JSONArray, JSONObject, JSONValue } from "../queryExecutionContext/index.js";
|
|
1
|
+
import type { SqlParameter, JSONArray, JSONObject, JSONValue } from "../queryExecutionContext/index.js";
|
|
2
2
|
import { TypeMarker } from "./enums/TypeMarker.js";
|
|
3
|
-
import { CosmosEncryptedNumber } from "./CosmosEncryptedNumber.js";
|
|
3
|
+
import type { CosmosEncryptedNumber } from "./CosmosEncryptedNumber.js";
|
|
4
4
|
export interface EncryptionSqlParameter extends SqlParameter {
|
|
5
5
|
type?: TypeMarker;
|
|
6
6
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EncryptionQueryBuilder.d.ts","sourceRoot":"","sources":["../../../src/encryption/EncryptionQueryBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"EncryptionQueryBuilder.d.ts","sourceRoot":"","sources":["../../../src/encryption/EncryptionQueryBuilder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAEV,YAAY,EACZ,SAAS,EACT,UAAU,EACV,SAAS,EACV,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGxE,MAAM,WAAW,sBAAuB,SAAQ,YAAY;IAC1D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,qBAAa,sBAAsB;IACjC,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,UAAU,CAAC,CAA2B;gBAElC,KAAK,EAAE,MAAM;IAIzB;;OAEG;IACI,YAAY,CACjB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,UAAU,GAAG,IAAI,GAAG,qBAAqB,EACtF,IAAI,EAAE,MAAM,GACX,IAAI;IA8DP,0CAA0C;IACnC,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;CAanF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EncryptionQueryBuilder.js","sourceRoot":"","sources":["../../../src/encryption/EncryptionQueryBuilder.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"EncryptionQueryBuilder.js","sourceRoot":"","sources":["../../../src/encryption/EncryptionQueryBuilder.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AASlC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAOvE;;GAEG;AACH,MAAM,OAAO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J,CAAC;CACF;AAED,SAAS,uBAAuB,CAAC,GAAQ;IACvC,OAAO,CACL,GAAG,KAAK,IAAI;QACZ,OAAO,GAAG,KAAK,QAAQ;QACvB,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ;QAC7B,OAAO,GAAG,CAAC,UAAU,KAAK,QAAQ;QAClC,CAAC,GAAG,CAAC,UAAU,KAAK,yBAAyB,CAAC,OAAO;YACnD,GAAG,CAAC,UAAU,KAAK,yBAAyB,CAAC,KAAK,CAAC,CACtD,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n SqlQuerySpec,\n SqlParameter,\n JSONArray,\n JSONObject,\n JSONValue,\n} from \"../queryExecutionContext/index.js\";\nimport { TypeMarker } from \"./enums/TypeMarker.js\";\nimport type { CosmosEncryptedNumber } from \"./CosmosEncryptedNumber.js\";\nimport { CosmosEncryptedNumberType } from \"./CosmosEncryptedNumber.js\";\n\nexport interface EncryptionSqlParameter extends SqlParameter {\n type?: TypeMarker;\n path: string;\n}\n\n/**\n * Represents a builder class for building encrypted parameters in parametrized query.\n */\nexport class EncryptionQueryBuilder {\n private query: string;\n private parameters?: EncryptionSqlParameter[];\n\n constructor(query: string) {\n this.query = query;\n this.parameters = [];\n }\n /**\n * Adds parameter to query\n */\n public addParameter(\n name: string,\n value: boolean | string | null | JSONArray | JSONObject | Date | CosmosEncryptedNumber,\n path: string,\n ): void {\n if (value === null) {\n this.parameters.push({ name: name, value: null, path: path });\n return;\n }\n switch (true) {\n case typeof value === \"boolean\":\n this.parameters.push({\n name,\n value,\n type: TypeMarker.Boolean,\n path,\n });\n break;\n case typeof value === \"string\":\n this.parameters.push({\n name,\n value,\n type: TypeMarker.String,\n path,\n });\n break;\n case value instanceof Date: {\n const date = value.toISOString();\n this.parameters.push({\n name: name,\n value: date,\n type: TypeMarker.String,\n path: path,\n });\n break;\n }\n case isCosmosEncryptedNumber(value): {\n const num = value.value;\n if (value.numberType === CosmosEncryptedNumberType.Integer) {\n this.parameters.push({\n name,\n value: num,\n type: TypeMarker.Long,\n path,\n });\n } else if (value.numberType === CosmosEncryptedNumberType.Float) {\n this.parameters.push({\n name,\n value: num,\n type: TypeMarker.Double,\n path,\n });\n }\n break;\n }\n case Array.isArray(value):\n this.parameters.push({ name, value, path });\n break;\n case typeof value === \"object\":\n this.parameters.push({ name, value, path });\n break;\n default:\n throw new Error(`Unsupported parameter type for parameter \"${name}\": ${typeof value}`);\n }\n }\n\n /** Adds unencrypted parameter to query */\n public addUnencryptedParameter(name: string, value: JSONValue, path: string): void {\n this.parameters.push({ name: name, value: value, path: path });\n }\n\n /*\n * @internal\n */\n public toEncryptionSqlQuerySpec(): SqlQuerySpec {\n return {\n query: this.query,\n parameters: this.parameters,\n };\n }\n}\n\nfunction isCosmosEncryptedNumber(val: any): val is CosmosEncryptedNumber {\n return (\n val !== null &&\n typeof val === \"object\" &&\n typeof val.value === \"number\" &&\n typeof val.numberType === \"string\" &&\n (val.numberType === CosmosEncryptedNumberType.Integer ||\n val.numberType === CosmosEncryptedNumberType.Float)\n );\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanSerializer.d.ts","sourceRoot":"","sources":["../../../../src/encryption/Serializers/BooleanSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"BooleanSerializer.d.ts","sourceRoot":"","sources":["../../../../src/encryption/Serializers/BooleanSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,qBAAa,iBAAkB,YAAW,UAAU;IAClD,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM;IAOjC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAMpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanSerializer.js","sourceRoot":"","sources":["../../../../src/encryption/Serializers/BooleanSerializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,OAAO,iBAAiB;IAC5B,SAAS,CAAC,KAAc;QACtB,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5C,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,WAAW,CAAC,KAAa;QACvB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Serializer } from \"./Serializer.js\";\n\nexport class BooleanSerializer implements Serializer {\n serialize(value: boolean): Buffer {\n const numValue = value ? 1 : 0;\n const buffer = Buffer.alloc(8);\n buffer.writeBigInt64LE(BigInt(numValue), 0);\n return buffer;\n }\n\n deserialize(bytes: Buffer): boolean {\n if (!bytes || bytes.length < 1) {\n throw new Error(\"Invalid byte array for deserialization\");\n }\n return !!bytes[0];\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BooleanSerializer.js","sourceRoot":"","sources":["../../../../src/encryption/Serializers/BooleanSerializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,OAAO,iBAAiB;IAC5B,SAAS,CAAC,KAAc;QACtB,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;QAC5C,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,WAAW,CAAC,KAAa;QACvB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Serializer } from \"./Serializer.js\";\n\nexport class BooleanSerializer implements Serializer {\n serialize(value: boolean): Buffer {\n const numValue = value ? 1 : 0;\n const buffer = Buffer.alloc(8);\n buffer.writeBigInt64LE(BigInt(numValue), 0);\n return buffer;\n }\n\n deserialize(bytes: Buffer): boolean {\n if (!bytes || bytes.length < 1) {\n throw new Error(\"Invalid byte array for deserialization\");\n }\n return !!bytes[0];\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatSerializer.d.ts","sourceRoot":"","sources":["../../../../src/encryption/Serializers/FloatSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"FloatSerializer.d.ts","sourceRoot":"","sources":["../../../../src/encryption/Serializers/FloatSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,qBAAa,eAAgB,YAAW,UAAU;IAChD,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAQlC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAQjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatSerializer.js","sourceRoot":"","sources":["../../../../src/encryption/Serializers/FloatSerializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,OAAO,eAAe;IAC1B,WAAW,CAAC,KAAa;QACvB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QACD,MAAM,GAAG,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAClC,OAAO,GAAG,CAAC;IACb,CAAC;IAED,SAAS,CAAC,KAAa;QACrB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC/B,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Serializer } from \"./Serializer.js\";\n\nexport class FloatSerializer implements Serializer {\n deserialize(bytes: Buffer): number {\n if (!bytes || bytes.length < 8) {\n throw new Error(\"Invalid byte array for deserialization\");\n }\n const res = bytes.readDoubleLE(0);\n return res;\n }\n\n serialize(value: number): Buffer {\n if (!Number.isFinite(value)) {\n throw new Error(\"Value is out of range\");\n }\n const buffer = Buffer.alloc(8);\n buffer.writeDoubleLE(value, 0);\n return buffer;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FloatSerializer.js","sourceRoot":"","sources":["../../../../src/encryption/Serializers/FloatSerializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,OAAO,eAAe;IAC1B,WAAW,CAAC,KAAa;QACvB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,CAAC;QACD,MAAM,GAAG,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QAClC,OAAO,GAAG,CAAC;IACb,CAAC;IAED,SAAS,CAAC,KAAa;QACrB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;QACD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC/B,OAAO,MAAM,CAAC;IAChB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Serializer } from \"./Serializer.js\";\n\nexport class FloatSerializer implements Serializer {\n deserialize(bytes: Buffer): number {\n if (!bytes || bytes.length < 8) {\n throw new Error(\"Invalid byte array for deserialization\");\n }\n const res = bytes.readDoubleLE(0);\n return res;\n }\n\n serialize(value: number): Buffer {\n if (!Number.isFinite(value)) {\n throw new Error(\"Value is out of range\");\n }\n const buffer = Buffer.alloc(8);\n buffer.writeDoubleLE(value, 0);\n return buffer;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringSerializer.d.ts","sourceRoot":"","sources":["../../../../src/encryption/Serializers/StringSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"StringSerializer.d.ts","sourceRoot":"","sources":["../../../../src/encryption/Serializers/StringSerializer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,qBAAa,gBAAiB,YAAW,UAAU;IACjD,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAA2B;IAE3D,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAIlC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAGjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringSerializer.js","sourceRoot":"","sources":["../../../../src/encryption/Serializers/StringSerializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,OAAO,gBAAgB;IACnB,MAAM,CAAC,iBAAiB,GAAmB,OAAO,CAAC;IAE3D,WAAW,CAAC,KAAa;QACvB,OAAO,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IAC5D,CAAC;IAED,SAAS,CAAC,KAAa;QACrB,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IAChE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Serializer } from \"./Serializer.js\";\n\nexport class StringSerializer implements Serializer {\n private static characterEncoding: BufferEncoding = \"utf-8\";\n\n deserialize(bytes: Buffer): string {\n return bytes.toString(StringSerializer.characterEncoding);\n }\n\n serialize(value: string): Buffer {\n return Buffer.from(value, StringSerializer.characterEncoding);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"StringSerializer.js","sourceRoot":"","sources":["../../../../src/encryption/Serializers/StringSerializer.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,OAAO,gBAAgB;IACnB,MAAM,CAAC,iBAAiB,GAAmB,OAAO,CAAC;IAE3D,WAAW,CAAC,KAAa;QACvB,OAAO,KAAK,CAAC,QAAQ,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IAC5D,CAAC;IAED,SAAS,CAAC,KAAa;QACrB,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;IAChE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { Serializer } from \"./Serializer.js\";\n\nexport class StringSerializer implements Serializer {\n private static characterEncoding: BufferEncoding = \"utf-8\";\n\n deserialize(bytes: Buffer): string {\n return bytes.toString(StringSerializer.characterEncoding);\n }\n\n serialize(value: string): Buffer {\n return Buffer.from(value, StringSerializer.characterEncoding);\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Serializer } from "./Serializer.js";
|
|
1
|
+
export type { Serializer } from "./Serializer.js";
|
|
2
2
|
export { BooleanSerializer } from "./BooleanSerializer.js";
|
|
3
3
|
export { NumberSerializer } from "./NumberSerializer.js";
|
|
4
4
|
export { FloatSerializer } from "./FloatSerializer.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/encryption/Serializers/index.ts"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/encryption/Serializers/index.ts"],"names":[],"mappings":"AAGA,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/encryption/Serializers/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport { Serializer } from \"./Serializer.js\";\nexport { BooleanSerializer } from \"./BooleanSerializer.js\";\nexport { NumberSerializer } from \"./NumberSerializer.js\";\nexport { FloatSerializer } from \"./FloatSerializer.js\";\nexport { StringSerializer } from \"./StringSerializer.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/encryption/Serializers/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport type { Serializer } from \"./Serializer.js\";\nexport { BooleanSerializer } from \"./BooleanSerializer.js\";\nexport { NumberSerializer } from \"./NumberSerializer.js\";\nexport { FloatSerializer } from \"./FloatSerializer.js\";\nexport { StringSerializer } from \"./StringSerializer.js\";\n"]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * from "./ClientEncryptionKey/index.js";
|
|
2
2
|
export * from "./enums/index.js";
|
|
3
3
|
export * from "./EncryptionKeyResolver/index.js";
|
|
4
|
-
export { ClientEncryptionIncludedPath } from "./ClientEncryptionIncludedPath.js";
|
|
5
|
-
export { ClientEncryptionPolicy } from "./ClientEncryptionPolicy.js";
|
|
6
|
-
export { EncryptionKeyWrapMetadata } from "./EncryptionKeyWrapMetadata.js";
|
|
4
|
+
export type { ClientEncryptionIncludedPath } from "./ClientEncryptionIncludedPath.js";
|
|
5
|
+
export type { ClientEncryptionPolicy } from "./ClientEncryptionPolicy.js";
|
|
6
|
+
export type { EncryptionKeyWrapMetadata } from "./EncryptionKeyWrapMetadata.js";
|
|
7
7
|
export { EncryptionKeyStoreProvider } from "./EncryptionKeyStoreProvider.js";
|
|
8
8
|
export { EncryptionSettings } from "./EncryptionSettings.js";
|
|
9
9
|
export { KeyEncryptionKey } from "./KeyEncryptionKey.js";
|
|
@@ -11,6 +11,6 @@ export { EncryptionSettingForProperty } from "./EncryptionSettingForProperty.js"
|
|
|
11
11
|
export { ProtectedDataEncryptionKey } from "./EncryptionKey/index.js";
|
|
12
12
|
export { EncryptionProcessor } from "./EncryptionProcessor.js";
|
|
13
13
|
export { EncryptionQueryBuilder } from "./EncryptionQueryBuilder.js";
|
|
14
|
-
export { ClientEncryptionOptions } from "./ClientEncryptionOptions.js";
|
|
15
|
-
export { CosmosEncryptedNumber, CosmosEncryptedNumberType } from "./CosmosEncryptedNumber.js";
|
|
14
|
+
export type { ClientEncryptionOptions } from "./ClientEncryptionOptions.js";
|
|
15
|
+
export { type CosmosEncryptedNumber, CosmosEncryptedNumberType } from "./CosmosEncryptedNumber.js";
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/encryption/index.ts"],"names":[],"mappings":"AAGA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,kCAAkC,CAAC;AACjD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/encryption/index.ts"],"names":[],"mappings":"AAGA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,kCAAkC,CAAC;AACjD,YAAY,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAC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","sourceRoot":"","sources":["../../../src/encryption/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,kCAAkC,CAAC;AAIjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAA8B,yBAAyB,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./ClientEncryptionKey/index.js\";\nexport * from \"./enums/index.js\";\nexport * from \"./EncryptionKeyResolver/index.js\";\nexport type { ClientEncryptionIncludedPath } from \"./ClientEncryptionIncludedPath.js\";\nexport type { ClientEncryptionPolicy } from \"./ClientEncryptionPolicy.js\";\nexport type { EncryptionKeyWrapMetadata } from \"./EncryptionKeyWrapMetadata.js\";\nexport { EncryptionKeyStoreProvider } from \"./EncryptionKeyStoreProvider.js\";\nexport { EncryptionSettings } from \"./EncryptionSettings.js\";\nexport { KeyEncryptionKey } from \"./KeyEncryptionKey.js\";\nexport { EncryptionSettingForProperty } from \"./EncryptionSettingForProperty.js\";\nexport { ProtectedDataEncryptionKey } from \"./EncryptionKey/index.js\";\nexport { EncryptionProcessor } from \"./EncryptionProcessor.js\";\nexport { EncryptionQueryBuilder } from \"./EncryptionQueryBuilder.js\";\nexport type { ClientEncryptionOptions } from \"./ClientEncryptionOptions.js\";\nexport { type CosmosEncryptedNumber, CosmosEncryptedNumberType } from \"./CosmosEncryptedNumber.js\";\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DiagnosticNodeInternal
|
|
1
|
+
import type { DiagnosticNodeInternal } from "./index.js";
|
|
2
|
+
import { type RequestContext } from "./index.js";
|
|
2
3
|
/**
|
|
3
4
|
* @hidden
|
|
4
5
|
* This class is used to failover single partitions to different regions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalPartitionEndpointManager.d.ts","sourceRoot":"","sources":["../../src/globalPartitionEndpointManager.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"globalPartitionEndpointManager.d.ts","sourceRoot":"","sources":["../../src/globalPartitionEndpointManager.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AAMpB;;;GAGG;AACH,qBAAa,8BAA8B;IAevC,OAAO,CAAC,qBAAqB;IAd/B,OAAO,CAAC,QAAQ,CAAC,mCAAmC,CAA6C;IACjG,OAAO,CAAC,QAAQ,CAAC,0CAA0C,CAGzD;IACF,OAAO,CAAC,kBAAkB,CAAW;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IACvC,OAAO,CAAC,yCAAyC,CAAC,CAAiB;IAqBnE;;;;OAIG;IACU,yBAAyB,CACpC,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,sBAAsB,GACrC,OAAO,CAAC,OAAO,CAAC;IA6BnB;;;OAGG;IACU,oCAAoC,CAC/C,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,sBAAsB,GACrC,OAAO,CAAC,cAAc,CAAC;IAiC1B;;;OAGG;IACI,OAAO,IAAI,IAAI;YAOR,8CAA8C;IA2D5D;;;OAGG;YACW,uCAAuC;IA6CrD,yEAAyE;YAC3D,qCAAqC;IA2BnD,0FAA0F;YAC5E,qCAAqC;IAmBnD;;;;OAIG;IACH,OAAO,CAAC,iDAAiD;IAazD;;;;OAIG;IACH,OAAO,CAAC,gDAAgD;IAgBxD;;;;;;OAMG;YACW,wDAAwD;IA8BtE;;;;;;;;OAQG;IACH,OAAO,CAAC,kCAAkC;IAU1C;;;;;OAKG;YACW,8CAA8C;CAqD7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalPartitionEndpointManager.js","sourceRoot":"","sources":["../../src/globalPartitionEndpointManager.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACL,SAAS,GAKV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;GAGG;AACH,MAAM,OAAO,8BAA8B;IAe/B;IAdO,mCAAmC,CAA6C;IAChF,0CAA0C,CAGzD;IACM,kBAAkB,CAAW;IAC9B,uBAAuB,CAAS;IAC/B,yCAAyC,CAAkB;IAEnE;;OAEG;IACH,YACE,OAA4B,EACpB,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,CAAuB;QAEpD,IAAI,CAAC,mCAAmC,GAAG,IAAI,GAAG,EAAyC,CAAC;QAC5F,IAAI,CAAC,0CAA0C,GAAG,IAAI,GAAG,EAGtD,CAAC;QACJ,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC;QACtE,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,MAAM,CA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E;QAC5E,IAAI,SAAS,EAAE,CAAC;YACd,gEAAgE;YAChE,IAAI,CAAC,IAAI,CAAC,yCAAyC,EAAE,CAAC;gBACpD,IAAI,CAAC,kCAAkC,EAAE,CAAC;YAC5C,CAAC;QACH,CAAC;aAAM,CAAC;YACN,oCAAoC;YACpC,IAAI,IAAI,CAAC,yCAAyC,EAAE,CAAC;gBACnD,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,CAAC;QACH,CAAC;IACH,CAAC;IACD;;;OAGG;IACI,wCAAwC;QAC7C,OAAO,IAAI,CAAC,qBAAqB,CAAC,oBAAoB,CAAC;IACzD,CAAC;IACD;;;OAGG;IACI,qCAAqC;QAC1C,OAAO,IAAI,CAAC,qBAAqB,CAAC,oBAAoB,CAAC;IACzD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { OperationType, ResourceType, isReadRequest } from \"./common/index.js\";\nimport {\n Constants,\n DiagnosticNodeInternal,\n type CosmosClientOptions,\n type GlobalEndpointManager,\n type RequestContext,\n} from \"./index.js\";\nimport { PartitionKeyRangeFailoverInfo } from \"./PartitionKeyRangeFailoverInfo.js\";\nimport { normalizeEndpoint } from \"./utils/checkURL.js\";\nimport { startBackgroundTask } from \"./utils/time.js\";\nimport { assertNotUndefined } from \"./utils/typeChecks.js\";\n\n/**\n * @hidden\n * This class is used to failover single partitions to different regions.\n */\nexport class GlobalPartitionEndpointManager {\n private readonly partitionKeyRangeToLocationForWrite: Map<string, PartitionKeyRangeFailoverInfo>;\n private readonly partitionKeyRangeToLocationForReadAndWrite: Map<\n string,\n PartitionKeyRangeFailoverInfo\n >;\n private preferredLocations: string[];\n public preferredLocationsCount: number;\n private circuitBreakerFailbackBackgroundRefresher?: NodeJS.Timeout;\n\n /**\n * @internal\n */\n constructor(\n options: CosmosClientOptions,\n private globalEndpointManager: GlobalEndpointManager,\n ) {\n this.partitionKeyRangeToLocationForWrite = new Map<string, PartitionKeyRangeFailoverInfo>();\n this.partitionKeyRangeToLocationForReadAndWrite = new Map<\n string,\n PartitionKeyRangeFailoverInfo\n >();\n this.preferredLocations = options.connectionPolicy.preferredLocations;\n this.preferredLocationsCount = this.preferredLocations ? this.preferredLocations.length : 0;\n if (this.globalEndpointManager.lastKnownPPCBEnabled) {\n this.initiateCircuitBreakerFailbackLoop();\n }\n }\n\n /**\n * Checks eligibility of the request for partition failover and\n * tries to mark the endpoint unavailable for the partition key range. Future\n * requests will be routed to the next location if available.\n */\n public async tryPartitionLevelFailover(\n requestContext: RequestContext,\n diagnosticNode: DiagnosticNodeInternal,\n ): Promise<boolean> {\n if (!(await this.isRequestEligibleForPartitionFailover(requestContext, true))) {\n return false;\n }\n\n const isRequestEligibleForPerPartitionAutomaticFailover =\n this.isRequestEligibleForPerPartitionAutomaticFailover(requestContext);\n const isRequestEligibleForPartitionLevelCircuitBreaker =\n this.isRequestEligibleForPartitionLevelCircuitBreaker(requestContext);\n\n if (\n isRequestEligibleForPerPartitionAutomaticFailover ||\n (isRequestEligibleForPartitionLevelCircuitBreaker &&\n (await this.incrementFailureCounterAndCheckFailover(\n requestContext,\n isRequestEligibleForPerPartitionAutomaticFailover,\n isRequestEligibleForPartitionLevelCircuitBreaker,\n )))\n ) {\n return this.tryMarkEndpointUnavailableForPartitionKeyRange(\n requestContext,\n diagnosticNode,\n isRequestEligibleForPerPartitionAutomaticFailover,\n isRequestEligibleForPartitionLevelCircuitBreaker,\n );\n }\n return false;\n }\n\n /**\n * Updates the DocumentServiceRequest routing location to point\n * new a location based if a partition level failover occurred.\n */\n public async tryAddPartitionLevelLocationOverride(\n requestContext: RequestContext,\n diagnosticNode: DiagnosticNodeInternal,\n ): Promise<RequestContext> {\n if (!(await this.isRequestEligibleForPartitionFailover(requestContext, false))) {\n return requestContext;\n }\n\n const partitionKeyRangeId = requestContext.partitionKeyRangeId;\n\n if (this.isRequestEligibleForPerPartitionAutomaticFailover(requestContext)) {\n if (this.partitionKeyRangeToLocationForWrite.has(partitionKeyRangeId)) {\n const partitionFailOver = this.partitionKeyRangeToLocationForWrite.get(partitionKeyRangeId);\n requestContext.endpoint = partitionFailOver.getCurrentEndPoint();\n diagnosticNode.recordEndpointResolution(requestContext.endpoint);\n return requestContext;\n }\n } else if (this.isRequestEligibleForPartitionLevelCircuitBreaker(requestContext)) {\n if (this.partitionKeyRangeToLocationForReadAndWrite.has(partitionKeyRangeId)) {\n const partitionFailOver =\n this.partitionKeyRangeToLocationForReadAndWrite.get(partitionKeyRangeId);\n\n const canCircuitBreakerTriggerPartitionFailOver =\n await partitionFailOver.canCircuitBreakerTriggerPartitionFailOver(\n isReadRequest(requestContext.operationType),\n );\n if (canCircuitBreakerTriggerPartitionFailOver) {\n requestContext.endpoint = partitionFailOver.getCurrentEndPoint();\n diagnosticNode.recordEndpointResolution(requestContext.endpoint);\n return requestContext;\n }\n }\n }\n return requestContext;\n }\n\n /**\n * This method clears the background refresher for circuit breaker failback\n * and stops the periodic checks for unhealthy endpoints.\n */\n public dispose(): void {\n if (this.circuitBreakerFailbackBackgroundRefresher) {\n clearTimeout(this.circuitBreakerFailbackBackgroundRefresher);\n this.circuitBreakerFailbackBackgroundRefresher = undefined;\n }\n }\n\n private async tryMarkEndpointUnavailableForPartitionKeyRange(\n requestContext: RequestContext,\n diagnosticNode: DiagnosticNodeInternal,\n isRequestEligibleForPerPartitionAutomaticFailover: boolean,\n isRequestEligibleForPartitionLevelCircuitBreaker: boolean,\n ): Promise<boolean> {\n const partitionKeyRangeId = requestContext.partitionKeyRangeId;\n const failedEndPoint = requestContext.endpoint;\n\n const readLocations = await this.globalEndpointManager.getReadLocations();\n const readEndPoints: string[] = [];\n\n if (isRequestEligibleForPerPartitionAutomaticFailover) {\n // For any single master write accounts, the next locations to fail over will be the read regions configured at the account level.\n for (const location of readLocations) {\n readEndPoints.push(location.databaseAccountEndpoint);\n }\n return this.tryAddOrUpdatePartitionFailoverInfoAndMoveToNextLocation(\n partitionKeyRangeId,\n failedEndPoint,\n readEndPoints,\n this.partitionKeyRangeToLocationForWrite,\n diagnosticNode,\n );\n } else if (isRequestEligibleForPartitionLevelCircuitBreaker) {\n // For the read requests or multi-master write requests, the next locations to fail over will be the preferred locations\n // configured at the account level plus any other read locations that are not already in the preferred locations.\n if (this.preferredLocations && this.preferredLocations.length > 0) {\n for (const preferredLocation of this.preferredLocations) {\n const location = readLocations.find(\n (loc) => normalizeEndpoint(loc.name) === normalizeEndpoint(preferredLocation),\n );\n if (location) {\n readEndPoints.push(location.databaseAccountEndpoint);\n }\n }\n\n // Add the rest of the locations not already added\n for (const location of readLocations) {\n if (!readEndPoints.includes(location.databaseAccountEndpoint)) {\n readEndPoints.push(location.databaseAccountEndpoint);\n }\n }\n } else {\n for (const location of readLocations) {\n readEndPoints.push(location.databaseAccountEndpoint);\n }\n }\n return this.tryAddOrUpdatePartitionFailoverInfoAndMoveToNextLocation(\n partitionKeyRangeId,\n failedEndPoint,\n readEndPoints,\n this.partitionKeyRangeToLocationForReadAndWrite,\n diagnosticNode,\n );\n }\n return false;\n }\n\n /**\n * Increments the failure counter for the specified partition and checks if the partition can fail over.\n * This method is used to determine if a partition should be failed over based on the number of request failures.\n */\n private async incrementFailureCounterAndCheckFailover(\n requestContext: RequestContext,\n isRequestEligibleForPerPartitionAutomaticFailover: boolean,\n isRequestEligibleForPartitionLevelCircuitBreaker: boolean,\n ): Promise<boolean> {\n const partitionKeyRangeId = requestContext.partitionKeyRangeId;\n const failedEndPoint = requestContext.endpoint;\n let partitionKeyRangeFailoverInfo: PartitionKeyRangeFailoverInfo;\n\n if (isRequestEligibleForPerPartitionAutomaticFailover) {\n if (!this.partitionKeyRangeToLocationForWrite.has(partitionKeyRangeId)) {\n // If the partition key range is not already in the map, add it\n const failoverInfo = new PartitionKeyRangeFailoverInfo(failedEndPoint);\n this.partitionKeyRangeToLocationForWrite.set(partitionKeyRangeId, failoverInfo);\n }\n partitionKeyRangeFailoverInfo =\n this.partitionKeyRangeToLocationForWrite.get(partitionKeyRangeId);\n } else if (isRequestEligibleForPartitionLevelCircuitBreaker) {\n if (!this.partitionKeyRangeToLocationForReadAndWrite.has(partitionKeyRangeId)) {\n // If the partition key range is not already in the map, add it\n const failoverInfo = new PartitionKeyRangeFailoverInfo(failedEndPoint);\n this.partitionKeyRangeToLocationForReadAndWrite.set(partitionKeyRangeId, failoverInfo);\n }\n partitionKeyRangeFailoverInfo =\n this.partitionKeyRangeToLocationForReadAndWrite.get(partitionKeyRangeId);\n } else {\n return false;\n }\n\n assertNotUndefined(\n partitionKeyRangeFailoverInfo,\n \"partitionKeyRangeFailoverInfo should be set if failover flags are true.\",\n );\n\n const currentTimeInMilliseconds = Date.now();\n await partitionKeyRangeFailoverInfo.incrementRequestFailureCounts(\n isReadRequest(requestContext.operationType),\n currentTimeInMilliseconds,\n );\n\n return partitionKeyRangeFailoverInfo.canCircuitBreakerTriggerPartitionFailOver(\n isReadRequest(requestContext.operationType),\n );\n }\n\n /** Validates if the given request is eligible for partition failover. */\n private async isRequestEligibleForPartitionFailover(\n requestContext: RequestContext,\n shouldValidateFailedLocation: boolean,\n ): Promise<boolean> {\n if (\n !requestContext ||\n !requestContext.operationType ||\n !requestContext.resourceType ||\n !requestContext.partitionKeyRangeId\n ) {\n return false;\n }\n\n const canUsePartitionLevelFailoverLocations = await this.canUsePartitionLevelFailoverLocations(\n requestContext.operationType,\n requestContext.resourceType,\n );\n if (!canUsePartitionLevelFailoverLocations) {\n return false;\n }\n\n if (shouldValidateFailedLocation && !requestContext.endpoint) {\n return false;\n }\n return true;\n }\n\n /** Determines if partition level failover locations can be used for the given request. */\n private async canUsePartitionLevelFailoverLocations(\n operationType?: OperationType,\n resourceType?: ResourceType,\n ): Promise<boolean> {\n const readEndPoints = await this.globalEndpointManager.getReadEndpoints();\n if (readEndPoints.length <= 1) {\n return false;\n }\n if (\n resourceType === ResourceType.item ||\n (resourceType === ResourceType.sproc && operationType === OperationType.Execute)\n ) {\n // Right now, for single-master only reads are supported for circuit breaker, and writes are supported for automatic.\n // failover. For multi master, both reads and writes are supported. Hence return true for both the cases.\n return true;\n }\n return false;\n }\n\n /**\n * Determines if a request is eligible for per-partition automatic failover.\n * A request is eligible if it is a write request, partition level failover is enabled,\n * and the global endpoint manager cannot use multiple write locations for the request.\n */\n private isRequestEligibleForPerPartitionAutomaticFailover(\n requestContext: RequestContext,\n ): boolean {\n return (\n this.isPartitionLevelAutomaticFailoverEnabled() &&\n !isReadRequest(requestContext.operationType) &&\n !this.globalEndpointManager.canUseMultipleWriteLocations(\n requestContext.resourceType,\n requestContext.operationType,\n )\n );\n }\n\n /**\n * Determines if a request is eligible for partition-level circuit breaker.\n * This method checks if partition-level circuit breaker is enabled, and if the request is a read-only request or\n * the global endpoint manager can use multiple write locations for the request.\n */\n private isRequestEligibleForPartitionLevelCircuitBreaker(\n requestContext: RequestContext,\n ): boolean {\n const enablePartitionLevelCircuitBreaker = this.isPartitionLevelCircuitBreakerEnabled();\n if (!enablePartitionLevelCircuitBreaker) {\n return false;\n }\n if (isReadRequest(requestContext.operationType)) {\n return true;\n }\n return this.globalEndpointManager.canUseMultipleWriteLocations(\n requestContext.resourceType,\n requestContext.operationType,\n );\n }\n\n /**\n * Attempts to add or update the partition failover information and move to the next available location.\n * This method checks if the current location for the partition key range has failed and updates the failover\n * information to route the request to the next available location. If all locations have been tried, it removes\n * the failover information for the partition key range. Return True if the failover information was successfully\n * updated and the request was routed to a new location, otherwise false.\n */\n private async tryAddOrUpdatePartitionFailoverInfoAndMoveToNextLocation(\n partitionKeyRangeId: string,\n failedEndPoint: string,\n nextEndPoints: readonly string[],\n partitionKeyRangeToLocation: Map<string, PartitionKeyRangeFailoverInfo>,\n diagnosticNode: DiagnosticNodeInternal,\n ): Promise<boolean> {\n if (!partitionKeyRangeToLocation.has(partitionKeyRangeId)) {\n // If the partition key range is not already in the map, add it\n const failoverInfo = new PartitionKeyRangeFailoverInfo(failedEndPoint);\n partitionKeyRangeToLocation.set(partitionKeyRangeId, failoverInfo);\n }\n const partitionFailOver = partitionKeyRangeToLocation.get(partitionKeyRangeId);\n\n // Will return true if it was able to update to a new region\n if (\n await partitionFailOver.tryMoveNextLocation(\n nextEndPoints,\n failedEndPoint,\n diagnosticNode,\n partitionKeyRangeId,\n )\n ) {\n return true;\n }\n // All the locations have been tried. Remove the override information\n partitionKeyRangeToLocation.delete(partitionKeyRangeId);\n return false;\n }\n\n /**\n * Initiates a background loop that periodically checks for unhealthy endpoints\n * and attempts to open connections to them. If a connection is successfully\n * established, it initiates a failback to the original location for the partition key range.\n * This is useful for scenarios where a partition key range has been marked as unavailable\n * due to a circuit breaker, and we want to periodically check if the original location\n * has become healthy again.\n * The loop runs at a defined interval specified by Constants.StalePartitionUnavailabilityRefreshIntervalInMs.\n */\n private initiateCircuitBreakerFailbackLoop(): void {\n this.circuitBreakerFailbackBackgroundRefresher = startBackgroundTask(async () => {\n try {\n await this.openConnectionToUnhealthyEndpointsWithFailback();\n } catch (err) {\n console.error(\"Failed to open connection to unhealthy endpoints: \", err);\n }\n }, Constants.StalePartitionUnavailabilityRefreshIntervalInMs);\n }\n\n /**\n * Attempts to open connections to unhealthy endpoints and initiates failback if the connections are successful.\n * This method checks the partition key ranges that have failed locations and tries to re-establish connections\n * to those locations. If a connection is successfully re-established, it initiates a failback to the original\n * location for the partition key range.\n */\n private async openConnectionToUnhealthyEndpointsWithFailback(): Promise<void> {\n // If partition level circuit breaker or failover is not enabled, dispose the timer.\n\n for (const pkRange of this.partitionKeyRangeToLocationForReadAndWrite.keys()) {\n const partitionFailover = this.partitionKeyRangeToLocationForReadAndWrite.get(pkRange);\n if (!partitionFailover) continue;\n\n const { firstRequestFailureTime } =\n await partitionFailover.snapshotPartitionFailoverTimestamps();\n const now = new Date();\n\n if (\n now.getTime() - firstRequestFailureTime >\n Constants.AllowedPartitionUnavailabilityDurationInMs\n ) {\n // Un-deterministically marking the original failed endpoint for the PkRange back to healthy.\n // Initiate Failback to the original failed location.\n this.partitionKeyRangeToLocationForReadAndWrite.delete(pkRange);\n }\n }\n }\n\n /**\n * @internal\n */\n public changeCircuitBreakerFailbackLoop(isEnabled: boolean): void {\n // Start or stop the circuit breaker failback loop based on PPAF/PPCB status\n if (isEnabled) {\n // Only start if not already running to prevent duplicate timers\n if (!this.circuitBreakerFailbackBackgroundRefresher) {\n this.initiateCircuitBreakerFailbackLoop();\n }\n } else {\n // Only dispose if currently running\n if (this.circuitBreakerFailbackBackgroundRefresher) {\n this.dispose();\n }\n }\n }\n /**\n * Gets a value indicating whether per-partition automatic failover is currently enabled.\n * @internal\n */\n public isPartitionLevelAutomaticFailoverEnabled(): boolean {\n return this.globalEndpointManager.lastKnownPPAFEnabled;\n }\n /**\n * Gets a value indicating whether per-partition automatic failover is currently enabled.\n * @internal\n */\n public isPartitionLevelCircuitBreakerEnabled(): boolean {\n return this.globalEndpointManager.lastKnownPPCBEnabled;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"globalPartitionEndpointManager.js","sourceRoot":"","sources":["../../src/globalPartitionEndpointManager.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,EACL,SAAS,GAIV,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;GAGG;AACH,MAAM,OAAO,8BAA8B;IAe/B;IAdO,mCAAmC,CAA6C;IAChF,0CAA0C,CAGzD;IACM,kBAAkB,CAAW;IAC9B,uBAAuB,CAAS;IAC/B,yCAAyC,CAAkB;IAEnE;;OAEG;IACH,YACE,OAA4B,EACpB,qBAA4C;QAA5C,0BAAqB,GAArB,qBAAqB,C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AG,GAAG,IAAI,IAAI,EAAE,CAAC;YAEvB,IACE,GAAG,CAAC,OAAO,EAAE,GAAG,uBAAuB;gBACvC,SAAS,CAAC,0CAA0C,EACpD,CAAC;gBACD,6FAA6F;gBAC7F,qDAAqD;gBACrD,IAAI,CAAC,0CAA0C,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAClE,CAAC;QACH,CAAC;IACH,CAAC;IAED;;OAEG;IACI,gCAAgC,CAAC,SAAkB;QACxD,4EAA4E;QAC5E,IAAI,SAAS,EAAE,CAAC;YACd,gEAAgE;YAChE,IAAI,CAAC,IAAI,CAAC,yCAAyC,EAAE,CAAC;gBACpD,IAAI,CAAC,kCAAkC,EAAE,CAAC;YAC5C,CAAC;QACH,CAAC;aAAM,CAAC;YACN,oCAAoC;YACpC,IAAI,IAAI,CAAC,yCAAyC,EAAE,CAAC;gBACnD,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,CAAC;QACH,CAAC;IACH,CAAC;IACD;;;OAGG;IACI,wCAAwC;QAC7C,OAAO,IAAI,CAAC,qBAAqB,CAAC,oBAAoB,CAAC;IACzD,CAAC;IACD;;;OAGG;IACI,qCAAqC;QAC1C,OAAO,IAAI,CAAC,qBAAqB,CAAC,oBAAoB,CAAC;IACzD,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { OperationType, ResourceType, isReadRequest } from \"./common/index.js\";\nimport type { DiagnosticNodeInternal } from \"./index.js\";\nimport {\n Constants,\n type CosmosClientOptions,\n type GlobalEndpointManager,\n type RequestContext,\n} from \"./index.js\";\nimport { PartitionKeyRangeFailoverInfo } from \"./PartitionKeyRangeFailoverInfo.js\";\nimport { normalizeEndpoint } from \"./utils/checkURL.js\";\nimport { startBackgroundTask } from \"./utils/time.js\";\nimport { assertNotUndefined } from \"./utils/typeChecks.js\";\n\n/**\n * @hidden\n * This class is used to failover single partitions to different regions.\n */\nexport class GlobalPartitionEndpointManager {\n private readonly partitionKeyRangeToLocationForWrite: Map<string, PartitionKeyRangeFailoverInfo>;\n private readonly partitionKeyRangeToLocationForReadAndWrite: Map<\n string,\n PartitionKeyRangeFailoverInfo\n >;\n private preferredLocations: string[];\n public preferredLocationsCount: number;\n private circuitBreakerFailbackBackgroundRefresher?: NodeJS.Timeout;\n\n /**\n * @internal\n */\n constructor(\n options: CosmosClientOptions,\n private globalEndpointManager: GlobalEndpointManager,\n ) {\n this.partitionKeyRangeToLocationForWrite = new Map<string, PartitionKeyRangeFailoverInfo>();\n this.partitionKeyRangeToLocationForReadAndWrite = new Map<\n string,\n PartitionKeyRangeFailoverInfo\n >();\n this.preferredLocations = options.connectionPolicy.preferredLocations;\n this.preferredLocationsCount = this.preferredLocations ? this.preferredLocations.length : 0;\n if (this.globalEndpointManager.lastKnownPPCBEnabled) {\n this.initiateCircuitBreakerFailbackLoop();\n }\n }\n\n /**\n * Checks eligibility of the request for partition failover and\n * tries to mark the endpoint unavailable for the partition key range. Future\n * requests will be routed to the next location if available.\n */\n public async tryPartitionLevelFailover(\n requestContext: RequestContext,\n diagnosticNode: DiagnosticNodeInternal,\n ): Promise<boolean> {\n if (!(await this.isRequestEligibleForPartitionFailover(requestContext, true))) {\n return false;\n }\n\n const isRequestEligibleForPerPartitionAutomaticFailover =\n this.isRequestEligibleForPerPartitionAutomaticFailover(requestContext);\n const isRequestEligibleForPartitionLevelCircuitBreaker =\n this.isRequestEligibleForPartitionLevelCircuitBreaker(requestContext);\n\n if (\n isRequestEligibleForPerPartitionAutomaticFailover ||\n (isRequestEligibleForPartitionLevelCircuitBreaker &&\n (await this.incrementFailureCounterAndCheckFailover(\n requestContext,\n isRequestEligibleForPerPartitionAutomaticFailover,\n isRequestEligibleForPartitionLevelCircuitBreaker,\n )))\n ) {\n return this.tryMarkEndpointUnavailableForPartitionKeyRange(\n requestContext,\n diagnosticNode,\n isRequestEligibleForPerPartitionAutomaticFailover,\n isRequestEligibleForPartitionLevelCircuitBreaker,\n );\n }\n return false;\n }\n\n /**\n * Updates the DocumentServiceRequest routing location to point\n * new a location based if a partition level failover occurred.\n */\n public async tryAddPartitionLevelLocationOverride(\n requestContext: RequestContext,\n diagnosticNode: DiagnosticNodeInternal,\n ): Promise<RequestContext> {\n if (!(await this.isRequestEligibleForPartitionFailover(requestContext, false))) {\n return requestContext;\n }\n\n const partitionKeyRangeId = requestContext.partitionKeyRangeId;\n\n if (this.isRequestEligibleForPerPartitionAutomaticFailover(requestContext)) {\n if (this.partitionKeyRangeToLocationForWrite.has(partitionKeyRangeId)) {\n const partitionFailOver = this.partitionKeyRangeToLocationForWrite.get(partitionKeyRangeId);\n requestContext.endpoint = partitionFailOver.getCurrentEndPoint();\n diagnosticNode.recordEndpointResolution(requestContext.endpoint);\n return requestContext;\n }\n } else if (this.isRequestEligibleForPartitionLevelCircuitBreaker(requestContext)) {\n if (this.partitionKeyRangeToLocationForReadAndWrite.has(partitionKeyRangeId)) {\n const partitionFailOver =\n this.partitionKeyRangeToLocationForReadAndWrite.get(partitionKeyRangeId);\n\n const canCircuitBreakerTriggerPartitionFailOver =\n await partitionFailOver.canCircuitBreakerTriggerPartitionFailOver(\n isReadRequest(requestContext.operationType),\n );\n if (canCircuitBreakerTriggerPartitionFailOver) {\n requestContext.endpoint = partitionFailOver.getCurrentEndPoint();\n diagnosticNode.recordEndpointResolution(requestContext.endpoint);\n return requestContext;\n }\n }\n }\n return requestContext;\n }\n\n /**\n * This method clears the background refresher for circuit breaker failback\n * and stops the periodic checks for unhealthy endpoints.\n */\n public dispose(): void {\n if (this.circuitBreakerFailbackBackgroundRefresher) {\n clearTimeout(this.circuitBreakerFailbackBackgroundRefresher);\n this.circuitBreakerFailbackBackgroundRefresher = undefined;\n }\n }\n\n private async tryMarkEndpointUnavailableForPartitionKeyRange(\n requestContext: RequestContext,\n diagnosticNode: DiagnosticNodeInternal,\n isRequestEligibleForPerPartitionAutomaticFailover: boolean,\n isRequestEligibleForPartitionLevelCircuitBreaker: boolean,\n ): Promise<boolean> {\n const partitionKeyRangeId = requestContext.partitionKeyRangeId;\n const failedEndPoint = requestContext.endpoint;\n\n const readLocations = await this.globalEndpointManager.getReadLocations();\n const readEndPoints: string[] = [];\n\n if (isRequestEligibleForPerPartitionAutomaticFailover) {\n // For any single master write accounts, the next locations to fail over will be the read regions configured at the account level.\n for (const location of readLocations) {\n readEndPoints.push(location.databaseAccountEndpoint);\n }\n return this.tryAddOrUpdatePartitionFailoverInfoAndMoveToNextLocation(\n partitionKeyRangeId,\n failedEndPoint,\n readEndPoints,\n this.partitionKeyRangeToLocationForWrite,\n diagnosticNode,\n );\n } else if (isRequestEligibleForPartitionLevelCircuitBreaker) {\n // For the read requests or multi-master write requests, the next locations to fail over will be the preferred locations\n // configured at the account level plus any other read locations that are not already in the preferred locations.\n if (this.preferredLocations && this.preferredLocations.length > 0) {\n for (const preferredLocation of this.preferredLocations) {\n const location = readLocations.find(\n (loc) => normalizeEndpoint(loc.name) === normalizeEndpoint(preferredLocation),\n );\n if (location) {\n readEndPoints.push(location.databaseAccountEndpoint);\n }\n }\n\n // Add the rest of the locations not already added\n for (const location of readLocations) {\n if (!readEndPoints.includes(location.databaseAccountEndpoint)) {\n readEndPoints.push(location.databaseAccountEndpoint);\n }\n }\n } else {\n for (const location of readLocations) {\n readEndPoints.push(location.databaseAccountEndpoint);\n }\n }\n return this.tryAddOrUpdatePartitionFailoverInfoAndMoveToNextLocation(\n partitionKeyRangeId,\n failedEndPoint,\n readEndPoints,\n this.partitionKeyRangeToLocationForReadAndWrite,\n diagnosticNode,\n );\n }\n return false;\n }\n\n /**\n * Increments the failure counter for the specified partition and checks if the partition can fail over.\n * This method is used to determine if a partition should be failed over based on the number of request failures.\n */\n private async incrementFailureCounterAndCheckFailover(\n requestContext: RequestContext,\n isRequestEligibleForPerPartitionAutomaticFailover: boolean,\n isRequestEligibleForPartitionLevelCircuitBreaker: boolean,\n ): Promise<boolean> {\n const partitionKeyRangeId = requestContext.partitionKeyRangeId;\n const failedEndPoint = requestContext.endpoint;\n let partitionKeyRangeFailoverInfo: PartitionKeyRangeFailoverInfo;\n\n if (isRequestEligibleForPerPartitionAutomaticFailover) {\n if (!this.partitionKeyRangeToLocationForWrite.has(partitionKeyRangeId)) {\n // If the partition key range is not already in the map, add it\n const failoverInfo = new PartitionKeyRangeFailoverInfo(failedEndPoint);\n this.partitionKeyRangeToLocationForWrite.set(partitionKeyRangeId, failoverInfo);\n }\n partitionKeyRangeFailoverInfo =\n this.partitionKeyRangeToLocationForWrite.get(partitionKeyRangeId);\n } else if (isRequestEligibleForPartitionLevelCircuitBreaker) {\n if (!this.partitionKeyRangeToLocationForReadAndWrite.has(partitionKeyRangeId)) {\n // If the partition key range is not already in the map, add it\n const failoverInfo = new PartitionKeyRangeFailoverInfo(failedEndPoint);\n this.partitionKeyRangeToLocationForReadAndWrite.set(partitionKeyRangeId, failoverInfo);\n }\n partitionKeyRangeFailoverInfo =\n this.partitionKeyRangeToLocationForReadAndWrite.get(partitionKeyRangeId);\n } else {\n return false;\n }\n\n assertNotUndefined(\n partitionKeyRangeFailoverInfo,\n \"partitionKeyRangeFailoverInfo should be set if failover flags are true.\",\n );\n\n const currentTimeInMilliseconds = Date.now();\n await partitionKeyRangeFailoverInfo.incrementRequestFailureCounts(\n isReadRequest(requestContext.operationType),\n currentTimeInMilliseconds,\n );\n\n return partitionKeyRangeFailoverInfo.canCircuitBreakerTriggerPartitionFailOver(\n isReadRequest(requestContext.operationType),\n );\n }\n\n /** Validates if the given request is eligible for partition failover. */\n private async isRequestEligibleForPartitionFailover(\n requestContext: RequestContext,\n shouldValidateFailedLocation: boolean,\n ): Promise<boolean> {\n if (\n !requestContext ||\n !requestContext.operationType ||\n !requestContext.resourceType ||\n !requestContext.partitionKeyRangeId\n ) {\n return false;\n }\n\n const canUsePartitionLevelFailoverLocations = await this.canUsePartitionLevelFailoverLocations(\n requestContext.operationType,\n requestContext.resourceType,\n );\n if (!canUsePartitionLevelFailoverLocations) {\n return false;\n }\n\n if (shouldValidateFailedLocation && !requestContext.endpoint) {\n return false;\n }\n return true;\n }\n\n /** Determines if partition level failover locations can be used for the given request. */\n private async canUsePartitionLevelFailoverLocations(\n operationType?: OperationType,\n resourceType?: ResourceType,\n ): Promise<boolean> {\n const readEndPoints = await this.globalEndpointManager.getReadEndpoints();\n if (readEndPoints.length <= 1) {\n return false;\n }\n if (\n resourceType === ResourceType.item ||\n (resourceType === ResourceType.sproc && operationType === OperationType.Execute)\n ) {\n // Right now, for single-master only reads are supported for circuit breaker, and writes are supported for automatic.\n // failover. For multi master, both reads and writes are supported. Hence return true for both the cases.\n return true;\n }\n return false;\n }\n\n /**\n * Determines if a request is eligible for per-partition automatic failover.\n * A request is eligible if it is a write request, partition level failover is enabled,\n * and the global endpoint manager cannot use multiple write locations for the request.\n */\n private isRequestEligibleForPerPartitionAutomaticFailover(\n requestContext: RequestContext,\n ): boolean {\n return (\n this.isPartitionLevelAutomaticFailoverEnabled() &&\n !isReadRequest(requestContext.operationType) &&\n !this.globalEndpointManager.canUseMultipleWriteLocations(\n requestContext.resourceType,\n requestContext.operationType,\n )\n );\n }\n\n /**\n * Determines if a request is eligible for partition-level circuit breaker.\n * This method checks if partition-level circuit breaker is enabled, and if the request is a read-only request or\n * the global endpoint manager can use multiple write locations for the request.\n */\n private isRequestEligibleForPartitionLevelCircuitBreaker(\n requestContext: RequestContext,\n ): boolean {\n const enablePartitionLevelCircuitBreaker = this.isPartitionLevelCircuitBreakerEnabled();\n if (!enablePartitionLevelCircuitBreaker) {\n return false;\n }\n if (isReadRequest(requestContext.operationType)) {\n return true;\n }\n return this.globalEndpointManager.canUseMultipleWriteLocations(\n requestContext.resourceType,\n requestContext.operationType,\n );\n }\n\n /**\n * Attempts to add or update the partition failover information and move to the next available location.\n * This method checks if the current location for the partition key range has failed and updates the failover\n * information to route the request to the next available location. If all locations have been tried, it removes\n * the failover information for the partition key range. Return True if the failover information was successfully\n * updated and the request was routed to a new location, otherwise false.\n */\n private async tryAddOrUpdatePartitionFailoverInfoAndMoveToNextLocation(\n partitionKeyRangeId: string,\n failedEndPoint: string,\n nextEndPoints: readonly string[],\n partitionKeyRangeToLocation: Map<string, PartitionKeyRangeFailoverInfo>,\n diagnosticNode: DiagnosticNodeInternal,\n ): Promise<boolean> {\n if (!partitionKeyRangeToLocation.has(partitionKeyRangeId)) {\n // If the partition key range is not already in the map, add it\n const failoverInfo = new PartitionKeyRangeFailoverInfo(failedEndPoint);\n partitionKeyRangeToLocation.set(partitionKeyRangeId, failoverInfo);\n }\n const partitionFailOver = partitionKeyRangeToLocation.get(partitionKeyRangeId);\n\n // Will return true if it was able to update to a new region\n if (\n await partitionFailOver.tryMoveNextLocation(\n nextEndPoints,\n failedEndPoint,\n diagnosticNode,\n partitionKeyRangeId,\n )\n ) {\n return true;\n }\n // All the locations have been tried. Remove the override information\n partitionKeyRangeToLocation.delete(partitionKeyRangeId);\n return false;\n }\n\n /**\n * Initiates a background loop that periodically checks for unhealthy endpoints\n * and attempts to open connections to them. If a connection is successfully\n * established, it initiates a failback to the original location for the partition key range.\n * This is useful for scenarios where a partition key range has been marked as unavailable\n * due to a circuit breaker, and we want to periodically check if the original location\n * has become healthy again.\n * The loop runs at a defined interval specified by Constants.StalePartitionUnavailabilityRefreshIntervalInMs.\n */\n private initiateCircuitBreakerFailbackLoop(): void {\n this.circuitBreakerFailbackBackgroundRefresher = startBackgroundTask(async () => {\n try {\n await this.openConnectionToUnhealthyEndpointsWithFailback();\n } catch (err) {\n console.error(\"Failed to open connection to unhealthy endpoints: \", err);\n }\n }, Constants.StalePartitionUnavailabilityRefreshIntervalInMs);\n }\n\n /**\n * Attempts to open connections to unhealthy endpoints and initiates failback if the connections are successful.\n * This method checks the partition key ranges that have failed locations and tries to re-establish connections\n * to those locations. If a connection is successfully re-established, it initiates a failback to the original\n * location for the partition key range.\n */\n private async openConnectionToUnhealthyEndpointsWithFailback(): Promise<void> {\n // If partition level circuit breaker or failover is not enabled, dispose the timer.\n\n for (const pkRange of this.partitionKeyRangeToLocationForReadAndWrite.keys()) {\n const partitionFailover = this.partitionKeyRangeToLocationForReadAndWrite.get(pkRange);\n if (!partitionFailover) continue;\n\n const { firstRequestFailureTime } =\n await partitionFailover.snapshotPartitionFailoverTimestamps();\n const now = new Date();\n\n if (\n now.getTime() - firstRequestFailureTime >\n Constants.AllowedPartitionUnavailabilityDurationInMs\n ) {\n // Un-deterministically marking the original failed endpoint for the PkRange back to healthy.\n // Initiate Failback to the original failed location.\n this.partitionKeyRangeToLocationForReadAndWrite.delete(pkRange);\n }\n }\n }\n\n /**\n * @internal\n */\n public changeCircuitBreakerFailbackLoop(isEnabled: boolean): void {\n // Start or stop the circuit breaker failback loop based on PPAF/PPCB status\n if (isEnabled) {\n // Only start if not already running to prevent duplicate timers\n if (!this.circuitBreakerFailbackBackgroundRefresher) {\n this.initiateCircuitBreakerFailbackLoop();\n }\n } else {\n // Only dispose if currently running\n if (this.circuitBreakerFailbackBackgroundRefresher) {\n this.dispose();\n }\n }\n }\n /**\n * Gets a value indicating whether per-partition automatic failover is currently enabled.\n * @internal\n */\n public isPartitionLevelAutomaticFailoverEnabled(): boolean {\n return this.globalEndpointManager.lastKnownPPAFEnabled;\n }\n /**\n * Gets a value indicating whether per-partition automatic failover is currently enabled.\n * @internal\n */\n public isPartitionLevelCircuitBreakerEnabled(): boolean {\n return this.globalEndpointManager.lastKnownPPCBEnabled;\n }\n}\n"]}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
export { DEFAULT_PARTITION_KEY_PATH } from "./common/partitionKeys.js";
|
|
2
|
-
export { StatusCodes, StatusCodesType, PartitionKeyRangePropertiesNames } from "./common/index.js";
|
|
2
|
+
export { StatusCodes, type StatusCodesType, type PartitionKeyRangePropertiesNames, } from "./common/index.js";
|
|
3
3
|
export { setAuthorizationTokenHeaderUsingMasterKey } from "./auth.js";
|
|
4
|
-
export { Operation, OperationResponse, BulkOptions, CreateOperation, UpsertOperation, ReplaceOperation, DeleteOperation, ReadOperation, OperationBase, OperationWithItem, OperationInput, BulkOperationType, ExtendedOperationResponse, BulkOperationResponse, CreateOperationInput, UpsertOperationInput, ReplaceOperationInput, ReadOperationInput, DeleteOperationInput, PatchOperationInput, BulkPatchOperation, BulkOperationResult, } from "./utils/batch.js";
|
|
5
|
-
export { PatchOperation, PatchOperationType, ExistingKeyOperation, RemoveOperation, PatchRequestBody, } from "./utils/patch.js";
|
|
6
|
-
export { ConnectionMode, ConsistencyLevel, ConnectionPolicy, DatabaseAccount, DataType, Index, IndexedPath, IndexingMode, IndexingPolicy, SpatialIndex, SpatialType, GeospatialType, IndexKind, Location, PartitionKey, PrimitivePartitionKeyValue, NullPartitionKeyType, NonePartitionKeyType, PartitionKeyKind, PartitionKeyDefinition, PartitionKeyDefinitionVersion, PartitionKeyBuilder, PermissionMode, PriorityLevel, TriggerOperation, TriggerType, UserDefinedFunctionType, CompositePath, ComputedProperty, VectorEmbeddingPolicy, VectorIndex, VectorEmbedding, VectorEmbeddingDataType, VectorEmbeddingDistanceFunction, VectorIndexType, FullTextIndex, FullTextPolicy, FullTextPath, } from "./documents/index.js";
|
|
7
|
-
export { UniqueKeyPolicy, UniqueKey } from "./client/Container/UniqueKeyPolicy.js";
|
|
8
|
-
export { ContainerRequest } from "./client/Container/ContainerRequest.js";
|
|
4
|
+
export { type Operation, type OperationResponse, type BulkOptions, type CreateOperation, type UpsertOperation, type ReplaceOperation, type DeleteOperation, type ReadOperation, type OperationBase, type OperationWithItem, type OperationInput, BulkOperationType, type ExtendedOperationResponse, type BulkOperationResponse, type CreateOperationInput, type UpsertOperationInput, type ReplaceOperationInput, type ReadOperationInput, type DeleteOperationInput, type PatchOperationInput, type BulkPatchOperation, type BulkOperationResult, } from "./utils/batch.js";
|
|
5
|
+
export { type PatchOperation, PatchOperationType, type ExistingKeyOperation, type RemoveOperation, type PatchRequestBody, } from "./utils/patch.js";
|
|
6
|
+
export { ConnectionMode, ConsistencyLevel, type ConnectionPolicy, DatabaseAccount, DataType, type Index, type IndexedPath, IndexingMode, type IndexingPolicy, type SpatialIndex, SpatialType, GeospatialType, IndexKind, type Location, type PartitionKey, type PrimitivePartitionKeyValue, type NullPartitionKeyType, type NonePartitionKeyType, PartitionKeyKind, type PartitionKeyDefinition, PartitionKeyDefinitionVersion, PartitionKeyBuilder, PermissionMode, PriorityLevel, TriggerOperation, TriggerType, UserDefinedFunctionType, type CompositePath, type ComputedProperty, type VectorEmbeddingPolicy, type VectorIndex, type VectorEmbedding, VectorEmbeddingDataType, VectorEmbeddingDistanceFunction, VectorIndexType, type FullTextIndex, type FullTextPolicy, type FullTextPath, } from "./documents/index.js";
|
|
7
|
+
export type { UniqueKeyPolicy, UniqueKey } from "./client/Container/UniqueKeyPolicy.js";
|
|
8
|
+
export type { ContainerRequest } from "./client/Container/ContainerRequest.js";
|
|
9
9
|
export { Constants, OperationType, ResourceType, HTTPMethod } from "./common/index.js";
|
|
10
|
-
export { RetryOptions } from "./retry/index.js";
|
|
10
|
+
export type { RetryOptions } from "./retry/index.js";
|
|
11
11
|
export * from "./request/index.js";
|
|
12
|
-
export { DiagnosticNodeInternal, DiagnosticDataValue, DiagnosticNodeType, } from "./diagnostics/DiagnosticNodeInternal.js";
|
|
13
|
-
export { CosmosHeaders, SqlParameter, SqlQuerySpec, JSONValue, JSONArray, JSONObject, } from "./queryExecutionContext/index.js";
|
|
12
|
+
export { DiagnosticNodeInternal, type DiagnosticDataValue, DiagnosticNodeType, } from "./diagnostics/DiagnosticNodeInternal.js";
|
|
13
|
+
export type { CosmosHeaders, SqlParameter, SqlQuerySpec, JSONValue, JSONArray, JSONObject, } from "./queryExecutionContext/index.js";
|
|
14
14
|
export { QueryIterator } from "./queryIterator.js";
|
|
15
15
|
export * from "./queryMetrics/index.js";
|
|
16
16
|
export { CosmosClient } from "./CosmosClient.js";
|
|
17
|
-
export { CosmosClientOptions, Agent } from "./CosmosClientOptions.js";
|
|
17
|
+
export type { CosmosClientOptions, Agent } from "./CosmosClientOptions.js";
|
|
18
18
|
export * from "./client/index.js";
|
|
19
19
|
export { Scripts } from "./client/Script/Scripts.js";
|
|
20
|
-
export { Next, Plugin, PluginConfig, PluginOn } from "./plugins/Plugin.js";
|
|
21
|
-
export { TokenProvider, RequestInfo } from "./auth.js";
|
|
20
|
+
export { type Next, type Plugin, type PluginConfig, PluginOn } from "./plugins/Plugin.js";
|
|
21
|
+
export type { TokenProvider, RequestInfo } from "./auth.js";
|
|
22
22
|
export { ChangeFeedIterator } from "./ChangeFeedIterator.js";
|
|
23
|
-
export { ChangeFeedOptions } from "./ChangeFeedOptions.js";
|
|
23
|
+
export type { ChangeFeedOptions } from "./ChangeFeedOptions.js";
|
|
24
24
|
export { ChangeFeedResponse } from "./ChangeFeedResponse.js";
|
|
25
25
|
export { ClientContext } from "./ClientContext.js";
|
|
26
|
-
export { CosmosDiagnostics, MetadataLookUpDiagnostic, MetadataLookUpDiagnostics, MetadataLookUpType, RetryDiagnostics, FailedRequestAttemptDiagnostic, GatewayStatistics, ClientSideRequestStatistics, ClientConfigDiagnostic, DiagnosticNode, EncryptionDiagnostics, } from "./CosmosDiagnostics.js";
|
|
27
|
-
export { ChangeFeedPullModelIterator, ChangeFeedIteratorOptions, ChangeFeedIteratorResponse, ChangeFeedStartFrom, FeedRange, ChangeFeedMode, ChangeFeedPolicy, ChangeFeedRetentionTimeSpan, } from "./client/ChangeFeed/index.js";
|
|
26
|
+
export { CosmosDiagnostics, type MetadataLookUpDiagnostic, type MetadataLookUpDiagnostics, MetadataLookUpType, type RetryDiagnostics, type FailedRequestAttemptDiagnostic, type GatewayStatistics, type ClientSideRequestStatistics, type ClientConfigDiagnostic, type DiagnosticNode, type EncryptionDiagnostics, } from "./CosmosDiagnostics.js";
|
|
27
|
+
export { type ChangeFeedPullModelIterator, type ChangeFeedIteratorOptions, ChangeFeedIteratorResponse, ChangeFeedStartFrom, FeedRange, ChangeFeedMode, ChangeFeedPolicy, ChangeFeedRetentionTimeSpan, } from "./client/ChangeFeed/index.js";
|
|
28
28
|
export { CosmosDbDiagnosticLevel } from "./diagnostics/CosmosDbDiagnosticLevel.js";
|
|
29
29
|
export { GlobalEndpointManager } from "./globalEndpointManager.js";
|
|
30
30
|
export { SasTokenPermissionKind } from "./common/constants.js";
|
|
@@ -34,5 +34,5 @@ export { AbortError } from "@azure/abort-controller";
|
|
|
34
34
|
export * from "./encryption/enums/index.js";
|
|
35
35
|
export * from "./encryption/ClientEncryptionKey/index.js";
|
|
36
36
|
export * from "./encryption/EncryptionKeyResolver/index.js";
|
|
37
|
-
export { ClientEncryptionIncludedPath, ClientEncryptionPolicy, ClientEncryptionKeyProperties, EncryptionKeyWrapMetadata, EncryptionQueryBuilder, ClientEncryptionKeyRequest, ClientEncryptionKeyResponse, EncryptionKeyResolver, AzureKeyVaultEncryptionKeyResolver, EncryptionType, EncryptionAlgorithm, EncryptionKeyResolverName, ClientEncryptionOptions, CosmosEncryptedNumber, CosmosEncryptedNumberType, } from "./encryption/index.js";
|
|
37
|
+
export { type ClientEncryptionIncludedPath, type ClientEncryptionPolicy, type ClientEncryptionKeyProperties, type EncryptionKeyWrapMetadata, EncryptionQueryBuilder, type ClientEncryptionKeyRequest, ClientEncryptionKeyResponse, type EncryptionKeyResolver, AzureKeyVaultEncryptionKeyResolver, EncryptionType, EncryptionAlgorithm, EncryptionKeyResolverName, type ClientEncryptionOptions, type CosmosEncryptedNumber, CosmosEncryptedNumberType, } from "./encryption/index.js";
|
|
38
38
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EACL,WAAW,EACX,KAAK,eAAe,EACpB,K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