@azure/storage-queue 12.27.0-beta.1 → 12.28.0-beta.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/README.md +1 -1
- package/dist/browser/AccountSASPermissions.d.ts +1 -1
- package/dist/browser/AccountSASPermissions.js +2 -2
- package/dist/browser/AccountSASPermissions.js.map +1 -1
- package/dist/browser/AccountSASResourceTypes.d.ts +1 -1
- package/dist/browser/AccountSASResourceTypes.js +1 -1
- package/dist/browser/AccountSASResourceTypes.js.map +1 -1
- package/dist/browser/AccountSASSignatureValues.d.ts +3 -3
- package/dist/browser/AccountSASSignatureValues.js +1 -1
- package/dist/browser/AccountSASSignatureValues.js.map +1 -1
- package/dist/browser/Pipeline.d.ts.map +1 -1
- package/dist/browser/Pipeline.js +2 -1
- package/dist/browser/Pipeline.js.map +1 -1
- package/dist/browser/QueueClient.d.ts +21 -21
- package/dist/browser/QueueClient.d.ts.map +1 -1
- package/dist/browser/QueueClient.js +16 -16
- package/dist/browser/QueueClient.js.map +1 -1
- package/dist/browser/QueueSASSignatureValues.d.ts +1 -1
- package/dist/browser/QueueSASSignatureValues.js.map +1 -1
- package/dist/browser/QueueServiceClient.d.ts +8 -8
- package/dist/browser/QueueServiceClient.js +8 -8
- package/dist/browser/QueueServiceClient.js.map +1 -1
- package/dist/browser/SASQueryParameters.d.ts +1 -1
- package/dist/browser/SASQueryParameters.js.map +1 -1
- package/dist/browser/StorageClient.js +1 -1
- package/dist/browser/StorageClient.js.map +1 -1
- package/dist/browser/generated/src/models/parameters.js +1 -1
- package/dist/browser/generated/src/models/parameters.js.map +1 -1
- package/dist/browser/generated/src/storageClient.js +2 -2
- package/dist/browser/generated/src/storageClient.js.map +1 -1
- package/dist/browser/utils/constants.js +2 -2
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/browser/utils/utils.common.js +1 -1
- package/dist/browser/utils/utils.common.js.map +1 -1
- package/dist/commonjs/AccountSASPermissions.d.ts +1 -1
- package/dist/commonjs/AccountSASPermissions.js +2 -2
- package/dist/commonjs/AccountSASPermissions.js.map +1 -1
- package/dist/commonjs/AccountSASResourceTypes.d.ts +1 -1
- package/dist/commonjs/AccountSASResourceTypes.js +1 -1
- package/dist/commonjs/AccountSASResourceTypes.js.map +1 -1
- package/dist/commonjs/AccountSASSignatureValues.d.ts +3 -3
- package/dist/commonjs/AccountSASSignatureValues.js +1 -1
- package/dist/commonjs/AccountSASSignatureValues.js.map +1 -1
- package/dist/commonjs/Pipeline.d.ts.map +1 -1
- package/dist/commonjs/Pipeline.js +1 -0
- package/dist/commonjs/Pipeline.js.map +1 -1
- package/dist/commonjs/QueueClient.d.ts +21 -21
- package/dist/commonjs/QueueClient.d.ts.map +1 -1
- package/dist/commonjs/QueueClient.js +16 -16
- package/dist/commonjs/QueueClient.js.map +1 -1
- package/dist/commonjs/QueueSASSignatureValues.d.ts +1 -1
- package/dist/commonjs/QueueSASSignatureValues.js.map +1 -1
- package/dist/commonjs/QueueServiceClient.d.ts +8 -8
- package/dist/commonjs/QueueServiceClient.js +8 -8
- package/dist/commonjs/QueueServiceClient.js.map +1 -1
- package/dist/commonjs/SASQueryParameters.d.ts +1 -1
- package/dist/commonjs/SASQueryParameters.js.map +1 -1
- package/dist/commonjs/StorageClient.js +1 -1
- package/dist/commonjs/StorageClient.js.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.js +1 -1
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
- package/dist/commonjs/generated/src/storageClient.js +2 -2
- package/dist/commonjs/generated/src/storageClient.js.map +1 -1
- package/dist/commonjs/utils/constants.js +2 -2
- package/dist/commonjs/utils/constants.js.map +1 -1
- package/dist/commonjs/utils/utils.common.js +1 -1
- package/dist/commonjs/utils/utils.common.js.map +1 -1
- package/dist/esm/AccountSASPermissions.d.ts +1 -1
- package/dist/esm/AccountSASPermissions.js +2 -2
- package/dist/esm/AccountSASPermissions.js.map +1 -1
- package/dist/esm/AccountSASResourceTypes.d.ts +1 -1
- package/dist/esm/AccountSASResourceTypes.js +1 -1
- package/dist/esm/AccountSASResourceTypes.js.map +1 -1
- package/dist/esm/AccountSASSignatureValues.d.ts +3 -3
- package/dist/esm/AccountSASSignatureValues.js +1 -1
- package/dist/esm/AccountSASSignatureValues.js.map +1 -1
- package/dist/esm/Pipeline.d.ts.map +1 -1
- package/dist/esm/Pipeline.js +2 -1
- package/dist/esm/Pipeline.js.map +1 -1
- package/dist/esm/QueueClient.d.ts +21 -21
- package/dist/esm/QueueClient.d.ts.map +1 -1
- package/dist/esm/QueueClient.js +16 -16
- package/dist/esm/QueueClient.js.map +1 -1
- package/dist/esm/QueueSASSignatureValues.d.ts +1 -1
- package/dist/esm/QueueSASSignatureValues.js.map +1 -1
- package/dist/esm/QueueServiceClient.d.ts +8 -8
- package/dist/esm/QueueServiceClient.js +8 -8
- package/dist/esm/QueueServiceClient.js.map +1 -1
- package/dist/esm/SASQueryParameters.d.ts +1 -1
- package/dist/esm/SASQueryParameters.js.map +1 -1
- package/dist/esm/StorageClient.js +1 -1
- package/dist/esm/StorageClient.js.map +1 -1
- package/dist/esm/generated/src/models/parameters.js +1 -1
- package/dist/esm/generated/src/models/parameters.js.map +1 -1
- package/dist/esm/generated/src/storageClient.js +2 -2
- package/dist/esm/generated/src/storageClient.js.map +1 -1
- package/dist/esm/utils/constants.js +2 -2
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/utils.common.js +1 -1
- package/dist/esm/utils/utils.common.js.map +1 -1
- package/dist/react-native/AccountSASPermissions.d.ts +1 -1
- package/dist/react-native/AccountSASPermissions.js +2 -2
- package/dist/react-native/AccountSASPermissions.js.map +1 -1
- package/dist/react-native/AccountSASResourceTypes.d.ts +1 -1
- package/dist/react-native/AccountSASResourceTypes.js +1 -1
- package/dist/react-native/AccountSASResourceTypes.js.map +1 -1
- package/dist/react-native/AccountSASSignatureValues.d.ts +3 -3
- package/dist/react-native/AccountSASSignatureValues.js +1 -1
- package/dist/react-native/AccountSASSignatureValues.js.map +1 -1
- package/dist/react-native/Pipeline.d.ts.map +1 -1
- package/dist/react-native/Pipeline.js +2 -1
- package/dist/react-native/Pipeline.js.map +1 -1
- package/dist/react-native/QueueClient.d.ts +21 -21
- package/dist/react-native/QueueClient.d.ts.map +1 -1
- package/dist/react-native/QueueClient.js +16 -16
- package/dist/react-native/QueueClient.js.map +1 -1
- package/dist/react-native/QueueSASSignatureValues.d.ts +1 -1
- package/dist/react-native/QueueSASSignatureValues.js.map +1 -1
- package/dist/react-native/QueueServiceClient.d.ts +8 -8
- package/dist/react-native/QueueServiceClient.js +8 -8
- package/dist/react-native/QueueServiceClient.js.map +1 -1
- package/dist/react-native/SASQueryParameters.d.ts +1 -1
- package/dist/react-native/SASQueryParameters.js.map +1 -1
- package/dist/react-native/StorageClient.js +1 -1
- package/dist/react-native/StorageClient.js.map +1 -1
- package/dist/react-native/generated/src/models/parameters.js +1 -1
- package/dist/react-native/generated/src/models/parameters.js.map +1 -1
- package/dist/react-native/generated/src/storageClient.js +2 -2
- package/dist/react-native/generated/src/storageClient.js.map +1 -1
- package/dist/react-native/utils/constants.js +2 -2
- package/dist/react-native/utils/constants.js.map +1 -1
- package/dist/react-native/utils/utils.common.js +1 -1
- package/dist/react-native/utils/utils.common.js.map +1 -1
- package/package.json +5 -5
|
@@ -97,7 +97,7 @@ export class QueueClient extends StorageClient {
|
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Creates a new queue under the specified account.
|
|
100
|
-
* @see https://learn.microsoft.com/
|
|
100
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-queue4
|
|
101
101
|
*
|
|
102
102
|
* @param options - Options to Queue create operation.
|
|
103
103
|
* @returns Response data for the Queue create operation.
|
|
@@ -130,7 +130,7 @@ export class QueueClient extends StorageClient {
|
|
|
130
130
|
/**
|
|
131
131
|
* Creates a new queue under the specified account if it doesn't already exist.
|
|
132
132
|
* If the queue already exists, it is not changed.
|
|
133
|
-
* @see https://learn.microsoft.com/
|
|
133
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-queue4
|
|
134
134
|
*
|
|
135
135
|
* @param options -
|
|
136
136
|
*/
|
|
@@ -157,7 +157,7 @@ export class QueueClient extends StorageClient {
|
|
|
157
157
|
}
|
|
158
158
|
/**
|
|
159
159
|
* Deletes the specified queue permanently if it exists.
|
|
160
|
-
* @see https://learn.microsoft.com/
|
|
160
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/delete-queue3
|
|
161
161
|
*
|
|
162
162
|
* @param options -
|
|
163
163
|
*/
|
|
@@ -178,7 +178,7 @@ export class QueueClient extends StorageClient {
|
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
180
|
* Deletes the specified queue permanently.
|
|
181
|
-
* @see https://learn.microsoft.com/
|
|
181
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/delete-queue3
|
|
182
182
|
*
|
|
183
183
|
* @param options - Options to Queue delete operation.
|
|
184
184
|
* @returns Response data for the Queue delete operation.
|
|
@@ -237,7 +237,7 @@ export class QueueClient extends StorageClient {
|
|
|
237
237
|
/**
|
|
238
238
|
* Gets all user-defined metadata and system properties for the specified
|
|
239
239
|
* queue. Metadata is associated with the queue as name-values pairs.
|
|
240
|
-
* @see https://learn.microsoft.com/
|
|
240
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-queue-metadata
|
|
241
241
|
*
|
|
242
242
|
* WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if
|
|
243
243
|
* they originally contained uppercase characters. This differs from the metadata keys returned by
|
|
@@ -257,7 +257,7 @@ export class QueueClient extends StorageClient {
|
|
|
257
257
|
*
|
|
258
258
|
* If no option provided, or no metadata defined in the option parameter, the queue
|
|
259
259
|
* metadata will be removed.
|
|
260
|
-
* @see https://learn.microsoft.com/
|
|
260
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-queue-metadata
|
|
261
261
|
*
|
|
262
262
|
* @param metadata - If no metadata provided, all existing metadata will be removed.
|
|
263
263
|
* @param options - Options to Queue set metadata operation.
|
|
@@ -274,7 +274,7 @@ export class QueueClient extends StorageClient {
|
|
|
274
274
|
* WARNING: JavaScript Date will potential lost precision when parsing start and expiry string.
|
|
275
275
|
* For example, new Date("2018-12-31T03:44:23.8827891Z").toISOString() will get "2018-12-31T03:44:23.882Z".
|
|
276
276
|
*
|
|
277
|
-
* @see https://learn.microsoft.com/
|
|
277
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-queue-acl
|
|
278
278
|
*
|
|
279
279
|
* @param options - Options to Queue get access policy operation.
|
|
280
280
|
* @returns Response data for the Queue get access policy operation.
|
|
@@ -317,7 +317,7 @@ export class QueueClient extends StorageClient {
|
|
|
317
317
|
}
|
|
318
318
|
/**
|
|
319
319
|
* Sets stored access policies for the queue that may be used with Shared Access Signatures.
|
|
320
|
-
* @see https://learn.microsoft.com/
|
|
320
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-queue-acl
|
|
321
321
|
*
|
|
322
322
|
* @param queueAcl -
|
|
323
323
|
* @param options - Options to Queue set access policy operation.
|
|
@@ -345,7 +345,7 @@ export class QueueClient extends StorageClient {
|
|
|
345
345
|
}
|
|
346
346
|
/**
|
|
347
347
|
* Clear deletes all messages from a queue.
|
|
348
|
-
* @see https://learn.microsoft.com/
|
|
348
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/clear-messages
|
|
349
349
|
*
|
|
350
350
|
* @param options - Options to clear messages operation.
|
|
351
351
|
* @returns Response data for the clear messages operation.
|
|
@@ -360,7 +360,7 @@ export class QueueClient extends StorageClient {
|
|
|
360
360
|
* the message should be invisible to Dequeue and Peek operations.
|
|
361
361
|
* 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.
|
|
362
362
|
* To include markup in the message, the contents of the message must either be XML-escaped or Base64-encode.
|
|
363
|
-
* @see https://learn.microsoft.com/
|
|
363
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/put-message
|
|
364
364
|
*
|
|
365
365
|
* @param messageText - Text of the message to send
|
|
366
366
|
* @param options - Options to send messages operation.
|
|
@@ -410,7 +410,7 @@ export class QueueClient extends StorageClient {
|
|
|
410
410
|
}
|
|
411
411
|
/**
|
|
412
412
|
* receiveMessages retrieves one or more messages from the front of the queue.
|
|
413
|
-
* @see https://learn.microsoft.com/
|
|
413
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-messages
|
|
414
414
|
*
|
|
415
415
|
* @param options - Options to receive messages operation.
|
|
416
416
|
* @returns Response data for the receive messages operation.
|
|
@@ -463,7 +463,7 @@ export class QueueClient extends StorageClient {
|
|
|
463
463
|
}
|
|
464
464
|
/**
|
|
465
465
|
* peekMessages retrieves one or more messages from the front of the queue but does not alter the visibility of the message.
|
|
466
|
-
* @see https://learn.microsoft.com/
|
|
466
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/peek-messages
|
|
467
467
|
*
|
|
468
468
|
* @param options - Options to peek messages operation.
|
|
469
469
|
* @returns Response data for the peek messages operation.
|
|
@@ -506,7 +506,7 @@ export class QueueClient extends StorageClient {
|
|
|
506
506
|
}
|
|
507
507
|
/**
|
|
508
508
|
* deleteMessage permanently removes the specified message from its queue.
|
|
509
|
-
* @see https://learn.microsoft.com/
|
|
509
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/delete-message2
|
|
510
510
|
*
|
|
511
511
|
* @param messageId - Id of the message.
|
|
512
512
|
* @param popReceipt - A valid pop receipt value returned from an earlier call to the receive messages or update message operation.
|
|
@@ -522,7 +522,7 @@ export class QueueClient extends StorageClient {
|
|
|
522
522
|
* Update changes a message's visibility timeout and contents.
|
|
523
523
|
* 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.
|
|
524
524
|
* To include markup in the message, the contents of the message must either be XML-escaped or Base64-encode.
|
|
525
|
-
* @see https://learn.microsoft.com/
|
|
525
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/update-message
|
|
526
526
|
*
|
|
527
527
|
* @param messageId - Id of the message
|
|
528
528
|
* @param popReceipt - A valid pop receipt value returned from an earlier call to the receive messages or update message operation.
|
|
@@ -588,7 +588,7 @@ export class QueueClient extends StorageClient {
|
|
|
588
588
|
* Generates a Service Shared Access Signature (SAS) URI based on the client properties
|
|
589
589
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
590
590
|
*
|
|
591
|
-
* @see https://learn.microsoft.com/
|
|
591
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
|
592
592
|
*
|
|
593
593
|
* @param options - Optional parameters.
|
|
594
594
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
@@ -606,7 +606,7 @@ export class QueueClient extends StorageClient {
|
|
|
606
606
|
* Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties
|
|
607
607
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
608
608
|
*
|
|
609
|
-
* @see https://learn.microsoft.com/
|
|
609
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
|
610
610
|
*
|
|
611
611
|
* @param options - Optional parameters.
|
|
612
612
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueueClient.js","sourceRoot":"","sources":["../../src/QueueClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AA8B1C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE5E,OAAO,EACL,eAAe,EACf,4BAA4B,EAC5B,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0B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KAAU,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAC5E,CAAC;IACH,CAAC;IAED;;;;;;;;;;OAUG;IACI,cAAc,CAAC,OAAmC;QACvD,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,0BAA0B,CAAC,EAAE,CAAC;YAC7D,MAAM,UAAU,CACd,uFAAuF,CACxF,CAAC;QACJ,CAAC;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;IAED;;;;;;;;;;OAUG;IACH,gEAAgE;IACzD,uBAAuB,CAAC,OAAmC;QAChE,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,0BAA0B,CAAC,EAAE,CAAC;YAC7D,MAAM,UAAU,CACd,uFAAuF,CACxF,CAAC;QACJ,CAAC;QAED,OAAO,uCAAuC,iBAE1C,SAAS,EAAE,IAAI,CAAC,IAAI,IACjB,OAAO,GAEZ,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { isNode } from \"@azure/core-util\";\nimport type {\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.js\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { Messages, MessageId, Queue } from \"./generated/src/operationsInterfaces/index.js\";\nimport type { StoragePipelineOptions, Pipeline } from \"./Pipeline.js\";\nimport { newPipeline, isPipelineLike } from \"./Pipeline.js\";\nimport type { CommonOptions } from \"./StorageClient.js\";\nimport { StorageClient, getStorageClientContext } from \"./StorageClient.js\";\nimport type { WithResponse } from \"./utils/utils.common.js\";\nimport {\n appendToURLPath,\n extractConnectionStringParts,\n isIpEndpointStyle,\n truncatedISO8061Date,\n appendToURLQuery,\n assertResponse,\n} from \"./utils/utils.common.js\";\nimport { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport type { Metadata } from \"./models.js\";\nimport {\n generateQueueSASQueryParameters,\n generateQueueSASQueryParametersInternal,\n} from \"./QueueSASSignatureValues.js\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport type { QueueSASPermissions } from \"./QueueSASPermissions.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\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://learn.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://learn.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 * 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 MessagesDequeueOptionalParams extends CommonOptions {\n /** The The timeout parameter is expressed in seconds. For more information, see <a href=\"https://learn.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 * 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 MessagesPeekOptionalParams extends CommonOptions {\n /** The The timeout parameter is expressed in seconds. For more information, see <a href=\"https://learn.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 * 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 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://learn.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 (isPipelineLike(credentialOrPipelineOrQueueName)) {\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://learn.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 * ```ts snippet:ReadmeSampleCreateQueue\n * import { QueueServiceClient } from \"@azure/storage-queue\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const queueName = \"<valid queue name>\";\n * const queueClient = queueServiceClient.getQueueClient(queueName);\n * const createQueueResponse = await queueClient.create();\n * console.log(\n * `Created queue ${queueName} successfully, service assigned request Id: ${createQueueResponse.requestId}`,\n * );\n * ```\n */\n public async create(options: QueueCreateOptions = {}): Promise<QueueCreateResponse> {\n return tracingClient.withSpan(\"QueueClient-create\", options, async (updatedOptions) => {\n return assertResponse<QueueCreateHeaders, QueueCreateHeaders>(\n await this.queueContext.create(updatedOptions),\n );\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://learn.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 return tracingClient.withSpan(\n \"QueueClient-createIfNotExists\",\n options,\n async (updatedOptions) => {\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 return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response,\n };\n }\n\n throw e;\n }\n },\n );\n }\n\n /**\n * Deletes the specified queue permanently if it exists.\n * @see https://learn.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 return tracingClient.withSpan(\"QueueClient-deleteIfExists\", options, async (updatedOptions) => {\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 return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response,\n };\n }\n throw e;\n }\n });\n }\n\n /**\n * Deletes the specified queue permanently.\n * @see https://learn.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 * ```ts snippet:ReadmeSampleDeleteQueue\n * import { QueueServiceClient } from \"@azure/storage-queue\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const queueName = \"<valid queue name>\";\n * const queueClient = queueServiceClient.getQueueClient(queueName);\n * const deleteQueueResponse = await queueClient.delete();\n * console.log(\n * `Deleted queue successfully, service assigned request Id: ${deleteQueueResponse.requestId}`,\n * );\n * ```\n */\n public async delete(options: QueueDeleteOptions = {}): Promise<QueueDeleteResponse> {\n return tracingClient.withSpan(\"QueueClient-delete\", options, async (updatedOptions) => {\n return assertResponse<QueueDeleteHeaders, QueueDeleteHeaders>(\n await this.queueContext.delete({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\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 return tracingClient.withSpan(\"QueueClient-exists\", options, async (updatedOptions) => {\n try {\n await this.getProperties(updatedOptions);\n return true;\n } catch (e: any) {\n if (e.statusCode === 404) {\n return false;\n }\n throw e;\n }\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://learn.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 return tracingClient.withSpan(\"QueueClient-getProperties\", options, async (updatedOptions) => {\n return assertResponse<QueueGetPropertiesHeaders, QueueGetPropertiesHeaders>(\n await this.queueContext.getProperties(updatedOptions),\n );\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://learn.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 return tracingClient.withSpan(\"QueueClient-setMetadata\", options, async (updatedOptions) => {\n return assertResponse<QueueSetMetadataHeaders, QueueSetMetadataHeaders>(\n await this.queueContext.setMetadata({\n ...updatedOptions,\n metadata,\n }),\n );\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://learn.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 return tracingClient.withSpan(\n \"QueueClient-getAccessPolicy\",\n options,\n async (updatedOptions) => {\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 },\n );\n }\n\n /**\n * Sets stored access policies for the queue that may be used with Shared Access Signatures.\n * @see https://learn.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 return tracingClient.withSpan(\n \"QueueClient-setAccessPolicy\",\n options,\n async (updatedOptions) => {\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 ...updatedOptions,\n queueAcl: acl,\n }),\n );\n },\n );\n }\n\n /**\n * Clear deletes all messages from a queue.\n * @see https://learn.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 return tracingClient.withSpan(\"QueueClient-clearMessages\", options, async (updatedOptions) => {\n return assertResponse<MessagesClearHeaders, MessagesClearHeaders>(\n await this.messagesContext.clear(updatedOptions),\n );\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://learn.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 * ```ts snippet:ReadmeSampleSendMessage\n * import { QueueServiceClient } from \"@azure/storage-queue\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const queueName = \"<valid queue name>\";\n * const queueClient = queueServiceClient.getQueueClient(queueName);\n * // Send a message into the queue using the sendMessage method.\n * const sendMessageResponse = await queueClient.sendMessage(\"Hello World!\");\n * console.log(\n * `Sent message successfully, service assigned message Id: ${sendMessageResponse.messageId}, service assigned request Id: ${sendMessageResponse.requestId}`,\n * );\n * ```\n */\n public async sendMessage(\n messageText: string,\n options: QueueSendMessageOptions = {},\n ): Promise<QueueSendMessageResponse> {\n return tracingClient.withSpan(\"QueueClient-sendMessage\", options, async (updatedOptions) => {\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 });\n }\n\n /**\n * receiveMessages retrieves one or more messages from the front of the queue.\n * @see https://learn.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 * ```ts snippet:ReadmeSampleReceiveMessage\n * import { QueueServiceClient } from \"@azure/storage-queue\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const queueName = \"<valid queue name>\";\n * const queueClient = queueServiceClient.getQueueClient(queueName);\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: ${deleteMessageResponse.requestId}`,\n * );\n * }\n * ```\n */\n public async receiveMessages(\n options: QueueReceiveMessageOptions = {},\n ): Promise<QueueReceiveMessageResponse> {\n return tracingClient.withSpan(\n \"QueueClient-receiveMessages\",\n options,\n async (updatedOptions) => {\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 },\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://learn.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 * ```ts snippet:ReadmeSamplePeekMessage\n * import { QueueServiceClient } from \"@azure/storage-queue\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const queueName = \"<valid queue name>\";\n * const queueClient = queueServiceClient.getQueueClient(queueName);\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 return tracingClient.withSpan(\"QueueClient-peekMessages\", options, async (updatedOptions) => {\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 });\n }\n\n /**\n * deleteMessage permanently removes the specified message from its queue.\n * @see https://learn.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 return tracingClient.withSpan(\"QueueClient-deleteMessage\", options, async (updatedOptions) => {\n return assertResponse<MessageIdDeleteHeaders, MessageIdDeleteHeaders>(\n await this.getMessageIdContext(messageId).delete(popReceipt, updatedOptions),\n );\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://learn.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 return tracingClient.withSpan(\"QueueClient-updateMessage\", options, async (updatedOptions) => {\n let queueMessage = undefined;\n if (message !== undefined) {\n queueMessage = { messageText: message };\n }\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 });\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://learn.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 /**\n * Only available for QueueClient constructed with a shared key credential.\n *\n * Generates string to sign for 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://learn.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 /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n public generateSasStringToSign(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 return generateQueueSASQueryParametersInternal(\n {\n queueName: this.name,\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"QueueClient.js","sourceRoot":"","sources":["../../src/QueueClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AA8B1C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAE5E,OAAO,EACL,eAAe,EACf,4BAA4B,EAC5B,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EACL,+BAA+B,EAC/B,uCAAuC,GACxC,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AA8WpE;;GAEG;AACH,MAAM,OAAO,WAAY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A+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;IAED;;;;;;;;;;OAUG;IACH,gEAAgE;IACzD,uBAAuB,CAAC,OAAmC;QAChE,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,0BAA0B,CAAC,EAAE,CAAC;YAC7D,MAAM,UAAU,CACd,uFAAuF,CACxF,CAAC;QACJ,CAAC;QAED,OAAO,uCAAuC,iBAE1C,SAAS,EAAE,IAAI,CAAC,IAAI,IACjB,OAAO,GAEZ,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { isNode } from \"@azure/core-util\";\nimport type {\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.js\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { Messages, MessageId, Queue } from \"./generated/src/operationsInterfaces/index.js\";\nimport type { StoragePipelineOptions, Pipeline } from \"./Pipeline.js\";\nimport { newPipeline, isPipelineLike } from \"./Pipeline.js\";\nimport type { CommonOptions } from \"./StorageClient.js\";\nimport { StorageClient, getStorageClientContext } from \"./StorageClient.js\";\nimport type { WithResponse } from \"./utils/utils.common.js\";\nimport {\n appendToURLPath,\n extractConnectionStringParts,\n isIpEndpointStyle,\n truncatedISO8061Date,\n appendToURLQuery,\n assertResponse,\n} from \"./utils/utils.common.js\";\nimport { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport type { Metadata } from \"./models.js\";\nimport {\n generateQueueSASQueryParameters,\n generateQueueSASQueryParametersInternal,\n} from \"./QueueSASSignatureValues.js\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport type { QueueSASPermissions } from \"./QueueSASPermissions.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\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://learn.microsoft.com/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://learn.microsoft.com/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 * 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 MessagesDequeueOptionalParams extends CommonOptions {\n /** The The timeout parameter is expressed in seconds. For more information, see <a href=\"https://learn.microsoft.com/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 * 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 MessagesPeekOptionalParams extends CommonOptions {\n /** The The timeout parameter is expressed in seconds. For more information, see <a href=\"https://learn.microsoft.com/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 * 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 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://learn.microsoft.com/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 (isPipelineLike(credentialOrPipelineOrQueueName)) {\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://learn.microsoft.com/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 * ```ts snippet:ReadmeSampleCreateQueue\n * import { QueueServiceClient } from \"@azure/storage-queue\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const queueName = \"<valid queue name>\";\n * const queueClient = queueServiceClient.getQueueClient(queueName);\n * const createQueueResponse = await queueClient.create();\n * console.log(\n * `Created queue ${queueName} successfully, service assigned request Id: ${createQueueResponse.requestId}`,\n * );\n * ```\n */\n public async create(options: QueueCreateOptions = {}): Promise<QueueCreateResponse> {\n return tracingClient.withSpan(\"QueueClient-create\", options, async (updatedOptions) => {\n return assertResponse<QueueCreateHeaders, QueueCreateHeaders>(\n await this.queueContext.create(updatedOptions),\n );\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://learn.microsoft.com/rest/api/storageservices/create-queue4\n *\n * @param options -\n */\n public async createIfNotExists(\n options: QueueCreateOptions = {},\n ): Promise<QueueCreateIfNotExistsResponse> {\n return tracingClient.withSpan(\n \"QueueClient-createIfNotExists\",\n options,\n async (updatedOptions) => {\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 return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response,\n };\n }\n\n throw e;\n }\n },\n );\n }\n\n /**\n * Deletes the specified queue permanently if it exists.\n * @see https://learn.microsoft.com/rest/api/storageservices/delete-queue3\n *\n * @param options -\n */\n public async deleteIfExists(\n options: QueueDeleteOptions = {},\n ): Promise<QueueDeleteIfExistsResponse> {\n return tracingClient.withSpan(\"QueueClient-deleteIfExists\", options, async (updatedOptions) => {\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 return {\n succeeded: false,\n ...e.response?.parsedHeaders,\n _response: e.response,\n };\n }\n throw e;\n }\n });\n }\n\n /**\n * Deletes the specified queue permanently.\n * @see https://learn.microsoft.com/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 * ```ts snippet:ReadmeSampleDeleteQueue\n * import { QueueServiceClient } from \"@azure/storage-queue\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const queueName = \"<valid queue name>\";\n * const queueClient = queueServiceClient.getQueueClient(queueName);\n * const deleteQueueResponse = await queueClient.delete();\n * console.log(\n * `Deleted queue successfully, service assigned request Id: ${deleteQueueResponse.requestId}`,\n * );\n * ```\n */\n public async delete(options: QueueDeleteOptions = {}): Promise<QueueDeleteResponse> {\n return tracingClient.withSpan(\"QueueClient-delete\", options, async (updatedOptions) => {\n return assertResponse<QueueDeleteHeaders, QueueDeleteHeaders>(\n await this.queueContext.delete({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\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 return tracingClient.withSpan(\"QueueClient-exists\", options, async (updatedOptions) => {\n try {\n await this.getProperties(updatedOptions);\n return true;\n } catch (e: any) {\n if (e.statusCode === 404) {\n return false;\n }\n throw e;\n }\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://learn.microsoft.com/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 return tracingClient.withSpan(\"QueueClient-getProperties\", options, async (updatedOptions) => {\n return assertResponse<QueueGetPropertiesHeaders, QueueGetPropertiesHeaders>(\n await this.queueContext.getProperties(updatedOptions),\n );\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://learn.microsoft.com/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 return tracingClient.withSpan(\"QueueClient-setMetadata\", options, async (updatedOptions) => {\n return assertResponse<QueueSetMetadataHeaders, QueueSetMetadataHeaders>(\n await this.queueContext.setMetadata({\n ...updatedOptions,\n metadata,\n }),\n );\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://learn.microsoft.com/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 return tracingClient.withSpan(\n \"QueueClient-getAccessPolicy\",\n options,\n async (updatedOptions) => {\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 },\n );\n }\n\n /**\n * Sets stored access policies for the queue that may be used with Shared Access Signatures.\n * @see https://learn.microsoft.com/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 return tracingClient.withSpan(\n \"QueueClient-setAccessPolicy\",\n options,\n async (updatedOptions) => {\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 ...updatedOptions,\n queueAcl: acl,\n }),\n );\n },\n );\n }\n\n /**\n * Clear deletes all messages from a queue.\n * @see https://learn.microsoft.com/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 return tracingClient.withSpan(\"QueueClient-clearMessages\", options, async (updatedOptions) => {\n return assertResponse<MessagesClearHeaders, MessagesClearHeaders>(\n await this.messagesContext.clear(updatedOptions),\n );\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://learn.microsoft.com/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 * ```ts snippet:ReadmeSampleSendMessage\n * import { QueueServiceClient } from \"@azure/storage-queue\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const queueName = \"<valid queue name>\";\n * const queueClient = queueServiceClient.getQueueClient(queueName);\n * // Send a message into the queue using the sendMessage method.\n * const sendMessageResponse = await queueClient.sendMessage(\"Hello World!\");\n * console.log(\n * `Sent message successfully, service assigned message Id: ${sendMessageResponse.messageId}, service assigned request Id: ${sendMessageResponse.requestId}`,\n * );\n * ```\n */\n public async sendMessage(\n messageText: string,\n options: QueueSendMessageOptions = {},\n ): Promise<QueueSendMessageResponse> {\n return tracingClient.withSpan(\"QueueClient-sendMessage\", options, async (updatedOptions) => {\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 });\n }\n\n /**\n * receiveMessages retrieves one or more messages from the front of the queue.\n * @see https://learn.microsoft.com/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 * ```ts snippet:ReadmeSampleReceiveMessage\n * import { QueueServiceClient } from \"@azure/storage-queue\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const queueName = \"<valid queue name>\";\n * const queueClient = queueServiceClient.getQueueClient(queueName);\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: ${deleteMessageResponse.requestId}`,\n * );\n * }\n * ```\n */\n public async receiveMessages(\n options: QueueReceiveMessageOptions = {},\n ): Promise<QueueReceiveMessageResponse> {\n return tracingClient.withSpan(\n \"QueueClient-receiveMessages\",\n options,\n async (updatedOptions) => {\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 },\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://learn.microsoft.com/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 * ```ts snippet:ReadmeSamplePeekMessage\n * import { QueueServiceClient } from \"@azure/storage-queue\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const queueName = \"<valid queue name>\";\n * const queueClient = queueServiceClient.getQueueClient(queueName);\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 return tracingClient.withSpan(\"QueueClient-peekMessages\", options, async (updatedOptions) => {\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 });\n }\n\n /**\n * deleteMessage permanently removes the specified message from its queue.\n * @see https://learn.microsoft.com/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 return tracingClient.withSpan(\"QueueClient-deleteMessage\", options, async (updatedOptions) => {\n return assertResponse<MessageIdDeleteHeaders, MessageIdDeleteHeaders>(\n await this.getMessageIdContext(messageId).delete(popReceipt, updatedOptions),\n );\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://learn.microsoft.com/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 return tracingClient.withSpan(\"QueueClient-updateMessage\", options, async (updatedOptions) => {\n let queueMessage = undefined;\n if (message !== undefined) {\n queueMessage = { messageText: message };\n }\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 });\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://learn.microsoft.com/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 /**\n * Only available for QueueClient constructed with a shared key credential.\n *\n * Generates string to sign for 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://learn.microsoft.com/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 /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n public generateSasStringToSign(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 return generateQueueSASQueryParametersInternal(\n {\n queueName: this.name,\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n}\n"]}
|
|
@@ -43,7 +43,7 @@ export interface QueueSASSignatureValues {
|
|
|
43
43
|
/**
|
|
44
44
|
* Optional. The name of the access policy on the queue this SAS references if any.
|
|
45
45
|
*
|
|
46
|
-
* @see https://learn.microsoft.com/
|
|
46
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy
|
|
47
47
|
*/
|
|
48
48
|
identifier?: string;
|
|
49
49
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueueSASSignatureValues.js","sourceRoot":"","sources":["../../src/QueueSASSignatureValues.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAsD/D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,+BAA+B,CAC7C,uBAAgD,EAChD,mBAA+C;IAE/C,OAAO,uCAAuC,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;SACzF,kBAAkB,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,uCAAuC,CACrD,uBAAgD,EAChD,mBAA+C;IAE/C,IACE,CAAC,uBAAuB,CAAC,UAAU;QACnC,CAAC,CAAC,uBAAuB,CAAC,WAAW,IAAI,uBAAuB,CAAC,SAAS,CAAC,EAC3E,CAAC;QACD,MAAM,IAAI,UAAU,CAClB,wGAAwG,CACzG,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,uBAAuB,CAAC,OAAO;QAC7C,CAAC,CAAC,uBAAuB,CAAC,OAAO;QACjC,CAAC,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AAuB,CAAC,UAAU,CACnC;QACD,YAAY,EAAE,YAAY;KAC3B,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.js\";\nimport type { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport { SASQueryParameters } from \"./SASQueryParameters.js\";\nimport { SERVICE_VERSION } from \"./utils/constants.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\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://learn.microsoft.com/
|
|
1
|
+
{"version":3,"file":"QueueSASSignatureValues.js","sourceRoot":"","sources":["../../src/QueueSASSignatureValues.ts"],"names":[],"mappings":"AAAA,uCA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AC/D,CAAC,CAAC,EAAE;QACN,uBAAuB,CAAC,SAAS;YAC/B,CAAC,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;QACL,kBAAkB,EAAE,IAAI,kBAAkB,CACxC,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;QACD,YAAY,EAAE,YAAY;KAC3B,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.js\";\nimport type { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport { SASQueryParameters } from \"./SASQueryParameters.js\";\nimport { SERVICE_VERSION } from \"./utils/constants.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\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://learn.microsoft.com/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 return generateQueueSASQueryParametersInternal(queueSASSignatureValues, sharedKeyCredential)\n .sasQueryParameters;\n}\n\nexport function generateQueueSASQueryParametersInternal(\n queueSASSignatureValues: QueueSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\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 {\n sasQueryParameters: 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 stringToSign: stringToSign,\n };\n}\n\nfunction getCanonicalName(accountName: string, queueName: string): string {\n // Queue: \"/queue/account/queueName\"\n return `/queue/${accountName}/${queueName}`;\n}\n"]}
|
|
@@ -195,7 +195,7 @@ export declare class QueueServiceClient extends StorageClient {
|
|
|
195
195
|
getQueueClient(queueName: string): QueueClient;
|
|
196
196
|
/**
|
|
197
197
|
* Returns a list of the queues under the specified account.
|
|
198
|
-
* @see https://learn.microsoft.com/
|
|
198
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/list-queues1
|
|
199
199
|
*
|
|
200
200
|
* @param marker - A string value that identifies the portion of
|
|
201
201
|
* the list of queues to be returned with the next listing operation. The
|
|
@@ -333,7 +333,7 @@ export declare class QueueServiceClient extends StorageClient {
|
|
|
333
333
|
/**
|
|
334
334
|
* Gets the properties of a storage account’s Queue service, including properties
|
|
335
335
|
* for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
|
336
|
-
* @see https://learn.microsoft.com/
|
|
336
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-queue-service-properties
|
|
337
337
|
*
|
|
338
338
|
* @param options - Options to get properties operation.
|
|
339
339
|
* @returns Response data including the queue service properties.
|
|
@@ -342,7 +342,7 @@ export declare class QueueServiceClient extends StorageClient {
|
|
|
342
342
|
/**
|
|
343
343
|
* Sets properties for a storage account’s Queue service endpoint, including properties
|
|
344
344
|
* for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
|
|
345
|
-
* @see https://learn.microsoft.com/
|
|
345
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-queue-service-properties
|
|
346
346
|
*
|
|
347
347
|
* @param properties -
|
|
348
348
|
* @param options - Options to set properties operation.
|
|
@@ -353,7 +353,7 @@ export declare class QueueServiceClient extends StorageClient {
|
|
|
353
353
|
* Retrieves statistics related to replication for the Queue service. It is only
|
|
354
354
|
* available on the secondary location endpoint when read-access geo-redundant
|
|
355
355
|
* replication is enabled for the storage account.
|
|
356
|
-
* @see https://learn.microsoft.com/
|
|
356
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-queue-service-stats
|
|
357
357
|
*
|
|
358
358
|
* @param options - Options to get statistics operation.
|
|
359
359
|
* @returns Response data for get statistics the operation.
|
|
@@ -361,7 +361,7 @@ export declare class QueueServiceClient extends StorageClient {
|
|
|
361
361
|
getStatistics(options?: ServiceGetStatisticsOptions): Promise<ServiceGetStatisticsResponse>;
|
|
362
362
|
/**
|
|
363
363
|
* Creates a new queue under the specified account.
|
|
364
|
-
* @see https://learn.microsoft.com/
|
|
364
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-queue4
|
|
365
365
|
*
|
|
366
366
|
* @param queueName - name of the queue to create
|
|
367
367
|
* @param options - Options to Queue create operation.
|
|
@@ -370,7 +370,7 @@ export declare class QueueServiceClient extends StorageClient {
|
|
|
370
370
|
createQueue(queueName: string, options?: QueueCreateOptions): Promise<QueueCreateResponse>;
|
|
371
371
|
/**
|
|
372
372
|
* Deletes the specified queue permanently.
|
|
373
|
-
* @see https://learn.microsoft.com/
|
|
373
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/delete-queue3
|
|
374
374
|
*
|
|
375
375
|
* @param queueName - name of the queue to delete.
|
|
376
376
|
* @param options - Options to Queue delete operation.
|
|
@@ -383,7 +383,7 @@ export declare class QueueServiceClient extends StorageClient {
|
|
|
383
383
|
* Generates an account Shared Access Signature (SAS) URI based on the client properties
|
|
384
384
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
385
385
|
*
|
|
386
|
-
* @see https://learn.microsoft.com/
|
|
386
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas
|
|
387
387
|
*
|
|
388
388
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.
|
|
389
389
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
|
@@ -398,7 +398,7 @@ export declare class QueueServiceClient extends StorageClient {
|
|
|
398
398
|
* Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties
|
|
399
399
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
|
400
400
|
*
|
|
401
|
-
* @see https://learn.microsoft.com/
|
|
401
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas
|
|
402
402
|
*
|
|
403
403
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.
|
|
404
404
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|