@azure/storage-queue 12.13.0 → 12.20.0-alpha.20230615.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1216 -689
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchResponse.js +4 -0
- package/dist-esm/storage-blob/src/BatchResponse.js.map +1 -0
- package/dist-esm/storage-blob/src/BatchResponseParser.js +137 -0
- package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -0
- package/dist-esm/storage-blob/src/BatchUtils.browser.js +11 -0
- package/dist-esm/storage-blob/src/BatchUtils.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/BatchUtils.js +15 -0
- package/dist-esm/storage-blob/src/BatchUtils.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobBatch.js +267 -0
- package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobBatchClient.js +140 -0
- package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js +7 -0
- package/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js +455 -0
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobLeaseClient.js +192 -0
- package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js +362 -0
- package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobQueryResponse.js +367 -0
- package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -0
- package/dist-esm/storage-blob/src/BlobServiceClient.js +702 -0
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -0
- package/dist-esm/storage-blob/src/Clients.js +2527 -0
- package/dist-esm/storage-blob/src/Clients.js.map +1 -0
- package/dist-esm/storage-blob/src/ContainerClient.js +1161 -0
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -0
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js +24 -0
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -0
- package/dist-esm/storage-blob/src/Pipeline.js +259 -0
- package/dist-esm/storage-blob/src/Pipeline.js.map +1 -0
- package/dist-esm/storage-blob/src/Range.js +21 -0
- package/dist-esm/storage-blob/src/Range.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/StorageBrowserPolicyFactory.js +1 -1
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +1 -0
- package/dist-esm/storage-blob/src/StorageClient.js +29 -0
- package/dist-esm/storage-blob/src/StorageClient.js.map +1 -0
- package/dist-esm/storage-blob/src/StorageContextClient.js +17 -0
- package/dist-esm/storage-blob/src/StorageContextClient.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/StorageRetryPolicyFactory.js +1 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/credentials/AnonymousCredential.js +2 -2
- package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map +1 -0
- package/dist-esm/storage-blob/src/credentials/Credential.js.map +1 -0
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/credentials/StorageSharedKeyCredential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +1 -0
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js +5 -0
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js +31 -0
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/generated/src/index.js +1 -1
- package/dist-esm/storage-blob/src/generated/src/index.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/models/index.js +256 -0
- package/dist-esm/storage-blob/src/generated/src/models/index.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/models/mappers.js +8196 -0
- package/dist-esm/storage-blob/src/generated/src/models/mappers.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js +1610 -0
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js +221 -0
- package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/blob.js +997 -0
- package/dist-esm/storage-blob/src/generated/src/operations/blob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js +365 -0
- package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/container.js +705 -0
- package/dist-esm/storage-blob/src/generated/src/operations/container.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/index.js +14 -0
- package/dist-esm/storage-blob/src/generated/src/operations/index.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js +456 -0
- package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operations/service.js +315 -0
- package/dist-esm/storage-blob/src/generated/src/operations/service.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blob.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js +14 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js +9 -0
- package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist-esm/storage-blob/src/generated/src/storageClient.js +49 -0
- package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -0
- package/dist-esm/storage-blob/src/generatedModels.js.map +1 -0
- package/dist-esm/storage-blob/src/index.browser.js +23 -0
- package/dist-esm/storage-blob/src/index.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/index.js +33 -0
- package/dist-esm/storage-blob/src/index.js.map +1 -0
- package/dist-esm/storage-blob/src/log.js +8 -0
- package/dist-esm/storage-blob/src/log.js.map +1 -0
- package/dist-esm/storage-blob/src/models.js +108 -0
- package/dist-esm/storage-blob/src/models.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/policies/CredentialPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js +40 -0
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/policies/StorageBrowserPolicy.js +2 -1
- package/dist-esm/{src → storage-blob/src}/policies/StorageBrowserPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js +31 -0
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/policies/StorageRetryPolicy.js +5 -4
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +165 -0
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +1 -0
- package/dist-esm/{src → storage-blob/src}/policies/StorageSharedKeyCredentialPolicy.js +4 -2
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js +18 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +131 -0
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -0
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js +130 -0
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js +227 -0
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/AccountSASServices.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +93 -0
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js +195 -0
- package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +555 -0
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js +221 -0
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +234 -0
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -0
- package/dist-esm/storage-blob/src/sas/SasIPRange.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/Batch.js +122 -0
- package/dist-esm/storage-blob/src/utils/Batch.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js +111 -0
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/Mutex.js +66 -0
- package/dist-esm/storage-blob/src/utils/Mutex.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +119 -0
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/cache.js +11 -0
- package/dist-esm/storage-blob/src/utils/cache.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/constants.js +223 -0
- package/dist-esm/storage-blob/src/utils/constants.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/tracing.js +14 -0
- package/dist-esm/storage-blob/src/utils/tracing.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/utils.browser.js +48 -0
- package/dist-esm/storage-blob/src/utils/utils.browser.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/utils.common.js +754 -0
- package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -0
- package/dist-esm/storage-blob/src/utils/utils.node.js +132 -0
- package/dist-esm/storage-blob/src/utils/utils.node.js.map +1 -0
- package/dist-esm/storage-queue/src/AccountSASPermissions.js.map +1 -0
- package/dist-esm/storage-queue/src/AccountSASResourceTypes.js +72 -0
- package/dist-esm/storage-queue/src/AccountSASResourceTypes.js.map +1 -0
- package/dist-esm/storage-queue/src/AccountSASServices.js +80 -0
- package/dist-esm/storage-queue/src/AccountSASServices.js.map +1 -0
- package/dist-esm/storage-queue/src/AccountSASSignatureValues.js.map +1 -0
- package/dist-esm/{src → storage-queue/src}/QueueClient.js +44 -43
- package/dist-esm/storage-queue/src/QueueClient.js.map +1 -0
- package/dist-esm/storage-queue/src/QueueSASPermissions.js.map +1 -0
- package/dist-esm/storage-queue/src/QueueSASSignatureValues.js.map +1 -0
- package/dist-esm/{src → storage-queue/src}/QueueServiceClient.js +49 -41
- package/dist-esm/storage-queue/src/QueueServiceClient.js.map +1 -0
- package/dist-esm/{src → storage-queue/src}/SASQueryParameters.js +14 -14
- package/dist-esm/storage-queue/src/SASQueryParameters.js.map +1 -0
- package/dist-esm/storage-queue/src/SasIPRange.js +13 -0
- package/dist-esm/storage-queue/src/SasIPRange.js.map +1 -0
- package/dist-esm/storage-queue/src/StorageClient.js +53 -0
- package/dist-esm/storage-queue/src/StorageClient.js.map +1 -0
- package/dist-esm/storage-queue/src/StorageContextClient.js +18 -0
- package/dist-esm/storage-queue/src/StorageContextClient.js.map +1 -0
- package/dist-esm/storage-queue/src/generated/src/index.js +11 -0
- package/dist-esm/storage-queue/src/generated/src/index.js.map +1 -0
- package/dist-esm/{src → storage-queue/src}/generated/src/models/index.js +57 -0
- package/dist-esm/storage-queue/src/generated/src/models/index.js.map +1 -0
- package/dist-esm/{src → storage-queue/src}/generated/src/models/mappers.js +2 -2
- package/dist-esm/storage-queue/src/generated/src/models/mappers.js.map +1 -0
- package/dist-esm/{src → storage-queue/src}/generated/src/models/parameters.js +4 -5
- package/dist-esm/storage-queue/src/generated/src/models/parameters.js.map +1 -0
- package/dist-esm/storage-queue/src/generated/src/operations/index.js.map +1 -0
- package/dist-esm/{src → storage-queue/src}/generated/src/operations/messageId.js +6 -15
- package/dist-esm/storage-queue/src/generated/src/operations/messageId.js.map +1 -0
- package/dist-esm/{src → storage-queue/src}/generated/src/operations/messages.js +8 -21
- package/dist-esm/storage-queue/src/generated/src/operations/messages.js.map +1 -0
- package/dist-esm/{src → storage-queue/src}/generated/src/operations/queue.js +10 -28
- package/dist-esm/storage-queue/src/generated/src/operations/queue.js.map +1 -0
- package/dist-esm/{src → storage-queue/src}/generated/src/operations/service.js +8 -21
- package/dist-esm/storage-queue/src/generated/src/operations/service.js.map +1 -0
- package/dist-esm/storage-queue/src/generated/src/operationsInterfaces/index.js +12 -0
- package/dist-esm/storage-queue/src/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/storage-queue/src/generated/src/operationsInterfaces/messageId.js +9 -0
- package/dist-esm/storage-queue/src/generated/src/operationsInterfaces/messageId.js.map +1 -0
- package/dist-esm/storage-queue/src/generated/src/operationsInterfaces/messages.js +9 -0
- package/dist-esm/storage-queue/src/generated/src/operationsInterfaces/messages.js.map +1 -0
- package/dist-esm/storage-queue/src/generated/src/operationsInterfaces/queue.js +9 -0
- package/dist-esm/storage-queue/src/generated/src/operationsInterfaces/queue.js.map +1 -0
- package/dist-esm/storage-queue/src/generated/src/operationsInterfaces/service.js +9 -0
- package/dist-esm/storage-queue/src/generated/src/operationsInterfaces/service.js.map +1 -0
- package/dist-esm/storage-queue/src/generated/src/storageClient.js +47 -0
- package/dist-esm/storage-queue/src/generated/src/storageClient.js.map +1 -0
- package/dist-esm/storage-queue/src/generatedModels.js +4 -0
- package/dist-esm/storage-queue/src/generatedModels.js.map +1 -0
- package/dist-esm/storage-queue/src/index.browser.js +18 -0
- package/dist-esm/storage-queue/src/index.browser.js.map +1 -0
- package/dist-esm/storage-queue/src/index.js +26 -0
- package/dist-esm/storage-queue/src/index.js.map +1 -0
- package/dist-esm/storage-queue/src/log.js.map +1 -0
- package/dist-esm/storage-queue/src/models.js.map +1 -0
- package/dist-esm/{src → storage-queue/src}/utils/constants.js +2 -2
- package/dist-esm/storage-queue/src/utils/constants.js.map +1 -0
- package/dist-esm/storage-queue/src/utils/tracing.js +12 -0
- package/dist-esm/storage-queue/src/utils/tracing.js.map +1 -0
- package/dist-esm/{src → storage-queue/src}/utils/utils.common.js +69 -47
- package/dist-esm/storage-queue/src/utils/utils.common.js.map +1 -0
- package/package.json +25 -18
- package/types/3.1/storage-queue.d.ts +544 -255
- package/types/latest/storage-queue.d.ts +583 -259
- package/dist-esm/src/AccountSASPermissions.js.map +0 -1
- package/dist-esm/src/AccountSASResourceTypes.js.map +0 -1
- package/dist-esm/src/AccountSASServices.js.map +0 -1
- package/dist-esm/src/AccountSASSignatureValues.js.map +0 -1
- package/dist-esm/src/Pipeline.js +0 -85
- package/dist-esm/src/Pipeline.js.map +0 -1
- package/dist-esm/src/QueueClient.js.map +0 -1
- package/dist-esm/src/QueueSASPermissions.js.map +0 -1
- package/dist-esm/src/QueueSASSignatureValues.js.map +0 -1
- package/dist-esm/src/QueueServiceClient.js.map +0 -1
- package/dist-esm/src/SASQueryParameters.js.map +0 -1
- package/dist-esm/src/SasIPRange.js.map +0 -1
- package/dist-esm/src/StorageBrowserPolicyFactory.js.map +0 -1
- package/dist-esm/src/StorageClient.js +0 -44
- package/dist-esm/src/StorageClient.js.map +0 -1
- package/dist-esm/src/StorageRetryPolicyFactory.js.map +0 -1
- package/dist-esm/src/TelemetryPolicyFactory.js +0 -50
- package/dist-esm/src/TelemetryPolicyFactory.js.map +0 -1
- package/dist-esm/src/credentials/AnonymousCredential.js.map +0 -1
- package/dist-esm/src/credentials/Credential.js.map +0 -1
- package/dist-esm/src/credentials/StorageSharedKeyCredential.browser.js.map +0 -1
- package/dist-esm/src/credentials/StorageSharedKeyCredential.js.map +0 -1
- package/dist-esm/src/generated/src/index.js.map +0 -1
- package/dist-esm/src/generated/src/models/index.js.map +0 -1
- package/dist-esm/src/generated/src/models/mappers.js.map +0 -1
- package/dist-esm/src/generated/src/models/parameters.js.map +0 -1
- package/dist-esm/src/generated/src/operations/index.js.map +0 -1
- package/dist-esm/src/generated/src/operations/messageId.js.map +0 -1
- package/dist-esm/src/generated/src/operations/messages.js.map +0 -1
- package/dist-esm/src/generated/src/operations/queue.js.map +0 -1
- package/dist-esm/src/generated/src/operations/service.js.map +0 -1
- package/dist-esm/src/generated/src/storageClient.js +0 -25
- package/dist-esm/src/generated/src/storageClient.js.map +0 -1
- package/dist-esm/src/generated/src/storageClientContext.js +0 -39
- package/dist-esm/src/generated/src/storageClientContext.js.map +0 -1
- package/dist-esm/src/generatedModels.js.map +0 -1
- package/dist-esm/src/index.browser.js +0 -17
- package/dist-esm/src/index.browser.js.map +0 -1
- package/dist-esm/src/index.js +0 -25
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/log.js.map +0 -1
- package/dist-esm/src/models.js.map +0 -1
- package/dist-esm/src/policies/AnonymousCredentialPolicy.js.map +0 -1
- package/dist-esm/src/policies/CredentialPolicy.js.map +0 -1
- package/dist-esm/src/policies/StorageRetryPolicy.js.map +0 -1
- package/dist-esm/src/policies/StorageSharedKeyCredentialPolicy.js.map +0 -1
- package/dist-esm/src/policies/TelemetryPolicy.js +0 -36
- package/dist-esm/src/policies/TelemetryPolicy.js.map +0 -1
- package/dist-esm/src/utils/cache.js +0 -8
- package/dist-esm/src/utils/cache.js.map +0 -1
- package/dist-esm/src/utils/constants.js.map +0 -1
- package/dist-esm/src/utils/tracing.js +0 -27
- package/dist-esm/src/utils/tracing.js.map +0 -1
- package/dist-esm/src/utils/utils.common.js.map +0 -1
- /package/dist-esm/{src → storage-blob/src}/credentials/Credential.js +0 -0
- /package/dist-esm/{src → storage-blob/src}/credentials/StorageSharedKeyCredential.browser.js +0 -0
- /package/dist-esm/{src → storage-blob/src}/generatedModels.js +0 -0
- /package/dist-esm/{src → storage-blob/src}/policies/AnonymousCredentialPolicy.js +0 -0
- /package/dist-esm/{src → storage-blob/src/sas}/AccountSASResourceTypes.js +0 -0
- /package/dist-esm/{src → storage-blob/src/sas}/AccountSASServices.js +0 -0
- /package/dist-esm/{src → storage-blob/src/sas}/SasIPRange.js +0 -0
- /package/dist-esm/{src → storage-queue/src}/AccountSASPermissions.js +0 -0
- /package/dist-esm/{src → storage-queue/src}/AccountSASSignatureValues.js +0 -0
- /package/dist-esm/{src → storage-queue/src}/QueueSASPermissions.js +0 -0
- /package/dist-esm/{src → storage-queue/src}/QueueSASSignatureValues.js +0 -0
- /package/dist-esm/{src → storage-queue/src}/generated/src/operations/index.js +0 -0
- /package/dist-esm/{src → storage-queue/src}/log.js +0 -0
- /package/dist-esm/{src → storage-queue/src}/models.js +0 -0
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
|
-
import { isTokenCredential
|
|
3
|
+
import { isTokenCredential } from "@azure/core-auth";
|
|
4
|
+
import { isNode } from "@azure/core-util";
|
|
4
5
|
import { SpanStatusCode } from "@azure/core-tracing";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { AnonymousCredential } from "./credentials/AnonymousCredential";
|
|
6
|
+
import { newPipeline, Pipeline } from "../../storage-blob/src/Pipeline";
|
|
7
|
+
import { StorageClient, getStorageClientContext } from "./StorageClient";
|
|
8
|
+
import { appendToURLPath, extractConnectionStringParts, isIpEndpointStyle, truncatedISO8061Date, appendToURLQuery, assertResponse, } from "./utils/utils.common";
|
|
9
|
+
import { StorageSharedKeyCredential } from "../../storage-blob/src/credentials/StorageSharedKeyCredential";
|
|
10
|
+
import { AnonymousCredential } from "../../storage-blob/src/credentials/AnonymousCredential";
|
|
11
11
|
import { createSpan } from "./utils/tracing";
|
|
12
12
|
import { generateQueueSASQueryParameters } from "./QueueSASSignatureValues";
|
|
13
|
+
import { getDefaultProxySettings } from "@azure/core-rest-pipeline";
|
|
13
14
|
/**
|
|
14
15
|
* A QueueClient represents a URL to an Azure Storage Queue's messages allowing you to manipulate its messages.
|
|
15
16
|
*/
|
|
16
17
|
export class QueueClient extends StorageClient {
|
|
18
|
+
/**
|
|
19
|
+
* The name of the queue.
|
|
20
|
+
*/
|
|
21
|
+
get name() {
|
|
22
|
+
return this._name;
|
|
23
|
+
}
|
|
17
24
|
constructor(urlOrConnectionString, credentialOrPipelineOrQueueName,
|
|
18
25
|
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
19
26
|
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
|
@@ -36,7 +43,7 @@ export class QueueClient extends StorageClient {
|
|
|
36
43
|
else if (!credentialOrPipelineOrQueueName &&
|
|
37
44
|
typeof credentialOrPipelineOrQueueName !== "string") {
|
|
38
45
|
// (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)
|
|
39
|
-
// The second
|
|
46
|
+
// The second parameter is undefined. Use anonymous credential.
|
|
40
47
|
url = urlOrConnectionString;
|
|
41
48
|
pipeline = newPipeline(new AnonymousCredential(), options);
|
|
42
49
|
}
|
|
@@ -72,20 +79,14 @@ export class QueueClient extends StorageClient {
|
|
|
72
79
|
}
|
|
73
80
|
super(url, pipeline);
|
|
74
81
|
this._name = this.getQueueNameFromUrl();
|
|
75
|
-
this.queueContext =
|
|
82
|
+
this.queueContext = this.storageClientContext.queue;
|
|
76
83
|
// MessagesContext
|
|
77
84
|
// Build the url with "messages"
|
|
78
85
|
const partsOfUrl = this.url.split("?");
|
|
79
86
|
this._messagesUrl = partsOfUrl[1]
|
|
80
87
|
? appendToURLPath(partsOfUrl[0], "messages") + "?" + partsOfUrl[1]
|
|
81
88
|
: appendToURLPath(partsOfUrl[0], "messages");
|
|
82
|
-
this.messagesContext =
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* The name of the queue.
|
|
86
|
-
*/
|
|
87
|
-
get name() {
|
|
88
|
-
return this._name;
|
|
89
|
+
this.messagesContext = getStorageClientContext(this._messagesUrl, this.pipeline).messages;
|
|
89
90
|
}
|
|
90
91
|
getMessageIdContext(messageId) {
|
|
91
92
|
// Build the url with messageId
|
|
@@ -93,7 +94,7 @@ export class QueueClient extends StorageClient {
|
|
|
93
94
|
const urlWithMessageId = partsOfUrl[1]
|
|
94
95
|
? appendToURLPath(partsOfUrl[0], messageId) + "?" + partsOfUrl[1]
|
|
95
96
|
: appendToURLPath(partsOfUrl[0], messageId);
|
|
96
|
-
return
|
|
97
|
+
return getStorageClientContext(urlWithMessageId, this.pipeline).messageId;
|
|
97
98
|
}
|
|
98
99
|
/**
|
|
99
100
|
* Creates a new queue under the specified account.
|
|
@@ -112,7 +113,7 @@ export class QueueClient extends StorageClient {
|
|
|
112
113
|
async create(options = {}) {
|
|
113
114
|
const { span, updatedOptions } = createSpan("QueueClient-create", options);
|
|
114
115
|
try {
|
|
115
|
-
return await this.queueContext.create(
|
|
116
|
+
return assertResponse(await this.queueContext.create(updatedOptions));
|
|
116
117
|
}
|
|
117
118
|
catch (e) {
|
|
118
119
|
span.setStatus({
|
|
@@ -213,10 +214,10 @@ export class QueueClient extends StorageClient {
|
|
|
213
214
|
async delete(options = {}) {
|
|
214
215
|
const { span, updatedOptions } = createSpan("QueueClient-delete", options);
|
|
215
216
|
try {
|
|
216
|
-
return await this.queueContext.delete({
|
|
217
|
+
return assertResponse(await this.queueContext.delete({
|
|
217
218
|
abortSignal: options.abortSignal,
|
|
218
219
|
tracingOptions: updatedOptions.tracingOptions,
|
|
219
|
-
});
|
|
220
|
+
}));
|
|
220
221
|
}
|
|
221
222
|
catch (e) {
|
|
222
223
|
span.setStatus({
|
|
@@ -281,10 +282,10 @@ export class QueueClient extends StorageClient {
|
|
|
281
282
|
async getProperties(options = {}) {
|
|
282
283
|
const { span, updatedOptions } = createSpan("QueueClient-getProperties", options);
|
|
283
284
|
try {
|
|
284
|
-
return await this.queueContext.getProperties({
|
|
285
|
+
return assertResponse(await this.queueContext.getProperties({
|
|
285
286
|
abortSignal: options.abortSignal,
|
|
286
287
|
tracingOptions: updatedOptions.tracingOptions,
|
|
287
|
-
});
|
|
288
|
+
}));
|
|
288
289
|
}
|
|
289
290
|
catch (e) {
|
|
290
291
|
span.setStatus({
|
|
@@ -311,11 +312,11 @@ export class QueueClient extends StorageClient {
|
|
|
311
312
|
async setMetadata(metadata, options = {}) {
|
|
312
313
|
const { span, updatedOptions } = createSpan("QueueClient-setMetadata", options);
|
|
313
314
|
try {
|
|
314
|
-
return await this.queueContext.setMetadata({
|
|
315
|
+
return assertResponse(await this.queueContext.setMetadata({
|
|
315
316
|
abortSignal: options.abortSignal,
|
|
316
317
|
metadata,
|
|
317
318
|
tracingOptions: updatedOptions.tracingOptions,
|
|
318
|
-
});
|
|
319
|
+
}));
|
|
319
320
|
}
|
|
320
321
|
catch (e) {
|
|
321
322
|
span.setStatus({
|
|
@@ -342,10 +343,10 @@ export class QueueClient extends StorageClient {
|
|
|
342
343
|
async getAccessPolicy(options = {}) {
|
|
343
344
|
const { span, updatedOptions } = createSpan("QueueClient-getAccessPolicy", options);
|
|
344
345
|
try {
|
|
345
|
-
const response = await this.queueContext.getAccessPolicy({
|
|
346
|
+
const response = assertResponse(await this.queueContext.getAccessPolicy({
|
|
346
347
|
abortSignal: options.abortSignal,
|
|
347
348
|
tracingOptions: updatedOptions.tracingOptions,
|
|
348
|
-
});
|
|
349
|
+
}));
|
|
349
350
|
const res = {
|
|
350
351
|
_response: response._response,
|
|
351
352
|
date: response.date,
|
|
@@ -412,11 +413,11 @@ export class QueueClient extends StorageClient {
|
|
|
412
413
|
id: identifier.id,
|
|
413
414
|
});
|
|
414
415
|
}
|
|
415
|
-
return await this.queueContext.setAccessPolicy({
|
|
416
|
+
return assertResponse(await this.queueContext.setAccessPolicy({
|
|
416
417
|
abortSignal: options.abortSignal,
|
|
417
418
|
queueAcl: acl,
|
|
418
419
|
tracingOptions: updatedOptions.tracingOptions,
|
|
419
|
-
});
|
|
420
|
+
}));
|
|
420
421
|
}
|
|
421
422
|
catch (e) {
|
|
422
423
|
span.setStatus({
|
|
@@ -439,10 +440,10 @@ export class QueueClient extends StorageClient {
|
|
|
439
440
|
async clearMessages(options = {}) {
|
|
440
441
|
const { span, updatedOptions } = createSpan("QueueClient-clearMessages", options);
|
|
441
442
|
try {
|
|
442
|
-
return await this.messagesContext.clear({
|
|
443
|
+
return assertResponse(await this.messagesContext.clear({
|
|
443
444
|
abortSignal: options.abortSignal,
|
|
444
445
|
tracingOptions: updatedOptions.tracingOptions,
|
|
445
|
-
});
|
|
446
|
+
}));
|
|
446
447
|
}
|
|
447
448
|
catch (e) {
|
|
448
449
|
span.setStatus({
|
|
@@ -479,9 +480,9 @@ export class QueueClient extends StorageClient {
|
|
|
479
480
|
async sendMessage(messageText, options = {}) {
|
|
480
481
|
const { span, updatedOptions } = createSpan("QueueClient-sendMessage", options);
|
|
481
482
|
try {
|
|
482
|
-
const response = await this.messagesContext.enqueue({
|
|
483
|
+
const response = assertResponse(await this.messagesContext.enqueue({
|
|
483
484
|
messageText: messageText,
|
|
484
|
-
}, updatedOptions);
|
|
485
|
+
}, updatedOptions));
|
|
485
486
|
const item = response[0];
|
|
486
487
|
return {
|
|
487
488
|
_response: response._response,
|
|
@@ -536,7 +537,7 @@ export class QueueClient extends StorageClient {
|
|
|
536
537
|
async receiveMessages(options = {}) {
|
|
537
538
|
const { span, updatedOptions } = createSpan("QueueClient-receiveMessages", options);
|
|
538
539
|
try {
|
|
539
|
-
const response = await this.messagesContext.dequeue(updatedOptions);
|
|
540
|
+
const response = assertResponse(await this.messagesContext.dequeue(updatedOptions));
|
|
540
541
|
const res = {
|
|
541
542
|
_response: response._response,
|
|
542
543
|
date: response.date,
|
|
@@ -579,7 +580,7 @@ export class QueueClient extends StorageClient {
|
|
|
579
580
|
async peekMessages(options = {}) {
|
|
580
581
|
const { span, updatedOptions } = createSpan("QueueClient-peekMessages", options);
|
|
581
582
|
try {
|
|
582
|
-
const response = await this.messagesContext.peek(updatedOptions);
|
|
583
|
+
const response = assertResponse(await this.messagesContext.peek(updatedOptions));
|
|
583
584
|
const res = {
|
|
584
585
|
_response: response._response,
|
|
585
586
|
date: response.date,
|
|
@@ -617,10 +618,10 @@ export class QueueClient extends StorageClient {
|
|
|
617
618
|
async deleteMessage(messageId, popReceipt, options = {}) {
|
|
618
619
|
const { span, updatedOptions } = createSpan("QueueClient-deleteMessage", options);
|
|
619
620
|
try {
|
|
620
|
-
return await this.getMessageIdContext(messageId).delete(popReceipt, {
|
|
621
|
+
return assertResponse(await this.getMessageIdContext(messageId).delete(popReceipt, {
|
|
621
622
|
abortSignal: options.abortSignal,
|
|
622
623
|
tracingOptions: updatedOptions.tracingOptions,
|
|
623
|
-
});
|
|
624
|
+
}));
|
|
624
625
|
}
|
|
625
626
|
catch (e) {
|
|
626
627
|
span.setStatus({
|
|
@@ -657,11 +658,11 @@ export class QueueClient extends StorageClient {
|
|
|
657
658
|
queueMessage = { messageText: message };
|
|
658
659
|
}
|
|
659
660
|
try {
|
|
660
|
-
return await this.getMessageIdContext(messageId).update(popReceipt, visibilityTimeout || 0, {
|
|
661
|
+
return assertResponse(await this.getMessageIdContext(messageId).update(popReceipt, visibilityTimeout || 0, {
|
|
661
662
|
abortSignal: options.abortSignal,
|
|
662
663
|
tracingOptions: updatedOptions.tracingOptions,
|
|
663
664
|
queueMessage,
|
|
664
|
-
});
|
|
665
|
+
}));
|
|
665
666
|
}
|
|
666
667
|
catch (e) {
|
|
667
668
|
span.setStatus({
|
|
@@ -682,22 +683,22 @@ export class QueueClient extends StorageClient {
|
|
|
682
683
|
// "https://myaccount.queue.core.windows.net/myqueue".
|
|
683
684
|
// IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10001/devstoreaccount1/myqueue`
|
|
684
685
|
// http://localhost:10001/devstoreaccount1/queuename
|
|
685
|
-
const parsedUrl =
|
|
686
|
-
if (parsedUrl.
|
|
686
|
+
const parsedUrl = new URL(this.url);
|
|
687
|
+
if (parsedUrl.hostname.split(".")[1] === "queue") {
|
|
687
688
|
// "https://myaccount.queue.core.windows.net/queuename".
|
|
688
689
|
// .getPath() -> /queuename
|
|
689
|
-
queueName = parsedUrl.
|
|
690
|
+
queueName = parsedUrl.pathname.split("/")[1];
|
|
690
691
|
}
|
|
691
692
|
else if (isIpEndpointStyle(parsedUrl)) {
|
|
692
693
|
// IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/queuename
|
|
693
694
|
// Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/queuename
|
|
694
695
|
// .getPath() -> /devstoreaccount1/queuename
|
|
695
|
-
queueName = parsedUrl.
|
|
696
|
+
queueName = parsedUrl.pathname.split("/")[2];
|
|
696
697
|
}
|
|
697
698
|
else {
|
|
698
699
|
// "https://customdomain.com/queuename".
|
|
699
700
|
// .getPath() -> /queuename
|
|
700
|
-
queueName = parsedUrl.
|
|
701
|
+
queueName = parsedUrl.pathname.split("/")[1];
|
|
701
702
|
}
|
|
702
703
|
if (!queueName) {
|
|
703
704
|
throw new Error("Provided queueName is invalid.");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueueClient.js","sourceRoot":"","sources":["../../../src/QueueClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAmB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AA6BrD,OAAO,EAAE,WAAW,EAA0B,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChG,OAAO,EAAE,aAAa,EAAiB,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AACxF,OAAO,EACL,eAAe,EACf,4BAA4B,EAC5B,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAEhB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,0BAA0B,EAAE,MAAM,+DAA+D,CAAC;AAC3G,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAI5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AA4VpE;;GAEG;AACH,MAAM,OAAO,WAAY,SAAQ,aAAa;IAY5C;;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AC9C;iBAAM,IAAI,iBAAiB,CAAC,SAAS,CAAC,EAAE;gBACvC,0FAA0F;gBAC1F,oHAAoH;gBACpH,4CAA4C;gBAC5C,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aAC9C;iBAAM;gBACL,wCAAwC;gBACxC,2BAA2B;gBAC3B,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aAC9C;YAED,IAAI,CAAC,SAAS,EAAE;gBACd,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;aACnD;YAED,OAAO,SAAS,CAAC;SAClB;QAAC,OAAO,KAAU,EAAE;YACnB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;SAC3E;IACH,CAAC;IAED;;;;;;;;;;OAUG;IACI,cAAc,CAAC,OAAmC;QACvD,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,0BAA0B,CAAC,EAAE;YAC5D,MAAM,UAAU,CACd,uFAAuF,CACxF,CAAC;SACH;QAED,MAAM,GAAG,GAAG,+BAA+B,iBAEvC,SAAS,EAAE,IAAI,CAAC,IAAI,IACjB,OAAO,GAEZ,IAAI,CAAC,UAAU,CAChB,CAAC,QAAQ,EAAE,CAAC;QAEb,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { isNode } from \"@azure/core-util\";\nimport { SpanStatusCode } from \"@azure/core-tracing\";\nimport {\n EnqueuedMessage,\n DequeuedMessageItem,\n MessagesDequeueHeaders,\n MessagesEnqueueHeaders,\n MessagesPeekHeaders,\n MessageIdUpdateResponse,\n MessageIdDeleteResponse,\n MessagesClearResponse,\n PeekedMessageItem,\n QueueCreateHeaders,\n QueueDeleteResponse,\n QueueGetAccessPolicyHeaders,\n QueueGetPropertiesResponse,\n QueueSetAccessPolicyResponse,\n QueueSetMetadataResponse,\n SignedIdentifierModel,\n QueueCreateResponse,\n QueueDeleteHeaders,\n QueueSetMetadataHeaders,\n QueueGetPropertiesHeaders,\n QueueSetAccessPolicyHeaders,\n MessagesClearHeaders,\n MessageIdDeleteHeaders,\n MessageIdUpdateHeaders,\n} from \"./generatedModels\";\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { Messages, MessageId, Queue } from \"./generated/src/operationsInterfaces\";\nimport { newPipeline, StoragePipelineOptions, Pipeline } from \"../../storage-blob/src/Pipeline\";\nimport { StorageClient, CommonOptions, getStorageClientContext } from \"./StorageClient\";\nimport {\n appendToURLPath,\n extractConnectionStringParts,\n isIpEndpointStyle,\n truncatedISO8061Date,\n appendToURLQuery,\n WithResponse,\n assertResponse,\n} from \"./utils/utils.common\";\nimport { StorageSharedKeyCredential } from \"../../storage-blob/src/credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"../../storage-blob/src/credentials/AnonymousCredential\";\nimport { createSpan } from \"./utils/tracing\";\nimport { Metadata } from \"./models\";\nimport { generateQueueSASQueryParameters } from \"./QueueSASSignatureValues\";\nimport { SasIPRange } from \"./SasIPRange\";\nimport { QueueSASPermissions } from \"./QueueSASPermissions\";\nimport { SASProtocol } from \"./SASQueryParameters\";\nimport { getDefaultProxySettings } from \"@azure/core-rest-pipeline\";\n\n/**\n * Options to configure {@link QueueClient.create} operation\n */\nexport interface QueueCreateOptions 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 * A collection of key-value string pair to associate with the queue object.\n * The keys need to be lower-case.\n */\n metadata?: Metadata;\n}\n\n/**\n * Options to configure {@link QueueClient.exists} operation\n */\nexport interface QueueExistsOptions 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 {@link QueueClient.getProperties} operation\n */\nexport interface QueueGetPropertiesOptions 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 {@link QueueClient.delete} operation\n */\nexport interface QueueDeleteOptions 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 {@link QueueClient.getAccessPolicy} operation\n */\nexport interface QueueGetAccessPolicyOptions 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 {@link QueueClient.setAccessPolicy} operation\n */\nexport interface QueueSetAccessPolicyOptions 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 {@link QueueClient.setMetadata} operation\n */\nexport interface QueueSetMetadataOptions 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 * Signed identifier.\n */\nexport interface SignedIdentifier {\n /**\n * a unique id\n */\n id: string;\n /**\n * Access Policy\n */\n accessPolicy: {\n /**\n * the date-time the policy is active.\n */\n startsOn?: Date;\n /**\n * the date-time the policy expires.\n */\n expiresOn?: Date;\n /**\n * the permissions for the acl policy\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-queue-acl\n */\n permissions?: string;\n };\n}\n\n/**\n * Contains response data for the {@link QueueClient.getAccessPolicy} operation.\n */\nexport declare type QueueGetAccessPolicyResponse = WithResponse<\n {\n signedIdentifiers: SignedIdentifier[];\n } & QueueGetAccessPolicyHeaders,\n QueueGetAccessPolicyHeaders,\n SignedIdentifierModel[]\n>;\n\n/**\n * Options to configure {@link QueueClient.clearMessages} operation\n */\nexport interface QueueClearMessagesOptions 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/** Optional parameters. */\nexport interface MessagesEnqueueOptionalParams extends CommonOptions {\n /** The The timeout parameter is expressed in seconds. For more information, see <a href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations\">Setting Timeouts for Queue Service Operations.</a> */\n timeoutInSeconds?: number;\n /** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */\n requestId?: string;\n /** Optional. If specified, the request must be made using an x-ms-version of 2011-08-18 or later. If not specified, the default value is 0. Specifies the new visibility timeout value, in seconds, relative to server time. The new value must be larger than or equal to 0, and cannot be larger than 7 days. The visibility timeout of a message cannot be set to a value later than the expiry time. visibilitytimeout should be set to a value smaller than the time-to-live value. */\n visibilityTimeout?: number;\n /** Optional. Specifies the time-to-live interval for the message, in seconds. Prior to version 2017-07-29, the maximum time-to-live allowed is 7 days. For version 2017-07-29 or later, the maximum time-to-live can be any positive number, as well as -1 indicating that the message does not expire. If this parameter is omitted, the default time-to-live is 7 days. */\n messageTimeToLive?: number;\n}\n\n/**\n * Options to configure {@link QueueClient.sendMessage} operation\n */\nexport interface QueueSendMessageOptions extends MessagesEnqueueOptionalParams, CommonOptions {}\n\n/** Optional parameters. */\nexport interface MessagesDequeueOptionalParams extends CommonOptions {\n /** The The timeout parameter is expressed in seconds. For more information, see <a href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations\">Setting Timeouts for Queue Service Operations.</a> */\n timeoutInSeconds?: number;\n /** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */\n requestId?: string;\n /** Optional. A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. If fewer are visible, the visible messages are returned. By default, a single message is retrieved from the queue with this operation. */\n numberOfMessages?: number;\n /** Optional. Specifies the new visibility timeout value, in seconds, relative to server time. The default value is 30 seconds. A specified value must be larger than or equal to 1 second, and cannot be larger than 7 days, or larger than 2 hours on REST protocol versions prior to version 2011-08-18. The visibility timeout of a message can be set to a value later than the expiry time. */\n visibilityTimeout?: number;\n}\n\n/**\n * Options to configure {@link QueueClient.receiveMessages} operation\n */\nexport interface QueueReceiveMessageOptions extends MessagesDequeueOptionalParams, CommonOptions {}\n\n/** Optional parameters. */\nexport interface MessagesPeekOptionalParams extends CommonOptions {\n /** The The timeout parameter is expressed in seconds. For more information, see <a href=\"https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-queue-service-operations\">Setting Timeouts for Queue Service Operations.</a> */\n timeoutInSeconds?: number;\n /** Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. */\n requestId?: string;\n /** Optional. A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. If fewer are visible, the visible messages are returned. By default, a single message is retrieved from the queue with this operation. */\n numberOfMessages?: number;\n}\n\n/**\n * Options to configure {@link QueueClient.peekMessages} operation\n */\nexport interface QueuePeekMessagesOptions extends MessagesPeekOptionalParams, CommonOptions {}\n\n/**\n * Contains the response data for the {@link QueueClient.sendMessage} operation.\n */\nexport declare type QueueSendMessageResponse = WithResponse<\n {\n /**\n * The ID of the sent Message.\n */\n messageId: string;\n /**\n * This value is required to delete the Message.\n * If deletion fails using this popreceipt then the message has been received\n * by another client.\n */\n popReceipt: string;\n /**\n * The time that the message was inserted into the\n * Queue.\n */\n insertedOn: Date;\n /**\n * The time that the message will expire and be\n * automatically deleted.\n */\n expiresOn: Date;\n /**\n * The time that the message will again become\n * visible in the Queue.\n */\n nextVisibleOn: Date;\n } & MessagesEnqueueHeaders,\n MessagesEnqueueHeaders,\n EnqueuedMessage[]\n>;\n\n/**\n * The object returned in the `receivedMessageItems` array when calling {@link QueueClient.receiveMessages}.\n *\n * See: {@link QueueReceiveMessageResponse}\n */\nexport declare type ReceivedMessageItem = DequeuedMessageItem;\n\n/**\n * Contains the response data for the {@link QueueClient.receiveMessages} operation.\n */\nexport declare type QueueReceiveMessageResponse = WithResponse<\n {\n receivedMessageItems: ReceivedMessageItem[];\n } & MessagesDequeueHeaders,\n MessagesDequeueHeaders,\n ReceivedMessageItem[]\n>;\n\n/**\n * Contains the response data for the {@link QueueClient.peekMessages} operation.\n */\nexport declare type QueuePeekMessagesResponse = WithResponse<\n {\n peekedMessageItems: PeekedMessageItem[];\n } & MessagesPeekHeaders,\n MessagesPeekHeaders,\n PeekedMessageItem[]\n>;\n\n/**\n * Options to configure the {@link QueueClient.deleteMessage} operation\n */\nexport interface QueueDeleteMessageOptions 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 * Contains response data for the {@link QueueClient.updateMessage} operation.\n */\nexport declare type QueueUpdateMessageResponse = MessageIdUpdateResponse;\n\n/**\n * Contains response data for the {@link QueueClient.deleteMessage} operation.\n */\nexport declare type QueueDeleteMessageResponse = MessageIdDeleteResponse;\n\n/**\n * Contains response data for the {@link QueueClient.clearMessages} operation.\n */\nexport declare type QueueClearMessagesResponse = MessagesClearResponse;\n\n/**\n * Options to configure {@link QueueClient.updateMessage} operation\n */\nexport interface QueueUpdateMessageOptions 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 * Contains response data for the {@link QueueClient.createIfNotExists} operation.\n */\nexport interface QueueCreateIfNotExistsResponse extends QueueCreateResponse {\n /**\n * Indicate whether the queue is successfully created. Is false when the queue is not changed as it already exists.\n */\n succeeded: boolean;\n}\n\n/**\n * Contains response data for the {@link QueueClient.deleteIfExists} operation.\n */\nexport interface QueueDeleteIfExistsResponse extends QueueDeleteResponse {\n /**\n * Indicate whether the queue is successfully deleted. Is false if the queue does not exist in the first place.\n */\n succeeded: boolean;\n}\n\n/**\n * Options to configure {@link QueueClient.generateSasUrl} operation.\n */\nexport interface QueueGenerateSasUrlOptions {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n */\n expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link QueueSASPermissions} for help constructing the permissions string.\n */\n permissions?: QueueSASPermissions;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n\n /**\n * Optional. The name of the access policy on the queue this SAS references if any.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n}\n\n/**\n * A QueueClient represents a URL to an Azure Storage Queue's messages allowing you to manipulate its messages.\n */\nexport class QueueClient extends StorageClient {\n /**\n * messagesContext provided by protocol layer.\n */\n private messagesContext: Messages;\n /**\n * queueContext provided by protocol layer.\n */\n private queueContext: Queue;\n private _name: string;\n private _messagesUrl: string;\n\n /**\n * The name of the queue.\n */\n public get name(): string {\n return this._name;\n }\n\n /**\n * Creates an instance of QueueClient.\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 queueName - Queue name.\n * @param options - 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 /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n constructor(connectionString: string, queueName: string, options?: StoragePipelineOptions);\n /**\n * Creates an instance of QueueClient.\n *\n * @param url - A URL string pointing to Azure Storage queue, such as\n * \"https://myaccount.queue.core.windows.net/myqueue\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.queue.core.windows.net/myqueue?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param options - Options to configure the HTTP pipeline.\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | 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?: StoragePipelineOptions\n );\n /**\n * Creates an instance of QueueClient.\n *\n * @param url - A URL string pointing to Azure Storage queue, such as\n * \"https://myaccount.queue.core.windows.net/myqueue\". You can\n * append a SAS if using AnonymousCredential, such as\n * \"https://myaccount.queue.core.windows.net/myqueue?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n constructor(url: string, pipeline: Pipeline);\n constructor(\n urlOrConnectionString: string,\n credentialOrPipelineOrQueueName?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline\n | 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?: StoragePipelineOptions\n ) {\n options = options || {};\n let pipeline: Pipeline;\n let url: string;\n if (credentialOrPipelineOrQueueName instanceof Pipeline) {\n // (url: string, pipeline: Pipeline)\n url = urlOrConnectionString;\n pipeline = credentialOrPipelineOrQueueName;\n } else if (\n (isNode && credentialOrPipelineOrQueueName instanceof StorageSharedKeyCredential) ||\n credentialOrPipelineOrQueueName instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipelineOrQueueName)\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n url = urlOrConnectionString;\n pipeline = newPipeline(credentialOrPipelineOrQueueName, options);\n } else if (\n !credentialOrPipelineOrQueueName &&\n typeof credentialOrPipelineOrQueueName !== \"string\"\n ) {\n // (url: string, credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: StoragePipelineOptions)\n // The second parameter is undefined. Use anonymous credential.\n url = urlOrConnectionString;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else if (\n credentialOrPipelineOrQueueName &&\n typeof credentialOrPipelineOrQueueName === \"string\"\n ) {\n // (connectionString: string, containerName: string, queueName: string, options?: StoragePipelineOptions)\n const extractedCreds = extractConnectionStringParts(urlOrConnectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const queueName = credentialOrPipelineOrQueueName;\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName,\n extractedCreds.accountKey\n );\n url = appendToURLPath(extractedCreds.url, queueName);\n\n if (!options.proxyOptions) {\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n }\n\n pipeline = newPipeline(sharedKeyCredential, 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 queueName = credentialOrPipelineOrQueueName;\n url = appendToURLPath(extractedCreds.url, queueName) + \"?\" + extractedCreds.accountSas;\n pipeline = newPipeline(new AnonymousCredential(), options);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\"\n );\n }\n } else {\n throw new Error(\"Expecting non-empty strings for queueName parameter\");\n }\n super(url, pipeline);\n this._name = this.getQueueNameFromUrl();\n this.queueContext = this.storageClientContext.queue;\n\n // MessagesContext\n // Build the url with \"messages\"\n const partsOfUrl = this.url.split(\"?\");\n this._messagesUrl = partsOfUrl[1]\n ? appendToURLPath(partsOfUrl[0], \"messages\") + \"?\" + partsOfUrl[1]\n : appendToURLPath(partsOfUrl[0], \"messages\");\n\n this.messagesContext = getStorageClientContext(this._messagesUrl, this.pipeline).messages;\n }\n\n private getMessageIdContext(messageId: string): MessageId {\n // Build the url with messageId\n const partsOfUrl = this._messagesUrl.split(\"?\");\n const urlWithMessageId = partsOfUrl[1]\n ? appendToURLPath(partsOfUrl[0], messageId) + \"?\" + partsOfUrl[1]\n : appendToURLPath(partsOfUrl[0], messageId);\n\n return getStorageClientContext(urlWithMessageId, this.pipeline).messageId;\n }\n\n /**\n * Creates a new queue under the specified account.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-queue4\n *\n * @param options - Options to Queue create operation.\n * @returns Response data for the Queue create operation.\n *\n * Example usage:\n *\n * ```js\n * const queueClient = queueServiceClient.getQueueClient(\"<new queue name>\");\n * const createQueueResponse = await queueClient.create();\n * ```\n */\n public async create(options: QueueCreateOptions = {}): Promise<QueueCreateResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-create\", options);\n try {\n return assertResponse<QueueCreateHeaders, QueueCreateHeaders>(\n await this.queueContext.create(updatedOptions)\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Creates a new queue under the specified account if it doesn't already exist.\n * If the queue already exists, it is not changed.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-queue4\n *\n * @param options -\n */\n public async createIfNotExists(\n options: QueueCreateOptions = {}\n ): Promise<QueueCreateIfNotExistsResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-createIfNotExists\", options);\n try {\n const response = await this.create(updatedOptions);\n\n // When a queue with the specified name already exists, the Queue service checks the metadata associated with the existing queue.\n // If the existing metadata is identical to the metadata specified on the Create Queue request, status code 204 (No Content) is returned.\n // If the existing metadata does not match, the operation fails and status code 409 (Conflict) is returned.\n if (response._response.status === 204) {\n return {\n succeeded: false,\n ...response,\n };\n }\n return {\n succeeded: true,\n ...response,\n };\n } catch (e: any) {\n if (e.details?.errorCode === \"QueueAlreadyExists\") {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: \"Expected exception when creating a queue only if it does not already exist.\",\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response,\n };\n }\n\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes the specified queue permanently if it exists.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-queue3\n *\n * @param options -\n */\n public async deleteIfExists(\n options: QueueDeleteOptions = {}\n ): Promise<QueueDeleteIfExistsResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-deleteIfExists\", options);\n try {\n const res = await this.delete(updatedOptions);\n return {\n succeeded: true,\n ...res,\n };\n } catch (e: any) {\n if (e.details?.errorCode === \"QueueNotFound\") {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: \"Expected exception when deleting a queue only if it exists.\",\n });\n return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response,\n };\n }\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Deletes the specified queue permanently.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-queue3\n *\n * @param options - Options to Queue delete operation.\n * @returns Response data for the Queue delete operation.\n *\n * Example usage:\n *\n * ```js\n * const deleteQueueResponse = await queueClient.delete();\n * console.log(\n * \"Delete queue successfully, service assigned request Id:\", deleteQueueResponse.requestId\n * );\n * ```\n */\n public async delete(options: QueueDeleteOptions = {}): Promise<QueueDeleteResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-delete\", options);\n try {\n return assertResponse<QueueDeleteHeaders, QueueDeleteHeaders>(\n await this.queueContext.delete({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n })\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Returns true if the specified queue exists; false otherwise.\n *\n * NOTE: use this function with care since an existing queue might be deleted by other clients or\n * applications. Vice versa new queues might be added by other clients or applications after this\n * function completes.\n *\n * @param options - options to Exists operation.\n */\n public async exists(options: QueueExistsOptions = {}): Promise<boolean> {\n const { span, updatedOptions } = createSpan(\"QueueClient-exists\", options);\n try {\n await this.getProperties({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n });\n return true;\n } catch (e: any) {\n if (e.statusCode === 404) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: \"Expected exception when checking queue existence\",\n });\n return false;\n }\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets all user-defined metadata and system properties for the specified\n * queue. Metadata is associated with the queue as name-values pairs.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-queue-metadata\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the `listQueues` method of {@link QueueServiceClient} using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @param options - Options to Queue get properties operation.\n * @returns Response data for the Queue get properties operation.\n */\n public async getProperties(\n options: QueueGetPropertiesOptions = {}\n ): Promise<QueueGetPropertiesResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-getProperties\", options);\n try {\n return assertResponse<QueueGetPropertiesHeaders, QueueGetPropertiesHeaders>(\n await this.queueContext.getProperties({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n })\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets one or more user-defined name-value pairs for the specified queue.\n *\n * If no option provided, or no metadata defined in the option parameter, the queue\n * metadata will be removed.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-queue-metadata\n *\n * @param metadata - If no metadata provided, all existing metadata will be removed.\n * @param options - Options to Queue set metadata operation.\n * @returns Response data for the Queue set metadata operation.\n */\n public async setMetadata(\n metadata?: Metadata,\n options: QueueSetMetadataOptions = {}\n ): Promise<QueueSetMetadataResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-setMetadata\", options);\n try {\n return assertResponse<QueueSetMetadataHeaders, QueueSetMetadataHeaders>(\n await this.queueContext.setMetadata({\n abortSignal: options.abortSignal,\n metadata,\n tracingOptions: updatedOptions.tracingOptions,\n })\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Gets details about any stored access policies specified on the queue that may be used with Shared Access Signatures.\n *\n * WARNING: JavaScript Date will potential lost precision when parsing start and expiry string.\n * For example, new Date(\"2018-12-31T03:44:23.8827891Z\").toISOString() will get \"2018-12-31T03:44:23.882Z\".\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-queue-acl\n *\n * @param options - Options to Queue get access policy operation.\n * @returns Response data for the Queue get access policy operation.\n */\n public async getAccessPolicy(\n options: QueueGetAccessPolicyOptions = {}\n ): Promise<QueueGetAccessPolicyResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-getAccessPolicy\", options);\n try {\n const response = assertResponse<\n QueueGetAccessPolicyHeaders & SignedIdentifierModel[],\n QueueGetAccessPolicyHeaders,\n SignedIdentifierModel[]\n >(\n await this.queueContext.getAccessPolicy({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n })\n );\n\n const res: QueueGetAccessPolicyResponse = {\n _response: response._response,\n date: response.date,\n requestId: response.requestId,\n clientRequestId: response.clientRequestId,\n signedIdentifiers: [],\n version: response.version,\n errorCode: response.errorCode,\n };\n\n for (const identifier of response) {\n let accessPolicy: any = undefined;\n if (identifier.accessPolicy) {\n accessPolicy = {\n permissions: identifier.accessPolicy.permissions,\n };\n\n if (identifier.accessPolicy.expiresOn) {\n accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);\n }\n\n if (identifier.accessPolicy.startsOn) {\n accessPolicy.startsOn = new Date(identifier.accessPolicy.startsOn);\n }\n }\n\n res.signedIdentifiers.push({\n accessPolicy,\n id: identifier.id,\n });\n }\n\n return res;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Sets stored access policies for the queue that may be used with Shared Access Signatures.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-queue-acl\n *\n * @param queueAcl -\n * @param options - Options to Queue set access policy operation.\n * @returns Response data for the Queue set access policy operation.\n */\n public async setAccessPolicy(\n queueAcl?: SignedIdentifier[],\n options: QueueSetAccessPolicyOptions = {}\n ): Promise<QueueSetAccessPolicyResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-setAccessPolicy\", options);\n try {\n const acl: SignedIdentifierModel[] = [];\n for (const identifier of queueAcl || []) {\n acl.push({\n accessPolicy: {\n expiresOn: identifier.accessPolicy.expiresOn\n ? truncatedISO8061Date(identifier.accessPolicy.expiresOn)\n : undefined,\n permissions: identifier.accessPolicy.permissions,\n startsOn: identifier.accessPolicy.startsOn\n ? truncatedISO8061Date(identifier.accessPolicy.startsOn)\n : undefined,\n },\n id: identifier.id,\n });\n }\n\n return assertResponse<QueueSetAccessPolicyHeaders, QueueSetAccessPolicyHeaders>(\n await this.queueContext.setAccessPolicy({\n abortSignal: options.abortSignal,\n queueAcl: acl,\n tracingOptions: updatedOptions.tracingOptions,\n })\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Clear deletes all messages from a queue.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/clear-messages\n *\n * @param options - Options to clear messages operation.\n * @returns Response data for the clear messages operation.\n */\n public async clearMessages(\n options: QueueClearMessagesOptions = {}\n ): Promise<QueueClearMessagesResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-clearMessages\", options);\n try {\n return assertResponse<MessagesClearHeaders, MessagesClearHeaders>(\n await this.messagesContext.clear({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n })\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * sendMessage adds a new message to the back of a queue. The visibility timeout specifies how long\n * the message should be invisible to Dequeue and Peek operations.\n * The message content is up to 64KB in size, and must be in a format that can be included in an XML request with UTF-8 encoding.\n * To include markup in the message, the contents of the message must either be XML-escaped or Base64-encode.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/put-message\n *\n * @param messageText - Text of the message to send\n * @param options - Options to send messages operation.\n * @returns Response data for the send messages operation.\n *\n * Example usage:\n *\n * ```js\n * const sendMessageResponse = await queueClient.sendMessage(\"Hello World!\");\n * console.log(\n * \"Sent message successfully, service assigned message Id:\", sendMessageResponse.messageId,\n * \"service assigned request Id:\", sendMessageResponse.requestId\n * );\n * ```\n */\n public async sendMessage(\n messageText: string,\n options: QueueSendMessageOptions = {}\n ): Promise<QueueSendMessageResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-sendMessage\", options);\n try {\n const response = assertResponse<\n MessagesEnqueueHeaders & EnqueuedMessage[],\n MessagesEnqueueHeaders,\n EnqueuedMessage[]\n >(\n await this.messagesContext.enqueue(\n {\n messageText: messageText,\n },\n updatedOptions\n )\n );\n const item = response[0];\n return {\n _response: response._response,\n date: response.date,\n requestId: response.requestId,\n clientRequestId: response.clientRequestId,\n version: response.version,\n errorCode: response.errorCode,\n messageId: item.messageId,\n popReceipt: item.popReceipt,\n nextVisibleOn: item.nextVisibleOn,\n insertedOn: item.insertedOn,\n expiresOn: item.expiresOn,\n };\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * receiveMessages retrieves one or more messages from the front of the queue.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-messages\n *\n * @param options - Options to receive messages operation.\n * @returns Response data for the receive messages operation.\n *\n * Example usage:\n *\n * ```js\n * const response = await queueClient.receiveMessages();\n * if (response.receivedMessageItems.length == 1) {\n * const receivedMessageItem = response.receivedMessageItems[0];\n * console.log(\"Processing & deleting message with content:\", receivedMessageItem.messageText);\n * const deleteMessageResponse = await queueClient.deleteMessage(\n * receivedMessageItem.messageId,\n * receivedMessageItem.popReceipt\n * );\n * console.log(\n * \"Delete message successfully, service assigned request Id:\",\n * deleteMessageResponse.requestId\n * );\n * }\n * ```\n */\n public async receiveMessages(\n options: QueueReceiveMessageOptions = {}\n ): Promise<QueueReceiveMessageResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-receiveMessages\", options);\n try {\n const response = assertResponse<\n MessagesDequeueHeaders & DequeuedMessageItem[],\n MessagesDequeueHeaders,\n DequeuedMessageItem[]\n >(await this.messagesContext.dequeue(updatedOptions));\n\n const res: QueueReceiveMessageResponse = {\n _response: response._response,\n date: response.date,\n requestId: response.requestId,\n clientRequestId: response.clientRequestId,\n receivedMessageItems: [],\n version: response.version,\n errorCode: response.errorCode,\n };\n\n for (const item of response) {\n res.receivedMessageItems.push(item);\n }\n\n return res;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * peekMessages retrieves one or more messages from the front of the queue but does not alter the visibility of the message.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/peek-messages\n *\n * @param options - Options to peek messages operation.\n * @returns Response data for the peek messages operation.\n *\n * Example usage:\n *\n * ```js\n * const peekMessagesResponse = await queueClient.peekMessages();\n * console.log(\"The peeked message is:\", peekMessagesResponse.peekedMessageItems[0].messageText);\n * ```\n */\n public async peekMessages(\n options: QueuePeekMessagesOptions = {}\n ): Promise<QueuePeekMessagesResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-peekMessages\", options);\n try {\n const response = assertResponse<\n MessagesPeekHeaders & PeekedMessageItem[],\n MessagesPeekHeaders,\n PeekedMessageItem[]\n >(await this.messagesContext.peek(updatedOptions));\n\n const res: QueuePeekMessagesResponse = {\n _response: response._response,\n date: response.date,\n requestId: response.requestId,\n clientRequestId: response.clientRequestId,\n peekedMessageItems: [],\n version: response.version,\n errorCode: response.errorCode,\n };\n\n for (const item of response) {\n res.peekedMessageItems.push(item);\n }\n\n return res;\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * deleteMessage permanently removes the specified message from its queue.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/delete-message2\n *\n * @param messageId - Id of the message.\n * @param popReceipt - A valid pop receipt value returned from an earlier call to the receive messages or update message operation.\n * @param options - Options to delete message operation.\n * @returns Response data for the delete message operation.\n */\n public async deleteMessage(\n messageId: string,\n popReceipt: string,\n options: QueueDeleteMessageOptions = {}\n ): Promise<QueueDeleteMessageResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-deleteMessage\", options);\n try {\n return assertResponse<MessageIdDeleteHeaders, MessageIdDeleteHeaders>(\n await this.getMessageIdContext(messageId).delete(popReceipt, {\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n })\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n /**\n * Update changes a message's visibility timeout and contents.\n * The message content is up to 64KB in size, and must be in a format that can be included in an XML request with UTF-8 encoding.\n * To include markup in the message, the contents of the message must either be XML-escaped or Base64-encode.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/update-message\n *\n * @param messageId - Id of the message\n * @param popReceipt - A valid pop receipt value returned from an earlier call to the receive messages or update message operation.\n * @param message - Message to update. If this parameter is undefined, then the content of the message won't be updated.\n * @param visibilityTimeout - Specifies the new visibility timeout value, in seconds,\n * relative to server time. The new value must be larger than or equal to 0,\n * and cannot be larger than 7 days. The visibility timeout of a message cannot\n * be set to a value later than the expiry time.\n * A message can be updated until it has been deleted or has expired.\n * @param options - Options to update message operation.\n * @returns Response data for the update message operation.\n */\n public async updateMessage(\n messageId: string,\n popReceipt: string,\n message?: string,\n visibilityTimeout?: number,\n options: QueueUpdateMessageOptions = {}\n ): Promise<QueueUpdateMessageResponse> {\n const { span, updatedOptions } = createSpan(\"QueueClient-updateMessage\", options);\n let queueMessage = undefined;\n if (message !== undefined) {\n queueMessage = { messageText: message };\n }\n\n try {\n return assertResponse<MessageIdUpdateHeaders, MessageIdUpdateHeaders>(\n await this.getMessageIdContext(messageId).update(popReceipt, visibilityTimeout || 0, {\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n queueMessage,\n })\n );\n } catch (e: any) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: e.message,\n });\n throw e;\n } finally {\n span.end();\n }\n }\n\n private getQueueNameFromUrl(): string {\n let queueName;\n try {\n // URL may look like the following\n // \"https://myaccount.queue.core.windows.net/myqueue?sasString\".\n // \"https://myaccount.queue.core.windows.net/myqueue\".\n // IPv4/IPv6 address hosts, Endpoints - `http://127.0.0.1:10001/devstoreaccount1/myqueue`\n // http://localhost:10001/devstoreaccount1/queuename\n\n const parsedUrl = new URL(this.url);\n\n if (parsedUrl.hostname.split(\".\")[1] === \"queue\") {\n // \"https://myaccount.queue.core.windows.net/queuename\".\n // .getPath() -> /queuename\n queueName = parsedUrl.pathname.split(\"/\")[1];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/queuename\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/queuename\n // .getPath() -> /devstoreaccount1/queuename\n queueName = parsedUrl.pathname.split(\"/\")[2];\n } else {\n // \"https://customdomain.com/queuename\".\n // .getPath() -> /queuename\n queueName = parsedUrl.pathname.split(\"/\")[1];\n }\n\n if (!queueName) {\n throw new Error(\"Provided queueName is invalid.\");\n }\n\n return queueName;\n } catch (error: any) {\n throw new Error(\"Unable to extract queueName with provided information.\");\n }\n }\n\n /**\n * Only available for QueueClient constructed with a shared key credential.\n *\n * Generates a Service 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://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasUrl(options: QueueGenerateSasUrlOptions): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the SAS when the client is initialized with a shared key credential\"\n );\n }\n\n const sas = generateQueueSASQueryParameters(\n {\n queueName: this.name,\n ...options,\n },\n this.credential\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueueSASPermissions.js","sourceRoot":"","sources":["../../../src/QueueSASPermissions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,k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IAAI,CAAC,GAAG,CAAC,CAAC;SACvB;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a Queue. Setting\n * a value to true means that any SAS which uses these permissions will grant permissions for that operation. Once all\n * the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link QueueSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nexport class QueueSASPermissions {\n /**\n * Creates a {@link QueueSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n public static parse(permissions: string): QueueSASPermissions {\n const queueSASPermissions = new QueueSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n queueSASPermissions.read = true;\n break;\n case \"a\":\n queueSASPermissions.add = true;\n break;\n case \"u\":\n queueSASPermissions.update = true;\n break;\n case \"p\":\n queueSASPermissions.process = true;\n break;\n default:\n throw new RangeError(`Invalid permission: ${char}`);\n }\n }\n\n return queueSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n */\n public read: boolean = false;\n\n /**\n * Specifies Add access granted.\n */\n public add: boolean = false;\n\n /**\n * Specifies Update access granted.\n */\n public update: boolean = false;\n\n /**\n * Specifies Process access granted.\n */\n public process: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * @returns A string which represents the QueueSASPermissions\n */\n public toString(): string {\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.add) {\n permissions.push(\"a\");\n }\n if (this.update) {\n permissions.push(\"u\");\n }\n if (this.process) {\n permissions.push(\"p\");\n }\n return permissions.join(\"\");\n }\n}\n"]}
|
|
@@ -0,0 +1 @@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,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,EAAE,KAAK,CAAC;YAChE,CAAC,CAAC,EAAE;QACN,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,EAAE,uBAAuB,CAAC,SAAS,CAAC;QACpF,uBAAuB,CAAC,UAAU;QAClC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;QACvF,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;QACxE,OAAO;KACR,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEb,MAAM,SAAS,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAEtE,OAAO,IAAI,kBAAkB,CAC3B,OAAO,EACP,SAAS,EACT,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,uBAAuB,CAAC,QAAQ,EAChC,uBAAuB,CAAC,QAAQ,EAChC,uBAAuB,CAAC,SAAS,EACjC,uBAAuB,CAAC,OAAO,EAC/B,uBAAuB,CAAC,UAAU,CACnC,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,WAAmB,EAAE,SAAiB;IAC9D,oCAAoC;IACpC,OAAO,UAAU,WAAW,IAAI,SAAS,EAAE,CAAC;AAC9C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { QueueSASPermissions } from \"./QueueSASPermissions\";\nimport { StorageSharedKeyCredential } from \"../../storage-blob/src/credentials/StorageSharedKeyCredential\";\nimport { SasIPRange, ipRangeToString } from \"./SasIPRange\";\nimport { SASProtocol } from \"./SASQueryParameters\";\nimport { SASQueryParameters } from \"./SASQueryParameters\";\nimport { SERVICE_VERSION } from \"./utils/constants\";\nimport { truncatedISO8061Date } from \"./utils/utils.common\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * QueueSASSignatureValues is used to help generating Queue service SAS tokens for queues.\n */\nexport interface QueueSASSignatureValues {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n */\n expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link QueueSASPermissions}\n * being accessed for help constructing the permissions string.\n */\n permissions?: QueueSASPermissions;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n\n /**\n * The name of the queue the SAS user may access.\n */\n queueName: string;\n\n /**\n * Optional. The name of the access policy on the queue this SAS references if any.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param queueSASSignatureValues -\n * @param sharedKeyCredential -\n */\nexport function generateQueueSASQueryParameters(\n queueSASSignatureValues: QueueSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential\n): SASQueryParameters {\n if (\n !queueSASSignatureValues.identifier &&\n !(queueSASSignatureValues.permissions && queueSASSignatureValues.expiresOn)\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Queue SAS generation when 'identifier' is not provided.\"\n );\n }\n\n const version = queueSASSignatureValues.version\n ? queueSASSignatureValues.version\n : SERVICE_VERSION;\n let verifiedPermissions: string | undefined;\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n if (queueSASSignatureValues.permissions) {\n verifiedPermissions = QueueSASPermissions.parse(\n queueSASSignatureValues.permissions.toString()\n ).toString();\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n queueSASSignatureValues.startsOn\n ? truncatedISO8061Date(queueSASSignatureValues.startsOn, false)\n : \"\",\n queueSASSignatureValues.expiresOn\n ? truncatedISO8061Date(queueSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(sharedKeyCredential.accountName, queueSASSignatureValues.queueName),\n queueSASSignatureValues.identifier,\n queueSASSignatureValues.ipRange ? ipRangeToString(queueSASSignatureValues.ipRange) : \"\",\n queueSASSignatureValues.protocol ? queueSASSignatureValues.protocol : \"\",\n version,\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return new SASQueryParameters(\n version,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n queueSASSignatureValues.protocol,\n queueSASSignatureValues.startsOn,\n queueSASSignatureValues.expiresOn,\n queueSASSignatureValues.ipRange,\n queueSASSignatureValues.identifier\n );\n}\n\nfunction getCanonicalName(accountName: string, queueName: string): string {\n // Queue: \"/queue/account/queueName\"\n return `/queue/${accountName}/${queueName}`;\n}\n"]}
|
|
@@ -1,45 +1,26 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
3
|
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
4
|
-
import { isTokenCredential
|
|
4
|
+
import { isTokenCredential } from "@azure/core-auth";
|
|
5
|
+
import { isNode } from "@azure/core-util";
|
|
5
6
|
import { SpanStatusCode } from "@azure/core-tracing";
|
|
6
|
-
import {
|
|
7
|
-
import { newPipeline, Pipeline } from "./Pipeline";
|
|
7
|
+
import { newPipeline, Pipeline } from "../../storage-blob/src/Pipeline";
|
|
8
8
|
import { StorageClient } from "./StorageClient";
|
|
9
9
|
import "@azure/core-paging";
|
|
10
|
-
import { appendToURLPath, appendToURLQuery, extractConnectionStringParts, } from "./utils/utils.common";
|
|
11
|
-
import { StorageSharedKeyCredential } from "
|
|
12
|
-
import { AnonymousCredential } from "
|
|
10
|
+
import { appendToURLPath, appendToURLQuery, extractConnectionStringParts, assertResponse, } from "./utils/utils.common";
|
|
11
|
+
import { StorageSharedKeyCredential } from "../../storage-blob/src/credentials/StorageSharedKeyCredential";
|
|
12
|
+
import { AnonymousCredential } from "../../storage-blob/src/credentials/AnonymousCredential";
|
|
13
13
|
import { createSpan } from "./utils/tracing";
|
|
14
14
|
import { QueueClient } from "./QueueClient";
|
|
15
15
|
import { AccountSASPermissions } from "./AccountSASPermissions";
|
|
16
16
|
import { generateAccountSASQueryParameters } from "./AccountSASSignatureValues";
|
|
17
17
|
import { AccountSASServices } from "./AccountSASServices";
|
|
18
|
+
import { getDefaultProxySettings } from "@azure/core-rest-pipeline";
|
|
18
19
|
/**
|
|
19
20
|
* A QueueServiceClient represents a URL to the Azure Storage Queue service allowing you
|
|
20
21
|
* to manipulate queues.
|
|
21
22
|
*/
|
|
22
23
|
export class QueueServiceClient extends StorageClient {
|
|
23
|
-
constructor(url, credentialOrPipeline,
|
|
24
|
-
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
25
|
-
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
|
26
|
-
options) {
|
|
27
|
-
let pipeline;
|
|
28
|
-
if (credentialOrPipeline instanceof Pipeline) {
|
|
29
|
-
pipeline = credentialOrPipeline;
|
|
30
|
-
}
|
|
31
|
-
else if ((isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||
|
|
32
|
-
credentialOrPipeline instanceof AnonymousCredential ||
|
|
33
|
-
isTokenCredential(credentialOrPipeline)) {
|
|
34
|
-
pipeline = newPipeline(credentialOrPipeline, options);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
// The second paramter is undefined. Use anonymous credential.
|
|
38
|
-
pipeline = newPipeline(new AnonymousCredential(), options);
|
|
39
|
-
}
|
|
40
|
-
super(url, pipeline);
|
|
41
|
-
this.serviceContext = new Service(this.storageClientContext);
|
|
42
|
-
}
|
|
43
24
|
/**
|
|
44
25
|
* Creates an instance of QueueServiceClient.
|
|
45
26
|
*
|
|
@@ -79,6 +60,26 @@ export class QueueServiceClient extends StorageClient {
|
|
|
79
60
|
throw new Error("Connection string must be either an Account connection string or a SAS connection string");
|
|
80
61
|
}
|
|
81
62
|
}
|
|
63
|
+
constructor(url, credentialOrPipeline,
|
|
64
|
+
// Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
|
|
65
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
|
|
66
|
+
options) {
|
|
67
|
+
let pipeline;
|
|
68
|
+
if (credentialOrPipeline instanceof Pipeline) {
|
|
69
|
+
pipeline = credentialOrPipeline;
|
|
70
|
+
}
|
|
71
|
+
else if ((isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||
|
|
72
|
+
credentialOrPipeline instanceof AnonymousCredential ||
|
|
73
|
+
isTokenCredential(credentialOrPipeline)) {
|
|
74
|
+
pipeline = newPipeline(credentialOrPipeline, options);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
// The second parameter is undefined. Use anonymous credential.
|
|
78
|
+
pipeline = newPipeline(new AnonymousCredential(), options);
|
|
79
|
+
}
|
|
80
|
+
super(url, pipeline);
|
|
81
|
+
this.serviceContext = this.storageClientContext.service;
|
|
82
|
+
}
|
|
82
83
|
/**
|
|
83
84
|
* Creates a {@link QueueClient} object.
|
|
84
85
|
*
|
|
@@ -115,14 +116,14 @@ export class QueueServiceClient extends StorageClient {
|
|
|
115
116
|
options.prefix = undefined;
|
|
116
117
|
}
|
|
117
118
|
try {
|
|
118
|
-
return await this.serviceContext.listQueuesSegment({
|
|
119
|
+
return assertResponse(await this.serviceContext.listQueuesSegment({
|
|
119
120
|
abortSignal: options.abortSignal,
|
|
120
121
|
marker: marker,
|
|
121
122
|
maxPageSize: options.maxPageSize,
|
|
122
123
|
prefix: options.prefix,
|
|
123
124
|
include: options.include === undefined ? undefined : [options.include],
|
|
124
125
|
tracingOptions: updatedOptions.tracingOptions,
|
|
125
|
-
});
|
|
126
|
+
}));
|
|
126
127
|
}
|
|
127
128
|
catch (e) {
|
|
128
129
|
span.setStatus({
|
|
@@ -167,23 +168,30 @@ export class QueueServiceClient extends StorageClient {
|
|
|
167
168
|
*/
|
|
168
169
|
listItems(options = {}) {
|
|
169
170
|
return __asyncGenerator(this, arguments, function* listItems_1() {
|
|
170
|
-
var e_1,
|
|
171
|
+
var _a, e_1, _b, _c;
|
|
171
172
|
if (options.prefix === "") {
|
|
172
173
|
options.prefix = undefined;
|
|
173
174
|
}
|
|
174
175
|
let marker;
|
|
175
176
|
try {
|
|
176
|
-
for (var
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
for (var _d = true, _e = __asyncValues(this.listSegments(marker, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
|
|
178
|
+
_c = _f.value;
|
|
179
|
+
_d = false;
|
|
180
|
+
try {
|
|
181
|
+
const segment = _c;
|
|
182
|
+
if (segment.queueItems) {
|
|
183
|
+
yield __await(yield* __asyncDelegator(__asyncValues(segment.queueItems)));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
finally {
|
|
187
|
+
_d = true;
|
|
180
188
|
}
|
|
181
189
|
}
|
|
182
190
|
}
|
|
183
191
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
184
192
|
finally {
|
|
185
193
|
try {
|
|
186
|
-
if (
|
|
194
|
+
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
187
195
|
}
|
|
188
196
|
finally { if (e_1) throw e_1.error; }
|
|
189
197
|
}
|
|
@@ -212,7 +220,7 @@ export class QueueServiceClient extends StorageClient {
|
|
|
212
220
|
* let iterator = queueServiceClient.listQueues();
|
|
213
221
|
* let item = await iterator.next();
|
|
214
222
|
* while (!item.done) {
|
|
215
|
-
* console.log(`Queue${i}: ${
|
|
223
|
+
* console.log(`Queue${i}: ${item.value.name}`);
|
|
216
224
|
* i++;
|
|
217
225
|
* item = await iterator.next();
|
|
218
226
|
* }
|
|
@@ -305,10 +313,10 @@ export class QueueServiceClient extends StorageClient {
|
|
|
305
313
|
async getProperties(options = {}) {
|
|
306
314
|
const { span, updatedOptions } = createSpan("QueueServiceClient-getProperties", options);
|
|
307
315
|
try {
|
|
308
|
-
return await this.serviceContext.getProperties({
|
|
316
|
+
return assertResponse(await this.serviceContext.getProperties({
|
|
309
317
|
abortSignal: options.abortSignal,
|
|
310
318
|
tracingOptions: updatedOptions.tracingOptions,
|
|
311
|
-
});
|
|
319
|
+
}));
|
|
312
320
|
}
|
|
313
321
|
catch (e) {
|
|
314
322
|
span.setStatus({
|
|
@@ -333,10 +341,10 @@ export class QueueServiceClient extends StorageClient {
|
|
|
333
341
|
async setProperties(properties, options = {}) {
|
|
334
342
|
const { span, updatedOptions } = createSpan("QueueServiceClient-setProperties", options);
|
|
335
343
|
try {
|
|
336
|
-
return await this.serviceContext.setProperties(properties, {
|
|
344
|
+
return assertResponse(await this.serviceContext.setProperties(properties, {
|
|
337
345
|
abortSignal: options.abortSignal,
|
|
338
346
|
tracingOptions: updatedOptions.tracingOptions,
|
|
339
|
-
});
|
|
347
|
+
}));
|
|
340
348
|
}
|
|
341
349
|
catch (e) {
|
|
342
350
|
span.setStatus({
|
|
@@ -361,10 +369,10 @@ export class QueueServiceClient extends StorageClient {
|
|
|
361
369
|
async getStatistics(options = {}) {
|
|
362
370
|
const { span, updatedOptions } = createSpan("QueueServiceClient-getStatistics", options);
|
|
363
371
|
try {
|
|
364
|
-
return await this.serviceContext.getStatistics({
|
|
372
|
+
return assertResponse(await this.serviceContext.getStatistics({
|
|
365
373
|
abortSignal: options.abortSignal,
|
|
366
374
|
tracingOptions: updatedOptions.tracingOptions,
|
|
367
|
-
});
|
|
375
|
+
}));
|
|
368
376
|
}
|
|
369
377
|
catch (e) {
|
|
370
378
|
span.setStatus({
|