@azure/storage-queue 12.28.1 → 12.29.0-alpha.20251201.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.
Files changed (222) hide show
  1. package/dist/browser/QueueClient.d.ts +25 -1
  2. package/dist/browser/QueueClient.d.ts.map +1 -1
  3. package/dist/browser/QueueClient.js +35 -0
  4. package/dist/browser/QueueClient.js.map +1 -1
  5. package/dist/browser/QueueSASSignatureValues.d.ts +9 -2
  6. package/dist/browser/QueueSASSignatureValues.d.ts.map +1 -1
  7. package/dist/browser/QueueSASSignatureValues.js +72 -19
  8. package/dist/browser/QueueSASSignatureValues.js.map +1 -1
  9. package/dist/browser/QueueServiceClient.d.ts +23 -1
  10. package/dist/browser/QueueServiceClient.d.ts.map +1 -1
  11. package/dist/browser/QueueServiceClient.js +41 -1
  12. package/dist/browser/QueueServiceClient.js.map +1 -1
  13. package/dist/browser/SASQueryParameters.d.ts +38 -1
  14. package/dist/browser/SASQueryParameters.d.ts.map +1 -1
  15. package/dist/browser/SASQueryParameters.js +87 -2
  16. package/dist/browser/SASQueryParameters.js.map +1 -1
  17. package/dist/browser/generated/src/models/index.d.ts +66 -16
  18. package/dist/browser/generated/src/models/index.d.ts.map +1 -1
  19. package/dist/browser/generated/src/models/index.js.map +1 -1
  20. package/dist/browser/generated/src/models/mappers.d.ts +4 -0
  21. package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
  22. package/dist/browser/generated/src/models/mappers.js +641 -492
  23. package/dist/browser/generated/src/models/mappers.js.map +1 -1
  24. package/dist/browser/generated/src/models/parameters.d.ts +3 -1
  25. package/dist/browser/generated/src/models/parameters.d.ts.map +1 -1
  26. package/dist/browser/generated/src/models/parameters.js +107 -92
  27. package/dist/browser/generated/src/models/parameters.js.map +1 -1
  28. package/dist/browser/generated/src/operations/messageId.js +11 -11
  29. package/dist/browser/generated/src/operations/messageId.js.map +1 -1
  30. package/dist/browser/generated/src/operations/messages.js +33 -31
  31. package/dist/browser/generated/src/operations/messages.js.map +1 -1
  32. package/dist/browser/generated/src/operations/queue.js +38 -38
  33. package/dist/browser/generated/src/operations/queue.js.map +1 -1
  34. package/dist/browser/generated/src/operations/service.d.ts +8 -1
  35. package/dist/browser/generated/src/operations/service.d.ts.map +1 -1
  36. package/dist/browser/generated/src/operations/service.js +65 -25
  37. package/dist/browser/generated/src/operations/service.js.map +1 -1
  38. package/dist/browser/generated/src/operationsInterfaces/messageId.js.map +1 -1
  39. package/dist/browser/generated/src/operationsInterfaces/messages.js.map +1 -1
  40. package/dist/browser/generated/src/operationsInterfaces/queue.js.map +1 -1
  41. package/dist/browser/generated/src/operationsInterfaces/service.d.ts +8 -1
  42. package/dist/browser/generated/src/operationsInterfaces/service.d.ts.map +1 -1
  43. package/dist/browser/generated/src/operationsInterfaces/service.js.map +1 -1
  44. package/dist/browser/generated/src/storageClient.d.ts.map +1 -1
  45. package/dist/browser/generated/src/storageClient.js +6 -6
  46. package/dist/browser/generated/src/storageClient.js.map +1 -1
  47. package/dist/browser/generatedModels.d.ts +7 -2
  48. package/dist/browser/generatedModels.d.ts.map +1 -1
  49. package/dist/browser/generatedModels.js.map +1 -1
  50. package/dist/browser/index-browser.d.mts.map +1 -1
  51. package/dist/browser/index-browser.mjs.map +1 -1
  52. package/dist/browser/index.d.ts +1 -1
  53. package/dist/browser/utils/constants.d.ts.map +1 -1
  54. package/dist/browser/utils/constants.js +2 -2
  55. package/dist/browser/utils/constants.js.map +1 -1
  56. package/dist/commonjs/QueueClient.d.ts +25 -1
  57. package/dist/commonjs/QueueClient.d.ts.map +1 -1
  58. package/dist/commonjs/QueueClient.js +35 -0
  59. package/dist/commonjs/QueueClient.js.map +1 -1
  60. package/dist/commonjs/QueueSASSignatureValues.d.ts +9 -2
  61. package/dist/commonjs/QueueSASSignatureValues.d.ts.map +1 -1
  62. package/dist/commonjs/QueueSASSignatureValues.js +72 -19
  63. package/dist/commonjs/QueueSASSignatureValues.js.map +1 -1
  64. package/dist/commonjs/QueueServiceClient.d.ts +23 -1
  65. package/dist/commonjs/QueueServiceClient.d.ts.map +1 -1
  66. package/dist/commonjs/QueueServiceClient.js +40 -0
  67. package/dist/commonjs/QueueServiceClient.js.map +1 -1
  68. package/dist/commonjs/SASQueryParameters.d.ts +38 -1
  69. package/dist/commonjs/SASQueryParameters.d.ts.map +1 -1
  70. package/dist/commonjs/SASQueryParameters.js +87 -2
  71. package/dist/commonjs/SASQueryParameters.js.map +1 -1
  72. package/dist/commonjs/generated/src/models/index.d.ts +66 -16
  73. package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
  74. package/dist/commonjs/generated/src/models/index.js.map +1 -1
  75. package/dist/commonjs/generated/src/models/mappers.d.ts +4 -0
  76. package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
  77. package/dist/commonjs/generated/src/models/mappers.js +643 -493
  78. package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
  79. package/dist/commonjs/generated/src/models/parameters.d.ts +3 -1
  80. package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -1
  81. package/dist/commonjs/generated/src/models/parameters.js +107 -92
  82. package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
  83. package/dist/commonjs/generated/src/operations/messageId.js +11 -11
  84. package/dist/commonjs/generated/src/operations/messageId.js.map +1 -1
  85. package/dist/commonjs/generated/src/operations/messages.js +33 -31
  86. package/dist/commonjs/generated/src/operations/messages.js.map +1 -1
  87. package/dist/commonjs/generated/src/operations/queue.js +38 -38
  88. package/dist/commonjs/generated/src/operations/queue.js.map +1 -1
  89. package/dist/commonjs/generated/src/operations/service.d.ts +8 -1
  90. package/dist/commonjs/generated/src/operations/service.d.ts.map +1 -1
  91. package/dist/commonjs/generated/src/operations/service.js +65 -25
  92. package/dist/commonjs/generated/src/operations/service.js.map +1 -1
  93. package/dist/commonjs/generated/src/operationsInterfaces/messageId.js.map +1 -1
  94. package/dist/commonjs/generated/src/operationsInterfaces/messages.js.map +1 -1
  95. package/dist/commonjs/generated/src/operationsInterfaces/queue.js.map +1 -1
  96. package/dist/commonjs/generated/src/operationsInterfaces/service.d.ts +8 -1
  97. package/dist/commonjs/generated/src/operationsInterfaces/service.d.ts.map +1 -1
  98. package/dist/commonjs/generated/src/operationsInterfaces/service.js.map +1 -1
  99. package/dist/commonjs/generated/src/storageClient.d.ts.map +1 -1
  100. package/dist/commonjs/generated/src/storageClient.js +5 -5
  101. package/dist/commonjs/generated/src/storageClient.js.map +1 -1
  102. package/dist/commonjs/generatedModels.d.ts +7 -2
  103. package/dist/commonjs/generatedModels.d.ts.map +1 -1
  104. package/dist/commonjs/generatedModels.js.map +1 -1
  105. package/dist/commonjs/index.d.ts +1 -1
  106. package/dist/commonjs/index.d.ts.map +1 -1
  107. package/dist/commonjs/index.js.map +1 -1
  108. package/dist/commonjs/tsdoc-metadata.json +1 -1
  109. package/dist/commonjs/utils/constants.d.ts.map +1 -1
  110. package/dist/commonjs/utils/constants.js +2 -2
  111. package/dist/commonjs/utils/constants.js.map +1 -1
  112. package/dist/esm/QueueClient.d.ts +25 -1
  113. package/dist/esm/QueueClient.d.ts.map +1 -1
  114. package/dist/esm/QueueClient.js +35 -0
  115. package/dist/esm/QueueClient.js.map +1 -1
  116. package/dist/esm/QueueSASSignatureValues.d.ts +9 -2
  117. package/dist/esm/QueueSASSignatureValues.d.ts.map +1 -1
  118. package/dist/esm/QueueSASSignatureValues.js +72 -19
  119. package/dist/esm/QueueSASSignatureValues.js.map +1 -1
  120. package/dist/esm/QueueServiceClient.d.ts +23 -1
  121. package/dist/esm/QueueServiceClient.d.ts.map +1 -1
  122. package/dist/esm/QueueServiceClient.js +41 -1
  123. package/dist/esm/QueueServiceClient.js.map +1 -1
  124. package/dist/esm/SASQueryParameters.d.ts +38 -1
  125. package/dist/esm/SASQueryParameters.d.ts.map +1 -1
  126. package/dist/esm/SASQueryParameters.js +87 -2
  127. package/dist/esm/SASQueryParameters.js.map +1 -1
  128. package/dist/esm/generated/src/models/index.d.ts +66 -16
  129. package/dist/esm/generated/src/models/index.d.ts.map +1 -1
  130. package/dist/esm/generated/src/models/index.js.map +1 -1
  131. package/dist/esm/generated/src/models/mappers.d.ts +4 -0
  132. package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
  133. package/dist/esm/generated/src/models/mappers.js +641 -492
  134. package/dist/esm/generated/src/models/mappers.js.map +1 -1
  135. package/dist/esm/generated/src/models/parameters.d.ts +3 -1
  136. package/dist/esm/generated/src/models/parameters.d.ts.map +1 -1
  137. package/dist/esm/generated/src/models/parameters.js +107 -92
  138. package/dist/esm/generated/src/models/parameters.js.map +1 -1
  139. package/dist/esm/generated/src/operations/messageId.js +11 -11
  140. package/dist/esm/generated/src/operations/messageId.js.map +1 -1
  141. package/dist/esm/generated/src/operations/messages.js +33 -31
  142. package/dist/esm/generated/src/operations/messages.js.map +1 -1
  143. package/dist/esm/generated/src/operations/queue.js +38 -38
  144. package/dist/esm/generated/src/operations/queue.js.map +1 -1
  145. package/dist/esm/generated/src/operations/service.d.ts +8 -1
  146. package/dist/esm/generated/src/operations/service.d.ts.map +1 -1
  147. package/dist/esm/generated/src/operations/service.js +65 -25
  148. package/dist/esm/generated/src/operations/service.js.map +1 -1
  149. package/dist/esm/generated/src/operationsInterfaces/messageId.js.map +1 -1
  150. package/dist/esm/generated/src/operationsInterfaces/messages.js.map +1 -1
  151. package/dist/esm/generated/src/operationsInterfaces/queue.js.map +1 -1
  152. package/dist/esm/generated/src/operationsInterfaces/service.d.ts +8 -1
  153. package/dist/esm/generated/src/operationsInterfaces/service.d.ts.map +1 -1
  154. package/dist/esm/generated/src/operationsInterfaces/service.js.map +1 -1
  155. package/dist/esm/generated/src/storageClient.d.ts.map +1 -1
  156. package/dist/esm/generated/src/storageClient.js +6 -6
  157. package/dist/esm/generated/src/storageClient.js.map +1 -1
  158. package/dist/esm/generatedModels.d.ts +7 -2
  159. package/dist/esm/generatedModels.d.ts.map +1 -1
  160. package/dist/esm/generatedModels.js.map +1 -1
  161. package/dist/esm/index.d.ts +1 -1
  162. package/dist/esm/index.d.ts.map +1 -1
  163. package/dist/esm/index.js.map +1 -1
  164. package/dist/esm/utils/constants.d.ts.map +1 -1
  165. package/dist/esm/utils/constants.js +2 -2
  166. package/dist/esm/utils/constants.js.map +1 -1
  167. package/dist/react-native/QueueClient.d.ts +25 -1
  168. package/dist/react-native/QueueClient.d.ts.map +1 -1
  169. package/dist/react-native/QueueClient.js +35 -0
  170. package/dist/react-native/QueueClient.js.map +1 -1
  171. package/dist/react-native/QueueSASSignatureValues.d.ts +9 -2
  172. package/dist/react-native/QueueSASSignatureValues.d.ts.map +1 -1
  173. package/dist/react-native/QueueSASSignatureValues.js +72 -19
  174. package/dist/react-native/QueueSASSignatureValues.js.map +1 -1
  175. package/dist/react-native/QueueServiceClient.d.ts +23 -1
  176. package/dist/react-native/QueueServiceClient.d.ts.map +1 -1
  177. package/dist/react-native/QueueServiceClient.js +41 -1
  178. package/dist/react-native/QueueServiceClient.js.map +1 -1
  179. package/dist/react-native/SASQueryParameters.d.ts +38 -1
  180. package/dist/react-native/SASQueryParameters.d.ts.map +1 -1
  181. package/dist/react-native/SASQueryParameters.js +87 -2
  182. package/dist/react-native/SASQueryParameters.js.map +1 -1
  183. package/dist/react-native/generated/src/models/index.d.ts +66 -16
  184. package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
  185. package/dist/react-native/generated/src/models/index.js.map +1 -1
  186. package/dist/react-native/generated/src/models/mappers.d.ts +4 -0
  187. package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
  188. package/dist/react-native/generated/src/models/mappers.js +641 -492
  189. package/dist/react-native/generated/src/models/mappers.js.map +1 -1
  190. package/dist/react-native/generated/src/models/parameters.d.ts +3 -1
  191. package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -1
  192. package/dist/react-native/generated/src/models/parameters.js +107 -92
  193. package/dist/react-native/generated/src/models/parameters.js.map +1 -1
  194. package/dist/react-native/generated/src/operations/messageId.js +11 -11
  195. package/dist/react-native/generated/src/operations/messageId.js.map +1 -1
  196. package/dist/react-native/generated/src/operations/messages.js +33 -31
  197. package/dist/react-native/generated/src/operations/messages.js.map +1 -1
  198. package/dist/react-native/generated/src/operations/queue.js +38 -38
  199. package/dist/react-native/generated/src/operations/queue.js.map +1 -1
  200. package/dist/react-native/generated/src/operations/service.d.ts +8 -1
  201. package/dist/react-native/generated/src/operations/service.d.ts.map +1 -1
  202. package/dist/react-native/generated/src/operations/service.js +65 -25
  203. package/dist/react-native/generated/src/operations/service.js.map +1 -1
  204. package/dist/react-native/generated/src/operationsInterfaces/messageId.js.map +1 -1
  205. package/dist/react-native/generated/src/operationsInterfaces/messages.js.map +1 -1
  206. package/dist/react-native/generated/src/operationsInterfaces/queue.js.map +1 -1
  207. package/dist/react-native/generated/src/operationsInterfaces/service.d.ts +8 -1
  208. package/dist/react-native/generated/src/operationsInterfaces/service.d.ts.map +1 -1
  209. package/dist/react-native/generated/src/operationsInterfaces/service.js.map +1 -1
  210. package/dist/react-native/generated/src/storageClient.d.ts.map +1 -1
  211. package/dist/react-native/generated/src/storageClient.js +6 -6
  212. package/dist/react-native/generated/src/storageClient.js.map +1 -1
  213. package/dist/react-native/generatedModels.d.ts +7 -2
  214. package/dist/react-native/generatedModels.d.ts.map +1 -1
  215. package/dist/react-native/generatedModels.js.map +1 -1
  216. package/dist/react-native/index.d.ts +1 -1
  217. package/dist/react-native/index.d.ts.map +1 -1
  218. package/dist/react-native/index.js.map +1 -1
  219. package/dist/react-native/utils/constants.d.ts.map +1 -1
  220. package/dist/react-native/utils/constants.js +2 -2
  221. package/dist/react-native/utils/constants.js.map +1 -1
  222. package/package.json +24 -24
