@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
@@ -1,7 +1,8 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT license.
|
3
|
-
import { isNode } from "@azure/core-
|
3
|
+
import { isNode } from "@azure/core-util";
|
4
4
|
import { RetriableReadableStream, } from "./utils/RetriableReadableStream";
|
5
|
+
import { assertResponse } from "./utils/utils.common";
|
5
6
|
/**
|
6
7
|
* ONLY AVAILABLE IN NODE.JS RUNTIME.
|
7
8
|
*
|
@@ -13,19 +14,6 @@ import { RetriableReadableStream, } from "./utils/RetriableReadableStream";
|
|
13
14
|
* a normal Node.js Readable stream.
|
14
15
|
*/
|
15
16
|
export class FileDownloadResponse {
|
16
|
-
/**
|
17
|
-
* Creates an instance of FileDownloadResponse.
|
18
|
-
*
|
19
|
-
* @param originalResponse -
|
20
|
-
* @param getter -
|
21
|
-
* @param offset -
|
22
|
-
* @param count -
|
23
|
-
* @param options -
|
24
|
-
*/
|
25
|
-
constructor(originalResponse, getter, offset, count, options = {}) {
|
26
|
-
this.originalResponse = originalResponse;
|
27
|
-
this.fileDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options);
|
28
|
-
}
|
29
17
|
/**
|
30
18
|
* Indicates that the service supports
|
31
19
|
* requests for partial file content.
|
@@ -356,5 +344,18 @@ export class FileDownloadResponse {
|
|
356
344
|
get _response() {
|
357
345
|
return this.originalResponse._response;
|
358
346
|
}
|
347
|
+
/**
|
348
|
+
* Creates an instance of FileDownloadResponse.
|
349
|
+
*
|
350
|
+
* @param originalResponse -
|
351
|
+
* @param getter -
|
352
|
+
* @param offset -
|
353
|
+
* @param count -
|
354
|
+
* @param options -
|
355
|
+
*/
|
356
|
+
constructor(originalResponse, getter, offset, count, options = {}) {
|
357
|
+
this.originalResponse = assertResponse(originalResponse);
|
358
|
+
this.fileDownloadStream = new RetriableReadableStream(this.originalResponse.readableStreamBody, getter, offset, count, options);
|
359
|
+
}
|
359
360
|
}
|
360
361
|
//# sourceMappingURL=FileDownloadResponse.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FileDownloadResponse.js","sourceRoot":"","sources":["../../../src/FileDownloadResponse.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAU1C,OAAO,EAEL,uBAAuB,GAExB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAA8B,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAElF;;;;;;;;;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,aAAa;QACtB,OAAO,IAAI,CAAC,gBA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,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC;IACxC,CAAC;IAED;;;OAGG;IACH,IAAW,aAAa;QACtB,OAAO,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC;IAC1C,CAAC;IAED;;OAEG;IACH,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC;IAC3C,CAAC;IAED;;;;;;;OAOG;IACH,IAAW,kBAAkB;QAC3B,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,CAAC;IACtD,CAAC;IAED,IAAW,SAAS;QAGlB,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;IACzC,CAAC;IAKD;;;;;;;;OAQG;IACH,YACE,gBAA2C,EAC3C,MAA4B,EAC5B,MAAc,EACd,KAAa,EACb,UAA0C,EAAE;QAE5C,IAAI,CAAC,gBAAgB,GAAG,cAAc,CACpC,gBAAgB,CACjB,CAAC;QACF,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.\n\nimport { isNode } from \"@azure/core-util\";\nimport {\n CopyStatusType,\n FileDownloadHeaders,\n FileDownloadResponseModel,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType,\n} from \"./generatedModels\";\nimport { Metadata } from \"./models\";\nimport {\n ReadableStreamGetter,\n RetriableReadableStream,\n RetriableReadableStreamOptions,\n} from \"./utils/RetriableReadableStream\";\nimport { HttpResponse, WithResponse, assertResponse } from \"./utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * FileDownloadResponse implements the `FileDownloadResponseModel` interface, and in a Node.js runtime it will\n * automatically retry when its internal read stream unexpectedly ends. (This kind of unexpected end cannot\n * trigger retries defined in the pipeline retry policy.)\n *\n * The {@link readableStreamBody} stream will retry beneath the `ReadableStream` layer, so you can just use it as\n * a normal Node.js Readable stream.\n */\nexport class FileDownloadResponse implements FileDownloadResponseModel {\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 * Returnes 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 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 * 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 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 public get errorCode(): string | undefined {\n return this.originalResponse.errorCode;\n }\n\n /**\n * If the file 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 file'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 fileContentMD5(): Uint8Array | undefined {\n return this.originalResponse.fileContentMD5;\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 * 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 * 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 * Indicates the version of the File 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 * Attributes set for the file.\n *\n * @readonly\n */\n public get fileAttributes(): string | undefined {\n return this.originalResponse.fileAttributes;\n }\n\n /**\n * Creation time for the file.\n *\n * @readonly\n */\n public get fileCreatedOn(): Date | undefined {\n return this.originalResponse.fileCreatedOn;\n }\n\n /**\n * Last write time for the file.\n *\n * @readonly\n */\n public get fileLastWriteOn(): Date | undefined {\n return this.originalResponse.fileLastWriteOn;\n }\n\n /**\n * Change time for the file.\n *\n * @readonly\n */\n public get fileChangeOn(): Date | undefined {\n return this.originalResponse.fileChangeOn;\n }\n\n /**\n * Key of the permission set for the file.\n *\n * @readonly\n */\n public get filePermissionKey(): string | undefined {\n return this.originalResponse.filePermissionKey;\n }\n\n /**\n * The fileId of the file.\n *\n * @readonly\n */\n public get fileId(): string | undefined {\n return this.originalResponse.fileId;\n }\n\n /**\n * The parent fileId of the file.\n *\n * @readonly\n */\n public get fileParentId(): string | undefined {\n return this.originalResponse.fileParentId;\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 * When a file is leased, specifies whether the lease is of infinite or fixed duration. Possible\n * values include: 'infinite', 'fixed'\n */\n public get leaseDuration(): LeaseDurationType | undefined {\n return this.originalResponse.leaseDuration;\n }\n\n /**\n * Lease state of the file. Possible values include: 'available', 'leased', 'expired',\n * 'breaking', 'broken'\n */\n public get leaseState(): LeaseStateType | undefined {\n return this.originalResponse.leaseState;\n }\n\n /**\n * The current lease status of the file. Possible values include: 'locked', 'unlocked'\n */\n public get leaseStatus(): LeaseStatusType | undefined {\n return this.originalResponse.leaseStatus;\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.fileDownloadStream : undefined;\n }\n\n public get _response(): HttpResponse & {\n parsedHeaders: FileDownloadHeaders;\n } {\n return this.originalResponse._response;\n }\n\n private originalResponse: WithResponse<FileDownloadResponseModel, FileDownloadHeaders>;\n private fileDownloadStream?: RetriableReadableStream;\n\n /**\n * Creates an instance of FileDownloadResponse.\n *\n * @param originalResponse -\n * @param getter -\n * @param offset -\n * @param count -\n * @param options -\n */\n public constructor(\n originalResponse: FileDownloadResponseModel,\n getter: ReadableStreamGetter,\n offset: number,\n count: number,\n options: RetriableReadableStreamOptions = {}\n ) {\n this.originalResponse = assertResponse<FileDownloadResponseModel, FileDownloadHeaders>(\n originalResponse\n );\n this.fileDownloadStream = new RetriableReadableStream(\n this.originalResponse.readableStreamBody!,\n getter,\n offset,\n count,\n options\n );\n }\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":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I,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a file. Setting\n * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all\n * the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link FileSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nexport class FileSASPermissions {\n /**\n * Creates a FileSASPermissions from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n public static parse(permissions: string): FileSASPermissions {\n const fileSASPermissions = new FileSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n fileSASPermissions.read = true;\n break;\n case \"c\":\n fileSASPermissions.create = true;\n break;\n case \"w\":\n fileSASPermissions.write = true;\n break;\n case \"d\":\n fileSASPermissions.delete = true;\n break;\n default:\n throw new RangeError(`Invalid permission: ${char}`);\n }\n }\n\n return fileSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n */\n public read: boolean = false;\n\n /**\n * Specifies Create access granted.\n */\n public create: boolean = false;\n\n /**\n * Specifies Write access granted.\n */\n public write: boolean = false;\n\n /**\n * Specifies Delete access granted.\n */\n public delete: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * @returns A string which represents the FileSASPermissions\n */\n public toString(): string {\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n return permissions.join(\"\");\n }\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FileSASSignatureValues.js","sourceRoot":"","sources":["../../../src/FileSASSignatureValues.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAe,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAqF5D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,8BAA8B,CAC5C,sBAA8C,EAC9C,mBAA+C;IAE/C,IACE,CAAC,sBAAsB,CAAC,UAAU;QAClC,CAAC,CAAC,sBAAsB,CAAC,WAAW,IAAI,sBAAsB,CAAC,SAAS,CAAC,EACzE;QACA,MAAM,IAAI,UAAU,CAClB,uGAAuG,CACxG,CAAC;KACH;IAED,MAAM,OAAO,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC;IAClG,IAAI,QAAQ,GAAW,GAAG,CAAC;IAC3B,IAAI,sBAAsB,CAAC,QAAQ,EAAE;QACnC,QAAQ,GAAG,GAAG,CAAC;KAChB;IAED,IAAI,mBAAuC,CAAC;IAC5C,8FAA8F;IAC9F,IAAI,sBAAsB,CAAC,WAAW,EAAE;QACtC,IAAI,sBAAsB,CAAC,QAAQ,EAAE;YACnC,mBAAmB,GAAG,kBAAkB,CAAC,KAAK,CAC5C,sBAAsB,CAAC,WAAW,CAAC,QAAQ,EAAE,CAC9C,CAAC,QAAQ,EAAE,CAA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sBAAsB,CAAC,kBAAkB,EACzC,sBAAsB,CAAC,eAAe,EACtC,sBAAsB,CAAC,eAAe,EACtC,sBAAsB,CAAC,WAAW,CACnC,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,WAAmB,EAAE,SAAiB,EAAE,QAAiB;IACjF,mCAAmC;IACnC,4CAA4C;IAC5C,0DAA0D;IAC1D,MAAM,QAAQ,GAAa,CAAC,SAAS,WAAW,IAAI,SAAS,EAAE,CAAC,CAAC;IACjE,IAAI,QAAQ,EAAE;QACZ,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC;KAC/B;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { StorageSharedKeyCredential } from \"../../storage-blob/src/credentials/StorageSharedKeyCredential\";\nimport { FileSASPermissions } from \"./FileSASPermissions\";\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { SASProtocol, SASQueryParameters } from \"./SASQueryParameters\";\nimport { ShareSASPermissions } from \"./ShareSASPermissions\";\nimport { SERVICE_VERSION } from \"./utils/constants\";\nimport { truncatedISO8061Date } from \"./utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * FileSASSignatureValues is used to help generating File service SAS tokens for shares or files.\n */\n\nexport interface FileSASSignatureValues {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n */\n expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to either {@link ShareSASPermissions} or {@link FileSASPermissions} depending on the resource\n * being accessed for help constructing the permissions string.\n */\n permissions?: FileSASPermissions | ShareSASPermissions;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n\n /**\n * The name of the share the SAS user may access.\n */\n shareName: string;\n\n /**\n * Optional. The path of the file like, \"directory/FileName\" or \"FileName\".\n */\n filePath?: string;\n\n /**\n * Optional. The name of the access policy on the share this SAS references if any.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n\n /**\n * Optional. The cache-control header for the SAS.\n */\n cacheControl?: string;\n\n /**\n * Optional. The content-disposition header for the SAS.\n */\n contentDisposition?: string;\n\n /**\n * Optional. The content-encoding header for the SAS.\n */\n contentEncoding?: string;\n\n /**\n * Optional. The content-language header for the SAS.\n */\n contentLanguage?: string;\n\n /**\n * Optional. The content-type header for the SAS.\n */\n contentType?: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param fileSASSignatureValues -\n * @param sharedKeyCredential -\n */\nexport function generateFileSASQueryParameters(\n fileSASSignatureValues: FileSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential\n): SASQueryParameters {\n if (\n !fileSASSignatureValues.identifier &&\n !(fileSASSignatureValues.permissions && fileSASSignatureValues.expiresOn)\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for File SAS generation when 'identifier' is not provided.\"\n );\n }\n\n const version = fileSASSignatureValues.version ? fileSASSignatureValues.version : SERVICE_VERSION;\n let resource: string = \"s\";\n if (fileSASSignatureValues.filePath) {\n resource = \"f\";\n }\n\n let verifiedPermissions: string | undefined;\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n if (fileSASSignatureValues.permissions) {\n if (fileSASSignatureValues.filePath) {\n verifiedPermissions = FileSASPermissions.parse(\n fileSASSignatureValues.permissions.toString()\n ).toString();\n } else {\n verifiedPermissions = ShareSASPermissions.parse(\n fileSASSignatureValues.permissions.toString()\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions,\n fileSASSignatureValues.startsOn\n ? truncatedISO8061Date(fileSASSignatureValues.startsOn, false)\n : \"\",\n fileSASSignatureValues.expiresOn\n ? truncatedISO8061Date(fileSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n sharedKeyCredential.accountName,\n fileSASSignatureValues.shareName,\n fileSASSignatureValues.filePath\n ),\n fileSASSignatureValues.identifier,\n fileSASSignatureValues.ipRange ? ipRangeToString(fileSASSignatureValues.ipRange) : \"\",\n fileSASSignatureValues.protocol,\n version,\n fileSASSignatureValues.cacheControl,\n fileSASSignatureValues.contentDisposition,\n fileSASSignatureValues.contentEncoding,\n fileSASSignatureValues.contentLanguage,\n fileSASSignatureValues.contentType,\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return new SASQueryParameters(\n version,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n fileSASSignatureValues.protocol,\n fileSASSignatureValues.startsOn,\n fileSASSignatureValues.expiresOn,\n fileSASSignatureValues.ipRange,\n fileSASSignatureValues.identifier,\n resource,\n fileSASSignatureValues.cacheControl,\n fileSASSignatureValues.contentDisposition,\n fileSASSignatureValues.contentEncoding,\n fileSASSignatureValues.contentLanguage,\n fileSASSignatureValues.contentType\n );\n}\n\nfunction getCanonicalName(accountName: string, shareName: string, filePath?: string): string {\n // Share: \"/file/account/sharename\"\n // File: \"/file/account/sharename/filename\"\n // File: \"/file/account/sharename/directoryname/filename\"\n const elements: string[] = [`/file/${accountName}/${shareName}`];\n if (filePath) {\n elements.push(`/${filePath}`);\n }\n return elements.join(\"\");\n}\n"]}
|
@@ -0,0 +1 @@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E;YAClB,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC9B;QACD,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC5B;QACD,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC5B;QACD,IAAI,IAAI,CAAC,iBAAiB,EAAE;YAC1B,UAAU,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;SACtC;QACD,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SAChC;QACD,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * This is a helper class to construct a string representing the NTFS attributes to a file or directory.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-file#file-system-attributes\n */\nexport class FileSystemAttributes {\n /**\n * Creates a FileSystemAttributes from the specified attributes string. This method will throw an\n * Error if it encounters a string that does not correspond to a valid attributes.\n *\n * @param fileAttributes - The value of header x-ms-file-attributes.\n */\n public static parse(fileAttributes: string): FileSystemAttributes {\n if (!fileAttributes) {\n throw new RangeError(`Invalid fileAttributes: '${fileAttributes}'.`);\n }\n\n const fileSystemAttributes = new FileSystemAttributes();\n\n const attributes = fileAttributes.trim().split(\"|\");\n\n for (let str of attributes) {\n str = str.trim();\n switch (str) {\n case \"ReadOnly\":\n fileSystemAttributes.readonly = true;\n break;\n case \"Hidden\":\n fileSystemAttributes.hidden = true;\n break;\n case \"System\":\n fileSystemAttributes.system = true;\n break;\n case \"None\":\n fileSystemAttributes.none = true;\n break;\n case \"Temporary\":\n fileSystemAttributes.temporary = true;\n break;\n case \"Offline\":\n fileSystemAttributes.offline = true;\n break;\n case \"Directory\":\n fileSystemAttributes.directory = true;\n break;\n case \"Archive\":\n fileSystemAttributes.archive = true;\n break;\n case \"NotContentIndexed\":\n fileSystemAttributes.notContentIndexed = true;\n break;\n case \"NoScrubData\":\n fileSystemAttributes.noScrubData = true;\n break;\n default:\n throw new RangeError(`Invalid attribute: ${str}`);\n }\n }\n\n return fileSystemAttributes;\n }\n\n /**\n * Specifies a directory or file that is read-only.\n */\n public readonly: boolean = false;\n\n /**\n * Specifies a directory or file is hidden.\n */\n public hidden: boolean = false;\n\n /**\n * Specifies a directory or file that the operating system uses a part of, or uses exclusively.\n */\n public system: boolean = false;\n\n /**\n * Specifies a directory or file that does not have other attributes set. This attribute is valid only when used alone.\n */\n public none: boolean = false;\n\n /**\n * Specifies the handle identifies a directory.\n */\n public directory: boolean = false;\n\n /**\n * Specifies a directory or file is an archive. Applications typically use this attribute to mark files for backup or removal.\n */\n public archive: boolean = false;\n\n /**\n * Specifies if a file is temporary.\n */\n public temporary: boolean = false;\n\n /**\n * Specifies the data of a directory or file is not available immediately.\n * This file system attribute is presented primarily to provide compatibility with Windows - Azure Files does not support with offline storage options.\n */\n public offline: boolean = false;\n\n /**\n * Specifies the directory or file is not to be indexed by the content indexing service.\n */\n public notContentIndexed: boolean = false;\n\n /**\n * Specifies the user data stream not to be read by the background data integrity scanner.\n * This file system attribute is presented primarily to provide compatibility with Windows.\n * Applicable to directory or file.\n */\n public noScrubData: boolean = false;\n\n /**\n * Converts the given attributes to a string.\n *\n * @returns A string which represents the FileSystemAttributes\n */\n public toString(): string {\n const attributes: string[] = [];\n if (this.readonly) {\n attributes.push(\"ReadOnly\");\n }\n if (this.hidden) {\n attributes.push(\"Hidden\");\n }\n if (this.system) {\n attributes.push(\"System\");\n }\n if (this.none) {\n attributes.push(\"None\");\n }\n if (this.temporary) {\n attributes.push(\"Temporary\");\n }\n if (this.directory) {\n attributes.push(\"Directory\");\n }\n if (this.archive) {\n attributes.push(\"Archive\");\n }\n if (this.offline) {\n attributes.push(\"Offline\");\n }\n if (this.notContentIndexed) {\n attributes.push(\"NotContentIndexed\");\n }\n if (this.noScrubData) {\n attributes.push(\"NoScrubData\");\n }\n return attributes.join(\"|\");\n }\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Range.js","sourceRoot":"","sources":["../../../src/Range.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAkBlC;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,KAAY;IACxC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;QACpB,MAAM,IAAI,UAAU,CAAC,wCAAwC,CAAC,CAAC;KAChE;IACD,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,EAAE;QACnC,MAAM,IAAI,UAAU,CAClB,mGAAmG,CACpG,CAAC;KACH;IACD,OAAO,KAAK,CAAC,KAAK;QAChB,CAAC,CAAC,SAAS,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE;QAC3D,CAAC,CAAC,SAAS,KAAK,CAAC,MAAM,GAAG,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Range for Service Operations.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/specifying-the-range-header-for-file-service-operations\n */\nexport interface Range {\n /**\n * StartByte, larger than or equal 0.\n */\n offset: number;\n /**\n * Optional. Count of bytes, larger than 0.\n * If not provided, will return bytes from offset to the end.\n */\n count?: number;\n}\n\n/**\n * Generate a range string. For example:\n *\n * \"bytes=255-\" or \"bytes=0-511\"\n *\n * @param range - A range of byte positions.\n * @returns The string representation for the byte range.\n */\nexport function rangeToString(range: Range): string {\n if (range.offset < 0) {\n throw new RangeError(`Range.offset cannot be smaller than 0.`);\n }\n if (range.count && range.count <= 0) {\n throw new RangeError(\n `Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`\n );\n }\n return range.count\n ? `bytes=${range.offset}-${range.offset + range.count - 1}`\n : `bytes=${range.offset}-`;\n}\n"]}
|
@@ -26,6 +26,20 @@ export var SASProtocol;
|
|
26
26
|
* NOTE: Instances of this class are immutable.
|
27
27
|
*/
|
28
28
|
export class SASQueryParameters {
|
29
|
+
/**
|
30
|
+
* Optional. IP range allowed for this SAS.
|
31
|
+
*
|
32
|
+
* @readonly
|
33
|
+
*/
|
34
|
+
get ipRange() {
|
35
|
+
if (this.ipRangeInner) {
|
36
|
+
return {
|
37
|
+
end: this.ipRangeInner.end,
|
38
|
+
start: this.ipRangeInner.start,
|
39
|
+
};
|
40
|
+
}
|
41
|
+
return undefined;
|
42
|
+
}
|
29
43
|
/**
|
30
44
|
* Creates an instance of SASQueryParameters.
|
31
45
|
*
|
@@ -64,20 +78,6 @@ export class SASQueryParameters {
|
|
64
78
|
this.contentLanguage = contentLanguage;
|
65
79
|
this.contentType = contentType;
|
66
80
|
}
|
67
|
-
/**
|
68
|
-
* Optional. IP range allowed for this SAS.
|
69
|
-
*
|
70
|
-
* @readonly
|
71
|
-
*/
|
72
|
-
get ipRange() {
|
73
|
-
if (this.ipRangeInner) {
|
74
|
-
return {
|
75
|
-
end: this.ipRangeInner.end,
|
76
|
-
start: this.ipRangeInner.start,
|
77
|
-
};
|
78
|
-
}
|
79
|
-
return undefined;
|
80
|
-
}
|
81
81
|
/**
|
82
82
|
* Encodes all SAS query parameters into a string that can be appended to a URL.
|
83
83
|
*
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SASQueryParameters.js","sourceRoot":"","sources":["../../../src/SASQueryParameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D;;GAEG;AACH,MAAM,CAAN,IAAY,WAUX;AAVD,WAAY,WAAW;IACrB;;OAEG;IACH,8BAAe,CAAA;IAEf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BACR,KAAK,MAAM;oBACT,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;oBAC/D,MAAM;aACT;SACF;QACD,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED;;;;;;OAMG;IACK,uBAAuB,CAAC,OAAiB,EAAE,GAAW,EAAE,KAAc;QAC5E,IAAI,CAAC,KAAK,EAAE;YACV,OAAO;SACR;QAED,GAAG,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC9B,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;YACtC,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;SACjC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { truncatedISO8061Date } from \"./utils/utils.common\";\n\n/**\n * Protocols for generated SAS.\n */\nexport enum SASProtocol {\n /**\n * Protocol that allows HTTPS only\n */\n Https = \"https\",\n\n /**\n * Protocol that allows both HTTPS and HTTP\n */\n HttpsAndHttp = \"https,http\",\n}\n\n/**\n * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly\n * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link FileSASSignatureValues}\n * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should\n * be taken here in case there are existing query parameters, which might affect the appropriate means of appending\n * these query parameters).\n *\n * NOTE: Instances of this class are immutable.\n */\nexport class SASQueryParameters {\n /**\n * The storage API version.\n */\n public readonly version: string;\n\n /**\n * Optional. The allowed HTTP protocol(s).\n */\n public readonly protocol?: SASProtocol;\n\n /**\n * Optional. The start time for this SAS token.\n */\n public readonly startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n */\n public readonly expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link FileSASPermissions}, or {@link ShareSASPermissions} for\n * more details.\n */\n public readonly permissions?: string;\n\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n */\n public readonly services?: string;\n\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n */\n public readonly resourceTypes?: string;\n\n /**\n * Optional. The signed identifier (only for {@link FileSASSignatureValues}).\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n public readonly identifier?: string;\n\n /**\n * Optional. The storage share or file path (only for {@link FileSASSignatureValues}).\n */\n public readonly resource?: string;\n\n /**\n * The signature for the SAS token.\n */\n public readonly signature: string;\n\n /**\n * Value for cache-control header in Blob/File Service SAS.\n */\n public readonly cacheControl?: string;\n\n /**\n * Value for content-disposition header in Blob/File Service SAS.\n */\n public readonly contentDisposition?: string;\n\n /**\n * Value for content-encoding header in Blob/File Service SAS.\n */\n public readonly contentEncoding?: string;\n\n /**\n * Value for content-length header in Blob/File Service SAS.\n */\n public readonly contentLanguage?: string;\n\n /**\n * Value for content-type header in Blob/File Service SAS.\n */\n public readonly contentType?: string;\n\n /**\n * Inner value of getter ipRange.\n */\n private readonly ipRangeInner?: SasIPRange;\n\n /**\n * Optional. IP range allowed for this SAS.\n *\n * @readonly\n */\n public get ipRange(): SasIPRange | undefined {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start,\n };\n }\n return undefined;\n }\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param version - Representing the storage version\n * @param signature - Representing the signature for the SAS token\n * @param permissions - Representing the storage permissions\n * @param services - Representing the storage services being accessed (only for Account SAS)\n * @param resourceTypes - Representing the storage resource types being accessed (only for Account SAS)\n * @param protocol - Representing the allowed HTTP protocol(s)\n * @param startsOn - Representing the start time for this SAS token\n * @param expiresOn - Representing the expiry time for this SAS token\n * @param ipRange - Representing the range of valid IP addresses for this SAS token\n * @param identifier - Representing the signed identifier (only for Service SAS)\n * @param resource - Representing the storage container or blob (only for Service SAS)\n * @param cacheControl - Representing the cache-control header (only for Blob/File Service SAS)\n * @param contentDisposition - Representing the content-disposition header (only for Blob/File Service SAS)\n * @param contentEncoding - Representing the content-encoding header (only for Blob/File Service SAS)\n * @param contentLanguage - Representing the content-language header (only for Blob/File Service SAS)\n * @param contentType - Representing the content-type header (only for Blob/File Service SAS)\n */\n constructor(\n version: string,\n signature: string,\n permissions?: string,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n cacheControl?: string,\n contentDisposition?: string,\n contentEncoding?: string,\n contentLanguage?: string,\n contentType?: string\n ) {\n this.version = version;\n this.services = services;\n this.resourceTypes = resourceTypes;\n this.expiresOn = expiresOn;\n this.permissions = permissions;\n this.protocol = protocol;\n this.startsOn = startsOn;\n this.ipRangeInner = ipRange;\n this.identifier = identifier;\n this.resource = resource;\n this.signature = signature;\n this.cacheControl = cacheControl;\n this.contentDisposition = contentDisposition;\n this.contentEncoding = contentEncoding;\n this.contentLanguage = contentLanguage;\n this.contentType = contentType;\n }\n\n /**\n * Encodes all SAS query parameters into a string that can be appended to a URL.\n *\n */\n public toString(): string {\n const params: string[] = [\n \"sv\",\n \"ss\",\n \"srt\",\n \"spr\",\n \"st\",\n \"se\",\n \"sip\",\n \"si\",\n \"sr\",\n \"sp\",\n \"sig\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n ];\n const queries: string[] = [];\n\n for (const param of params) {\n switch (param) {\n case \"sv\":\n this.tryAppendQueryParameter(queries, param, this.version);\n break;\n case \"ss\":\n this.tryAppendQueryParameter(queries, param, this.services);\n break;\n case \"srt\":\n this.tryAppendQueryParameter(queries, param, this.resourceTypes);\n break;\n case \"spr\":\n this.tryAppendQueryParameter(queries, param, this.protocol);\n break;\n case \"st\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined\n );\n break;\n case \"se\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined\n );\n break;\n case \"sip\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.ipRange ? ipRangeToString(this.ipRange) : undefined\n );\n break;\n case \"si\":\n this.tryAppendQueryParameter(queries, param, this.identifier);\n break;\n case \"sr\":\n this.tryAppendQueryParameter(queries, param, this.resource);\n break;\n case \"sp\":\n this.tryAppendQueryParameter(queries, param, this.permissions);\n break;\n case \"sig\":\n this.tryAppendQueryParameter(queries, param, this.signature);\n break;\n case \"rscc\":\n this.tryAppendQueryParameter(queries, param, this.cacheControl);\n break;\n case \"rscd\":\n this.tryAppendQueryParameter(queries, param, this.contentDisposition);\n break;\n case \"rsce\":\n this.tryAppendQueryParameter(queries, param, this.contentEncoding);\n break;\n case \"rscl\":\n this.tryAppendQueryParameter(queries, param, this.contentLanguage);\n break;\n case \"rsct\":\n this.tryAppendQueryParameter(queries, param, this.contentType);\n break;\n }\n }\n return queries.join(\"&\");\n }\n\n /**\n * A private helper method used to filter and append query key/value pairs into an array.\n *\n * @param queries -\n * @param key -\n * @param value -\n */\n private tryAppendQueryParameter(queries: string[], key: string, value?: string): void {\n if (!value) {\n return;\n }\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n if (key.length > 0 && value.length > 0) {\n queries.push(`${key}=${value}`);\n }\n }\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SasIPRange.js","sourceRoot":"","sources":["../../../src/SasIPRange.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAkBlC;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAAC,OAAmB;IACjD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;AACzE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Allowed IP range for a SAS.\n */\nexport interface SasIPRange {\n /**\n * Starting IP address in the IP range.\n * If end IP doesn't provide, start IP will the only IP allowed.\n */\n start: string;\n /**\n * Optional. IP address that ends the IP range.\n * If not provided, start IP will the only IP allowed.\n */\n end?: string;\n}\n\n/**\n * Generate SasIPRange format string. For example:\n *\n * \"8.8.8.8\" or \"1.1.1.1-255.255.255.255\"\n *\n * @param ipRange - A range of IP addresses.\n * @returns string representation of the IP range.\n */\nexport function ipRangeToString(ipRange: SasIPRange): string {\n return ipRange.end ? `${ipRange.start}-${ipRange.end}` : ipRange.start;\n}\n"]}
|
@@ -1,14 +1,13 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT license.
|
3
3
|
import { StorageClient } from "./StorageClient";
|
4
|
-
import { Share } from "./generated/src/operations";
|
5
4
|
/**
|
6
5
|
* ShareClientInternal is the thin wrapper for Share which contains internal helper methods.
|
7
6
|
*/
|
8
7
|
export class ShareClientInternal extends StorageClient {
|
9
8
|
constructor(url, pipeline) {
|
10
9
|
super(url, pipeline);
|
11
|
-
this.context =
|
10
|
+
this.context = this.storageClientContext.share;
|
12
11
|
}
|
13
12
|
async restore(options = {}) {
|
14
13
|
return this.context.restore(options);
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ShareClientInternal.js","sourceRoot":"","sources":["../../../src/ShareClientInternal.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,aAAa;IAGpD,YAAY,GAAW,EAAE,QAAkB;QACzC,KAAK,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;IACjD,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,UAAsC,EAAE;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Pipeline } from \"../../storage-blob/src/Pipeline\";\nimport { StorageClient } from \"./StorageClient\";\nimport { ShareRestoreOptionalParams, ShareRestoreResponse } from \"./generated/src/models\";\nimport { Share } from \"./generated/src/operationsInterfaces\";\n\n/**\n * ShareClientInternal is the thin wrapper for Share which contains internal helper methods.\n */\nexport class ShareClientInternal extends StorageClient {\n private context: Share;\n\n constructor(url: string, pipeline: Pipeline) {\n super(url, pipeline);\n this.context = this.storageClientContext.share;\n }\n\n public async restore(options: ShareRestoreOptionalParams = {}): Promise<ShareRestoreResponse> {\n return this.context.restore(options);\n }\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ShareSASPermissions.js","sourceRoot":"","sources":["../../../src/ShareSASPermissions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;GAMG;AACH,MAAM,OAAO,mBAAmB;IAAhC;QAmCE;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;IA6B/B,CAAC;IAtFC;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,WAAmB;Q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// Licensed under the MIT license.\n\n/**\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a share.\n * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.\n * Once all the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link FileSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nexport class ShareSASPermissions {\n /**\n * Creates an {@link ShareSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n public static parse(permissions: string): ShareSASPermissions {\n const shareSASPermissions = new ShareSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n shareSASPermissions.read = true;\n break;\n case \"c\":\n shareSASPermissions.create = true;\n break;\n case \"w\":\n shareSASPermissions.write = true;\n break;\n case \"d\":\n shareSASPermissions.delete = true;\n break;\n case \"l\":\n shareSASPermissions.list = true;\n break;\n default:\n throw new RangeError(`Invalid permission ${char}`);\n }\n }\n\n return shareSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n */\n public read: boolean = false;\n\n /**\n * Specifies Create access granted.\n */\n public create: boolean = false;\n\n /**\n * Specifies Write access granted.\n */\n public write: boolean = false;\n\n /**\n * Specifies Delete access granted.\n */\n public delete: boolean = false;\n\n /**\n * Specifies List access granted.\n */\n public list: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * The order of the characters should be as specified here to ensure correctness.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n */\n public toString(): string {\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n return permissions.join(\"\");\n }\n}\n"]}
|
@@ -1,19 +1,17 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT license.
|
3
3
|
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
4
|
-
import {
|
5
|
-
import { newPipeline, Pipeline } from "./Pipeline";
|
4
|
+
import { newPipeline, Pipeline } from "../../storage-blob/src/Pipeline";
|
6
5
|
import { StorageClient } from "./StorageClient";
|
7
6
|
import { ShareClientInternal } from "./ShareClientInternal";
|
8
7
|
import { ShareClient } from "./Clients";
|
9
|
-
import { appendToURLPath, extractConnectionStringParts } from "./utils/utils.common";
|
10
|
-
import { Credential } from "
|
11
|
-
import { StorageSharedKeyCredential } from "
|
12
|
-
import { AnonymousCredential } from "
|
8
|
+
import { appendToURLPath, extractConnectionStringParts, assertResponse, } from "./utils/utils.common";
|
9
|
+
import { Credential } from "../../storage-blob/src/credentials/Credential";
|
10
|
+
import { StorageSharedKeyCredential } from "../../storage-blob/src/credentials/StorageSharedKeyCredential";
|
11
|
+
import { AnonymousCredential } from "../../storage-blob/src/credentials/AnonymousCredential";
|
13
12
|
import "@azure/core-paging";
|
14
|
-
import { isNode
|
15
|
-
import {
|
16
|
-
import { convertTracingToRequestOptionsBase, createSpan } from "./utils/tracing";
|
13
|
+
import { isNode } from "@azure/core-util";
|
14
|
+
import { tracingClient } from "./utils/tracing";
|
17
15
|
import { toShareProtocols } from "./models";
|
18
16
|
import { AccountSASPermissions } from "./AccountSASPermissions";
|
19
17
|
import { generateAccountSASQueryParameters } from "./AccountSASSignatureValues";
|
@@ -24,26 +22,6 @@ import { appendToURLQuery } from "./utils/utils.common";
|
|
24
22
|
* to manipulate file shares.
|
25
23
|
*/
|
26
24
|
export class ShareServiceClient extends StorageClient {
|
27
|
-
constructor(url, credentialOrPipeline,
|
28
|
-
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
29
|
-
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
30
|
-
options) {
|
31
|
-
let pipeline;
|
32
|
-
if (credentialOrPipeline instanceof Pipeline) {
|
33
|
-
pipeline = credentialOrPipeline;
|
34
|
-
}
|
35
|
-
else if (credentialOrPipeline instanceof Credential ||
|
36
|
-
isTokenCredential(credentialOrPipeline)) {
|
37
|
-
pipeline = newPipeline(credentialOrPipeline, options);
|
38
|
-
}
|
39
|
-
else {
|
40
|
-
// The second parameter is undefined. Use anonymous credential.
|
41
|
-
pipeline = newPipeline(new AnonymousCredential(), options);
|
42
|
-
}
|
43
|
-
super(url, pipeline);
|
44
|
-
this.shareClientConfig = options;
|
45
|
-
this.serviceContext = new Service(this.storageClientContext);
|
46
|
-
}
|
47
25
|
/**
|
48
26
|
*
|
49
27
|
* Creates an instance of ShareServiceClient from connection string.
|
@@ -66,7 +44,7 @@ export class ShareServiceClient extends StorageClient {
|
|
66
44
|
if (isNode) {
|
67
45
|
const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
68
46
|
const pipeline = newPipeline(sharedKeyCredential, options);
|
69
|
-
return new ShareServiceClient(extractedCreds.url, pipeline
|
47
|
+
return new ShareServiceClient(extractedCreds.url, pipeline);
|
70
48
|
}
|
71
49
|
else {
|
72
50
|
throw new Error("Account connection string is only supported in Node.js environment");
|
@@ -74,12 +52,30 @@ export class ShareServiceClient extends StorageClient {
|
|
74
52
|
}
|
75
53
|
else if (extractedCreds.kind === "SASConnString") {
|
76
54
|
const pipeline = newPipeline(new AnonymousCredential(), options);
|
77
|
-
return new ShareServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline
|
55
|
+
return new ShareServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline);
|
78
56
|
}
|
79
57
|
else {
|
80
58
|
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
|
81
59
|
}
|
82
60
|
}
|
61
|
+
constructor(url, credentialOrPipeline,
|
62
|
+
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
63
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
64
|
+
options) {
|
65
|
+
let pipeline;
|
66
|
+
if (credentialOrPipeline instanceof Pipeline) {
|
67
|
+
pipeline = credentialOrPipeline;
|
68
|
+
}
|
69
|
+
else if (credentialOrPipeline instanceof Credential) {
|
70
|
+
pipeline = newPipeline(credentialOrPipeline, options);
|
71
|
+
}
|
72
|
+
else {
|
73
|
+
// The second parameter is undefined. Use anonymous credential.
|
74
|
+
pipeline = newPipeline(new AnonymousCredential(), options);
|
75
|
+
}
|
76
|
+
super(url, pipeline);
|
77
|
+
this.serviceContext = this.storageClientContext.service;
|
78
|
+
}
|
83
79
|
/**
|
84
80
|
* Creates a ShareClient object.
|
85
81
|
*
|
@@ -95,7 +91,7 @@ export class ShareServiceClient extends StorageClient {
|
|
95
91
|
* ```
|
96
92
|
*/
|
97
93
|
getShareClient(shareName) {
|
98
|
-
return new ShareClient(appendToURLPath(this.url, shareName), this.pipeline
|
94
|
+
return new ShareClient(appendToURLPath(this.url, shareName), this.pipeline);
|
99
95
|
}
|
100
96
|
/**
|
101
97
|
* Creates a Share.
|
@@ -105,25 +101,14 @@ export class ShareServiceClient extends StorageClient {
|
|
105
101
|
* @returns Share creation response and the corresponding share client.
|
106
102
|
*/
|
107
103
|
async createShare(shareName, options = {}) {
|
108
|
-
|
109
|
-
try {
|
104
|
+
return tracingClient.withSpan("ShareServiceClient-createShare", options, async (updatedOptions) => {
|
110
105
|
const shareClient = this.getShareClient(shareName);
|
111
106
|
const shareCreateResponse = await shareClient.create(updatedOptions);
|
112
107
|
return {
|
113
108
|
shareCreateResponse,
|
114
109
|
shareClient,
|
115
110
|
};
|
116
|
-
}
|
117
|
-
catch (e) {
|
118
|
-
span.setStatus({
|
119
|
-
code: SpanStatusCode.ERROR,
|
120
|
-
message: e.message,
|
121
|
-
});
|
122
|
-
throw e;
|
123
|
-
}
|
124
|
-
finally {
|
125
|
-
span.end();
|
126
|
-
}
|
111
|
+
});
|
127
112
|
}
|
128
113
|
/**
|
129
114
|
* Deletes a Share.
|
@@ -133,21 +118,10 @@ export class ShareServiceClient extends StorageClient {
|
|
133
118
|
* @returns Share deletion response and the corresponding share client.
|
134
119
|
*/
|
135
120
|
async deleteShare(shareName, options = {}) {
|
136
|
-
|
137
|
-
try {
|
121
|
+
return tracingClient.withSpan("ShareServiceClient-deleteShare", options, async (updatedOptions) => {
|
138
122
|
const shareClient = this.getShareClient(shareName);
|
139
|
-
return
|
140
|
-
}
|
141
|
-
catch (e) {
|
142
|
-
span.setStatus({
|
143
|
-
code: SpanStatusCode.ERROR,
|
144
|
-
message: e.message,
|
145
|
-
});
|
146
|
-
throw e;
|
147
|
-
}
|
148
|
-
finally {
|
149
|
-
span.end();
|
150
|
-
}
|
123
|
+
return shareClient.delete(updatedOptions);
|
124
|
+
});
|
151
125
|
}
|
152
126
|
/**
|
153
127
|
* Gets the properties of a storage account’s file service, including properties
|
@@ -158,20 +132,9 @@ export class ShareServiceClient extends StorageClient {
|
|
158
132
|
* @returns Response data for the Get Properties operation.
|
159
133
|
*/
|
160
134
|
async getProperties(options = {}) {
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
}
|
165
|
-
catch (e) {
|
166
|
-
span.setStatus({
|
167
|
-
code: SpanStatusCode.ERROR,
|
168
|
-
message: e.message,
|
169
|
-
});
|
170
|
-
throw e;
|
171
|
-
}
|
172
|
-
finally {
|
173
|
-
span.end();
|
174
|
-
}
|
135
|
+
return tracingClient.withSpan("ShareServiceClient-getProperties", options, async (updatedOptions) => {
|
136
|
+
return assertResponse(await this.serviceContext.getProperties(updatedOptions));
|
137
|
+
});
|
175
138
|
}
|
176
139
|
/**
|
177
140
|
* Sets properties for a storage account’s file service endpoint, including properties
|
@@ -183,20 +146,9 @@ export class ShareServiceClient extends StorageClient {
|
|
183
146
|
* @returns Response data for the Set Properties operation.
|
184
147
|
*/
|
185
148
|
async setProperties(properties, options = {}) {
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
}
|
190
|
-
catch (e) {
|
191
|
-
span.setStatus({
|
192
|
-
code: SpanStatusCode.ERROR,
|
193
|
-
message: e.message,
|
194
|
-
});
|
195
|
-
throw e;
|
196
|
-
}
|
197
|
-
finally {
|
198
|
-
span.end();
|
199
|
-
}
|
149
|
+
return tracingClient.withSpan("ShareServiceClient-setProperties", options, async (updatedOptions) => {
|
150
|
+
return assertResponse(await this.serviceContext.setProperties(properties, updatedOptions));
|
151
|
+
});
|
200
152
|
}
|
201
153
|
/**
|
202
154
|
* Returns an AsyncIterableIterator for {@link ServiceListSharesSegmentResponse} objects
|
@@ -230,23 +182,30 @@ export class ShareServiceClient extends StorageClient {
|
|
230
182
|
*/
|
231
183
|
listItems(options = {}) {
|
232
184
|
return __asyncGenerator(this, arguments, function* listItems_1() {
|
233
|
-
var e_1,
|
185
|
+
var _a, e_1, _b, _c;
|
234
186
|
if (options.prefix === "") {
|
235
187
|
options.prefix = undefined;
|
236
188
|
}
|
237
189
|
let marker;
|
238
190
|
try {
|
239
|
-
for (var
|
240
|
-
|
241
|
-
|
242
|
-
|
191
|
+
for (var _d = true, _e = __asyncValues(this.listSegments(marker, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
|
192
|
+
_c = _f.value;
|
193
|
+
_d = false;
|
194
|
+
try {
|
195
|
+
const segment = _c;
|
196
|
+
if (segment.shareItems) {
|
197
|
+
yield __await(yield* __asyncDelegator(__asyncValues(segment.shareItems)));
|
198
|
+
}
|
199
|
+
}
|
200
|
+
finally {
|
201
|
+
_d = true;
|
243
202
|
}
|
244
203
|
}
|
245
204
|
}
|
246
205
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
247
206
|
finally {
|
248
207
|
try {
|
249
|
-
if (
|
208
|
+
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
250
209
|
}
|
251
210
|
finally { if (e_1) throw e_1.error; }
|
252
211
|
}
|
@@ -378,12 +337,11 @@ export class ShareServiceClient extends StorageClient {
|
|
378
337
|
* @returns Response data for the List Shares Segment operation.
|
379
338
|
*/
|
380
339
|
async listSharesSegment(marker, options = {}) {
|
381
|
-
const { span, updatedOptions } = createSpan("ShareServiceClient-listSharesSegment", options);
|
382
340
|
if (options.prefix === "") {
|
383
341
|
options.prefix = undefined;
|
384
342
|
}
|
385
|
-
|
386
|
-
const res = await this.serviceContext.listSharesSegment(Object.assign(Object.assign({
|
343
|
+
return tracingClient.withSpan("ShareServiceClient-listSharesSegment", options, async (updatedOptions) => {
|
344
|
+
const res = assertResponse(await this.serviceContext.listSharesSegment(Object.assign(Object.assign({}, updatedOptions), { marker })));
|
387
345
|
// parse protocols
|
388
346
|
if (res.shareItems) {
|
389
347
|
for (let i = 0; i < res.shareItems.length; i++) {
|
@@ -392,17 +350,7 @@ export class ShareServiceClient extends StorageClient {
|
|
392
350
|
}
|
393
351
|
}
|
394
352
|
return res;
|
395
|
-
}
|
396
|
-
catch (e) {
|
397
|
-
span.setStatus({
|
398
|
-
code: SpanStatusCode.ERROR,
|
399
|
-
message: e.message,
|
400
|
-
});
|
401
|
-
throw e;
|
402
|
-
}
|
403
|
-
finally {
|
404
|
-
span.end();
|
405
|
-
}
|
353
|
+
});
|
406
354
|
}
|
407
355
|
/**
|
408
356
|
* Restores a previously deleted share.
|
@@ -415,22 +363,11 @@ export class ShareServiceClient extends StorageClient {
|
|
415
363
|
* @returns Restored share.
|
416
364
|
*/
|
417
365
|
async undeleteShare(deletedShareName, deletedShareVersion, options = {}) {
|
418
|
-
|
419
|
-
try {
|
366
|
+
return tracingClient.withSpan("ShareServiceClient-undeleteShare", options, async (updatedOptions) => {
|
420
367
|
const shareClient = this.getShareClient(deletedShareName);
|
421
|
-
await new ShareClientInternal(shareClient.url, this.pipeline).restore(Object.assign({ deletedShareName: deletedShareName, deletedShareVersion: deletedShareVersion
|
368
|
+
await new ShareClientInternal(shareClient.url, this.pipeline).restore(Object.assign(Object.assign({}, updatedOptions), { deletedShareName: deletedShareName, deletedShareVersion: deletedShareVersion }));
|
422
369
|
return shareClient;
|
423
|
-
}
|
424
|
-
catch (e) {
|
425
|
-
span.setStatus({
|
426
|
-
code: SpanStatusCode.ERROR,
|
427
|
-
message: e.message,
|
428
|
-
});
|
429
|
-
throw e;
|
430
|
-
}
|
431
|
-
finally {
|
432
|
-
span.end();
|
433
|
-
}
|
370
|
+
});
|
434
371
|
}
|
435
372
|
/**
|
436
373
|
* Only available for ShareServiceClient constructed with a shared key credential.
|