@azure/storage-file-share 12.28.0-beta.1 → 12.28.1-alpha.20250724.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/AccountSASPermissions.d.ts +1 -1
- package/dist/browser/AccountSASPermissions.js +34 -36
- package/dist/browser/AccountSASPermissions.js.map +1 -1
- package/dist/browser/AccountSASResourceTypes.d.ts +1 -1
- package/dist/browser/AccountSASResourceTypes.js +13 -15
- package/dist/browser/AccountSASResourceTypes.js.map +1 -1
- package/dist/browser/AccountSASServices.js +16 -18
- package/dist/browser/AccountSASServices.js.map +1 -1
- package/dist/browser/AccountSASSignatureValues.d.ts +4 -4
- package/dist/browser/AccountSASSignatureValues.d.ts.map +1 -1
- package/dist/browser/AccountSASSignatureValues.js +1 -1
- package/dist/browser/AccountSASSignatureValues.js.map +1 -1
- package/dist/browser/Clients.d.ts +56 -55
- package/dist/browser/Clients.d.ts.map +1 -1
- package/dist/browser/Clients.js +602 -289
- package/dist/browser/Clients.js.map +1 -1
- package/dist/browser/FileSASPermissions.js +16 -18
- package/dist/browser/FileSASPermissions.js.map +1 -1
- package/dist/browser/FileSASSignatureValues.d.ts +2 -2
- package/dist/browser/FileSASSignatureValues.d.ts.map +1 -1
- package/dist/browser/FileSASSignatureValues.js.map +1 -1
- package/dist/browser/FileSystemAttributes.d.ts +1 -1
- package/dist/browser/FileSystemAttributes.js +44 -46
- package/dist/browser/FileSystemAttributes.js.map +1 -1
- package/dist/browser/Pipeline.d.ts +2 -4
- package/dist/browser/Pipeline.d.ts.map +1 -1
- package/dist/browser/Pipeline.js +28 -19
- package/dist/browser/Pipeline.js.map +1 -1
- package/dist/browser/Range.d.ts +1 -1
- package/dist/browser/Range.js.map +1 -1
- package/dist/browser/SASQueryParameters.d.ts +1 -1
- package/dist/browser/SASQueryParameters.js +70 -0
- package/dist/browser/SASQueryParameters.js.map +1 -1
- package/dist/browser/ShareClientInternal.js +1 -0
- package/dist/browser/ShareClientInternal.js.map +1 -1
- package/dist/browser/ShareSASPermissions.d.ts +1 -1
- package/dist/browser/ShareSASPermissions.js +21 -23
- package/dist/browser/ShareSASPermissions.js.map +1 -1
- package/dist/browser/ShareServiceClient.d.ts +5 -5
- package/dist/browser/ShareServiceClient.d.ts.map +1 -1
- package/dist/browser/ShareServiceClient.js +70 -54
- package/dist/browser/ShareServiceClient.js.map +1 -1
- package/dist/browser/StorageClient.d.ts +2 -2
- package/dist/browser/StorageClient.d.ts.map +1 -1
- package/dist/browser/StorageClient.js +23 -0
- package/dist/browser/StorageClient.js.map +1 -1
- package/dist/browser/StorageContextClient.js +1 -1
- package/dist/browser/StorageContextClient.js.map +1 -1
- package/dist/browser/generated/src/operations/directory.js +1 -0
- package/dist/browser/generated/src/operations/directory.js.map +1 -1
- package/dist/browser/generated/src/operations/file.js +1 -0
- package/dist/browser/generated/src/operations/file.js.map +1 -1
- package/dist/browser/generated/src/operations/service.js +1 -0
- package/dist/browser/generated/src/operations/service.js.map +1 -1
- package/dist/browser/generated/src/operations/share.js +1 -0
- package/dist/browser/generated/src/operations/share.js.map +1 -1
- package/dist/browser/generated/src/storageClient.js +15 -4
- package/dist/browser/generated/src/storageClient.js.map +1 -1
- package/dist/browser/index-browser.d.mts.map +1 -1
- package/dist/browser/index-browser.mjs.map +1 -1
- package/dist/browser/index.d.ts +1 -7
- package/dist/browser/index.js +1 -7
- package/dist/browser/utils/Batch.js +29 -21
- package/dist/browser/utils/Batch.js.map +1 -1
- package/dist/browser/utils/BufferScheduler.js +70 -44
- package/dist/browser/utils/BufferScheduler.js.map +1 -1
- package/dist/browser/utils/RetriableReadableStream.js +70 -62
- package/dist/browser/utils/RetriableReadableStream.js.map +1 -1
- package/dist/browser/utils/constants.d.ts.map +1 -1
- package/dist/browser/utils/constants.js +1 -1
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/browser/utils/utils.common.d.ts +2 -2
- package/dist/browser/utils/utils.common.js +33 -17
- package/dist/browser/utils/utils.common.js.map +1 -1
- package/dist/commonjs/AccountSASPermissions.d.ts +1 -1
- package/dist/commonjs/AccountSASPermissions.js +34 -36
- package/dist/commonjs/AccountSASPermissions.js.map +1 -1
- package/dist/commonjs/AccountSASResourceTypes.d.ts +1 -1
- package/dist/commonjs/AccountSASResourceTypes.js +13 -15
- package/dist/commonjs/AccountSASResourceTypes.js.map +1 -1
- package/dist/commonjs/AccountSASServices.js +16 -18
- package/dist/commonjs/AccountSASServices.js.map +1 -1
- package/dist/commonjs/AccountSASSignatureValues.d.ts +4 -4
- package/dist/commonjs/AccountSASSignatureValues.d.ts.map +1 -1
- package/dist/commonjs/AccountSASSignatureValues.js +1 -1
- package/dist/commonjs/AccountSASSignatureValues.js.map +1 -1
- package/dist/commonjs/Clients.d.ts +56 -55
- package/dist/commonjs/Clients.d.ts.map +1 -1
- package/dist/commonjs/Clients.js +614 -301
- package/dist/commonjs/Clients.js.map +1 -1
- package/dist/commonjs/FileDownloadResponse.js +2 -0
- package/dist/commonjs/FileDownloadResponse.js.map +1 -1
- package/dist/commonjs/FileSASPermissions.js +16 -18
- package/dist/commonjs/FileSASPermissions.js.map +1 -1
- package/dist/commonjs/FileSASSignatureValues.d.ts +2 -2
- package/dist/commonjs/FileSASSignatureValues.d.ts.map +1 -1
- package/dist/commonjs/FileSASSignatureValues.js.map +1 -1
- package/dist/commonjs/FileSystemAttributes.d.ts +1 -1
- package/dist/commonjs/FileSystemAttributes.js +44 -46
- package/dist/commonjs/FileSystemAttributes.js.map +1 -1
- package/dist/commonjs/Pipeline.d.ts +2 -4
- package/dist/commonjs/Pipeline.d.ts.map +1 -1
- package/dist/commonjs/Pipeline.js +39 -30
- package/dist/commonjs/Pipeline.js.map +1 -1
- package/dist/commonjs/Range.d.ts +1 -1
- package/dist/commonjs/Range.js.map +1 -1
- package/dist/commonjs/SASQueryParameters.d.ts +1 -1
- package/dist/commonjs/SASQueryParameters.js +70 -0
- package/dist/commonjs/SASQueryParameters.js.map +1 -1
- package/dist/commonjs/ShareClientInternal.js +1 -0
- package/dist/commonjs/ShareClientInternal.js.map +1 -1
- package/dist/commonjs/ShareSASPermissions.d.ts +1 -1
- package/dist/commonjs/ShareSASPermissions.js +21 -23
- package/dist/commonjs/ShareSASPermissions.js.map +1 -1
- package/dist/commonjs/ShareServiceClient.d.ts +5 -5
- package/dist/commonjs/ShareServiceClient.d.ts.map +1 -1
- package/dist/commonjs/ShareServiceClient.js +76 -60
- package/dist/commonjs/ShareServiceClient.js.map +1 -1
- package/dist/commonjs/StorageClient.d.ts +2 -2
- package/dist/commonjs/StorageClient.d.ts.map +1 -1
- package/dist/commonjs/StorageClient.js +23 -0
- package/dist/commonjs/StorageClient.js.map +1 -1
- package/dist/commonjs/StorageContextClient.js +1 -1
- package/dist/commonjs/StorageContextClient.js.map +1 -1
- package/dist/commonjs/generated/src/operations/directory.js +1 -0
- package/dist/commonjs/generated/src/operations/directory.js.map +1 -1
- package/dist/commonjs/generated/src/operations/file.js +1 -0
- package/dist/commonjs/generated/src/operations/file.js.map +1 -1
- package/dist/commonjs/generated/src/operations/service.js +1 -0
- package/dist/commonjs/generated/src/operations/service.js.map +1 -1
- package/dist/commonjs/generated/src/operations/share.js +1 -0
- package/dist/commonjs/generated/src/operations/share.js.map +1 -1
- package/dist/commonjs/generated/src/storageClient.js +15 -4
- package/dist/commonjs/generated/src/storageClient.js.map +1 -1
- package/dist/commonjs/index.d.ts +1 -9
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +13 -18
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/commonjs/utils/Batch.js +29 -21
- package/dist/commonjs/utils/Batch.js.map +1 -1
- package/dist/commonjs/utils/BufferScheduler.js +70 -44
- package/dist/commonjs/utils/BufferScheduler.js.map +1 -1
- package/dist/commonjs/utils/RetriableReadableStream.js +70 -62
- package/dist/commonjs/utils/RetriableReadableStream.js.map +1 -1
- package/dist/commonjs/utils/constants.d.ts.map +1 -1
- package/dist/commonjs/utils/constants.js +1 -1
- package/dist/commonjs/utils/constants.js.map +1 -1
- package/dist/commonjs/utils/utils.common.d.ts +2 -2
- package/dist/commonjs/utils/utils.common.js +33 -17
- package/dist/commonjs/utils/utils.common.js.map +1 -1
- package/dist/commonjs/utils/utils.d.ts +1 -1
- package/dist/commonjs/utils/utils.d.ts.map +1 -1
- package/dist/commonjs/utils/utils.js +5 -5
- package/dist/commonjs/utils/utils.js.map +1 -1
- package/dist/esm/AccountSASPermissions.d.ts +1 -1
- package/dist/esm/AccountSASPermissions.js +34 -36
- package/dist/esm/AccountSASPermissions.js.map +1 -1
- package/dist/esm/AccountSASResourceTypes.d.ts +1 -1
- package/dist/esm/AccountSASResourceTypes.js +13 -15
- package/dist/esm/AccountSASResourceTypes.js.map +1 -1
- package/dist/esm/AccountSASServices.js +16 -18
- package/dist/esm/AccountSASServices.js.map +1 -1
- package/dist/esm/AccountSASSignatureValues.d.ts +4 -4
- package/dist/esm/AccountSASSignatureValues.d.ts.map +1 -1
- package/dist/esm/AccountSASSignatureValues.js +1 -1
- package/dist/esm/AccountSASSignatureValues.js.map +1 -1
- package/dist/esm/Clients.d.ts +56 -55
- package/dist/esm/Clients.d.ts.map +1 -1
- package/dist/esm/Clients.js +602 -289
- package/dist/esm/Clients.js.map +1 -1
- package/dist/esm/FileDownloadResponse.js +2 -0
- package/dist/esm/FileDownloadResponse.js.map +1 -1
- package/dist/esm/FileSASPermissions.js +16 -18
- package/dist/esm/FileSASPermissions.js.map +1 -1
- package/dist/esm/FileSASSignatureValues.d.ts +2 -2
- package/dist/esm/FileSASSignatureValues.d.ts.map +1 -1
- package/dist/esm/FileSASSignatureValues.js.map +1 -1
- package/dist/esm/FileSystemAttributes.d.ts +1 -1
- package/dist/esm/FileSystemAttributes.js +44 -46
- package/dist/esm/FileSystemAttributes.js.map +1 -1
- package/dist/esm/Pipeline.d.ts +2 -4
- package/dist/esm/Pipeline.d.ts.map +1 -1
- package/dist/esm/Pipeline.js +28 -19
- package/dist/esm/Pipeline.js.map +1 -1
- package/dist/esm/Range.d.ts +1 -1
- package/dist/esm/Range.js.map +1 -1
- package/dist/esm/SASQueryParameters.d.ts +1 -1
- package/dist/esm/SASQueryParameters.js +70 -0
- package/dist/esm/SASQueryParameters.js.map +1 -1
- package/dist/esm/ShareClientInternal.js +1 -0
- package/dist/esm/ShareClientInternal.js.map +1 -1
- package/dist/esm/ShareSASPermissions.d.ts +1 -1
- package/dist/esm/ShareSASPermissions.js +21 -23
- package/dist/esm/ShareSASPermissions.js.map +1 -1
- package/dist/esm/ShareServiceClient.d.ts +5 -5
- package/dist/esm/ShareServiceClient.d.ts.map +1 -1
- package/dist/esm/ShareServiceClient.js +70 -54
- package/dist/esm/ShareServiceClient.js.map +1 -1
- package/dist/esm/StorageClient.d.ts +2 -2
- package/dist/esm/StorageClient.d.ts.map +1 -1
- package/dist/esm/StorageClient.js +23 -0
- package/dist/esm/StorageClient.js.map +1 -1
- package/dist/esm/StorageContextClient.js +1 -1
- package/dist/esm/StorageContextClient.js.map +1 -1
- package/dist/esm/generated/src/operations/directory.js +1 -0
- package/dist/esm/generated/src/operations/directory.js.map +1 -1
- package/dist/esm/generated/src/operations/file.js +1 -0
- package/dist/esm/generated/src/operations/file.js.map +1 -1
- package/dist/esm/generated/src/operations/service.js +1 -0
- package/dist/esm/generated/src/operations/service.js.map +1 -1
- package/dist/esm/generated/src/operations/share.js +1 -0
- package/dist/esm/generated/src/operations/share.js.map +1 -1
- package/dist/esm/generated/src/storageClient.js +15 -4
- package/dist/esm/generated/src/storageClient.js.map +1 -1
- package/dist/esm/index.d.ts +1 -9
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -9
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/Batch.js +29 -21
- package/dist/esm/utils/Batch.js.map +1 -1
- package/dist/esm/utils/BufferScheduler.js +70 -44
- package/dist/esm/utils/BufferScheduler.js.map +1 -1
- package/dist/esm/utils/RetriableReadableStream.js +70 -62
- package/dist/esm/utils/RetriableReadableStream.js.map +1 -1
- package/dist/esm/utils/constants.d.ts.map +1 -1
- package/dist/esm/utils/constants.js +1 -1
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/utils.common.d.ts +2 -2
- package/dist/esm/utils/utils.common.js +33 -17
- package/dist/esm/utils/utils.common.js.map +1 -1
- package/dist/esm/utils/utils.d.ts +1 -1
- package/dist/esm/utils/utils.d.ts.map +1 -1
- package/dist/esm/utils/utils.js +2 -2
- package/dist/esm/utils/utils.js.map +1 -1
- package/dist/react-native/AccountSASPermissions.d.ts +1 -1
- package/dist/react-native/AccountSASPermissions.js +34 -36
- package/dist/react-native/AccountSASPermissions.js.map +1 -1
- package/dist/react-native/AccountSASResourceTypes.d.ts +1 -1
- package/dist/react-native/AccountSASResourceTypes.js +13 -15
- package/dist/react-native/AccountSASResourceTypes.js.map +1 -1
- package/dist/react-native/AccountSASServices.js +16 -18
- package/dist/react-native/AccountSASServices.js.map +1 -1
- package/dist/react-native/AccountSASSignatureValues.d.ts +4 -4
- package/dist/react-native/AccountSASSignatureValues.d.ts.map +1 -1
- package/dist/react-native/AccountSASSignatureValues.js +1 -1
- package/dist/react-native/AccountSASSignatureValues.js.map +1 -1
- package/dist/react-native/Clients.d.ts +56 -55
- package/dist/react-native/Clients.d.ts.map +1 -1
- package/dist/react-native/Clients.js +602 -289
- package/dist/react-native/Clients.js.map +1 -1
- package/dist/react-native/FileDownloadResponse.js +2 -0
- package/dist/react-native/FileDownloadResponse.js.map +1 -1
- package/dist/react-native/FileSASPermissions.js +16 -18
- package/dist/react-native/FileSASPermissions.js.map +1 -1
- package/dist/react-native/FileSASSignatureValues.d.ts +2 -2
- package/dist/react-native/FileSASSignatureValues.d.ts.map +1 -1
- package/dist/react-native/FileSASSignatureValues.js.map +1 -1
- package/dist/react-native/FileSystemAttributes.d.ts +1 -1
- package/dist/react-native/FileSystemAttributes.js +44 -46
- package/dist/react-native/FileSystemAttributes.js.map +1 -1
- package/dist/react-native/Pipeline.d.ts +2 -4
- package/dist/react-native/Pipeline.d.ts.map +1 -1
- package/dist/react-native/Pipeline.js +28 -19
- package/dist/react-native/Pipeline.js.map +1 -1
- package/dist/react-native/Range.d.ts +1 -1
- package/dist/react-native/Range.js.map +1 -1
- package/dist/react-native/SASQueryParameters.d.ts +1 -1
- package/dist/react-native/SASQueryParameters.js +70 -0
- package/dist/react-native/SASQueryParameters.js.map +1 -1
- package/dist/react-native/ShareClientInternal.js +1 -0
- package/dist/react-native/ShareClientInternal.js.map +1 -1
- package/dist/react-native/ShareSASPermissions.d.ts +1 -1
- package/dist/react-native/ShareSASPermissions.js +21 -23
- package/dist/react-native/ShareSASPermissions.js.map +1 -1
- package/dist/react-native/ShareServiceClient.d.ts +5 -5
- package/dist/react-native/ShareServiceClient.d.ts.map +1 -1
- package/dist/react-native/ShareServiceClient.js +70 -54
- package/dist/react-native/ShareServiceClient.js.map +1 -1
- package/dist/react-native/StorageClient.d.ts +2 -2
- package/dist/react-native/StorageClient.d.ts.map +1 -1
- package/dist/react-native/StorageClient.js +23 -0
- package/dist/react-native/StorageClient.js.map +1 -1
- package/dist/react-native/StorageContextClient.js +1 -1
- package/dist/react-native/StorageContextClient.js.map +1 -1
- package/dist/react-native/generated/src/operations/directory.js +1 -0
- package/dist/react-native/generated/src/operations/directory.js.map +1 -1
- package/dist/react-native/generated/src/operations/file.js +1 -0
- package/dist/react-native/generated/src/operations/file.js.map +1 -1
- package/dist/react-native/generated/src/operations/service.js +1 -0
- package/dist/react-native/generated/src/operations/service.js.map +1 -1
- package/dist/react-native/generated/src/operations/share.js +1 -0
- package/dist/react-native/generated/src/operations/share.js.map +1 -1
- package/dist/react-native/generated/src/storageClient.js +15 -4
- package/dist/react-native/generated/src/storageClient.js.map +1 -1
- package/dist/react-native/index.d.ts +1 -9
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +1 -9
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/utils/Batch.js +29 -21
- package/dist/react-native/utils/Batch.js.map +1 -1
- package/dist/react-native/utils/BufferScheduler.js +70 -44
- package/dist/react-native/utils/BufferScheduler.js.map +1 -1
- package/dist/react-native/utils/RetriableReadableStream.js +70 -62
- package/dist/react-native/utils/RetriableReadableStream.js.map +1 -1
- package/dist/react-native/utils/constants.d.ts.map +1 -1
- package/dist/react-native/utils/constants.js +1 -1
- package/dist/react-native/utils/constants.js.map +1 -1
- package/dist/react-native/utils/utils.common.d.ts +2 -2
- package/dist/react-native/utils/utils.common.js +33 -17
- package/dist/react-native/utils/utils.common.js.map +1 -1
- package/dist/react-native/utils/utils.d.ts +1 -1
- package/dist/react-native/utils/utils.d.ts.map +1 -1
- package/dist/react-native/utils/utils.js +2 -2
- package/dist/react-native/utils/utils.js.map +1 -1
- package/package.json +12 -12
- package/dist/browser/StorageRetryPolicyFactory.d.ts +0 -56
- package/dist/browser/StorageRetryPolicyFactory.d.ts.map +0 -1
- package/dist/browser/StorageRetryPolicyFactory.js +0 -26
- package/dist/browser/StorageRetryPolicyFactory.js.map +0 -1
- package/dist/browser/policies/StorageRetryPolicy.d.ts +0 -75
- package/dist/browser/policies/StorageRetryPolicy.d.ts.map +0 -1
- package/dist/browser/policies/StorageRetryPolicy.js +0 -220
- package/dist/browser/policies/StorageRetryPolicy.js.map +0 -1
- package/dist/browser/policies/StorageRetryPolicyV2.d.ts +0 -24
- package/dist/browser/policies/StorageRetryPolicyV2.d.ts.map +0 -1
- package/dist/browser/policies/StorageRetryPolicyV2.js +0 -176
- package/dist/browser/policies/StorageRetryPolicyV2.js.map +0 -1
- package/dist/commonjs/StorageRetryPolicyFactory.d.ts +0 -56
- package/dist/commonjs/StorageRetryPolicyFactory.d.ts.map +0 -1
- package/dist/commonjs/StorageRetryPolicyFactory.js +0 -31
- package/dist/commonjs/StorageRetryPolicyFactory.js.map +0 -1
- package/dist/commonjs/policies/StorageRetryPolicy.d.ts +0 -75
- package/dist/commonjs/policies/StorageRetryPolicy.d.ts.map +0 -1
- package/dist/commonjs/policies/StorageRetryPolicy.js +0 -225
- package/dist/commonjs/policies/StorageRetryPolicy.js.map +0 -1
- package/dist/commonjs/policies/StorageRetryPolicyV2.d.ts +0 -24
- package/dist/commonjs/policies/StorageRetryPolicyV2.d.ts.map +0 -1
- package/dist/commonjs/policies/StorageRetryPolicyV2.js +0 -180
- package/dist/commonjs/policies/StorageRetryPolicyV2.js.map +0 -1
- package/dist/esm/StorageRetryPolicyFactory.d.ts +0 -56
- package/dist/esm/StorageRetryPolicyFactory.d.ts.map +0 -1
- package/dist/esm/StorageRetryPolicyFactory.js +0 -26
- package/dist/esm/StorageRetryPolicyFactory.js.map +0 -1
- package/dist/esm/policies/StorageRetryPolicy.d.ts +0 -75
- package/dist/esm/policies/StorageRetryPolicy.d.ts.map +0 -1
- package/dist/esm/policies/StorageRetryPolicy.js +0 -220
- package/dist/esm/policies/StorageRetryPolicy.js.map +0 -1
- package/dist/esm/policies/StorageRetryPolicyV2.d.ts +0 -24
- package/dist/esm/policies/StorageRetryPolicyV2.d.ts.map +0 -1
- package/dist/esm/policies/StorageRetryPolicyV2.js +0 -176
- package/dist/esm/policies/StorageRetryPolicyV2.js.map +0 -1
- package/dist/react-native/StorageRetryPolicyFactory.d.ts +0 -56
- package/dist/react-native/StorageRetryPolicyFactory.d.ts.map +0 -1
- package/dist/react-native/StorageRetryPolicyFactory.js +0 -26
- package/dist/react-native/StorageRetryPolicyFactory.js.map +0 -1
- package/dist/react-native/policies/StorageRetryPolicy.d.ts +0 -75
- package/dist/react-native/policies/StorageRetryPolicy.d.ts.map +0 -1
- package/dist/react-native/policies/StorageRetryPolicy.js +0 -220
- package/dist/react-native/policies/StorageRetryPolicy.js.map +0 -1
- package/dist/react-native/policies/StorageRetryPolicyV2.d.ts +0 -24
- package/dist/react-native/policies/StorageRetryPolicyV2.d.ts.map +0 -1
- package/dist/react-native/policies/StorageRetryPolicyV2.js +0 -176
- package/dist/react-native/policies/StorageRetryPolicyV2.js.map +0 -1
@@ -3,15 +3,14 @@
|
|
3
3
|
// Licensed under the MIT License.
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
5
5
|
exports.ShareServiceClient = void 0;
|
6
|
-
const tslib_1 = require("tslib");
|
7
6
|
const Pipeline_js_1 = require("./Pipeline.js");
|
8
7
|
const StorageClient_js_1 = require("./StorageClient.js");
|
9
8
|
const ShareClientInternal_js_1 = require("./ShareClientInternal.js");
|
10
9
|
const Clients_js_1 = require("./Clients.js");
|
11
10
|
const utils_common_js_1 = require("./utils/utils.common.js");
|
12
|
-
const
|
13
|
-
const
|
14
|
-
const
|
11
|
+
const storage_common_1 = require("@azure/storage-common");
|
12
|
+
const storage_common_2 = require("@azure/storage-common");
|
13
|
+
const storage_common_3 = require("@azure/storage-common");
|
15
14
|
const core_util_1 = require("@azure/core-util");
|
16
15
|
const tracing_js_1 = require("./utils/tracing.js");
|
17
16
|
const models_js_1 = require("./models.js");
|
@@ -25,6 +24,11 @@ const core_auth_1 = require("@azure/core-auth");
|
|
25
24
|
* to manipulate file shares.
|
26
25
|
*/
|
27
26
|
class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
27
|
+
/**
|
28
|
+
* serviceContext provided by protocol layer.
|
29
|
+
*/
|
30
|
+
serviceContext;
|
31
|
+
shareClientConfig;
|
28
32
|
/**
|
29
33
|
*
|
30
34
|
* Creates an instance of ShareServiceClient from connection string.
|
@@ -45,7 +49,7 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
45
49
|
const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString);
|
46
50
|
if (extractedCreds.kind === "AccountConnString") {
|
47
51
|
if (core_util_1.isNodeLike) {
|
48
|
-
const sharedKeyCredential = new
|
52
|
+
const sharedKeyCredential = new storage_common_2.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
|
49
53
|
const pipeline = (0, Pipeline_js_1.newPipeline)(sharedKeyCredential, options);
|
50
54
|
return new ShareServiceClient(extractedCreds.url, pipeline, options);
|
51
55
|
}
|
@@ -54,7 +58,7 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
54
58
|
}
|
55
59
|
}
|
56
60
|
else if (extractedCreds.kind === "SASConnString") {
|
57
|
-
const pipeline = (0, Pipeline_js_1.newPipeline)(new
|
61
|
+
const pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_3.AnonymousCredential(), options);
|
58
62
|
return new ShareServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline, options);
|
59
63
|
}
|
60
64
|
else {
|
@@ -69,13 +73,13 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
69
73
|
if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) {
|
70
74
|
pipeline = credentialOrPipeline;
|
71
75
|
}
|
72
|
-
else if (credentialOrPipeline instanceof
|
76
|
+
else if (credentialOrPipeline instanceof storage_common_1.Credential ||
|
73
77
|
(0, core_auth_1.isTokenCredential)(credentialOrPipeline)) {
|
74
78
|
pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options);
|
75
79
|
}
|
76
80
|
else {
|
77
81
|
// The second parameter is undefined. Use anonymous credential.
|
78
|
-
pipeline = (0, Pipeline_js_1.newPipeline)(new
|
82
|
+
pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_3.AnonymousCredential(), options);
|
79
83
|
}
|
80
84
|
super(url, pipeline);
|
81
85
|
this.shareClientConfig = options;
|
@@ -146,20 +150,23 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
146
150
|
/**
|
147
151
|
* Gets the properties of a storage account’s file service, including properties
|
148
152
|
* for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
149
|
-
* @see https://learn.microsoft.com/
|
153
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-file-service-properties
|
150
154
|
*
|
151
155
|
* @param options - Options to Get Properties operation.
|
152
156
|
* @returns Response data for the Get Properties operation.
|
153
157
|
*/
|
154
158
|
async getProperties(options = {}) {
|
155
159
|
return tracing_js_1.tracingClient.withSpan("ShareServiceClient-getProperties", options, async (updatedOptions) => {
|
156
|
-
return (0, utils_common_js_1.assertResponse)(await this.serviceContext.getProperties(
|
160
|
+
return (0, utils_common_js_1.assertResponse)(await this.serviceContext.getProperties({
|
161
|
+
...updatedOptions,
|
162
|
+
...this.shareClientConfig,
|
163
|
+
}));
|
157
164
|
});
|
158
165
|
}
|
159
166
|
/**
|
160
167
|
* Sets properties for a storage account’s file service endpoint, including properties
|
161
168
|
* for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
|
162
|
-
* @see https://learn.microsoft.com/
|
169
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-file-service-properties
|
163
170
|
*
|
164
171
|
* @param properties -
|
165
172
|
* @param options - Options to Set Properties operation.
|
@@ -167,7 +174,10 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
167
174
|
*/
|
168
175
|
async setProperties(properties, options = {}) {
|
169
176
|
return tracing_js_1.tracingClient.withSpan("ShareServiceClient-setProperties", options, async (updatedOptions) => {
|
170
|
-
return (0, utils_common_js_1.assertResponse)(await this.serviceContext.setProperties(properties,
|
177
|
+
return (0, utils_common_js_1.assertResponse)(await this.serviceContext.setProperties(properties, {
|
178
|
+
...updatedOptions,
|
179
|
+
...this.shareClientConfig,
|
180
|
+
}));
|
171
181
|
});
|
172
182
|
}
|
173
183
|
/**
|
@@ -182,49 +192,32 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
182
192
|
* items. The marker value is opaque to the client.
|
183
193
|
* @param options - Options to list shares operation.
|
184
194
|
*/
|
185
|
-
listSegments(
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
} while (marker);
|
196
|
-
});
|
195
|
+
async *listSegments(marker, options = {}) {
|
196
|
+
if (options.prefix === "") {
|
197
|
+
options.prefix = undefined;
|
198
|
+
}
|
199
|
+
let listSharesSegmentResponse;
|
200
|
+
do {
|
201
|
+
listSharesSegmentResponse = await this.listSharesSegment(marker, options);
|
202
|
+
marker = listSharesSegmentResponse.continuationToken;
|
203
|
+
yield await listSharesSegmentResponse;
|
204
|
+
} while (marker);
|
197
205
|
}
|
198
206
|
/**
|
199
207
|
* Returns an AsyncIterableIterator for share items
|
200
208
|
*
|
201
209
|
* @param options - Options to list shares operation.
|
202
210
|
*/
|
203
|
-
listItems() {
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
for (var _d = true, _e = tslib_1.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
|
212
|
-
_c = _f.value;
|
213
|
-
_d = false;
|
214
|
-
const segment = _c;
|
215
|
-
if (segment.shareItems) {
|
216
|
-
yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(segment.shareItems)));
|
217
|
-
}
|
218
|
-
}
|
219
|
-
}
|
220
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
221
|
-
finally {
|
222
|
-
try {
|
223
|
-
if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
|
224
|
-
}
|
225
|
-
finally { if (e_1) throw e_1.error; }
|
211
|
+
async *listItems(options = {}) {
|
212
|
+
if (options.prefix === "") {
|
213
|
+
options.prefix = undefined;
|
214
|
+
}
|
215
|
+
let marker;
|
216
|
+
for await (const segment of this.listSegments(marker, options)) {
|
217
|
+
if (segment.shareItems) {
|
218
|
+
yield* segment.shareItems;
|
226
219
|
}
|
227
|
-
}
|
220
|
+
}
|
228
221
|
}
|
229
222
|
/**
|
230
223
|
* Returns an async iterable iterator to list all the shares
|
@@ -349,7 +342,10 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
349
342
|
if (options.includeDeleted) {
|
350
343
|
include.push("deleted");
|
351
344
|
}
|
352
|
-
const updatedOptions =
|
345
|
+
const updatedOptions = {
|
346
|
+
...options,
|
347
|
+
...(include.length > 0 ? { include: include } : {}),
|
348
|
+
};
|
353
349
|
// AsyncIterableIterator to iterate over queues
|
354
350
|
const iter = this.listItems(updatedOptions);
|
355
351
|
return {
|
@@ -369,7 +365,10 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
369
365
|
* Return an AsyncIterableIterator that works a page at a time
|
370
366
|
*/
|
371
367
|
byPage: (settings = {}) => {
|
372
|
-
return this.listSegments((0, utils_common_js_1.removeEmptyString)(settings.continuationToken),
|
368
|
+
return this.listSegments((0, utils_common_js_1.removeEmptyString)(settings.continuationToken), {
|
369
|
+
maxResults: settings.maxPageSize,
|
370
|
+
...updatedOptions,
|
371
|
+
});
|
373
372
|
},
|
374
373
|
};
|
375
374
|
}
|
@@ -391,7 +390,11 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
391
390
|
options.prefix = undefined;
|
392
391
|
}
|
393
392
|
return tracing_js_1.tracingClient.withSpan("ShareServiceClient-listSharesSegment", options, async (updatedOptions) => {
|
394
|
-
const res = (0, utils_common_js_1.assertResponse)(await this.serviceContext.listSharesSegment(
|
393
|
+
const res = (0, utils_common_js_1.assertResponse)(await this.serviceContext.listSharesSegment({
|
394
|
+
...updatedOptions,
|
395
|
+
...this.shareClientConfig,
|
396
|
+
marker,
|
397
|
+
}));
|
395
398
|
// parse protocols
|
396
399
|
if (res.shareItems) {
|
397
400
|
for (let i = 0; i < res.shareItems.length; i++) {
|
@@ -415,7 +418,12 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
415
418
|
async undeleteShare(deletedShareName, deletedShareVersion, options = {}) {
|
416
419
|
return tracing_js_1.tracingClient.withSpan("ShareServiceClient-undeleteShare", options, async (updatedOptions) => {
|
417
420
|
const shareClient = this.getShareClient(deletedShareName);
|
418
|
-
await new ShareClientInternal_js_1.ShareClientInternal(shareClient.url, this.pipeline).restore(
|
421
|
+
await new ShareClientInternal_js_1.ShareClientInternal(shareClient.url, this.pipeline).restore({
|
422
|
+
...updatedOptions,
|
423
|
+
...this.shareClientConfig,
|
424
|
+
deletedShareName: deletedShareName,
|
425
|
+
deletedShareVersion: deletedShareVersion,
|
426
|
+
});
|
419
427
|
return shareClient;
|
420
428
|
});
|
421
429
|
}
|
@@ -425,7 +433,7 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
425
433
|
* Generates an account Shared Access Signature (SAS) URI based on the client properties
|
426
434
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
427
435
|
*
|
428
|
-
* @see https://learn.microsoft.com/
|
436
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas
|
429
437
|
*
|
430
438
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.
|
431
439
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
@@ -434,16 +442,20 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
434
442
|
* @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
435
443
|
*/
|
436
444
|
generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) {
|
437
|
-
if (!(this.credential instanceof
|
445
|
+
if (!(this.credential instanceof storage_common_2.StorageSharedKeyCredential)) {
|
438
446
|
throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential");
|
439
447
|
}
|
440
448
|
if (expiresOn === undefined) {
|
441
449
|
const now = new Date();
|
442
450
|
expiresOn = new Date(now.getTime() + 3600 * 1000);
|
443
451
|
}
|
444
|
-
const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)(
|
452
|
+
const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({
|
453
|
+
permissions,
|
445
454
|
expiresOn,
|
446
|
-
resourceTypes,
|
455
|
+
resourceTypes,
|
456
|
+
services: AccountSASServices_js_1.AccountSASServices.parse("f").toString(),
|
457
|
+
...options,
|
458
|
+
}, this.credential).toString();
|
447
459
|
return (0, utils_common_js_2.appendToURLQuery)(this.url, sas);
|
448
460
|
}
|
449
461
|
/**
|
@@ -452,7 +464,7 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
452
464
|
* Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties
|
453
465
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
454
466
|
*
|
455
|
-
* @see https://learn.microsoft.com/
|
467
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas
|
456
468
|
*
|
457
469
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.
|
458
470
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
@@ -463,16 +475,20 @@ class ShareServiceClient extends StorageClient_js_1.StorageClient {
|
|
463
475
|
generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco",
|
464
476
|
// eslint-disable-next-line @azure/azure-sdk/ts-naming-options
|
465
477
|
options = {}) {
|
466
|
-
if (!(this.credential instanceof
|
478
|
+
if (!(this.credential instanceof storage_common_2.StorageSharedKeyCredential)) {
|
467
479
|
throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential");
|
468
480
|
}
|
469
481
|
if (expiresOn === undefined) {
|
470
482
|
const now = new Date();
|
471
483
|
expiresOn = new Date(now.getTime() + 3600 * 1000);
|
472
484
|
}
|
473
|
-
return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)(
|
485
|
+
return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({
|
486
|
+
permissions,
|
474
487
|
expiresOn,
|
475
|
-
resourceTypes,
|
488
|
+
resourceTypes,
|
489
|
+
services: AccountSASServices_js_1.AccountSASServices.parse("f").toString(),
|
490
|
+
...options,
|
491
|
+
}, this.credential).stringToSign;
|
476
492
|
}
|
477
493
|
}
|
478
494
|
exports.ShareServiceClient = ShareServiceClient;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ShareServiceClient.js","sourceRoot":"","sources":["../../src/ShareServiceClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAkBlC,+CAA4D;AAE5D,yDAAmD;AACnD,qEAA+D;AAE/D,6CAA2C;AAE3C,6DAKiC;AACjC,sDAAiD;AACjD,sDAAiE;AACjE,sDAA0D;AAE1D,gDAA8C;AAC9C,mDAAmD;AAEnD,2CAA+C;AAC/C,yEAAmE;AACnE,iFAGwC;AACxC,mEAA6D;AAG7D,6DAA2D;AAE3D,gDAAqD;AAuKrD;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,gCAAa;IAQnD;;;;;;;;;;;;OAYG;IACI,MAAM,CAAC,oBAAoB,CAChC,gBAAwB;IACxB,2FAA2F;IAC3F,iEAAiE;IACjE,OAA4B;QAE5B,MAAM,cAAc,GAAG,IAAA,8CAA4B,EAAC,gBAAgB,CAAC,CAAC;QACtE,IAAI,cAAc,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;YAChD,IAAI,sBAAU,EAAE,CAAC;gBACf,MAAM,mBAAmB,GAAG,IAAI,yCAA0B,CACxD,cAAc,CAAC,WAAY,EAC3B,cAAc,CAAC,UAAU,CAC1B,CAAC;gBACF,MAAM,QAAQ,GAAG,IAAA,yBAAW,EAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;gBAC3D,OAAO,IAAI,kBAAkB,CAAC,cAAc,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;YACvE,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;YACxF,CAAC;QACH,CAAC;aAAM,IAAI,cAAc,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;YACnD,MAAM,QAAQ,GAAG,IAAA,yBAAW,EAAC,IAAI,kCAAmB,EAAE,EAAE,OA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,IAAI,EAAE,CAAC;YACvB,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,IAAA,wEAAyC,kBAE5C,WAAW;YACX,SAAS;YACT,aAAa,EACb,QAAQ,EAAE,0CAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,IAC/C,OAAO,GAEZ,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF;AA5mBD,gDA4mBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type {\n FileServiceProperties,\n ListSharesIncludeType,\n ShareCreateResponse,\n ShareDeleteResponse,\n ServiceGetPropertiesResponse,\n ServiceSetPropertiesResponse,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel,\n SharePropertiesInternal,\n ServiceSetPropertiesHeaders,\n ServiceGetPropertiesHeaders,\n} from \"./generatedModels.js\";\nimport type { Service } from \"./generated/src/operationsInterfaces/index.js\";\nimport type { Pipeline } from \"./Pipeline.js\";\nimport { isPipelineLike, newPipeline } from \"./Pipeline.js\";\nimport type { CommonOptions } from \"./StorageClient.js\";\nimport { StorageClient } from \"./StorageClient.js\";\nimport { ShareClientInternal } from \"./ShareClientInternal.js\";\nimport type { ShareCreateOptions, ShareDeleteMethodOptions } from \"./Clients.js\";\nimport { ShareClient } from \"./Clients.js\";\nimport type { WithResponse } from \"./utils/utils.common.js\";\nimport {\n appendToURLPath,\n extractConnectionStringParts,\n assertResponse,\n removeEmptyString,\n} from \"./utils/utils.common.js\";\nimport { Credential } from \"@azure/storage-blob\";\nimport { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport type { ShareClientConfig, ShareClientOptions, ShareProtocols } from \"./models.js\";\nimport { toShareProtocols } from \"./models.js\";\nimport { AccountSASPermissions } from \"./AccountSASPermissions.js\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./AccountSASSignatureValues.js\";\nimport { AccountSASServices } from \"./AccountSASServices.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { appendToURLQuery } from \"./utils/utils.common.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\n\n/**\n * Options to configure Share - List Shares Segment operations.\n *\n * See:\n * - {@link ShareServiceClient.listSegments}\n * - {@link ShareServiceClient.listItems}\n * - {@link ShareServiceClient.listSharesSegment}\n */\ninterface ServiceListSharesSegmentOptions 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 * Filters the results to return only entries whose\n * name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of entries to\n * return. If the request does not specify maxResults, or specifies a value\n * greater than 5,000, the server will return up to 5,000 items.\n */\n maxResults?: number;\n\n /**\n * Include this parameter to\n * specify one or more datasets to include in the response.\n */\n include?: ListSharesIncludeType[];\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.listShares} operation.\n */\nexport interface ServiceListSharesOptions 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 * Filters the results to return only entries whose\n * name begins with the specified prefix.\n */\n prefix?: string;\n\n /**\n * Specifies that share snapshots should be included in the enumeration. Share Snapshots are listed from oldest to newest in the response.\n */\n includeMetadata?: boolean;\n\n /**\n * Specifies that share snapshot should be returned in the response.\n */\n includeSnapshots?: boolean;\n\n /**\n * Specifies that share soft deleted should be returned in the response.\n */\n includeDeleted?: boolean;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.getProperties} operation.\n */\nexport interface ServiceGetPropertiesOptions 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\n/**\n * Options to configure the {@link ShareServiceClient.setProperties} operation.\n */\nexport interface ServiceSetPropertiesOptions 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\n/**\n * Options to configure the {@link ShareServiceClient.undelete} operation.\n */\nexport interface ServiceUndeleteShareOptions 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\n/**\n * Properties of a share.\n */\nexport type ShareProperties = SharePropertiesInternal & {\n /**\n * The protocols that have been enabled on the share.\n */\n protocols?: ShareProtocols;\n};\n\n/**\n * A listed Azure Storage share item.\n */\nexport interface ShareItem {\n name: string;\n snapshot?: string;\n deleted?: boolean;\n version?: string;\n properties: ShareProperties;\n metadata?: { [propertyName: string]: string };\n}\n\n/**\n * An enumeration of shares.\n */\nexport interface ListSharesResponse {\n serviceEndpoint: string;\n prefix?: string;\n marker?: string;\n maxResults?: number;\n shareItems?: ShareItem[];\n continuationToken: string;\n}\n\n/**\n * Contains response data for the {@link ShareServiceClient.listShares} operation.\n */\nexport type ServiceListSharesSegmentResponse = WithResponse<\n ListSharesResponse & ServiceListSharesSegmentHeaders,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel\n>;\n\n/**\n * Options to configure {@link ShareServiceClient.generateAccountSasUrl} operation.\n */\nexport interface ServiceGenerateAccountSasUrlOptions {\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 allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n}\n\n/**\n * A ShareServiceClient represents a URL to the Azure Storage File service allowing you\n * to manipulate file shares.\n */\nexport class ShareServiceClient extends StorageClient {\n /**\n * serviceContext provided by protocol layer.\n */\n private serviceContext: Service;\n\n private shareClientConfig?: ShareClientConfig;\n\n /**\n *\n * Creates an instance of ShareServiceClient from connection string.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param options - Options to configure the HTTP pipeline.\n * @returns A new ShareServiceClient from the given connection string.\n */\n public static fromConnectionString(\n connectionString: string,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n ): ShareServiceClient {\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNodeLike) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey,\n );\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new ShareServiceClient(extractedCreds.url, pipeline, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new ShareServiceClient(\n extractedCreds.url + \"?\" + extractedCreds.accountSas,\n pipeline,\n options,\n );\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\",\n );\n }\n }\n\n /**\n * Creates an instance of ShareServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage file service, such as\n * \"https://myaccount.file.core.windows.net\". You can Append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.file.core.windows.net?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential, or TokenCredential,\n * If not specified, AnonymousCredential is used.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n\n constructor(\n url: string,\n credential?: Credential | TokenCredential,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n );\n /**\n * Creates an instance of ShareServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage file service, such as\n * \"https://myaccount.file.core.windows.net\". You can Append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.file.core.windows.net?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);\n constructor(\n url: string,\n credentialOrPipeline?: Credential | TokenCredential | Pipeline,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n ) {\n let pipeline: Pipeline;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n } else if (\n credentialOrPipeline instanceof Credential ||\n isTokenCredential(credentialOrPipeline)\n ) {\n pipeline = newPipeline(credentialOrPipeline, options);\n } else {\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n\n super(url, pipeline);\n this.shareClientConfig = options;\n this.serviceContext = this.storageClientContext.service;\n }\n\n /**\n * Creates a ShareClient object.\n *\n * @param shareName - Name of a share.\n * @returns The ShareClient object for the given share name.\n *\n * Example usage:\n *\n * ```ts snippet:ReadmeSampleCreateShareClient\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * const shareName = \"<share name>\";\n * const shareClient = serviceClient.getShareClient(shareName);\n * await shareClient.create();\n * ```\n */\n public getShareClient(shareName: string): ShareClient {\n return new ShareClient(\n appendToURLPath(this.url, shareName),\n this.pipeline,\n this.shareClientConfig,\n );\n }\n\n /**\n * Creates a Share.\n *\n * @param shareName -\n * @param options -\n * @returns Share creation response and the corresponding share client.\n */\n public async createShare(\n shareName: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ShareCreateOptions = {},\n ): Promise<{ shareCreateResponse: ShareCreateResponse; shareClient: ShareClient }> {\n return tracingClient.withSpan(\n \"ShareServiceClient-createShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(shareName);\n const shareCreateResponse = await shareClient.create(updatedOptions);\n return {\n shareCreateResponse,\n shareClient,\n };\n },\n );\n }\n\n /**\n * Deletes a Share.\n *\n * @param shareName -\n * @param options -\n * @returns Share deletion response and the corresponding share client.\n */\n public async deleteShare(\n shareName: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ShareDeleteMethodOptions = {},\n ): Promise<ShareDeleteResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-deleteShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(shareName);\n return shareClient.delete(updatedOptions);\n },\n );\n }\n\n /**\n * Gets the properties of a storage account’s file service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/get-file-service-properties\n *\n * @param options - Options to Get Properties operation.\n * @returns Response data for the Get Properties operation.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<ServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceGetPropertiesHeaders & FileServiceProperties,\n ServiceGetPropertiesHeaders,\n FileServiceProperties\n >(\n await this.serviceContext.getProperties({\n ...updatedOptions,\n ...this.shareClientConfig,\n }),\n );\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s file service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/set-file-service-properties\n *\n * @param properties -\n * @param options - Options to Set Properties operation.\n * @returns Response data for the Set Properties operation.\n */\n public async setProperties(\n properties: FileServiceProperties,\n options: ServiceSetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceSetPropertiesHeaders, ServiceSetPropertiesHeaders>(\n await this.serviceContext.setProperties(properties, {\n ...updatedOptions,\n ...this.shareClientConfig,\n }),\n );\n },\n );\n }\n\n /**\n * Returns an AsyncIterableIterator for {@link ServiceListSharesSegmentResponse} objects\n *\n * @param marker - A string value that identifies the portion of\n * the list of shares to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all shares remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list shares operation.\n */\n private async *listSegments(\n marker?: string,\n options: ServiceListSharesSegmentOptions = {},\n ): AsyncIterableIterator<ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let listSharesSegmentResponse;\n do {\n listSharesSegmentResponse = await this.listSharesSegment(marker, options);\n marker = listSharesSegmentResponse.continuationToken;\n yield await listSharesSegmentResponse;\n } while (marker);\n }\n\n /**\n * Returns an AsyncIterableIterator for share items\n *\n * @param options - Options to list shares operation.\n */\n private async *listItems(\n options: ServiceListSharesSegmentOptions = {},\n ): AsyncIterableIterator<ShareItem> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let marker: string | undefined;\n for await (const segment of this.listSegments(marker, options)) {\n if (segment.shareItems) {\n yield* segment.shareItems;\n }\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the shares\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the shares in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListShares\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * let i = 1;\n * for await (const share of serviceClient.listShares()) {\n * console.log(`Share${i++}: ${share.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListShares_Iterator\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * const shareIter = serviceClient.listShares();\n * let i = 1;\n * let { value, done } = await shareIter.next();\n * while (!done) {\n * console.log(`Share ${i++}: ${value.name}`);\n * ({ value, done } = await shareIter.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListShares_ByPage\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * let i = 1;\n * for await (const response of serviceClient.listShares().byPage({ maxPageSize: 20 })) {\n * console.log(`Page ${i++}:`);\n * for (const share of response.shareItems || []) {\n * console.log(`\\tShare: ${share.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListShares_Continuation\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * let iterator = serviceClient.listShares().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * for await (const share of response.shareItems || []) {\n * console.log(`\\tShare: ${share.name}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n * iterator = serviceClient.listShares().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * for await (const share of response.shareItems || []) {\n * console.log(`\\tShare: ${share.name}`);\n * }\n * ```\n *\n * @param options - Options to list shares operation.\n *\n * An asyncIterableIterator that supports paging.\n */\n public listShares(\n options: ServiceListSharesOptions = {},\n ): PagedAsyncIterableIterator<ShareItem, ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const include: ListSharesIncludeType[] = [];\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n\n const updatedOptions: ServiceListSharesSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include: include } : {}),\n };\n\n // AsyncIterableIterator to iterate over queues\n const iter = this.listItems(updatedOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(removeEmptyString(settings.continuationToken), {\n maxResults: settings.maxPageSize,\n ...updatedOptions,\n });\n },\n };\n }\n\n /**\n * Gets the properties of a storage account's File service, including properties for Storage\n * Analytics metrics and CORS (Cross-Origin Resource Sharing) rules.\n *\n * @param marker - A string value that identifies the portion of\n * the list to be returned with the next list operation. The operation\n * returns a marker value within the response body if the list returned was\n * not complete. The marker value may then be used in a subsequent call to\n * request the next set of list items. The marker value is opaque to the\n * client.\n * @param options - Options to List Shares Segment operation.\n * @returns Response data for the List Shares Segment operation.\n */\n private async listSharesSegment(\n marker?: string,\n options: ServiceListSharesSegmentOptions = {},\n ): Promise<ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n return tracingClient.withSpan(\n \"ShareServiceClient-listSharesSegment\",\n options,\n async (updatedOptions) => {\n const res = assertResponse<\n ServiceListSharesSegmentHeaders & ListSharesResponseModel,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel\n >(\n await this.serviceContext.listSharesSegment({\n ...updatedOptions,\n ...this.shareClientConfig,\n marker,\n }),\n );\n\n // parse protocols\n if (res.shareItems) {\n for (let i = 0; i < res.shareItems.length; i++) {\n const protocolsStr = res.shareItems[i].properties.enabledProtocols;\n (res.shareItems[i].properties as any).protocols = toShareProtocols(protocolsStr);\n }\n }\n\n return res;\n },\n );\n }\n\n /**\n * Restores a previously deleted share.\n * This API is only functional if Share Soft Delete is enabled\n * for the storage account associated with the share.\n *\n * @param deletedShareName - The name of the previously deleted share.\n * @param deletedShareVersion - The version of the previously deleted share.\n * @param options - Options to Share undelete operation.\n * @returns Restored share.\n */\n public async undeleteShare(\n deletedShareName: string,\n deletedShareVersion: string,\n options: ServiceUndeleteShareOptions = {},\n ): Promise<ShareClient> {\n return tracingClient.withSpan(\n \"ShareServiceClient-undeleteShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(deletedShareName);\n await new ShareClientInternal(shareClient.url, this.pipeline).restore({\n ...updatedOptions,\n ...this.shareClientConfig,\n deletedShareName: deletedShareName,\n deletedShareVersion: deletedShareVersion,\n });\n return shareClient;\n },\n );\n }\n\n /**\n * Only available for ShareServiceClient constructed with a shared key credential.\n *\n * Generates an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateAccountSasUrl(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n const sas = generateAccountSASQueryParameters(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"f\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for ShareServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasStringToSign(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n return generateAccountSASQueryParametersInternal(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"f\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ShareServiceClient.js","sourceRoot":"","sources":["../../src/ShareServiceClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAkBlC,+CAA4D;AAE5D,yDAAmD;AACnD,qEAA+D;AAE/D,6CAA2C;AAE3C,6DAKiC;AACjC,0DAAmD;AACnD,0DAAmE;AACnE,0DAA4D;AAE5D,gDAA8C;AAC9C,mDAAmD;AAEnD,2CAA+C;AAC/C,yEAAmE;AACnE,iFAGwC;AACxC,mEAA6D;AAG7D,6DAA2D;AAE3D,gDAAqD;AAuKrD;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,gCAAa;IACnD;;OAEG;IACK,cAAc,CAAU;IAExB,iBAAiB,CAAqB;IAE9C;;;;;;;;;;;;OAYG;IACI,MAAM,CAAC,oBAAoB,CAChC,gB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AAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,GAAG,GAAG,IAAA,gEAAiC,EAC3C;YACE,WAAW;YACX,SAAS;YACT,aAAa;YACb,QAAQ,EAAE,0CAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;YAClD,GAAG,OAAO;SACX,EACD,IAAI,CAAC,UAAU,CAChB,CAAC,QAAQ,EAAE,CAAC;QAEb,OAAO,IAAA,kCAAgB,EAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;;;;;;;OAaG;IACI,uBAAuB,CAC5B,SAAgB,EAChB,cAAqC,gDAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,EACrE,gBAAwB,KAAK;IAC7B,8DAA8D;IAC9D,UAA+C,EAAE;QAEjD,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,2CAA0B,CAAC,EAAE,CAAC;YAC7D,MAAM,UAAU,CACd,+FAA+F,CAChG,CAAC;QACJ,CAAC;QAED,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,IAAA,wEAAyC,EAC9C;YACE,WAAW;YACX,SAAS;YACT,aAAa;YACb,QAAQ,EAAE,0CAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;YAClD,GAAG,OAAO;SACX,EACD,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF;AA5mBD,gDA4mBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type {\n FileServiceProperties,\n ListSharesIncludeType,\n ShareCreateResponse,\n ShareDeleteResponse,\n ServiceGetPropertiesResponse,\n ServiceSetPropertiesResponse,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel,\n SharePropertiesInternal,\n ServiceSetPropertiesHeaders,\n ServiceGetPropertiesHeaders,\n} from \"./generatedModels.js\";\nimport type { Service } from \"./generated/src/operationsInterfaces/index.js\";\nimport type { Pipeline } from \"./Pipeline.js\";\nimport { isPipelineLike, newPipeline } from \"./Pipeline.js\";\nimport type { CommonOptions } from \"./StorageClient.js\";\nimport { StorageClient } from \"./StorageClient.js\";\nimport { ShareClientInternal } from \"./ShareClientInternal.js\";\nimport type { ShareCreateOptions, ShareDeleteMethodOptions } from \"./Clients.js\";\nimport { ShareClient } from \"./Clients.js\";\nimport type { WithResponse } from \"./utils/utils.common.js\";\nimport {\n appendToURLPath,\n extractConnectionStringParts,\n assertResponse,\n removeEmptyString,\n} from \"./utils/utils.common.js\";\nimport { Credential } from \"@azure/storage-common\";\nimport { StorageSharedKeyCredential } from \"@azure/storage-common\";\nimport { AnonymousCredential } from \"@azure/storage-common\";\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport type { ShareClientConfig, ShareClientOptions, ShareProtocols } from \"./models.js\";\nimport { toShareProtocols } from \"./models.js\";\nimport { AccountSASPermissions } from \"./AccountSASPermissions.js\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./AccountSASSignatureValues.js\";\nimport { AccountSASServices } from \"./AccountSASServices.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { appendToURLQuery } from \"./utils/utils.common.js\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\n\n/**\n * Options to configure Share - List Shares Segment operations.\n *\n * See:\n * - {@link ShareServiceClient.listSegments}\n * - {@link ShareServiceClient.listItems}\n * - {@link ShareServiceClient.listSharesSegment}\n */\ninterface ServiceListSharesSegmentOptions 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 * Filters the results to return only entries whose\n * name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of entries to\n * return. If the request does not specify maxResults, or specifies a value\n * greater than 5,000, the server will return up to 5,000 items.\n */\n maxResults?: number;\n\n /**\n * Include this parameter to\n * specify one or more datasets to include in the response.\n */\n include?: ListSharesIncludeType[];\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.listShares} operation.\n */\nexport interface ServiceListSharesOptions 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 * Filters the results to return only entries whose\n * name begins with the specified prefix.\n */\n prefix?: string;\n\n /**\n * Specifies that share snapshots should be included in the enumeration. Share Snapshots are listed from oldest to newest in the response.\n */\n includeMetadata?: boolean;\n\n /**\n * Specifies that share snapshot should be returned in the response.\n */\n includeSnapshots?: boolean;\n\n /**\n * Specifies that share soft deleted should be returned in the response.\n */\n includeDeleted?: boolean;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.getProperties} operation.\n */\nexport interface ServiceGetPropertiesOptions 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\n/**\n * Options to configure the {@link ShareServiceClient.setProperties} operation.\n */\nexport interface ServiceSetPropertiesOptions 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\n/**\n * Options to configure the {@link ShareServiceClient.undelete} operation.\n */\nexport interface ServiceUndeleteShareOptions 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\n/**\n * Properties of a share.\n */\nexport type ShareProperties = SharePropertiesInternal & {\n /**\n * The protocols that have been enabled on the share.\n */\n protocols?: ShareProtocols;\n};\n\n/**\n * A listed Azure Storage share item.\n */\nexport interface ShareItem {\n name: string;\n snapshot?: string;\n deleted?: boolean;\n version?: string;\n properties: ShareProperties;\n metadata?: { [propertyName: string]: string };\n}\n\n/**\n * An enumeration of shares.\n */\nexport interface ListSharesResponse {\n serviceEndpoint: string;\n prefix?: string;\n marker?: string;\n maxResults?: number;\n shareItems?: ShareItem[];\n continuationToken: string;\n}\n\n/**\n * Contains response data for the {@link ShareServiceClient.listShares} operation.\n */\nexport type ServiceListSharesSegmentResponse = WithResponse<\n ListSharesResponse & ServiceListSharesSegmentHeaders,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel\n>;\n\n/**\n * Options to configure {@link ShareServiceClient.generateAccountSasUrl} operation.\n */\nexport interface ServiceGenerateAccountSasUrlOptions {\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 allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n}\n\n/**\n * A ShareServiceClient represents a URL to the Azure Storage File service allowing you\n * to manipulate file shares.\n */\nexport class ShareServiceClient extends StorageClient {\n /**\n * serviceContext provided by protocol layer.\n */\n private serviceContext: Service;\n\n private shareClientConfig?: ShareClientConfig;\n\n /**\n *\n * Creates an instance of ShareServiceClient from connection string.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param options - Options to configure the HTTP pipeline.\n * @returns A new ShareServiceClient from the given connection string.\n */\n public static fromConnectionString(\n connectionString: string,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n ): ShareServiceClient {\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNodeLike) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey,\n );\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new ShareServiceClient(extractedCreds.url, pipeline, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new ShareServiceClient(\n extractedCreds.url + \"?\" + extractedCreds.accountSas,\n pipeline,\n options,\n );\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\",\n );\n }\n }\n\n /**\n * Creates an instance of ShareServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage file service, such as\n * \"https://myaccount.file.core.windows.net\". You can Append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.file.core.windows.net?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential, or TokenCredential,\n * If not specified, AnonymousCredential is used.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n\n constructor(\n url: string,\n credential?: Credential | TokenCredential,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n );\n /**\n * Creates an instance of ShareServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage file service, such as\n * \"https://myaccount.file.core.windows.net\". You can Append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.file.core.windows.net?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);\n constructor(\n url: string,\n credentialOrPipeline?: Credential | TokenCredential | Pipeline,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n ) {\n let pipeline: Pipeline;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n } else if (\n credentialOrPipeline instanceof Credential ||\n isTokenCredential(credentialOrPipeline)\n ) {\n pipeline = newPipeline(credentialOrPipeline, options);\n } else {\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n\n super(url, pipeline);\n this.shareClientConfig = options;\n this.serviceContext = this.storageClientContext.service;\n }\n\n /**\n * Creates a ShareClient object.\n *\n * @param shareName - Name of a share.\n * @returns The ShareClient object for the given share name.\n *\n * Example usage:\n *\n * ```ts snippet:ReadmeSampleCreateShareClient\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * const shareName = \"<share name>\";\n * const shareClient = serviceClient.getShareClient(shareName);\n * await shareClient.create();\n * ```\n */\n public getShareClient(shareName: string): ShareClient {\n return new ShareClient(\n appendToURLPath(this.url, shareName),\n this.pipeline,\n this.shareClientConfig,\n );\n }\n\n /**\n * Creates a Share.\n *\n * @param shareName -\n * @param options -\n * @returns Share creation response and the corresponding share client.\n */\n public async createShare(\n shareName: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ShareCreateOptions = {},\n ): Promise<{ shareCreateResponse: ShareCreateResponse; shareClient: ShareClient }> {\n return tracingClient.withSpan(\n \"ShareServiceClient-createShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(shareName);\n const shareCreateResponse = await shareClient.create(updatedOptions);\n return {\n shareCreateResponse,\n shareClient,\n };\n },\n );\n }\n\n /**\n * Deletes a Share.\n *\n * @param shareName -\n * @param options -\n * @returns Share deletion response and the corresponding share client.\n */\n public async deleteShare(\n shareName: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ShareDeleteMethodOptions = {},\n ): Promise<ShareDeleteResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-deleteShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(shareName);\n return shareClient.delete(updatedOptions);\n },\n );\n }\n\n /**\n * Gets the properties of a storage account’s file service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://learn.microsoft.com/rest/api/storageservices/get-file-service-properties\n *\n * @param options - Options to Get Properties operation.\n * @returns Response data for the Get Properties operation.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<ServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceGetPropertiesHeaders & FileServiceProperties,\n ServiceGetPropertiesHeaders,\n FileServiceProperties\n >(\n await this.serviceContext.getProperties({\n ...updatedOptions,\n ...this.shareClientConfig,\n }),\n );\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s file service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://learn.microsoft.com/rest/api/storageservices/set-file-service-properties\n *\n * @param properties -\n * @param options - Options to Set Properties operation.\n * @returns Response data for the Set Properties operation.\n */\n public async setProperties(\n properties: FileServiceProperties,\n options: ServiceSetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceSetPropertiesHeaders, ServiceSetPropertiesHeaders>(\n await this.serviceContext.setProperties(properties, {\n ...updatedOptions,\n ...this.shareClientConfig,\n }),\n );\n },\n );\n }\n\n /**\n * Returns an AsyncIterableIterator for {@link ServiceListSharesSegmentResponse} objects\n *\n * @param marker - A string value that identifies the portion of\n * the list of shares to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all shares remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list shares operation.\n */\n private async *listSegments(\n marker?: string,\n options: ServiceListSharesSegmentOptions = {},\n ): AsyncIterableIterator<ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let listSharesSegmentResponse;\n do {\n listSharesSegmentResponse = await this.listSharesSegment(marker, options);\n marker = listSharesSegmentResponse.continuationToken;\n yield await listSharesSegmentResponse;\n } while (marker);\n }\n\n /**\n * Returns an AsyncIterableIterator for share items\n *\n * @param options - Options to list shares operation.\n */\n private async *listItems(\n options: ServiceListSharesSegmentOptions = {},\n ): AsyncIterableIterator<ShareItem> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let marker: string | undefined;\n for await (const segment of this.listSegments(marker, options)) {\n if (segment.shareItems) {\n yield* segment.shareItems;\n }\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the shares\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the shares in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListShares\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * let i = 1;\n * for await (const share of serviceClient.listShares()) {\n * console.log(`Share${i++}: ${share.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListShares_Iterator\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * const shareIter = serviceClient.listShares();\n * let i = 1;\n * let { value, done } = await shareIter.next();\n * while (!done) {\n * console.log(`Share ${i++}: ${value.name}`);\n * ({ value, done } = await shareIter.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListShares_ByPage\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * let i = 1;\n * for await (const response of serviceClient.listShares().byPage({ maxPageSize: 20 })) {\n * console.log(`Page ${i++}:`);\n * for (const share of response.shareItems || []) {\n * console.log(`\\tShare: ${share.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListShares_Continuation\n * import { StorageSharedKeyCredential, ShareServiceClient } from \"@azure/storage-file-share\";\n *\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * const credential = new StorageSharedKeyCredential(account, accountKey);\n * const serviceClient = new ShareServiceClient(\n * `https://${account}.file.core.windows.net`,\n * credential,\n * );\n *\n * let iterator = serviceClient.listShares().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * for await (const share of response.shareItems || []) {\n * console.log(`\\tShare: ${share.name}`);\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n * iterator = serviceClient.listShares().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * for await (const share of response.shareItems || []) {\n * console.log(`\\tShare: ${share.name}`);\n * }\n * ```\n *\n * @param options - Options to list shares operation.\n *\n * An asyncIterableIterator that supports paging.\n */\n public listShares(\n options: ServiceListSharesOptions = {},\n ): PagedAsyncIterableIterator<ShareItem, ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const include: ListSharesIncludeType[] = [];\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n\n const updatedOptions: ServiceListSharesSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include: include } : {}),\n };\n\n // AsyncIterableIterator to iterate over queues\n const iter = this.listItems(updatedOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(removeEmptyString(settings.continuationToken), {\n maxResults: settings.maxPageSize,\n ...updatedOptions,\n });\n },\n };\n }\n\n /**\n * Gets the properties of a storage account's File service, including properties for Storage\n * Analytics metrics and CORS (Cross-Origin Resource Sharing) rules.\n *\n * @param marker - A string value that identifies the portion of\n * the list to be returned with the next list operation. The operation\n * returns a marker value within the response body if the list returned was\n * not complete. The marker value may then be used in a subsequent call to\n * request the next set of list items. The marker value is opaque to the\n * client.\n * @param options - Options to List Shares Segment operation.\n * @returns Response data for the List Shares Segment operation.\n */\n private async listSharesSegment(\n marker?: string,\n options: ServiceListSharesSegmentOptions = {},\n ): Promise<ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n return tracingClient.withSpan(\n \"ShareServiceClient-listSharesSegment\",\n options,\n async (updatedOptions) => {\n const res = assertResponse<\n ServiceListSharesSegmentHeaders & ListSharesResponseModel,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel\n >(\n await this.serviceContext.listSharesSegment({\n ...updatedOptions,\n ...this.shareClientConfig,\n marker,\n }),\n );\n\n // parse protocols\n if (res.shareItems) {\n for (let i = 0; i < res.shareItems.length; i++) {\n const protocolsStr = res.shareItems[i].properties.enabledProtocols;\n (res.shareItems[i].properties as any).protocols = toShareProtocols(protocolsStr);\n }\n }\n\n return res;\n },\n );\n }\n\n /**\n * Restores a previously deleted share.\n * This API is only functional if Share Soft Delete is enabled\n * for the storage account associated with the share.\n *\n * @param deletedShareName - The name of the previously deleted share.\n * @param deletedShareVersion - The version of the previously deleted share.\n * @param options - Options to Share undelete operation.\n * @returns Restored share.\n */\n public async undeleteShare(\n deletedShareName: string,\n deletedShareVersion: string,\n options: ServiceUndeleteShareOptions = {},\n ): Promise<ShareClient> {\n return tracingClient.withSpan(\n \"ShareServiceClient-undeleteShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(deletedShareName);\n await new ShareClientInternal(shareClient.url, this.pipeline).restore({\n ...updatedOptions,\n ...this.shareClientConfig,\n deletedShareName: deletedShareName,\n deletedShareVersion: deletedShareVersion,\n });\n return shareClient;\n },\n );\n }\n\n /**\n * Only available for ShareServiceClient constructed with a shared key credential.\n *\n * Generates an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateAccountSasUrl(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n const sas = generateAccountSASQueryParameters(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"f\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for ShareServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasStringToSign(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n return generateAccountSASQueryParametersInternal(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"f\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n}\n"]}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import type { StorageClient as StorageClientContext } from "./generated/src/index.js";
|
2
2
|
import type { Pipeline } from "./Pipeline.js";
|
3
3
|
import type { OperationTracingOptions } from "@azure/core-tracing";
|
4
|
-
import type { AnonymousCredential } from "@azure/storage-
|
5
|
-
import type { StorageSharedKeyCredential } from "@azure/storage-
|
4
|
+
import type { AnonymousCredential } from "@azure/storage-common";
|
5
|
+
import type { StorageSharedKeyCredential } from "@azure/storage-common";
|
6
6
|
import type { TokenCredential } from "@azure/core-auth";
|
7
7
|
/**
|
8
8
|
* An interface for options common to every remote operation.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StorageClient.d.ts","sourceRoot":"","sources":["../../src/StorageClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEtF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"StorageClient.d.ts","sourceRoot":"","sources":["../../src/StorageClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEtF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,cAAc,CAAC,EAAE,uBAAuB,CAAC;CAC1C;AAED;;GAEG;AACH,8BAAsB,aAAa;IACjC;;OAEG;IACH,SAAgB,GAAG,EAAE,MAAM,CAAC;IAC5B,SAAgB,WAAW,EAAE,MAAM,CAAC;IAEpC;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAEtC;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,0BAA0B,GAAG,mBAAmB,GAAG,eAAe,CAAC;IAElG;;;OAGG;IACH,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAE9D;;;;OAIG;IACH,SAAS,aAAa,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;CAgBtD"}
|
@@ -10,6 +10,29 @@ const utils_common_js_1 = require("./utils/utils.common.js");
|
|
10
10
|
* A StorageClient represents a base client class for ServiceClient, ContainerClient and etc.
|
11
11
|
*/
|
12
12
|
class StorageClient {
|
13
|
+
/**
|
14
|
+
* URL string value.
|
15
|
+
*/
|
16
|
+
url;
|
17
|
+
accountName;
|
18
|
+
/**
|
19
|
+
* Request policy pipeline.
|
20
|
+
*
|
21
|
+
* @internal
|
22
|
+
*/
|
23
|
+
pipeline;
|
24
|
+
/**
|
25
|
+
* Credential in the pipeline to authenticate requests to the service, such as AnonymousCredential, StorageSharedKeyCredential.
|
26
|
+
* Initialized to an AnonymousCredential if not able to retrieve it from the pipeline.
|
27
|
+
*
|
28
|
+
* @internal
|
29
|
+
*/
|
30
|
+
credential;
|
31
|
+
/**
|
32
|
+
* StorageClient is a reference to protocol layer operations entry, which is
|
33
|
+
* generated by AutoRest generator.
|
34
|
+
*/
|
35
|
+
storageClientContext;
|
13
36
|
/**
|
14
37
|
* Creates an instance of StorageClient.
|
15
38
|
* @param url -
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StorageClient.js","sourceRoot":"","sources":["../../src/StorageClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,uEAAiE;AAEjE,+CAAgF;AAChF,6DAA+E;AAa/E;;GAEG;AACH,MAAsB,aAAa;
|
1
|
+
{"version":3,"file":"StorageClient.js","sourceRoot":"","sources":["../../src/StorageClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,uEAAiE;AAEjE,+CAAgF;AAChF,6DAA+E;AAa/E;;GAEG;AACH,MAAsB,aAAa;IACjC;;OAEG;IACa,GAAG,CAAS;IACZ,WAAW,CAAS;IAEpC;;;;OAIG;IACgB,QAAQ,CAAW;IAEtC;;;;;OAKG;IACgB,UAAU,CAAqE;IAElG;;;OAGG;IACgB,oBAAoB,CAAuB;IAE9D;;;;OAIG;IACH,YAAsB,GAAW,EAAE,QAAkB;QACnD,iFAAiF;QACjF,IAAI,CAAC,GAAG,GAAG,IAAA,+BAAa,EAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,IAAA,uCAAqB,EAAC,GAAG,CAAC,CAAC;QAE9C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,oBAAoB,GAAG,IAAI,8CAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAA,kCAAoB,EAAC,QAAQ,CAAC,CAAC,CAAC;QAC/F,4EAA4E;QAC5E,MAAM,oBAAoB,GAAG,IAAI,CAAC,oBAA2B,CAAC;QAC9D,IAAI,oBAAoB,CAAC,kBAAkB,EAAE,CAAC;YAC5C,oBAAoB,CAAC,kBAAkB,GAAG,SAAS,CAAC;QACtD,CAAC;QAED,MAAM,UAAU,GAAG,IAAA,uCAAyB,EAAC,QAAQ,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF;AAjDD,sCAiDC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageClient as StorageClientContext } from \"./generated/src/index.js\";\nimport { StorageContextClient } from \"./StorageContextClient.js\";\nimport type { Pipeline } from \"./Pipeline.js\";\nimport { getCoreClientOptions, getCredentialFromPipeline } from \"./Pipeline.js\";\nimport { escapeURLPath, getAccountNameFromUrl } from \"./utils/utils.common.js\";\nimport type { OperationTracingOptions } from \"@azure/core-tracing\";\nimport type { AnonymousCredential } from \"@azure/storage-common\";\nimport type { StorageSharedKeyCredential } from \"@azure/storage-common\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/**\n * An interface for options common to every remote operation.\n */\nexport interface CommonOptions {\n tracingOptions?: OperationTracingOptions;\n}\n\n/**\n * A StorageClient represents a base client class for ServiceClient, ContainerClient and etc.\n */\nexport abstract class StorageClient {\n /**\n * URL string value.\n */\n public readonly url: string;\n public readonly accountName: string;\n\n /**\n * Request policy pipeline.\n *\n * @internal\n */\n protected readonly pipeline: Pipeline;\n\n /**\n * Credential in the pipeline to authenticate requests to the service, such as AnonymousCredential, StorageSharedKeyCredential.\n * Initialized to an AnonymousCredential if not able to retrieve it from the pipeline.\n *\n * @internal\n */\n protected readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n\n /**\n * StorageClient is a reference to protocol layer operations entry, which is\n * generated by AutoRest generator.\n */\n protected readonly storageClientContext: StorageClientContext;\n\n /**\n * Creates an instance of StorageClient.\n * @param url -\n * @param pipeline -\n */\n protected constructor(url: string, pipeline: Pipeline) {\n // URL should be encoded and only once, protocol layer shouldn't encode URL again\n this.url = escapeURLPath(url);\n this.accountName = getAccountNameFromUrl(url);\n\n this.pipeline = pipeline;\n this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline));\n // Remove the default content-type in generated code of StorageClientContext\n const storageClientContext = this.storageClientContext as any;\n if (storageClientContext.requestContentType) {\n storageClientContext.requestContentType = undefined;\n }\n\n const credential = getCredentialFromPipeline(pipeline);\n this.credential = credential;\n }\n}\n"]}
|
@@ -9,7 +9,7 @@ const index_js_1 = require("./generated/src/index.js");
|
|
9
9
|
*/
|
10
10
|
class StorageContextClient extends index_js_1.StorageClient {
|
11
11
|
async sendOperationRequest(operationArguments, operationSpec) {
|
12
|
-
const operationSpecToSend =
|
12
|
+
const operationSpecToSend = { ...operationSpec };
|
13
13
|
if (operationSpecToSend.path === "/{shareName}" ||
|
14
14
|
operationSpecToSend.path === "/{shareName}/{directory}" ||
|
15
15
|
operationSpecToSend.path === "/{shareName}/{directory}/{fileName}") {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StorageContextClient.js","sourceRoot":"","sources":["../../src/StorageContextClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,uDAAyD;AAEzD;;GAEG;AACH,MAAa,oBAAqB,SAAQ,wBAAa;IACrD,KAAK,CAAC,oBAAoB,CACxB,kBAAsC,EACtC,aAA4B;QAE5B,MAAM,mBAAmB,
|
1
|
+
{"version":3,"file":"StorageContextClient.js","sourceRoot":"","sources":["../../src/StorageContextClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,uDAAyD;AAEzD;;GAEG;AACH,MAAa,oBAAqB,SAAQ,wBAAa;IACrD,KAAK,CAAC,oBAAoB,CACxB,kBAAsC,EACtC,aAA4B;QAE5B,MAAM,mBAAmB,GAAG,EAAE,GAAG,aAAa,EAAE,CAAC;QAEjD,IACE,mBAAmB,CAAC,IAAI,KAAK,cAAc;YAC3C,mBAAmB,CAAC,IAAI,KAAK,0BAA0B;YACvD,mBAAmB,CAAC,IAAI,KAAK,qCAAqC,EAClE,CAAC;YACD,mBAAmB,CAAC,IAAI,GAAG,EAAE,CAAC;QAChC,CAAC;QACD,OAAO,KAAK,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;IAC7E,CAAC;CACF;AAhBD,oDAgBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { OperationArguments, OperationSpec } from \"@azure/core-client\";\nimport { StorageClient } from \"./generated/src/index.js\";\n\n/**\n * @internal\n */\nexport class StorageContextClient extends StorageClient {\n async sendOperationRequest<T>(\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n ): Promise<T> {\n const operationSpecToSend = { ...operationSpec };\n\n if (\n operationSpecToSend.path === \"/{shareName}\" ||\n operationSpecToSend.path === \"/{shareName}/{directory}\" ||\n operationSpecToSend.path === \"/{shareName}/{directory}/{fileName}\"\n ) {\n operationSpecToSend.path = \"\";\n }\n return super.sendOperationRequest(operationArguments, operationSpecToSend);\n }\n}\n"]}
|
@@ -14,6 +14,7 @@ const Mappers = tslib_1.__importStar(require("../models/mappers.js"));
|
|
14
14
|
const Parameters = tslib_1.__importStar(require("../models/parameters.js"));
|
15
15
|
/** Class containing Directory operations. */
|
16
16
|
class DirectoryImpl {
|
17
|
+
client;
|
17
18
|
/**
|
18
19
|
* Initialize a new instance of the class Directory class.
|
19
20
|
* @param client Reference to the service client
|