@@ -1 +1 @@
1
- {"version":3,"file":"QueueClient.d.ts","sourceRoot":"","sources":["../../src/QueueClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,sBA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,WAAW,CACtB,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,wBAAwB,CAAC;IA+BpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACU,eAAe,CAC1B,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,2BAA2B,CAAC;IA8BvC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACU,YAAY,CACvB,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,yBAAyB,CAAC;IA0BrC;;;;;;;;OAQG;IACU,aAAa,CACxB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,0BAA0B,CAAC;IAQtC;;;;;;;;;;;;;;;;OAgBG;IACU,aAAa,CACxB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,EAChB,iBAAiB,CAAC,EAAE,MAAM,EAC1B,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,0BAA0B,CAAC;IAgBtC,OAAO,CAAC,mBAAmB;IAoC3B;;;;;;;;;;OAUG;IACI,cAAc,CAAC,OAAO,EAAE,0BAA0B,GAAG,MAAM;IAkBlE;;;;;;;;;;OAUG;IAEI,uBAAuB,CAAC,OAAO,EAAE,0BAA0B,GAAG,MAAM;IAgB3E;;;;;;;;;;OAUG;IACI,4BAA4B,CACjC,OAAO,EAAE,0BAA0B,EACnC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM;IAaT;;;;;;;;;;OAUG;IACI,kCAAkC,CACvC,OAAO,EAAE,0BAA0B,EACnC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM;CAUV"}
@@ -655,5 +655,40 @@ export class QueueClient extends StorageClient {
655
655
  ...options,
656
656
  }, this.credential).stringToSign;
