@azure/storage-file-share 12.15.0-beta.1 → 12.20.0-alpha.20230607.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/index.js +7060 -7656
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchResponse.js +4 -0
- package/dist-esm/storage-blob/src/BatchResponse.js.map +1 -0
- package/dist-esm/storage-blob/src/BatchResponseParser.js +137 -0
- package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -0
- package/dist-esm/storage-blob/src/BatchUtils.browser.js +11 -0
- package/dist-esm/storage-blob/src/BatchUtils.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/BatchUtils.js +15 -0
- package/dist-esm/storage-blob/src/BatchUtils.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobBatch.js +267 -0
- package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobBatchClient.js +140 -0
- package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js +7 -0
- package/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js +455 -0
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobLeaseClient.js +192 -0
- package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js +362 -0
- package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobQueryResponse.js +367 -0
- package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobServiceClient.js +702 -0
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -0
- package/dist-esm/storage-blob/src/Clients.js +2527 -0
- package/dist-esm/storage-blob/src/Clients.js.map +1 -0
- package/dist-esm/storage-blob/src/ContainerClient.js +1161 -0
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -0
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js +24 -0
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -0
- package/dist-esm/storage-blob/src/Pipeline.js +259 -0
- package/dist-esm/storage-blob/src/Pipeline.js.map +1 -0
- package/dist-esm/storage-blob/src/Range.js +21 -0
- package/dist-esm/storage-blob/src/Range.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/StorageBrowserPolicyFactory.js +1 -1
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +1 -0
- package/dist-esm/storage-blob/src/StorageClient.js +29 -0
- package/dist-esm/storage-blob/src/StorageClient.js.map +1 -0
- package/dist-esm/storage-blob/src/StorageContextClient.js +17 -0
- package/dist-esm/storage-blob/src/StorageContextClient.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/StorageRetryPolicyFactory.js +2 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/credentials/AnonymousCredential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map +1 -0
- package/dist-esm/storage-blob/src/credentials/Credential.js.map +1 -0
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/credentials/StorageSharedKeyCredential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js +5 -0
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js +31 -0
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/generated/src/index.js +1 -1
- package/dist-esm/storage-blob/src/generated/src/index.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/models/index.js +256 -0
- package/dist-esm/storage-blob/src/generated/src/models/index.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/models/mappers.js +8196 -0
- package/dist-esm/storage-blob/src/generated/src/models/mappers.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js +1610 -0
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js +221 -0
- package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/blob.js +997 -0
- package/dist-esm/storage-blob/src/generated/src/operations/blob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js +365 -0
- package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/container.js +705 -0
- package/dist-esm/storage-blob/src/generated/src/operations/container.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/index.js +14 -0
- package/dist-esm/storage-blob/src/generated/src/operations/index.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js +456 -0
- package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/service.js +315 -0
- package/dist-esm/storage-blob/src/generated/src/operations/service.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js.map +1 -0
- package/dist-esm/{src/generated/src/models/index.js → storage-blob/src/generated/src/operationsInterfaces/blob.js} +1 -1
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js +14 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/storageClient.js +49 -0
- package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -0
- package/dist-esm/storage-blob/src/generatedModels.js +4 -0
- package/dist-esm/storage-blob/src/generatedModels.js.map +1 -0
- package/dist-esm/storage-blob/src/index.browser.js +23 -0
- package/dist-esm/storage-blob/src/index.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/index.js +33 -0
- package/dist-esm/storage-blob/src/index.js.map +1 -0
- package/dist-esm/storage-blob/src/log.js +8 -0
- package/dist-esm/storage-blob/src/log.js.map +1 -0
- package/dist-esm/storage-blob/src/models.js +108 -0
- package/dist-esm/storage-blob/src/models.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/policies/CredentialPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js +40 -0
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/policies/StorageBrowserPolicy.js +2 -1
- package/dist-esm/{src → storage-blob/src}/policies/StorageBrowserPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js +31 -0
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/policies/StorageRetryPolicy.js +15 -6
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +165 -0
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js +18 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +131 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -0
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js +130 -0
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js +227 -0
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/AccountSASServices.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +93 -0
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js +195 -0
- package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +555 -0
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js +221 -0
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +234 -0
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/SasIPRange.js +13 -0
- package/dist-esm/storage-blob/src/sas/SasIPRange.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/Batch.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js +111 -0
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/Mutex.js +66 -0
- package/dist-esm/storage-blob/src/utils/Mutex.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +119 -0
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/cache.js +11 -0
- package/dist-esm/storage-blob/src/utils/cache.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/constants.js +223 -0
- package/dist-esm/storage-blob/src/utils/constants.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/tracing.js +14 -0
- package/dist-esm/storage-blob/src/utils/tracing.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/utils.browser.js +48 -0
- package/dist-esm/storage-blob/src/utils/utils.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/utils.common.js +754 -0
- package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/utils.node.js +132 -0
- package/dist-esm/storage-blob/src/utils/utils.node.js.map +1 -0
- package/dist-esm/storage-file-share/src/AccountSASPermissions.js.map +1 -0
- package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js +72 -0
- package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js.map +1 -0
- package/dist-esm/storage-file-share/src/AccountSASServices.js +80 -0
- package/dist-esm/storage-file-share/src/AccountSASServices.js.map +1 -0
- package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/Clients.js +476 -1253
- package/dist-esm/storage-file-share/src/Clients.js.map +1 -0
- package/dist-esm/storage-file-share/src/FileDownloadResponse.browser.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/FileDownloadResponse.js +15 -14
- package/dist-esm/storage-file-share/src/FileDownloadResponse.js.map +1 -0
- package/dist-esm/storage-file-share/src/FileSASPermissions.js.map +1 -0
- package/dist-esm/storage-file-share/src/FileSASSignatureValues.js.map +1 -0
- package/dist-esm/storage-file-share/src/FileSystemAttributes.js.map +1 -0
- package/dist-esm/storage-file-share/src/Range.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/SASQueryParameters.js +14 -14
- package/dist-esm/storage-file-share/src/SASQueryParameters.js.map +1 -0
- package/dist-esm/storage-file-share/src/SasIPRange.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/ShareClientInternal.js +1 -2
- package/dist-esm/storage-file-share/src/ShareClientInternal.js.map +1 -0
- package/dist-esm/storage-file-share/src/ShareSASPermissions.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/ShareServiceClient.js +58 -121
- package/dist-esm/storage-file-share/src/ShareServiceClient.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/StorageClient.js +20 -14
- package/dist-esm/storage-file-share/src/StorageClient.js.map +1 -0
- package/dist-esm/storage-file-share/src/StorageContextClient.js +18 -0
- package/dist-esm/storage-file-share/src/StorageContextClient.js.map +1 -0
- package/dist-esm/storage-file-share/src/generated/src/index.js +11 -0
- package/dist-esm/storage-file-share/src/generated/src/index.js.map +1 -0
- package/dist-esm/storage-file-share/src/generated/src/models/index.js +144 -0
- package/dist-esm/storage-file-share/src/generated/src/models/index.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/generated/src/models/mappers.js +16 -64
- package/dist-esm/storage-file-share/src/generated/src/models/mappers.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/generated/src/models/parameters.js +17 -37
- package/dist-esm/storage-file-share/src/generated/src/models/parameters.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/generated/src/operations/directory.js +17 -73
- package/dist-esm/storage-file-share/src/generated/src/operations/directory.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/generated/src/operations/file.js +33 -142
- package/dist-esm/storage-file-share/src/generated/src/operations/file.js.map +1 -0
- package/dist-esm/storage-file-share/src/generated/src/operations/index.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/generated/src/operations/service.js +7 -17
- package/dist-esm/storage-file-share/src/generated/src/operations/service.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/generated/src/operations/share.js +26 -85
- package/dist-esm/storage-file-share/src/generated/src/operations/share.js.map +1 -0
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/directory.js +9 -0
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/directory.js.map +1 -0
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/file.js +9 -0
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/file.js.map +1 -0
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/index.js +12 -0
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/service.js +9 -0
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/share.js +9 -0
- package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/share.js.map +1 -0
- package/dist-esm/storage-file-share/src/generated/src/storageClient.js +48 -0
- package/dist-esm/storage-file-share/src/generated/src/storageClient.js.map +1 -0
- package/dist-esm/storage-file-share/src/generatedModels.js +4 -0
- package/dist-esm/storage-file-share/src/generatedModels.js.map +1 -0
- package/dist-esm/storage-file-share/src/index.browser.js +18 -0
- package/dist-esm/storage-file-share/src/index.browser.js.map +1 -0
- package/dist-esm/storage-file-share/src/index.js +28 -0
- package/dist-esm/storage-file-share/src/index.js.map +1 -0
- package/dist-esm/storage-file-share/src/log.js.map +1 -0
- package/dist-esm/storage-file-share/src/models.js.map +1 -0
- package/dist-esm/storage-file-share/src/utils/Batch.js +122 -0
- package/dist-esm/storage-file-share/src/utils/Batch.js.map +1 -0
- package/dist-esm/storage-file-share/src/utils/BufferScheduler.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/utils/RetriableReadableStream.js +51 -48
- package/dist-esm/storage-file-share/src/utils/RetriableReadableStream.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/utils/constants.js +2 -6
- package/dist-esm/storage-file-share/src/utils/constants.js.map +1 -0
- package/dist-esm/storage-file-share/src/utils/tracing.js +14 -0
- package/dist-esm/storage-file-share/src/utils/tracing.js.map +1 -0
- package/dist-esm/storage-file-share/src/utils/utils.browser.js.map +1 -0
- package/dist-esm/{src → storage-file-share/src}/utils/utils.common.js +82 -95
- package/dist-esm/storage-file-share/src/utils/utils.common.js.map +1 -0
- package/dist-esm/storage-file-share/src/utils/utils.node.js.map +1 -0
- package/package.json +31 -25
- package/types/3.1/storage-file-share.d.ts +1454 -532
- package/types/latest/storage-file-share.d.ts +1571 -544
- package/dist-esm/src/AccountSASPermissions.js.map +0 -1
- package/dist-esm/src/AccountSASResourceTypes.js.map +0 -1
- package/dist-esm/src/AccountSASServices.js.map +0 -1
- package/dist-esm/src/AccountSASSignatureValues.js.map +0 -1
- package/dist-esm/src/Clients.js.map +0 -1
- package/dist-esm/src/FileDownloadResponse.browser.js.map +0 -1
- package/dist-esm/src/FileDownloadResponse.js.map +0 -1
- package/dist-esm/src/FileSASPermissions.js.map +0 -1
- package/dist-esm/src/FileSASSignatureValues.js.map +0 -1
- package/dist-esm/src/FileSystemAttributes.js.map +0 -1
- package/dist-esm/src/Pipeline.js +0 -88
- package/dist-esm/src/Pipeline.js.map +0 -1
- package/dist-esm/src/Range.js.map +0 -1
- package/dist-esm/src/SASQueryParameters.js.map +0 -1
- package/dist-esm/src/SasIPRange.js.map +0 -1
- package/dist-esm/src/ShareClientInternal.js.map +0 -1
- package/dist-esm/src/ShareSASPermissions.js.map +0 -1
- package/dist-esm/src/ShareServiceClient.js.map +0 -1
- package/dist-esm/src/StorageBrowserPolicyFactory.js.map +0 -1
- package/dist-esm/src/StorageClient.js.map +0 -1
- package/dist-esm/src/StorageRetryPolicyFactory.js.map +0 -1
- package/dist-esm/src/TelemetryPolicyFactory.js +0 -50
- package/dist-esm/src/TelemetryPolicyFactory.js.map +0 -1
- package/dist-esm/src/credentials/AnonymousCredential.js.map +0 -1
- package/dist-esm/src/credentials/Credential.js.map +0 -1
- package/dist-esm/src/credentials/StorageSharedKeyCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/StorageSharedKeyCredential.js.map +0 -1
- package/dist-esm/src/generated/src/index.js.map +0 -1
- package/dist-esm/src/generated/src/models/index.js.map +0 -1
- package/dist-esm/src/generated/src/models/mappers.js.map +0 -1
- package/dist-esm/src/generated/src/models/parameters.js.map +0 -1
- package/dist-esm/src/generated/src/operations/directory.js.map +0 -1
- package/dist-esm/src/generated/src/operations/file.js.map +0 -1
- package/dist-esm/src/generated/src/operations/index.js.map +0 -1
- package/dist-esm/src/generated/src/operations/service.js.map +0 -1
- package/dist-esm/src/generated/src/operations/share.js.map +0 -1
- package/dist-esm/src/generated/src/storageClient.js +0 -25
- package/dist-esm/src/generated/src/storageClient.js.map +0 -1
- package/dist-esm/src/generated/src/storageClientContext.js +0 -40
- package/dist-esm/src/generated/src/storageClientContext.js.map +0 -1
- package/dist-esm/src/generatedModels.js +0 -8
- package/dist-esm/src/generatedModels.js.map +0 -1
- package/dist-esm/src/index.browser.js +0 -17
- package/dist-esm/src/index.browser.js.map +0 -1
- package/dist-esm/src/index.js +0 -27
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/log.js.map +0 -1
- package/dist-esm/src/models.js.map +0 -1
- package/dist-esm/src/policies/AnonymousCredentialPolicy.js.map +0 -1
- package/dist-esm/src/policies/CredentialPolicy.js.map +0 -1
- package/dist-esm/src/policies/StorageRetryPolicy.js.map +0 -1
- package/dist-esm/src/policies/StorageSharedKeyCredentialPolicy.js.map +0 -1
- package/dist-esm/src/policies/TelemetryPolicy.js +0 -36
- package/dist-esm/src/policies/TelemetryPolicy.js.map +0 -1
- package/dist-esm/src/utils/Batch.js.map +0 -1
- package/dist-esm/src/utils/BufferScheduler.js.map +0 -1
- package/dist-esm/src/utils/RetriableReadableStream.js.map +0 -1
- package/dist-esm/src/utils/cache.js +0 -8
- package/dist-esm/src/utils/cache.js.map +0 -1
- package/dist-esm/src/utils/constants.js.map +0 -1
- package/dist-esm/src/utils/tracing.js +0 -27
- package/dist-esm/src/utils/tracing.js.map +0 -1
- package/dist-esm/src/utils/utils.browser.js.map +0 -1
- package/dist-esm/src/utils/utils.common.js.map +0 -1
- package/dist-esm/src/utils/utils.node.js.map +0 -1
- /package/dist-esm/{src → storage-blob/src}/credentials/Credential.js +0 -0
- /package/dist-esm/{src → storage-blob/src}/credentials/StorageSharedKeyCredential.browser.js +0 -0
- /package/dist-esm/{src → storage-blob/src}/policies/AnonymousCredentialPolicy.js +0 -0
- /package/dist-esm/{src → storage-blob/src}/policies/StorageSharedKeyCredentialPolicy.js +0 -0
- /package/dist-esm/{src → storage-blob/src/sas}/AccountSASResourceTypes.js +0 -0
- /package/dist-esm/{src → storage-blob/src/sas}/AccountSASServices.js +0 -0
- /package/dist-esm/{src → storage-blob/src}/utils/Batch.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/AccountSASPermissions.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/AccountSASSignatureValues.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/FileDownloadResponse.browser.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/FileSASPermissions.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/FileSASSignatureValues.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/FileSystemAttributes.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/Range.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/SasIPRange.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/ShareSASPermissions.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/generated/src/operations/index.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/log.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/models.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/utils/BufferScheduler.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/utils/utils.browser.js +0 -0
- /package/dist-esm/{src → storage-file-share/src}/utils/utils.node.js +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"BlobDownloadResponse.js","sourceRoot":"","sources":["../../../../storage-blob/src/BlobDownloadResponse.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAY1C,OAAO,EAEL,uBAAuB,GAExB,MAAM,iCAAiC,CAAC;AAGzC;;;;;;;;;GASG;AACH,MAAM,OAAO,oBAAoB;IAC/B;;;;;OAKG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;IAC5C,CAAC;IAED;;;;;OAKG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC;IAC5C,CAAC;IAED;;;;;;OAMG;IACH,IAAW,kBAAkB;QAC3B,OAAO,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC;IAC/C,CAAC;IAED;;;;;OAKG;IACH,IAAW,eAAe;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC;IAC/C,CAAC;IAED;;;;;OAKG;IACH,IAAW,kBAAkB;QAC3B,OAAO,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,CAAC;IAClD,CAAC;IAED;;;;;O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;;;;;;;OAOG;IACH,IAAW,kBAAkB;QAC3B,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;IACtD,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAClB,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;IACzC,CAAC;IAKD;;;;;;;;OAQG;IACH,YACE,gBAA4C,EAC5C,MAA4B,EAC5B,MAAc,EACd,KAAa,EACb,UAA0C,EAAE;QAE5C,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,kBAAkB,GAAG,IAAI,uBAAuB,CACnD,IAAI,CAAC,gBAAgB,CAAC,kBAAmB,EACzC,MAAM,EACN,MAAM,EACN,KAAK,EACL,OAAO,CACR,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { isNode } from \"@azure/core-util\";\nimport { BlobImmutabilityPolicyMode } from \"./generatedModels\";\n\nimport {\n BlobDownloadHeaders,\n BlobType,\n CopyStatusType,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType,\n} from \"./generatedModels\";\nimport { BlobDownloadResponseParsed, Metadata, ObjectReplicationPolicy } from \"./models\";\nimport {\n ReadableStreamGetter,\n RetriableReadableStream,\n RetriableReadableStreamOptions,\n} from \"./utils/RetriableReadableStream\";\nimport { ResponseWithHeaders } from \"./utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * BlobDownloadResponse implements BlobDownloadResponseParsed interface, and in Node.js runtime it will\n * automatically retry when internal read stream unexpected ends. (This kind of unexpected ends cannot\n * trigger retries defined in pipeline retry policy.)\n *\n * The {@link readableStreamBody} stream will retry underlayer, you can just use it as a normal Node.js\n * Readable stream.\n */\nexport class BlobDownloadResponse implements BlobDownloadResponseParsed {\n /**\n * Indicates that the service supports\n * requests for partial file content.\n *\n * @readonly\n */\n public get acceptRanges(): string | undefined {\n return this.originalResponse.acceptRanges;\n }\n\n /**\n * Returns if it was previously specified\n * for the file.\n *\n * @readonly\n */\n public get cacheControl(): string | undefined {\n return this.originalResponse.cacheControl;\n }\n\n /**\n * Returns the value that was specified\n * for the 'x-ms-content-disposition' header and specifies how to process the\n * response.\n *\n * @readonly\n */\n public get contentDisposition(): string | undefined {\n return this.originalResponse.contentDisposition;\n }\n\n /**\n * Returns the value that was specified\n * for the Content-Encoding request header.\n *\n * @readonly\n */\n public get contentEncoding(): string | undefined {\n return this.originalResponse.contentEncoding;\n }\n\n /**\n * Returns the value that was specified\n * for the Content-Language request header.\n *\n * @readonly\n */\n public get contentLanguage(): string | undefined {\n return this.originalResponse.contentLanguage;\n }\n\n /**\n * The current sequence number for a\n * page blob. This header is not returned for block blobs or append blobs.\n *\n * @readonly\n */\n public get blobSequenceNumber(): number | undefined {\n return this.originalResponse.blobSequenceNumber;\n }\n\n /**\n * The blob's type. Possible values include:\n * 'BlockBlob', 'PageBlob', 'AppendBlob'.\n *\n * @readonly\n */\n public get blobType(): BlobType | undefined {\n return this.originalResponse.blobType;\n }\n\n /**\n * The number of bytes present in the\n * response body.\n *\n * @readonly\n */\n public get contentLength(): number | undefined {\n return this.originalResponse.contentLength;\n }\n\n /**\n * If the file has an MD5 hash and the\n * request is to read the full file, this response header is returned so that\n * the client can check for message content integrity. If the request is to\n * read a specified range and the 'x-ms-range-get-content-md5' is set to\n * true, then the request returns an MD5 hash for the range, as long as the\n * range size is less than or equal to 4 MB. If neither of these sets of\n * conditions is true, then no value is returned for the 'Content-MD5'\n * header.\n *\n * @readonly\n */\n public get contentMD5(): Uint8Array | undefined {\n return this.originalResponse.contentMD5;\n }\n\n /**\n * Indicates the range of bytes returned if\n * the client requested a subset of the file by setting the Range request\n * header.\n *\n * @readonly\n */\n public get contentRange(): string | undefined {\n return this.originalResponse.contentRange;\n }\n\n /**\n * The content type specified for the file.\n * The default content type is 'application/octet-stream'\n *\n * @readonly\n */\n public get contentType(): string | undefined {\n return this.originalResponse.contentType;\n }\n\n /**\n * Conclusion time of the last attempted\n * Copy File operation where this file was the destination file. This value\n * can specify the time of a completed, aborted, or failed copy attempt.\n *\n * @readonly\n */\n public get copyCompletedOn(): Date | undefined {\n return this.originalResponse.copyCompletedOn;\n }\n\n /**\n * String identifier for the last attempted Copy\n * File operation where this file was the destination file.\n *\n * @readonly\n */\n public get copyId(): string | undefined {\n return this.originalResponse.copyId;\n }\n\n /**\n * Contains the number of bytes copied and\n * the total bytes in the source in the last attempted Copy File operation\n * where this file was the destination file. Can show between 0 and\n * Content-Length bytes copied.\n *\n * @readonly\n */\n public get copyProgress(): string | undefined {\n return this.originalResponse.copyProgress;\n }\n\n /**\n * URL up to 2KB in length that specifies the\n * source file used in the last attempted Copy File operation where this file\n * was the destination file.\n *\n * @readonly\n */\n public get copySource(): string | undefined {\n return this.originalResponse.copySource;\n }\n\n /**\n * State of the copy operation\n * identified by 'x-ms-copy-id'. Possible values include: 'pending',\n * 'success', 'aborted', 'failed'\n *\n * @readonly\n */\n public get copyStatus(): CopyStatusType | undefined {\n return this.originalResponse.copyStatus;\n }\n\n /**\n * Only appears when\n * x-ms-copy-status is failed or pending. Describes cause of fatal or\n * non-fatal copy operation failure.\n *\n * @readonly\n */\n public get copyStatusDescription(): string | undefined {\n return this.originalResponse.copyStatusDescription;\n }\n\n /**\n * When a blob is leased,\n * specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'.\n *\n * @readonly\n */\n public get leaseDuration(): LeaseDurationType | undefined {\n return this.originalResponse.leaseDuration;\n }\n\n /**\n * Lease state of the blob. Possible\n * values include: 'available', 'leased', 'expired', 'breaking', 'broken'.\n *\n * @readonly\n */\n public get leaseState(): LeaseStateType | undefined {\n return this.originalResponse.leaseState;\n }\n\n /**\n * The current lease status of the\n * blob. Possible values include: 'locked', 'unlocked'.\n *\n * @readonly\n */\n public get leaseStatus(): LeaseStatusType | undefined {\n return this.originalResponse.leaseStatus;\n }\n\n /**\n * A UTC date/time value generated by the service that\n * indicates the time at which the response was initiated.\n *\n * @readonly\n */\n public get date(): Date | undefined {\n return this.originalResponse.date;\n }\n\n /**\n * The number of committed blocks\n * present in the blob. This header is returned only for append blobs.\n *\n * @readonly\n */\n public get blobCommittedBlockCount(): number | undefined {\n return this.originalResponse.blobCommittedBlockCount;\n }\n\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally, in quotes.\n *\n * @readonly\n */\n public get etag(): string | undefined {\n return this.originalResponse.etag;\n }\n\n /**\n * The number of tags associated with the blob\n *\n * @readonly\n */\n public get tagCount(): number | undefined {\n return this.originalResponse.tagCount;\n }\n\n /**\n * The error code.\n *\n * @readonly\n */\n public get errorCode(): string | undefined {\n return this.originalResponse.errorCode;\n }\n\n /**\n * The value of this header is set to\n * true if the file data and application metadata are completely encrypted\n * using the specified algorithm. Otherwise, the value is set to false (when\n * the file is unencrypted, or if only parts of the file/application metadata\n * are encrypted).\n *\n * @readonly\n */\n public get isServerEncrypted(): boolean | undefined {\n return this.originalResponse.isServerEncrypted;\n }\n\n /**\n * If the blob has a MD5 hash, and if\n * request contains range header (Range or x-ms-range), this response header\n * is returned with the value of the whole blob's MD5 value. This value may\n * or may not be equal to the value returned in Content-MD5 header, with the\n * latter calculated from the requested range.\n *\n * @readonly\n */\n public get blobContentMD5(): Uint8Array | undefined {\n return this.originalResponse.blobContentMD5;\n }\n\n /**\n * Returns the date and time the file was last\n * modified. Any operation that modifies the file or its properties updates\n * the last modified time.\n *\n * @readonly\n */\n public get lastModified(): Date | undefined {\n return this.originalResponse.lastModified;\n }\n\n /**\n * Returns the UTC date and time generated by the service that indicates the time at which the blob was\n * last read or written to.\n *\n * @readonly\n */\n public get lastAccessed(): Date | undefined {\n return this.originalResponse.lastAccessed;\n }\n\n /**\n * A name-value pair\n * to associate with a file storage object.\n *\n * @readonly\n */\n public get metadata(): Metadata | undefined {\n return this.originalResponse.metadata;\n }\n\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n *\n * @readonly\n */\n public get requestId(): string | undefined {\n return this.originalResponse.requestId;\n }\n\n /**\n * If a client request id header is sent in the request, this header will be present in the\n * response with the same value.\n *\n * @readonly\n */\n public get clientRequestId(): string | undefined {\n return this.originalResponse.clientRequestId;\n }\n\n /**\n * Indicates the version of the Blob service used\n * to execute the request.\n *\n * @readonly\n */\n public get version(): string | undefined {\n return this.originalResponse.version;\n }\n\n /**\n * Indicates the versionId of the downloaded blob version.\n *\n * @readonly\n */\n public get versionId(): string | undefined {\n return this.originalResponse.versionId;\n }\n\n /**\n * Indicates whether version of this blob is a current version.\n *\n * @readonly\n */\n public get isCurrentVersion(): boolean | undefined {\n return this.originalResponse.isCurrentVersion;\n }\n\n /**\n * The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned\n * when the blob was encrypted with a customer-provided key.\n *\n * @readonly\n */\n public get encryptionKeySha256(): string | undefined {\n return this.originalResponse.encryptionKeySha256;\n }\n\n /**\n * If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to\n * true, then the request returns a crc64 for the range, as long as the range size is less than\n * or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is\n * specified in the same request, it will fail with 400(Bad Request)\n */\n public get contentCrc64(): Uint8Array | undefined {\n return this.originalResponse.contentCrc64;\n }\n\n /**\n * Object Replication Policy Id of the destination blob.\n *\n * @readonly\n */\n public get objectReplicationDestinationPolicyId(): string | undefined {\n return this.originalResponse.objectReplicationDestinationPolicyId;\n }\n\n /**\n * Parsed Object Replication Policy Id, Rule Id(s) and status of the source blob.\n *\n * @readonly\n */\n public get objectReplicationSourceProperties(): ObjectReplicationPolicy[] | undefined {\n return this.originalResponse.objectReplicationSourceProperties;\n }\n\n /**\n * If this blob has been sealed.\n *\n * @readonly\n */\n public get isSealed(): boolean | undefined {\n return this.originalResponse.isSealed;\n }\n\n /**\n * UTC date/time value generated by the service that indicates the time at which the blob immutability policy will expire.\n *\n * @readonly\n */\n public get immutabilityPolicyExpiresOn(): Date | undefined {\n return this.originalResponse.immutabilityPolicyExpiresOn;\n }\n\n /**\n * Indicates immutability policy mode.\n *\n * @readonly\n */\n public get immutabilityPolicyMode(): BlobImmutabilityPolicyMode | undefined {\n return this.originalResponse.immutabilityPolicyMode;\n }\n\n /**\n * Indicates if a legal hold is present on the blob.\n *\n * @readonly\n */\n public get legalHold(): boolean | undefined {\n return this.originalResponse.legalHold;\n }\n\n /**\n * The response body as a browser Blob.\n * Always undefined in node.js.\n *\n * @readonly\n */\n public get contentAsBlob(): Promise<Blob> | undefined {\n return this.originalResponse.blobBody;\n }\n\n /**\n * The response body as a node.js Readable stream.\n * Always undefined in the browser.\n *\n * It will automatically retry when internal read stream unexpected ends.\n *\n * @readonly\n */\n public get readableStreamBody(): NodeJS.ReadableStream | undefined {\n return isNode ? this.blobDownloadStream : undefined;\n }\n\n /**\n * The HTTP response.\n */\n public get _response(): ResponseWithHeaders<BlobDownloadHeaders>[\"_response\"] {\n return this.originalResponse._response;\n }\n\n private originalResponse: BlobDownloadResponseParsed;\n private blobDownloadStream?: RetriableReadableStream;\n\n /**\n * Creates an instance of BlobDownloadResponse.\n *\n * @param originalResponse -\n * @param getter -\n * @param offset -\n * @param count -\n * @param options -\n */\n public constructor(\n originalResponse: BlobDownloadResponseParsed,\n getter: ReadableStreamGetter,\n offset: number,\n count: number,\n options: RetriableReadableStreamOptions = {}\n ) {\n this.originalResponse = originalResponse;\n this.blobDownloadStream = new RetriableReadableStream(\n this.originalResponse.readableStreamBody!,\n getter,\n offset,\n count,\n options\n );\n }\n}\n"]}
|
@@ -0,0 +1,192 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT license.
|
3
|
+
import { v4 as generateUuid } from "uuid";
|
4
|
+
import { ETagNone } from "./utils/constants";
|
5
|
+
import { tracingClient } from "./utils/tracing";
|
6
|
+
import { assertResponse } from "./utils/utils.common";
|
7
|
+
/**
|
8
|
+
* A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.
|
9
|
+
*/
|
10
|
+
export class BlobLeaseClient {
|
11
|
+
/**
|
12
|
+
* Gets the lease Id.
|
13
|
+
*
|
14
|
+
* @readonly
|
15
|
+
*/
|
16
|
+
get leaseId() {
|
17
|
+
return this._leaseId;
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* Gets the url.
|
21
|
+
*
|
22
|
+
* @readonly
|
23
|
+
*/
|
24
|
+
get url() {
|
25
|
+
return this._url;
|
26
|
+
}
|
27
|
+
/**
|
28
|
+
* Creates an instance of BlobLeaseClient.
|
29
|
+
* @param client - The client to make the lease operation requests.
|
30
|
+
* @param leaseId - Initial proposed lease id.
|
31
|
+
*/
|
32
|
+
constructor(client, leaseId) {
|
33
|
+
const clientContext = client.storageClientContext;
|
34
|
+
this._url = client.url;
|
35
|
+
if (client.name === undefined) {
|
36
|
+
this._isContainer = true;
|
37
|
+
this._containerOrBlobOperation = clientContext.container;
|
38
|
+
}
|
39
|
+
else {
|
40
|
+
this._isContainer = false;
|
41
|
+
this._containerOrBlobOperation = clientContext.blob;
|
42
|
+
}
|
43
|
+
if (!leaseId) {
|
44
|
+
leaseId = generateUuid();
|
45
|
+
}
|
46
|
+
this._leaseId = leaseId;
|
47
|
+
}
|
48
|
+
/**
|
49
|
+
* Establishes and manages a lock on a container for delete operations, or on a blob
|
50
|
+
* for write and delete operations.
|
51
|
+
* The lock duration can be 15 to 60 seconds, or can be infinite.
|
52
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
|
53
|
+
* and
|
54
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
|
55
|
+
*
|
56
|
+
* @param duration - Must be between 15 to 60 seconds, or infinite (-1)
|
57
|
+
* @param options - option to configure lease management operations.
|
58
|
+
* @returns Response data for acquire lease operation.
|
59
|
+
*/
|
60
|
+
async acquireLease(duration, options = {}) {
|
61
|
+
var _a, _b, _c, _d, _e;
|
62
|
+
if (this._isContainer &&
|
63
|
+
((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
|
64
|
+
(((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
|
65
|
+
((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
|
66
|
+
throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
|
67
|
+
}
|
68
|
+
return tracingClient.withSpan("BlobLeaseClient-acquireLease", options, async (updatedOptions) => {
|
69
|
+
var _a;
|
70
|
+
return assertResponse(await this._containerOrBlobOperation.acquireLease({
|
71
|
+
abortSignal: options.abortSignal,
|
72
|
+
duration,
|
73
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
74
|
+
proposedLeaseId: this._leaseId,
|
75
|
+
tracingOptions: updatedOptions.tracingOptions,
|
76
|
+
}));
|
77
|
+
});
|
78
|
+
}
|
79
|
+
/**
|
80
|
+
* To change the ID of the lease.
|
81
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
|
82
|
+
* and
|
83
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
|
84
|
+
*
|
85
|
+
* @param proposedLeaseId - the proposed new lease Id.
|
86
|
+
* @param options - option to configure lease management operations.
|
87
|
+
* @returns Response data for change lease operation.
|
88
|
+
*/
|
89
|
+
async changeLease(proposedLeaseId, options = {}) {
|
90
|
+
var _a, _b, _c, _d, _e;
|
91
|
+
if (this._isContainer &&
|
92
|
+
((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
|
93
|
+
(((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
|
94
|
+
((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
|
95
|
+
throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
|
96
|
+
}
|
97
|
+
return tracingClient.withSpan("BlobLeaseClient-changeLease", options, async (updatedOptions) => {
|
98
|
+
var _a;
|
99
|
+
const response = assertResponse(await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, {
|
100
|
+
abortSignal: options.abortSignal,
|
101
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
102
|
+
tracingOptions: updatedOptions.tracingOptions,
|
103
|
+
}));
|
104
|
+
this._leaseId = proposedLeaseId;
|
105
|
+
return response;
|
106
|
+
});
|
107
|
+
}
|
108
|
+
/**
|
109
|
+
* To free the lease if it is no longer needed so that another client may
|
110
|
+
* immediately acquire a lease against the container or the blob.
|
111
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
|
112
|
+
* and
|
113
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
|
114
|
+
*
|
115
|
+
* @param options - option to configure lease management operations.
|
116
|
+
* @returns Response data for release lease operation.
|
117
|
+
*/
|
118
|
+
async releaseLease(options = {}) {
|
119
|
+
var _a, _b, _c, _d, _e;
|
120
|
+
if (this._isContainer &&
|
121
|
+
((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
|
122
|
+
(((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
|
123
|
+
((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
|
124
|
+
throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
|
125
|
+
}
|
126
|
+
return tracingClient.withSpan("BlobLeaseClient-releaseLease", options, async (updatedOptions) => {
|
127
|
+
var _a;
|
128
|
+
return assertResponse(await this._containerOrBlobOperation.releaseLease(this._leaseId, {
|
129
|
+
abortSignal: options.abortSignal,
|
130
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
131
|
+
tracingOptions: updatedOptions.tracingOptions,
|
132
|
+
}));
|
133
|
+
});
|
134
|
+
}
|
135
|
+
/**
|
136
|
+
* To renew the lease.
|
137
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
|
138
|
+
* and
|
139
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
|
140
|
+
*
|
141
|
+
* @param options - Optional option to configure lease management operations.
|
142
|
+
* @returns Response data for renew lease operation.
|
143
|
+
*/
|
144
|
+
async renewLease(options = {}) {
|
145
|
+
var _a, _b, _c, _d, _e;
|
146
|
+
if (this._isContainer &&
|
147
|
+
((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
|
148
|
+
(((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
|
149
|
+
((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
|
150
|
+
throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
|
151
|
+
}
|
152
|
+
return tracingClient.withSpan("BlobLeaseClient-renewLease", options, async (updatedOptions) => {
|
153
|
+
var _a;
|
154
|
+
return this._containerOrBlobOperation.renewLease(this._leaseId, {
|
155
|
+
abortSignal: options.abortSignal,
|
156
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
157
|
+
tracingOptions: updatedOptions.tracingOptions,
|
158
|
+
});
|
159
|
+
});
|
160
|
+
}
|
161
|
+
/**
|
162
|
+
* To end the lease but ensure that another client cannot acquire a new lease
|
163
|
+
* until the current lease period has expired.
|
164
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container
|
165
|
+
* and
|
166
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob
|
167
|
+
*
|
168
|
+
* @param breakPeriod - Break period
|
169
|
+
* @param options - Optional options to configure lease management operations.
|
170
|
+
* @returns Response data for break lease operation.
|
171
|
+
*/
|
172
|
+
async breakLease(breakPeriod, options = {}) {
|
173
|
+
var _a, _b, _c, _d, _e;
|
174
|
+
if (this._isContainer &&
|
175
|
+
((((_a = options.conditions) === null || _a === void 0 ? void 0 : _a.ifMatch) && ((_b = options.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch) !== ETagNone) ||
|
176
|
+
(((_c = options.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch) && ((_d = options.conditions) === null || _d === void 0 ? void 0 : _d.ifNoneMatch) !== ETagNone) ||
|
177
|
+
((_e = options.conditions) === null || _e === void 0 ? void 0 : _e.tagConditions))) {
|
178
|
+
throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");
|
179
|
+
}
|
180
|
+
return tracingClient.withSpan("BlobLeaseClient-breakLease", options, async (updatedOptions) => {
|
181
|
+
var _a;
|
182
|
+
const operationOptions = {
|
183
|
+
abortSignal: options.abortSignal,
|
184
|
+
breakPeriod,
|
185
|
+
modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }),
|
186
|
+
tracingOptions: updatedOptions.tracingOptions,
|
187
|
+
};
|
188
|
+
return assertResponse(await this._containerOrBlobOperation.breakLease(operationOptions));
|
189
|
+
});
|
190
|
+
}
|
191
|
+
}
|
192
|
+
//# sourceMappingURL=BlobLeaseClient.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"BlobLeaseClient.js","sourceRoot":"","sources":["../../../../storage-blob/src/BlobLeaseClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,EAAE,IAAI,YAAY,EAAE,MAAM,MAAM,CAAC;AAM1C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAgB,MAAM,sBAAsB,CAAC;AA8EpE;;GAEG;AACH,MAAM,OAAO,eAAe;IAM1B;;;;OAIG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;;;OAIG;IACH,YAAY,MAAoC,EAAE,OAAgB;QAChE,MAAM,aAAa,GAAI,MAAc,CAAC,oBAAoB,CAAC;QAC3D,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC;QAEvB,IAAK,MAAqB,CAAC,IAAI,KAAK,SAAS,EAAE;YAC7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YACzB,IAAI,CAAC,yBAAyB,GAAG,aAAa,CAAC,SAAS,CAAC;SAC1D;aAAM;YACL,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;YAC1B,IAAI,CAAC,yBAAyB,GAAG,aAAa,CAAC,IAAI,CAAC;SACrD;QAED,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,G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D,cAAc,EAAE,cAAc,CAAC,cAAc;aAC9C,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACI,KAAK,CAAC,UAAU,CACrB,WAAmB,EACnB,UAAiC,EAAE;;QAEnC,IACE,IAAI,CAAC,YAAY;YACjB,CAAC,CAAC,CAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,OAAO,KAAI,CAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,OAAO,MAAK,QAAQ,CAAC;gBACxE,CAAC,CAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,WAAW,KAAI,CAAA,MAAA,OAAO,CAAC,UAAU,0CAAE,WAAW,MAAK,QAAQ,CAAC;iBACjF,MAAA,OAAO,CAAC,UAAU,0CAAE,aAAa,CAAA,CAAC,EACpC;YACA,MAAM,IAAI,UAAU,CAClB,yJAAyJ,CAC1J,CAAC;SACH;QAED,OAAO,aAAa,CAAC,QAAQ,CAAC,4BAA4B,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;;YAC5F,MAAM,gBAAgB,GAAsC;gBAC1D,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,WAAW;gBACX,wBAAwB,kCACnB,OAAO,CAAC,UAAU,KACrB,MAAM,EAAE,MAAA,OAAO,CAAC,UAAU,0CAAE,aAAa,GAC1C;gBACD,cAAc,EAAE,cAAc,CAAC,cAAc;aAC9C,CAAC;YACF,OAAO,cAAc,CACnB,MAAM,IAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAClE,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { v4 as generateUuid } from \"uuid\";\nimport { ContainerBreakLeaseOptionalParams } from \"./generatedModels\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { Blob as StorageBlob, Container } from \"./generated/src/operationsInterfaces\";\nimport { ModifiedAccessConditions } from \"./models\";\nimport { CommonOptions } from \"./StorageClient\";\nimport { ETagNone } from \"./utils/constants\";\nimport { tracingClient } from \"./utils/tracing\";\nimport { BlobClient } from \"./Clients\";\nimport { ContainerClient } from \"./ContainerClient\";\nimport { assertResponse, WithResponse } from \"./utils/utils.common\";\nimport {\n ContainerAcquireLeaseHeaders,\n ContainerBreakLeaseHeaders,\n ContainerReleaseLeaseHeaders,\n} from \"./generated/src\";\n\n/**\n * The details for a specific lease.\n */\nexport interface Lease {\n /**\n * The ETag contains a value that you can use to\n * perform operations conditionally. If the request version is 2011-08-18 or\n * newer, the ETag value will be in quotes.\n */\n etag?: string;\n /**\n * Returns the date and time the container was\n * last modified. Any operation that modifies the blob, including an update\n * of the blob's metadata or properties, changes the last-modified time of\n * the blob.\n */\n lastModified?: Date;\n /**\n * Uniquely identifies a container's lease\n */\n leaseId?: string;\n /**\n * Approximate time remaining in the lease\n * period, in seconds.\n */\n leaseTime?: number;\n /**\n * This header uniquely identifies the request\n * that was made and can be used for troubleshooting the request.\n */\n requestId?: string;\n /**\n * Indicates the version of the Blob service used\n * to execute the request. This header is returned for requests made against\n * version 2009-09-19 and above.\n */\n version?: string;\n /**\n * UTC date/time value generated by the service that\n * indicates the time at which the response was initiated\n */\n date?: Date;\n /**\n * Error code if any associated with the response that returned\n * the Lease information.\n */\n errorCode?: string;\n}\n\n/**\n * Contains the response data for operations that create, modify, or delete a lease.\n *\n * See {@link BlobLeaseClient}.\n */\nexport type LeaseOperationResponse = WithResponse<Lease, Lease>;\n\n/**\n * Configures lease operations.\n */\nexport interface LeaseOperationOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Conditions to meet when changing the lease.\n */\n conditions?: ModifiedAccessConditions;\n}\n\n/**\n * A client that manages leases for a {@link ContainerClient} or a {@link BlobClient}.\n */\nexport class BlobLeaseClient {\n private _leaseId: string;\n private _url: string;\n private _containerOrBlobOperation: Container | StorageBlob;\n private _isContainer: boolean;\n\n /**\n * Gets the lease Id.\n *\n * @readonly\n */\n public get leaseId(): string {\n return this._leaseId;\n }\n\n /**\n * Gets the url.\n *\n * @readonly\n */\n public get url(): string {\n return this._url;\n }\n\n /**\n * Creates an instance of BlobLeaseClient.\n * @param client - The client to make the lease operation requests.\n * @param leaseId - Initial proposed lease id.\n */\n constructor(client: ContainerClient | BlobClient, leaseId?: string) {\n const clientContext = (client as any).storageClientContext;\n this._url = client.url;\n\n if ((client as BlobClient).name === undefined) {\n this._isContainer = true;\n this._containerOrBlobOperation = clientContext.container;\n } else {\n this._isContainer = false;\n this._containerOrBlobOperation = clientContext.blob;\n }\n\n if (!leaseId) {\n leaseId = generateUuid();\n }\n this._leaseId = leaseId;\n }\n\n /**\n * Establishes and manages a lock on a container for delete operations, or on a blob\n * for write and delete operations.\n * The lock duration can be 15 to 60 seconds, or can be infinite.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param duration - Must be between 15 to 60 seconds, or infinite (-1)\n * @param options - option to configure lease management operations.\n * @returns Response data for acquire lease operation.\n */\n public async acquireLease(\n duration: number,\n options: LeaseOperationOptions = {}\n ): Promise<LeaseOperationResponse> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n return tracingClient.withSpan(\n \"BlobLeaseClient-acquireLease\",\n options,\n async (updatedOptions) => {\n return assertResponse<ContainerAcquireLeaseHeaders, ContainerAcquireLeaseHeaders>(\n await this._containerOrBlobOperation.acquireLease({\n abortSignal: options.abortSignal,\n duration,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n proposedLeaseId: this._leaseId,\n tracingOptions: updatedOptions.tracingOptions,\n })\n );\n }\n );\n }\n\n /**\n * To change the ID of the lease.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param proposedLeaseId - the proposed new lease Id.\n * @param options - option to configure lease management operations.\n * @returns Response data for change lease operation.\n */\n public async changeLease(\n proposedLeaseId: string,\n options: LeaseOperationOptions = {}\n ): Promise<LeaseOperationResponse> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n\n return tracingClient.withSpan(\n \"BlobLeaseClient-changeLease\",\n options,\n async (updatedOptions) => {\n const response = assertResponse<Lease, Lease>(\n await this._containerOrBlobOperation.changeLease(this._leaseId, proposedLeaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n tracingOptions: updatedOptions.tracingOptions,\n })\n );\n this._leaseId = proposedLeaseId;\n return response;\n }\n );\n }\n\n /**\n * To free the lease if it is no longer needed so that another client may\n * immediately acquire a lease against the container or the blob.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param options - option to configure lease management operations.\n * @returns Response data for release lease operation.\n */\n public async releaseLease(options: LeaseOperationOptions = {}): Promise<LeaseOperationResponse> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n return tracingClient.withSpan(\n \"BlobLeaseClient-releaseLease\",\n options,\n async (updatedOptions) => {\n return assertResponse<ContainerReleaseLeaseHeaders, ContainerReleaseLeaseHeaders>(\n await this._containerOrBlobOperation.releaseLease(this._leaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n tracingOptions: updatedOptions.tracingOptions,\n })\n );\n }\n );\n }\n\n /**\n * To renew the lease.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param options - Optional option to configure lease management operations.\n * @returns Response data for renew lease operation.\n */\n public async renewLease(options: LeaseOperationOptions = {}): Promise<Lease> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n return tracingClient.withSpan(\"BlobLeaseClient-renewLease\", options, async (updatedOptions) => {\n return this._containerOrBlobOperation.renewLease(this._leaseId, {\n abortSignal: options.abortSignal,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n tracingOptions: updatedOptions.tracingOptions,\n });\n });\n }\n\n /**\n * To end the lease but ensure that another client cannot acquire a new lease\n * until the current lease period has expired.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-container\n * and\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/lease-blob\n *\n * @param breakPeriod - Break period\n * @param options - Optional options to configure lease management operations.\n * @returns Response data for break lease operation.\n */\n public async breakLease(\n breakPeriod: number,\n options: LeaseOperationOptions = {}\n ): Promise<LeaseOperationResponse> {\n if (\n this._isContainer &&\n ((options.conditions?.ifMatch && options.conditions?.ifMatch !== ETagNone) ||\n (options.conditions?.ifNoneMatch && options.conditions?.ifNoneMatch !== ETagNone) ||\n options.conditions?.tagConditions)\n ) {\n throw new RangeError(\n \"The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.\"\n );\n }\n\n return tracingClient.withSpan(\"BlobLeaseClient-breakLease\", options, async (updatedOptions) => {\n const operationOptions: ContainerBreakLeaseOptionalParams = {\n abortSignal: options.abortSignal,\n breakPeriod,\n modifiedAccessConditions: {\n ...options.conditions,\n ifTags: options.conditions?.tagConditions,\n },\n tracingOptions: updatedOptions.tracingOptions,\n };\n return assertResponse<ContainerBreakLeaseHeaders, ContainerBreakLeaseHeaders>(\n await this._containerOrBlobOperation.breakLease(operationOptions)\n );\n });\n }\n}\n"]}
|
@@ -0,0 +1,362 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT license.
|
3
|
+
/**
|
4
|
+
* ONLY AVAILABLE IN BROWSER RUNTIME.
|
5
|
+
*
|
6
|
+
* BlobQueryResponse implements BlobDownloadResponseModel interface, and in browser runtime it will
|
7
|
+
* parse avor data returned by blob query.
|
8
|
+
*/
|
9
|
+
export class BlobQueryResponse {
|
10
|
+
/**
|
11
|
+
* Indicates that the service supports
|
12
|
+
* requests for partial file content.
|
13
|
+
*
|
14
|
+
* @readonly
|
15
|
+
*/
|
16
|
+
get acceptRanges() {
|
17
|
+
return this.originalResponse.acceptRanges;
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* Returns if it was previously specified
|
21
|
+
* for the file.
|
22
|
+
*
|
23
|
+
* @readonly
|
24
|
+
*/
|
25
|
+
get cacheControl() {
|
26
|
+
return this.originalResponse.cacheControl;
|
27
|
+
}
|
28
|
+
/**
|
29
|
+
* Returns the value that was specified
|
30
|
+
* for the 'x-ms-content-disposition' header and specifies how to process the
|
31
|
+
* response.
|
32
|
+
*
|
33
|
+
* @readonly
|
34
|
+
*/
|
35
|
+
get contentDisposition() {
|
36
|
+
return this.originalResponse.contentDisposition;
|
37
|
+
}
|
38
|
+
/**
|
39
|
+
* Returns the value that was specified
|
40
|
+
* for the Content-Encoding request header.
|
41
|
+
*
|
42
|
+
* @readonly
|
43
|
+
*/
|
44
|
+
get contentEncoding() {
|
45
|
+
return this.originalResponse.contentEncoding;
|
46
|
+
}
|
47
|
+
/**
|
48
|
+
* Returns the value that was specified
|
49
|
+
* for the Content-Language request header.
|
50
|
+
*
|
51
|
+
* @readonly
|
52
|
+
*/
|
53
|
+
get contentLanguage() {
|
54
|
+
return this.originalResponse.contentLanguage;
|
55
|
+
}
|
56
|
+
/**
|
57
|
+
* The current sequence number for a
|
58
|
+
* page blob. This header is not returned for block blobs or append blobs.
|
59
|
+
*
|
60
|
+
* @readonly
|
61
|
+
*/
|
62
|
+
get blobSequenceNumber() {
|
63
|
+
return this.originalResponse.blobSequenceNumber;
|
64
|
+
}
|
65
|
+
/**
|
66
|
+
* The blob's type. Possible values include:
|
67
|
+
* 'BlockBlob', 'PageBlob', 'AppendBlob'.
|
68
|
+
*
|
69
|
+
* @readonly
|
70
|
+
*/
|
71
|
+
get blobType() {
|
72
|
+
return this.originalResponse.blobType;
|
73
|
+
}
|
74
|
+
/**
|
75
|
+
* The number of bytes present in the
|
76
|
+
* response body.
|
77
|
+
*
|
78
|
+
* @readonly
|
79
|
+
*/
|
80
|
+
get contentLength() {
|
81
|
+
return this.originalResponse.contentLength;
|
82
|
+
}
|
83
|
+
/**
|
84
|
+
* If the file has an MD5 hash and the
|
85
|
+
* request is to read the full file, this response header is returned so that
|
86
|
+
* the client can check for message content integrity. If the request is to
|
87
|
+
* read a specified range and the 'x-ms-range-get-content-md5' is set to
|
88
|
+
* true, then the request returns an MD5 hash for the range, as long as the
|
89
|
+
* range size is less than or equal to 4 MB. If neither of these sets of
|
90
|
+
* conditions is true, then no value is returned for the 'Content-MD5'
|
91
|
+
* header.
|
92
|
+
*
|
93
|
+
* @readonly
|
94
|
+
*/
|
95
|
+
get contentMD5() {
|
96
|
+
return this.originalResponse.contentMD5;
|
97
|
+
}
|
98
|
+
/**
|
99
|
+
* Indicates the range of bytes returned if
|
100
|
+
* the client requested a subset of the file by setting the Range request
|
101
|
+
* header.
|
102
|
+
*
|
103
|
+
* @readonly
|
104
|
+
*/
|
105
|
+
get contentRange() {
|
106
|
+
return this.originalResponse.contentRange;
|
107
|
+
}
|
108
|
+
/**
|
109
|
+
* The content type specified for the file.
|
110
|
+
* The default content type is 'application/octet-stream'
|
111
|
+
*
|
112
|
+
* @readonly
|
113
|
+
*/
|
114
|
+
get contentType() {
|
115
|
+
return this.originalResponse.contentType;
|
116
|
+
}
|
117
|
+
/**
|
118
|
+
* Conclusion time of the last attempted
|
119
|
+
* Copy File operation where this file was the destination file. This value
|
120
|
+
* can specify the time of a completed, aborted, or failed copy attempt.
|
121
|
+
*
|
122
|
+
* @readonly
|
123
|
+
*/
|
124
|
+
get copyCompletedOn() {
|
125
|
+
return undefined;
|
126
|
+
}
|
127
|
+
/**
|
128
|
+
* String identifier for the last attempted Copy
|
129
|
+
* File operation where this file was the destination file.
|
130
|
+
*
|
131
|
+
* @readonly
|
132
|
+
*/
|
133
|
+
get copyId() {
|
134
|
+
return this.originalResponse.copyId;
|
135
|
+
}
|
136
|
+
/**
|
137
|
+
* Contains the number of bytes copied and
|
138
|
+
* the total bytes in the source in the last attempted Copy File operation
|
139
|
+
* where this file was the destination file. Can show between 0 and
|
140
|
+
* Content-Length bytes copied.
|
141
|
+
*
|
142
|
+
* @readonly
|
143
|
+
*/
|
144
|
+
get copyProgress() {
|
145
|
+
return this.originalResponse.copyProgress;
|
146
|
+
}
|
147
|
+
/**
|
148
|
+
* URL up to 2KB in length that specifies the
|
149
|
+
* source file used in the last attempted Copy File operation where this file
|
150
|
+
* was the destination file.
|
151
|
+
*
|
152
|
+
* @readonly
|
153
|
+
*/
|
154
|
+
get copySource() {
|
155
|
+
return this.originalResponse.copySource;
|
156
|
+
}
|
157
|
+
/**
|
158
|
+
* State of the copy operation
|
159
|
+
* identified by 'x-ms-copy-id'. Possible values include: 'pending',
|
160
|
+
* 'success', 'aborted', 'failed'
|
161
|
+
*
|
162
|
+
* @readonly
|
163
|
+
*/
|
164
|
+
get copyStatus() {
|
165
|
+
return this.originalResponse.copyStatus;
|
166
|
+
}
|
167
|
+
/**
|
168
|
+
* Only appears when
|
169
|
+
* x-ms-copy-status is failed or pending. Describes cause of fatal or
|
170
|
+
* non-fatal copy operation failure.
|
171
|
+
*
|
172
|
+
* @readonly
|
173
|
+
*/
|
174
|
+
get copyStatusDescription() {
|
175
|
+
return this.originalResponse.copyStatusDescription;
|
176
|
+
}
|
177
|
+
/**
|
178
|
+
* When a blob is leased,
|
179
|
+
* specifies whether the lease is of infinite or fixed duration. Possible
|
180
|
+
* values include: 'infinite', 'fixed'.
|
181
|
+
*
|
182
|
+
* @readonly
|
183
|
+
*/
|
184
|
+
get leaseDuration() {
|
185
|
+
return this.originalResponse.leaseDuration;
|
186
|
+
}
|
187
|
+
/**
|
188
|
+
* Lease state of the blob. Possible
|
189
|
+
* values include: 'available', 'leased', 'expired', 'breaking', 'broken'.
|
190
|
+
*
|
191
|
+
* @readonly
|
192
|
+
*/
|
193
|
+
get leaseState() {
|
194
|
+
return this.originalResponse.leaseState;
|
195
|
+
}
|
196
|
+
/**
|
197
|
+
* The current lease status of the
|
198
|
+
* blob. Possible values include: 'locked', 'unlocked'.
|
199
|
+
*
|
200
|
+
* @readonly
|
201
|
+
*/
|
202
|
+
get leaseStatus() {
|
203
|
+
return this.originalResponse.leaseStatus;
|
204
|
+
}
|
205
|
+
/**
|
206
|
+
* A UTC date/time value generated by the service that
|
207
|
+
* indicates the time at which the response was initiated.
|
208
|
+
*
|
209
|
+
* @readonly
|
210
|
+
*/
|
211
|
+
get date() {
|
212
|
+
return this.originalResponse.date;
|
213
|
+
}
|
214
|
+
/**
|
215
|
+
* The number of committed blocks
|
216
|
+
* present in the blob. This header is returned only for append blobs.
|
217
|
+
*
|
218
|
+
* @readonly
|
219
|
+
*/
|
220
|
+
get blobCommittedBlockCount() {
|
221
|
+
return this.originalResponse.blobCommittedBlockCount;
|
222
|
+
}
|
223
|
+
/**
|
224
|
+
* The ETag contains a value that you can use to
|
225
|
+
* perform operations conditionally, in quotes.
|
226
|
+
*
|
227
|
+
* @readonly
|
228
|
+
*/
|
229
|
+
get etag() {
|
230
|
+
return this.originalResponse.etag;
|
231
|
+
}
|
232
|
+
/**
|
233
|
+
* The error code.
|
234
|
+
*
|
235
|
+
* @readonly
|
236
|
+
*/
|
237
|
+
get errorCode() {
|
238
|
+
return this.originalResponse.errorCode;
|
239
|
+
}
|
240
|
+
/**
|
241
|
+
* The value of this header is set to
|
242
|
+
* true if the file data and application metadata are completely encrypted
|
243
|
+
* using the specified algorithm. Otherwise, the value is set to false (when
|
244
|
+
* the file is unencrypted, or if only parts of the file/application metadata
|
245
|
+
* are encrypted).
|
246
|
+
*
|
247
|
+
* @readonly
|
248
|
+
*/
|
249
|
+
get isServerEncrypted() {
|
250
|
+
return this.originalResponse.isServerEncrypted;
|
251
|
+
}
|
252
|
+
/**
|
253
|
+
* If the blob has a MD5 hash, and if
|
254
|
+
* request contains range header (Range or x-ms-range), this response header
|
255
|
+
* is returned with the value of the whole blob's MD5 value. This value may
|
256
|
+
* or may not be equal to the value returned in Content-MD5 header, with the
|
257
|
+
* latter calculated from the requested range.
|
258
|
+
*
|
259
|
+
* @readonly
|
260
|
+
*/
|
261
|
+
get blobContentMD5() {
|
262
|
+
return this.originalResponse.blobContentMD5;
|
263
|
+
}
|
264
|
+
/**
|
265
|
+
* Returns the date and time the file was last
|
266
|
+
* modified. Any operation that modifies the file or its properties updates
|
267
|
+
* the last modified time.
|
268
|
+
*
|
269
|
+
* @readonly
|
270
|
+
*/
|
271
|
+
get lastModified() {
|
272
|
+
return this.originalResponse.lastModified;
|
273
|
+
}
|
274
|
+
/**
|
275
|
+
* A name-value pair
|
276
|
+
* to associate with a file storage object.
|
277
|
+
*
|
278
|
+
* @readonly
|
279
|
+
*/
|
280
|
+
get metadata() {
|
281
|
+
return this.originalResponse.metadata;
|
282
|
+
}
|
283
|
+
/**
|
284
|
+
* This header uniquely identifies the request
|
285
|
+
* that was made and can be used for troubleshooting the request.
|
286
|
+
*
|
287
|
+
* @readonly
|
288
|
+
*/
|
289
|
+
get requestId() {
|
290
|
+
return this.originalResponse.requestId;
|
291
|
+
}
|
292
|
+
/**
|
293
|
+
* If a client request id header is sent in the request, this header will be present in the
|
294
|
+
* response with the same value.
|
295
|
+
*
|
296
|
+
* @readonly
|
297
|
+
*/
|
298
|
+
get clientRequestId() {
|
299
|
+
return this.originalResponse.clientRequestId;
|
300
|
+
}
|
301
|
+
/**
|
302
|
+
* Indicates the version of the File service used
|
303
|
+
* to execute the request.
|
304
|
+
*
|
305
|
+
* @readonly
|
306
|
+
*/
|
307
|
+
get version() {
|
308
|
+
return this.originalResponse.version;
|
309
|
+
}
|
310
|
+
/**
|
311
|
+
* The SHA-256 hash of the encryption key used to encrypt the blob. This value is only returned
|
312
|
+
* when the blob was encrypted with a customer-provided key.
|
313
|
+
*
|
314
|
+
* @readonly
|
315
|
+
*/
|
316
|
+
get encryptionKeySha256() {
|
317
|
+
return this.originalResponse.encryptionKeySha256;
|
318
|
+
}
|
319
|
+
/**
|
320
|
+
* If the request is to read a specified range and the x-ms-range-get-content-crc64 is set to
|
321
|
+
* true, then the request returns a crc64 for the range, as long as the range size is less than
|
322
|
+
* or equal to 4 MB. If both x-ms-range-get-content-crc64 & x-ms-range-get-content-md5 is
|
323
|
+
* specified in the same request, it will fail with 400(Bad Request)
|
324
|
+
*/
|
325
|
+
get contentCrc64() {
|
326
|
+
return this.originalResponse.contentCrc64;
|
327
|
+
}
|
328
|
+
/**
|
329
|
+
* The response body as a browser Blob.
|
330
|
+
* Always undefined in node.js.
|
331
|
+
*
|
332
|
+
* @readonly
|
333
|
+
*/
|
334
|
+
get blobBody() {
|
335
|
+
throw Error(`Quick query in browser is not supported yet.`);
|
336
|
+
}
|
337
|
+
/**
|
338
|
+
* The response body as a node.js Readable stream.
|
339
|
+
* Always undefined in the browser.
|
340
|
+
*
|
341
|
+
* @readonly
|
342
|
+
*/
|
343
|
+
get readableStreamBody() {
|
344
|
+
return undefined;
|
345
|
+
}
|
346
|
+
/**
|
347
|
+
* The HTTP response.
|
348
|
+
*/
|
349
|
+
get _response() {
|
350
|
+
return this.originalResponse._response;
|
351
|
+
}
|
352
|
+
/**
|
353
|
+
* Creates an instance of BlobQueryResponse.
|
354
|
+
*
|
355
|
+
* @param originalResponse -
|
356
|
+
* @param options -
|
357
|
+
*/
|
358
|
+
constructor(originalResponse, _options = {}) {
|
359
|
+
this.originalResponse = originalResponse;
|
360
|
+
}
|
361
|
+
}
|
362
|
+
//# sourceMappingURL=BlobQueryResponse.browser.js.map
|