657
657
  }
658
+ /**
659
+ *
660
+ * Generates a Service Shared Access Signature (SAS) URI based on the client properties
661
+ * and parameters passed in. The SAS is signed by the user delegation key credential input.
662
+ *
663
+ * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
664
+ *
665
+ * @param options - Optional parameters.
666
+ * @param userDelegationKey - user delegation key used to sign the SAS URI
667
+ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
668
+ */
669
+ generateUserDelegationSasUrl(options, userDelegationKey) {
670
+ const sas = generateQueueSASQueryParameters({
671
+ queueName: this.name,
672
+ ...options,
673
+ }, userDelegationKey, this.accountName).toString();
674
+ return appendToURLQuery(this.url, sas);
675
+ }
676
+ /**
677
+ *
678
+ * Generates a Service Shared Access Signature (SAS) URI based on the client properties
679
+ * and parameters passed in. The SAS is signed by the user delegation key credential input.
680
+ *
681
+ * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
682
+ *
683
+ * @param options - Optional parameters.
684
+ * @param userDelegationKey - user delegation key used to sign the SAS URI
685
+ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
686
+ */
687
+ generateUserDelegationStringToSign(options, userDelegationKey) {
688
+ return generateQueueSASQueryParametersInternal({
689
+ queueName: this.name,
690
+ ...options,
691
+ }, userDelegationKey, this.accountName).stringToSign;
692
+ }
658
693
  }
659
694
  //# sourceMappingURL=QueueClient.js.map
@@ -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,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AA2B;gBAC3B,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/C,CAAC;YAED,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;YACpD,CAAC;YAED,OAAO,SAAS,CAAC;QACnB,CAAC;QAAC,OAAO,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,CACzC;YACE,SAAS,EAAE,IAAI,CAAC,IAAI;YACpB,GAAG,OAAO;SACX,EACD,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,CAC5C;YACE,SAAS,EAAE,IAAI,CAAC,IAAI;YACpB,GAAG,OAAO;SACX,EACD,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-common\";\nimport { AnonymousCredential } from \"@azure/storage-common\";\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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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"]}
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,EAAqB,MAAM,uBAAuB,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB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AAE,GAAG,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;;;;OAUG;IACI,kCAAkC,CACvC,OAAmC,EACnC,iBAAoC;QAEpC,OAAO,uCAAuC,CAC5C;YACE,SAAS,EAAE,IAAI,CAAC,IAAI;YACpB,GAAG,OAAO;SACX,EACD,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,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, UserDelegationKey } from \"@azure/storage-common\";\nimport { AnonymousCredential } from \"@azure/storage-common\";\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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 &commat;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 /**\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 user delegation key credential input.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @param userDelegationKey - user delegation key used to sign the SAS URI\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 generateUserDelegationSasUrl(\n options: QueueGenerateSasUrlOptions,\n userDelegationKey: UserDelegationKey,\n ): string {\n const sas = generateQueueSASQueryParameters(\n {\n queueName: this.name,\n ...options,\n },\n userDelegationKey,\n this.accountName,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\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 user delegation key credential input.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @param userDelegationKey - user delegation key used to sign the SAS URI\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 generateUserDelegationStringToSign(\n options: QueueGenerateSasUrlOptions,\n userDelegationKey: UserDelegationKey,\n ): string {\n return generateQueueSASQueryParametersInternal(\n {\n queueName: this.name,\n ...options,\n },\n userDelegationKey,\n this.accountName,\n ).stringToSign;\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { QueueSASPermissions } from "./QueueSASPermissions.js";
2
- import type { StorageSharedKeyCredential } from "@azure/storage-common";
2
+ import { StorageSharedKeyCredential, UserDelegationKey } from "@azure/storage-common";
3
3
  import type { SasIPRange } from "./SasIPRange.js";
4
4
  import type { SASProtocol } from "./SASQueryParameters.js";
5
5
  import { SASQueryParameters } from "./SASQueryParameters.js";
@@ -46,6 +46,12 @@ export interface QueueSASSignatureValues {
46
46
  * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy
47
47
  */
48
48
  identifier?: string;
49
+ /**
50
+ * Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user who is authorized to
51
+ * use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been
52
+ * issued to the user specified in this value.
53
+ */
54
+ delegatedUserObjectId?: string;
49
55
  }
50
56
  /**
51
57
  * ONLY AVAILABLE IN NODE.JS RUNTIME.
@@ -62,8 +68,9 @@ export interface QueueSASSignatureValues {
62
68
  * @param queueSASSignatureValues -
63
69
  * @param sharedKeyCredential -
64
70
  */
71
+ export declare function generateQueueSASQueryParameters(queueSASSignatureValues: QueueSASSignatureValues, userDelegationKey: UserDelegationKey, accountName: string): SASQueryParameters;
65
72
  export declare function generateQueueSASQueryParameters(queueSASSignatureValues: QueueSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential): SASQueryParameters;
66
- export declare function generateQueueSASQueryParametersInternal(queueSASSignatureValues: QueueSASSignatureValues, sharedKeyCredential: StorageSharedKeyCredential): {
73
+ export declare function generateQueueSASQueryParametersInternal(queueSASSignatureValues: QueueSASSignatureValues, sharedKeyCredentialOrUserDelegationKey: StorageSharedKeyCredential | UserDelegationKey, accountName?: string): {
67
74
  sasQueryParameters: SASQueryParameters;
68
75
  stringToSign: string;
69
76
  };
@@ -1 +1 @@
1
- {"version":3,"file":"QueueSASSignatureValues.d.ts","sourceRoot":"","sources":["../../src/QueueSASSignatureValues.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAI7D;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;IAEjB;;;;OAIG;IACH,WAAW,CAAC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;IAElB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,+BAA+B,CAC7C,uBAAuB,EAAE,uBAAuB,EAChD,iBAAiB,EAAE,iBAAiB,EACpC,WAAW,EAAE,MAAM,GAClB,kBAAkB,CAAC;AAEtB,wBAAgB,+BAA+B,CAC7C,uBAAuB,EAAE,uBAAuB,EAChD,mBAAmB,EAAE,0BAA0B,GAC9C,kBAAkB,CAAC;AActB,wBAAgB,uCAAuC,CACrD,uBAAuB,EAAE,uBAAuB,EAChD,sCAAsC,EAAE,0BAA0B,GAAG,iBAAiB,EACtF,WAAW,CAAC,EAAE,MAAM,GACnB;IAAE,kBAAkB,EAAE,kBAAkB,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAiClE"}
@@ -1,30 +1,38 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import { QueueSASPermissions } from "./QueueSASPermissions.js";
4
+ import { StorageSharedKeyCredential, UserDelegationKeyCredential, } from "@azure/storage-common";
4
5
  import { ipRangeToString } from "./SasIPRange.js";
5
6
  import { SASQueryParameters } from "./SASQueryParameters.js";
6
7
  import { SERVICE_VERSION } from "./utils/constants.js";
7
8
  import { truncatedISO8061Date } from "./utils/utils.common.js";
8
- /**
9
- * ONLY AVAILABLE IN NODE.JS RUNTIME.
10
- *
11
- * Creates an instance of SASQueryParameters.
12
- *
13
- * Only accepts required settings needed to create a SAS. For optional settings please
14
- * set corresponding properties directly, such as permissions, startsOn and identifier.
15
- *
16
- * WARNING: When identifier is not provided, permissions and expiresOn are required.
17
- * You MUST assign value to identifier or expiresOn & permissions manually if you initial with
18
- * this constructor.
19
- *
20
- * @param queueSASSignatureValues -
21
- * @param sharedKeyCredential -
22
- */
23
- export function generateQueueSASQueryParameters(queueSASSignatureValues, sharedKeyCredential) {
24
- return generateQueueSASQueryParametersInternal(queueSASSignatureValues, sharedKeyCredential)
25
- .sasQueryParameters;
9
+ export function generateQueueSASQueryParameters(queueSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) {
10
+ return generateQueueSASQueryParametersInternal(queueSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName).sasQueryParameters;
26
11
  }
27
- export function generateQueueSASQueryParametersInternal(queueSASSignatureValues, sharedKeyCredential) {
12
+ export function generateQueueSASQueryParametersInternal(queueSASSignatureValues, sharedKeyCredentialOrUserDelegationKey, accountName) {
13
+ const version = queueSASSignatureValues.version
14
+ ? queueSASSignatureValues.version
15
+ : SERVICE_VERSION;
16
+ const sharedKeyCredential = sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential
17
+ ? sharedKeyCredentialOrUserDelegationKey
18
+ : undefined;
19
+ let userDelegationKeyCredential;
20
+ if (sharedKeyCredential === undefined && accountName !== undefined) {
21
+ userDelegationKeyCredential = new UserDelegationKeyCredential(accountName, sharedKeyCredentialOrUserDelegationKey);
22
+ }
23
+ if (sharedKeyCredential !== undefined) {
24
+ return generateQueueSASQueryParametersDefault(queueSASSignatureValues, sharedKeyCredential);
25
+ }
26
+ else {
27
+ if (version >= "2025-07-05") {
28
+ return generateQueueSASQueryParametersUDK20250705(queueSASSignatureValues, userDelegationKeyCredential, accountName);
29
+ }
30
+ else {
31
+ throw new RangeError("'version' must be >= '2025-07-05' when generating user delegation SAS using user delegation key.");
32
+ }
33
+ }
34
+ }
35
+ function generateQueueSASQueryParametersDefault(queueSASSignatureValues, sharedKeyCredential) {
28
36
  if (!queueSASSignatureValues.identifier &&
29
37
  !(queueSASSignatureValues.permissions && queueSASSignatureValues.expiresOn)) {
30
38
  throw new RangeError("Must provide 'permissions' and 'expiresOn' for Queue SAS generation when 'identifier' is not provided.");
@@ -58,6 +66,51 @@ export function generateQueueSASQueryParametersInternal(queueSASSignatureValues,
58
66
  stringToSign: stringToSign,
59
67
  };
60
68
  }
69
+ function generateQueueSASQueryParametersUDK20250705(queueSASSignatureValues, userDelegationKeyCredential, accountName) {
70
+ if (!(queueSASSignatureValues.permissions && queueSASSignatureValues.expiresOn)) {
71
+ throw new RangeError("Must provide 'permissions' and 'expiresOn' for Queue SAS generation when generating user delegation SAS.");
72
+ }
73
+ const version = queueSASSignatureValues.version
74
+ ? queueSASSignatureValues.version
75
+ : SERVICE_VERSION;
76
+ let verifiedPermissions;
77
+ // Calling parse and toString guarantees the proper ordering and throws on invalid characters.
78
+ if (queueSASSignatureValues.permissions) {
79
+ verifiedPermissions = QueueSASPermissions.parse(queueSASSignatureValues.permissions.toString()).toString();
80
+ }
81
+ const resource = "q";
82
+ // Signature is generated on the un-url-encoded values.
83
+ const stringToSign = [
84
+ verifiedPermissions ? verifiedPermissions : "",
85
+ queueSASSignatureValues.startsOn
86
+ ? truncatedISO8061Date(queueSASSignatureValues.startsOn, false)
87
+ : "",
88
+ queueSASSignatureValues.expiresOn
89
+ ? truncatedISO8061Date(queueSASSignatureValues.expiresOn, false)
90
+ : "",
91
+ getCanonicalName(accountName, queueSASSignatureValues.queueName),
92
+ userDelegationKeyCredential.userDelegationKey.signedObjectId,
93
+ userDelegationKeyCredential.userDelegationKey.signedTenantId,
94
+ userDelegationKeyCredential.userDelegationKey.signedStartsOn
95
+ ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)
96
+ : "",
97
+ userDelegationKeyCredential.userDelegationKey.signedExpiresOn
98
+ ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)
99
+ : "",
100
+ userDelegationKeyCredential.userDelegationKey.signedService,
101
+ userDelegationKeyCredential.userDelegationKey.signedVersion,
102
+ undefined, // shared key delegation signed tenant id.
103
+ queueSASSignatureValues.delegatedUserObjectId,
104
+ queueSASSignatureValues.ipRange ? ipRangeToString(queueSASSignatureValues.ipRange) : "",
105
+ queueSASSignatureValues.protocol ? queueSASSignatureValues.protocol : "",
106
+ version,
107
+ ].join("\n");
108
+ const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
109
+ return {
110
+ sasQueryParameters: new SASQueryParameters(version, signature, verifiedPermissions, undefined, undefined, queueSASSignatureValues.protocol, queueSASSignatureValues.startsOn, queueSASSignatureValues.expiresOn, queueSASSignatureValues.ipRange, queueSASSignatureValues.identifier, resource, userDelegationKeyCredential.userDelegationKey, queueSASSignatureValues.delegatedUserObjectId),
111
+ stringToSign: stringToSign,
112
+ };
113
+ }
61
114
  function getCanonicalName(accountName, queueName) {
62
115
  // Queue: "/queue/account/queueName"
63
116
  return `/queue/${accountName}/${queueName}`;
@@ -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,uBAAu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Q,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-common\";\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"]}
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;AAC/D,OAAO,EACL,0BAA0B,EAE1B,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAE/B,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;AAuF/D,MAAM,UAAU,+BAA+B,CAC7C,uBAAgD,EAChD,sCAAsF,EACtF,WAAoB;IAEpB,OAAO,uCAAuC,CAC5C,uBAAuB,EACvB,sCAAsC,EACtC,WAAW,CACZ,CAAC,kBAAkB,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,uCAAuC,CACrD,uBAAgD,EAChD,sCAAsF,EACtF,WAAoB;IAEpB,MAAM,OAAO,GAAG,uBAAuB,CAAC,OAAO;QAC7C,CAAC,CAAC,uBAAuB,CAAC,OAAO;QACjC,CAAC,CAAC,eAA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,CAAC,aAAa;QAC3D,2BAA2B,CAAC,iBAAiB,CAAC,aAAa;QAC3D,SAAS,EAAE,0CAA0C;QACrD,uBAAuB,CAAC,qBAAqB;QAC7C,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,2BAA2B,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAE9E,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,EAClC,QAAQ,EACR,2BAA2B,CAAC,iBAAiB,EAC7C,uBAAuB,CAAC,qBAAqB,CAC9C;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 {\n StorageSharedKeyCredential,\n UserDelegationKey,\n UserDelegationKeyCredential,\n} from \"@azure/storage-common\";\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 * Optional. Beginning in version 2025-07-05, this value specifies the Entra ID of the user who is authorized to\n * use the resulting SAS URL. The resulting SAS URL must be used in conjunction with an Entra ID token that has been\n * issued to the user specified in this value.\n */\n delegatedUserObjectId?: 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 userDelegationKey: UserDelegationKey,\n accountName: string,\n): SASQueryParameters;\n\nexport function generateQueueSASQueryParameters(\n queueSASSignatureValues: QueueSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): SASQueryParameters;\n\nexport function generateQueueSASQueryParameters(\n queueSASSignatureValues: QueueSASSignatureValues,\n sharedKeyCredentialOrUserDelegationKey: StorageSharedKeyCredential | UserDelegationKey,\n accountName?: string,\n): SASQueryParameters {\n return generateQueueSASQueryParametersInternal(\n queueSASSignatureValues,\n sharedKeyCredentialOrUserDelegationKey,\n accountName,\n ).sasQueryParameters;\n}\n\nexport function generateQueueSASQueryParametersInternal(\n queueSASSignatureValues: QueueSASSignatureValues,\n sharedKeyCredentialOrUserDelegationKey: StorageSharedKeyCredential | UserDelegationKey,\n accountName?: string,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n const version = queueSASSignatureValues.version\n ? queueSASSignatureValues.version\n : SERVICE_VERSION;\n\n const sharedKeyCredential =\n sharedKeyCredentialOrUserDelegationKey instanceof StorageSharedKeyCredential\n ? sharedKeyCredentialOrUserDelegationKey\n : undefined;\n let userDelegationKeyCredential: UserDelegationKeyCredential | undefined;\n\n if (sharedKeyCredential === undefined && accountName !== undefined) {\n userDelegationKeyCredential = new UserDelegationKeyCredential(\n accountName,\n sharedKeyCredentialOrUserDelegationKey as UserDelegationKey,\n );\n }\n\n if (sharedKeyCredential !== undefined) {\n return generateQueueSASQueryParametersDefault(queueSASSignatureValues, sharedKeyCredential!);\n } else {\n if (version >= \"2025-07-05\") {\n return generateQueueSASQueryParametersUDK20250705(\n queueSASSignatureValues,\n userDelegationKeyCredential!,\n accountName!,\n );\n } else {\n throw new RangeError(\n \"'version' must be >= '2025-07-05' when generating user delegation SAS using user delegation key.\",\n );\n }\n }\n}\n\nfunction generateQueueSASQueryParametersDefault(\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 generateQueueSASQueryParametersUDK20250705(\n queueSASSignatureValues: QueueSASSignatureValues,\n userDelegationKeyCredential: UserDelegationKeyCredential,\n accountName: string,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n if (!(queueSASSignatureValues.permissions && queueSASSignatureValues.expiresOn)) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Queue SAS generation when generating user delegation SAS.\",\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 const resource: string = \"q\";\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(accountName, queueSASSignatureValues.queueName),\n userDelegationKeyCredential.userDelegationKey.signedObjectId,\n userDelegationKeyCredential.userDelegationKey.signedTenantId,\n userDelegationKeyCredential.userDelegationKey.signedStartsOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedStartsOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedExpiresOn\n ? truncatedISO8061Date(userDelegationKeyCredential.userDelegationKey.signedExpiresOn, false)\n : \"\",\n userDelegationKeyCredential.userDelegationKey.signedService,\n userDelegationKeyCredential.userDelegationKey.signedVersion,\n undefined, // shared key delegation signed tenant id.\n queueSASSignatureValues.delegatedUserObjectId,\n queueSASSignatureValues.ipRange ? ipRangeToString(queueSASSignatureValues.ipRange) : \"\",\n queueSASSignatureValues.protocol ? queueSASSignatureValues.protocol : \"\",\n version,\n ].join(\"\\n\");\n\n const signature = userDelegationKeyCredential.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 resource,\n userDelegationKeyCredential.userDelegationKey,\n queueSASSignatureValues.delegatedUserObjectId,\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"]}