@azure/storage-queue 12.28.0-beta.1 → 12.28.0

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 (214) hide show
  1. package/dist/browser/AccountSASPermissions.js +32 -34
  2. package/dist/browser/AccountSASPermissions.js.map +1 -1
  3. package/dist/browser/AccountSASResourceTypes.js +12 -14
  4. package/dist/browser/AccountSASResourceTypes.js.map +1 -1
  5. package/dist/browser/AccountSASServices.js +16 -18
  6. package/dist/browser/AccountSASServices.js.map +1 -1
  7. package/dist/browser/AccountSASSignatureValues.d.ts +1 -1
  8. package/dist/browser/AccountSASSignatureValues.d.ts.map +1 -1
  9. package/dist/browser/AccountSASSignatureValues.js.map +1 -1
  10. package/dist/browser/Pipeline.d.ts +2 -3
  11. package/dist/browser/Pipeline.d.ts.map +1 -1
  12. package/dist/browser/Pipeline.js +28 -19
  13. package/dist/browser/Pipeline.js.map +1 -1
  14. package/dist/browser/QueueClient.d.ts +2 -2
  15. package/dist/browser/QueueClient.d.ts.map +1 -1
  16. package/dist/browser/QueueClient.js +52 -15
  17. package/dist/browser/QueueClient.js.map +1 -1
  18. package/dist/browser/QueueSASPermissions.js +16 -18
  19. package/dist/browser/QueueSASPermissions.js.map +1 -1
  20. package/dist/browser/QueueSASSignatureValues.d.ts +1 -1
  21. package/dist/browser/QueueSASSignatureValues.d.ts.map +1 -1
  22. package/dist/browser/QueueSASSignatureValues.js.map +1 -1
  23. package/dist/browser/QueueServiceClient.d.ts +2 -2
  24. package/dist/browser/QueueServiceClient.d.ts.map +1 -1
  25. package/dist/browser/QueueServiceClient.js +50 -46
  26. package/dist/browser/QueueServiceClient.js.map +1 -1
  27. package/dist/browser/SASQueryParameters.js +49 -0
  28. package/dist/browser/SASQueryParameters.js.map +1 -1
  29. package/dist/browser/StorageClient.d.ts +2 -2
  30. package/dist/browser/StorageClient.d.ts.map +1 -1
  31. package/dist/browser/StorageClient.js +23 -0
  32. package/dist/browser/StorageClient.js.map +1 -1
  33. package/dist/browser/StorageContextClient.js +1 -1
  34. package/dist/browser/StorageContextClient.js.map +1 -1
  35. package/dist/browser/generated/src/operations/messageId.js +1 -0
  36. package/dist/browser/generated/src/operations/messageId.js.map +1 -1
  37. package/dist/browser/generated/src/operations/messages.js +1 -0
  38. package/dist/browser/generated/src/operations/messages.js.map +1 -1
  39. package/dist/browser/generated/src/operations/queue.js +1 -0
  40. package/dist/browser/generated/src/operations/queue.js.map +1 -1
  41. package/dist/browser/generated/src/operations/service.js +1 -0
  42. package/dist/browser/generated/src/operations/service.js.map +1 -1
  43. package/dist/browser/generated/src/storageClient.js +14 -4
  44. package/dist/browser/generated/src/storageClient.js.map +1 -1
  45. package/dist/browser/index-browser.d.mts.map +1 -1
  46. package/dist/browser/index-browser.mjs.map +1 -1
  47. package/dist/browser/index.d.ts +1 -7
  48. package/dist/browser/index.js +1 -7
  49. package/dist/browser/utils/constants.d.ts.map +1 -1
  50. package/dist/browser/utils/constants.js +1 -1
  51. package/dist/browser/utils/constants.js.map +1 -1
  52. package/dist/browser/utils/utils.common.js +1 -2
  53. package/dist/browser/utils/utils.common.js.map +1 -1
  54. package/dist/commonjs/AccountSASPermissions.js +32 -34
  55. package/dist/commonjs/AccountSASPermissions.js.map +1 -1
  56. package/dist/commonjs/AccountSASResourceTypes.js +12 -14
  57. package/dist/commonjs/AccountSASResourceTypes.js.map +1 -1
  58. package/dist/commonjs/AccountSASServices.js +16 -18
  59. package/dist/commonjs/AccountSASServices.js.map +1 -1
  60. package/dist/commonjs/AccountSASSignatureValues.d.ts +1 -1
  61. package/dist/commonjs/AccountSASSignatureValues.d.ts.map +1 -1
  62. package/dist/commonjs/AccountSASSignatureValues.js.map +1 -1
  63. package/dist/commonjs/Pipeline.d.ts +2 -3
  64. package/dist/commonjs/Pipeline.d.ts.map +1 -1
  65. package/dist/commonjs/Pipeline.js +39 -30
  66. package/dist/commonjs/Pipeline.js.map +1 -1
  67. package/dist/commonjs/QueueClient.d.ts +2 -2
  68. package/dist/commonjs/QueueClient.d.ts.map +1 -1
  69. package/dist/commonjs/QueueClient.js +59 -22
  70. package/dist/commonjs/QueueClient.js.map +1 -1
  71. package/dist/commonjs/QueueSASPermissions.js +16 -18
  72. package/dist/commonjs/QueueSASPermissions.js.map +1 -1
  73. package/dist/commonjs/QueueSASSignatureValues.d.ts +1 -1
  74. package/dist/commonjs/QueueSASSignatureValues.d.ts.map +1 -1
  75. package/dist/commonjs/QueueSASSignatureValues.js.map +1 -1
  76. package/dist/commonjs/QueueServiceClient.d.ts +2 -2
  77. package/dist/commonjs/QueueServiceClient.d.ts.map +1 -1
  78. package/dist/commonjs/QueueServiceClient.js +57 -53
  79. package/dist/commonjs/QueueServiceClient.js.map +1 -1
  80. package/dist/commonjs/SASQueryParameters.js +49 -0
  81. package/dist/commonjs/SASQueryParameters.js.map +1 -1
  82. package/dist/commonjs/StorageClient.d.ts +2 -2
  83. package/dist/commonjs/StorageClient.d.ts.map +1 -1
  84. package/dist/commonjs/StorageClient.js +23 -0
  85. package/dist/commonjs/StorageClient.js.map +1 -1
  86. package/dist/commonjs/StorageContextClient.js +1 -1
  87. package/dist/commonjs/StorageContextClient.js.map +1 -1
  88. package/dist/commonjs/generated/src/operations/messageId.js +1 -0
  89. package/dist/commonjs/generated/src/operations/messageId.js.map +1 -1
  90. package/dist/commonjs/generated/src/operations/messages.js +1 -0
  91. package/dist/commonjs/generated/src/operations/messages.js.map +1 -1
  92. package/dist/commonjs/generated/src/operations/queue.js +1 -0
  93. package/dist/commonjs/generated/src/operations/queue.js.map +1 -1
  94. package/dist/commonjs/generated/src/operations/service.js +1 -0
  95. package/dist/commonjs/generated/src/operations/service.js.map +1 -1
  96. package/dist/commonjs/generated/src/storageClient.js +14 -4
  97. package/dist/commonjs/generated/src/storageClient.js.map +1 -1
  98. package/dist/commonjs/index.d.ts +1 -9
  99. package/dist/commonjs/index.d.ts.map +1 -1
  100. package/dist/commonjs/index.js +13 -19
  101. package/dist/commonjs/index.js.map +1 -1
  102. package/dist/commonjs/tsdoc-metadata.json +11 -11
  103. package/dist/commonjs/utils/constants.d.ts.map +1 -1
  104. package/dist/commonjs/utils/constants.js +1 -1
  105. package/dist/commonjs/utils/constants.js.map +1 -1
  106. package/dist/commonjs/utils/utils.common.js +1 -2
  107. package/dist/commonjs/utils/utils.common.js.map +1 -1
  108. package/dist/esm/AccountSASPermissions.js +32 -34
  109. package/dist/esm/AccountSASPermissions.js.map +1 -1
  110. package/dist/esm/AccountSASResourceTypes.js +12 -14
  111. package/dist/esm/AccountSASResourceTypes.js.map +1 -1
  112. package/dist/esm/AccountSASServices.js +16 -18
  113. package/dist/esm/AccountSASServices.js.map +1 -1
  114. package/dist/esm/AccountSASSignatureValues.d.ts +1 -1
  115. package/dist/esm/AccountSASSignatureValues.d.ts.map +1 -1
  116. package/dist/esm/AccountSASSignatureValues.js.map +1 -1
  117. package/dist/esm/Pipeline.d.ts +2 -3
  118. package/dist/esm/Pipeline.d.ts.map +1 -1
  119. package/dist/esm/Pipeline.js +28 -19
  120. package/dist/esm/Pipeline.js.map +1 -1
  121. package/dist/esm/QueueClient.d.ts +2 -2
  122. package/dist/esm/QueueClient.d.ts.map +1 -1
  123. package/dist/esm/QueueClient.js +52 -15
  124. package/dist/esm/QueueClient.js.map +1 -1
  125. package/dist/esm/QueueSASPermissions.js +16 -18
  126. package/dist/esm/QueueSASPermissions.js.map +1 -1
  127. package/dist/esm/QueueSASSignatureValues.d.ts +1 -1
  128. package/dist/esm/QueueSASSignatureValues.d.ts.map +1 -1
  129. package/dist/esm/QueueSASSignatureValues.js.map +1 -1
  130. package/dist/esm/QueueServiceClient.d.ts +2 -2
  131. package/dist/esm/QueueServiceClient.d.ts.map +1 -1
  132. package/dist/esm/QueueServiceClient.js +50 -46
  133. package/dist/esm/QueueServiceClient.js.map +1 -1
  134. package/dist/esm/SASQueryParameters.js +49 -0
  135. package/dist/esm/SASQueryParameters.js.map +1 -1
  136. package/dist/esm/StorageClient.d.ts +2 -2
  137. package/dist/esm/StorageClient.d.ts.map +1 -1
  138. package/dist/esm/StorageClient.js +23 -0
  139. package/dist/esm/StorageClient.js.map +1 -1
  140. package/dist/esm/StorageContextClient.js +1 -1
  141. package/dist/esm/StorageContextClient.js.map +1 -1
  142. package/dist/esm/generated/src/operations/messageId.js +1 -0
  143. package/dist/esm/generated/src/operations/messageId.js.map +1 -1
  144. package/dist/esm/generated/src/operations/messages.js +1 -0
  145. package/dist/esm/generated/src/operations/messages.js.map +1 -1
  146. package/dist/esm/generated/src/operations/queue.js +1 -0
  147. package/dist/esm/generated/src/operations/queue.js.map +1 -1
  148. package/dist/esm/generated/src/operations/service.js +1 -0
  149. package/dist/esm/generated/src/operations/service.js.map +1 -1
  150. package/dist/esm/generated/src/storageClient.js +14 -4
  151. package/dist/esm/generated/src/storageClient.js.map +1 -1
  152. package/dist/esm/index.d.ts +1 -9
  153. package/dist/esm/index.d.ts.map +1 -1
  154. package/dist/esm/index.js +1 -9
  155. package/dist/esm/index.js.map +1 -1
  156. package/dist/esm/utils/constants.d.ts.map +1 -1
  157. package/dist/esm/utils/constants.js +1 -1
  158. package/dist/esm/utils/constants.js.map +1 -1
  159. package/dist/esm/utils/utils.common.js +1 -2
  160. package/dist/esm/utils/utils.common.js.map +1 -1
  161. package/dist/react-native/AccountSASPermissions.js +32 -34
  162. package/dist/react-native/AccountSASPermissions.js.map +1 -1
  163. package/dist/react-native/AccountSASResourceTypes.js +12 -14
  164. package/dist/react-native/AccountSASResourceTypes.js.map +1 -1
  165. package/dist/react-native/AccountSASServices.js +16 -18
  166. package/dist/react-native/AccountSASServices.js.map +1 -1
  167. package/dist/react-native/AccountSASSignatureValues.d.ts +1 -1
  168. package/dist/react-native/AccountSASSignatureValues.d.ts.map +1 -1
  169. package/dist/react-native/AccountSASSignatureValues.js.map +1 -1
  170. package/dist/react-native/Pipeline.d.ts +2 -3
  171. package/dist/react-native/Pipeline.d.ts.map +1 -1
  172. package/dist/react-native/Pipeline.js +28 -19
  173. package/dist/react-native/Pipeline.js.map +1 -1
  174. package/dist/react-native/QueueClient.d.ts +2 -2
  175. package/dist/react-native/QueueClient.d.ts.map +1 -1
  176. package/dist/react-native/QueueClient.js +52 -15
  177. package/dist/react-native/QueueClient.js.map +1 -1
  178. package/dist/react-native/QueueSASPermissions.js +16 -18
  179. package/dist/react-native/QueueSASPermissions.js.map +1 -1
  180. package/dist/react-native/QueueSASSignatureValues.d.ts +1 -1
  181. package/dist/react-native/QueueSASSignatureValues.d.ts.map +1 -1
  182. package/dist/react-native/QueueSASSignatureValues.js.map +1 -1
  183. package/dist/react-native/QueueServiceClient.d.ts +2 -2
  184. package/dist/react-native/QueueServiceClient.d.ts.map +1 -1
  185. package/dist/react-native/QueueServiceClient.js +50 -46
  186. package/dist/react-native/QueueServiceClient.js.map +1 -1
  187. package/dist/react-native/SASQueryParameters.js +49 -0
  188. package/dist/react-native/SASQueryParameters.js.map +1 -1
  189. package/dist/react-native/StorageClient.d.ts +2 -2
  190. package/dist/react-native/StorageClient.d.ts.map +1 -1
  191. package/dist/react-native/StorageClient.js +23 -0
  192. package/dist/react-native/StorageClient.js.map +1 -1
  193. package/dist/react-native/StorageContextClient.js +1 -1
  194. package/dist/react-native/StorageContextClient.js.map +1 -1
  195. package/dist/react-native/generated/src/operations/messageId.js +1 -0
  196. package/dist/react-native/generated/src/operations/messageId.js.map +1 -1
  197. package/dist/react-native/generated/src/operations/messages.js +1 -0
  198. package/dist/react-native/generated/src/operations/messages.js.map +1 -1
  199. package/dist/react-native/generated/src/operations/queue.js +1 -0
  200. package/dist/react-native/generated/src/operations/queue.js.map +1 -1
  201. package/dist/react-native/generated/src/operations/service.js +1 -0
  202. package/dist/react-native/generated/src/operations/service.js.map +1 -1
  203. package/dist/react-native/generated/src/storageClient.js +14 -4
  204. package/dist/react-native/generated/src/storageClient.js.map +1 -1
  205. package/dist/react-native/index.d.ts +1 -9
  206. package/dist/react-native/index.d.ts.map +1 -1
  207. package/dist/react-native/index.js +1 -9
  208. package/dist/react-native/index.js.map +1 -1
  209. package/dist/react-native/utils/constants.d.ts.map +1 -1
  210. package/dist/react-native/utils/constants.js +1 -1
  211. package/dist/react-native/utils/constants.js.map +1 -1
  212. package/dist/react-native/utils/utils.common.js +1 -2
  213. package/dist/react-native/utils/utils.common.js.map +1 -1
  214. package/package.json +36 -37
@@ -5,8 +5,8 @@ import type { StoragePipelineOptions, Pipeline } from "./Pipeline.js";
5
5
  import type { CommonOptions } from "./StorageClient.js";
6
6
  import { StorageClient } from "./StorageClient.js";
7
7
  import type { PagedAsyncIterableIterator } from "@azure/core-paging";
8
- import { StorageSharedKeyCredential } from "@azure/storage-blob";
9
- import { AnonymousCredential } from "@azure/storage-blob";
8
+ import { StorageSharedKeyCredential } from "@azure/storage-common";
9
+ import { AnonymousCredential } from "@azure/storage-common";
10
10
  import type { QueueCreateOptions, QueueDeleteOptions } from "./QueueClient.js";
11
11
  import { QueueClient } from "./QueueClient.js";
12
12
  import { AccountSASPermissions } from "./AccountSASPermissions.js";
@@ -1 +1 @@
1
- {"version":3,"file":"QueueServiceClient.d.ts","sourceRoot":"","sources":["../../src/QueueServiceClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACT,sBAAsB,EACtB,4BAA4B,EAE5B,4BAA4B,EAC5B,gCAAgC,EAChC,4BAA4B,EAM7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAgB,0BAA0B,EAAE,MAAM,oBAAoB,C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SAAS,CAAC,EAAE,IAAI,EAChB,WAAW,GAAE,qBAAwD,EACrE,aAAa,GAAE,MAAc,EAC7B,OAAO,GAAE,mCAAwC,GAChD,MAAM;IA0BT;;;;;;;;;;;;;OAaG;IACI,uBAAuB,CAC5B,SAAS,CAAC,EAAE,IAAI,EAChB,WAAW,GAAE,qBAAwD,EACrE,aAAa,GAAE,MAAc,EAC7B,OAAO,GAAE,mCAAwC,GAChD,MAAM;CAuBV"}
@@ -3,14 +3,13 @@
3
3
  // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.QueueServiceClient = void 0;
6
- const tslib_1 = require("tslib");
7
6
  const core_auth_1 = require("@azure/core-auth");
8
7
  const core_util_1 = require("@azure/core-util");
9
8
  const Pipeline_js_1 = require("./Pipeline.js");
10
9
  const StorageClient_js_1 = require("./StorageClient.js");
11
10
  const utils_common_js_1 = require("./utils/utils.common.js");
12
- const storage_blob_1 = require("@azure/storage-blob");
13
- const storage_blob_2 = require("@azure/storage-blob");
11
+ const storage_common_1 = require("@azure/storage-common");
12
+ const storage_common_2 = require("@azure/storage-common");
14
13
  const tracing_js_1 = require("./utils/tracing.js");
15
14
  const QueueClient_js_1 = require("./QueueClient.js");
16
15
  const AccountSASPermissions_js_1 = require("./AccountSASPermissions.js");
@@ -42,7 +41,7 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
42
41
  const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString);
43
42
  if (extractedCreds.kind === "AccountConnString") {
44
43
  if (core_util_1.isNodeLike) {
45
- const sharedKeyCredential = new storage_blob_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
44
+ const sharedKeyCredential = new storage_common_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
46
45
  if (!options.proxyOptions) {
47
46
  options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri);
48
47
  }
@@ -54,13 +53,17 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
54
53
  }
55
54
  }
56
55
  else if (extractedCreds.kind === "SASConnString") {
57
- const pipeline = (0, Pipeline_js_1.newPipeline)(new storage_blob_2.AnonymousCredential(), options);
56
+ const pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_2.AnonymousCredential(), options);
58
57
  return new QueueServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline);
59
58
  }
60
59
  else {
61
60
  throw new Error("Connection string must be either an Account connection string or a SAS connection string");
62
61
  }
63
62
  }
63
+ /**
64
+ * serviceContext provided by protocol layer.
65
+ */
66
+ serviceContext;
64
67
  constructor(url, credentialOrPipeline,
65
68
  // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
66
69
  /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
@@ -69,14 +72,14 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
69
72
  if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) {
70
73
  pipeline = credentialOrPipeline;
71
74
  }
72
- else if ((core_util_1.isNodeLike && credentialOrPipeline instanceof storage_blob_1.StorageSharedKeyCredential) ||
73
- credentialOrPipeline instanceof storage_blob_2.AnonymousCredential ||
75
+ else if ((core_util_1.isNodeLike && credentialOrPipeline instanceof storage_common_1.StorageSharedKeyCredential) ||
76
+ credentialOrPipeline instanceof storage_common_2.AnonymousCredential ||
74
77
  (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) {
75
78
  pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options);
76
79
  }
77
80
  else {
78
81
  // The second parameter is undefined. Use anonymous credential.
79
- pipeline = (0, Pipeline_js_1.newPipeline)(new storage_blob_2.AnonymousCredential(), options);
82
+ pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_2.AnonymousCredential(), options);
80
83
  }
81
84
  super(url, pipeline);
82
85
  this.serviceContext = this.storageClientContext.service;
@@ -129,7 +132,11 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
129
132
  options.prefix = undefined;
130
133
  }
131
134
  return tracing_js_1.tracingClient.withSpan("QueueServiceClient-listQueuesSegment", options, async (updatedOptions) => {
132
- return (0, utils_common_js_1.assertResponse)(await this.serviceContext.listQueuesSegment(Object.assign(Object.assign({}, updatedOptions), { marker, include: options.include === undefined ? undefined : [options.include] })));
135
+ return (0, utils_common_js_1.assertResponse)(await this.serviceContext.listQueuesSegment({
136
+ ...updatedOptions,
137
+ marker,
138
+ include: options.include === undefined ? undefined : [options.include],
139
+ }));
133
140
  });
134
141
  }
135
142
  /**
@@ -144,49 +151,32 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
144
151
  * items. The marker value is opaque to the client.
145
152
  * @param options - Options to list queues operation.
146
153
  */
147
- listSegments(marker_1) {
148
- return tslib_1.__asyncGenerator(this, arguments, function* listSegments_1(marker, options = {}) {
149
- if (options.prefix === "") {
150
- options.prefix = undefined;
151
- }
152
- let listQueuesResponse;
153
- do {
154
- listQueuesResponse = yield tslib_1.__await(this.listQueuesSegment(marker, options));
155
- marker = listQueuesResponse.continuationToken;
156
- yield yield tslib_1.__await(yield tslib_1.__await(listQueuesResponse));
157
- } while (marker);
158
- });
154
+ async *listSegments(marker, options = {}) {
155
+ if (options.prefix === "") {
156
+ options.prefix = undefined;
157
+ }
158
+ let listQueuesResponse;
159
+ do {
160
+ listQueuesResponse = await this.listQueuesSegment(marker, options);
161
+ marker = listQueuesResponse.continuationToken;
162
+ yield await listQueuesResponse;
163
+ } while (marker);
159
164
  }
160
165
  /**
161
166
  * Returns an AsyncIterableIterator for {@link QueueItem} objects
162
167
  *
163
168
  * @param options - Options to list queues operation.
164
169
  */
165
- listItems() {
166
- return tslib_1.__asyncGenerator(this, arguments, function* listItems_1(options = {}) {
167
- var _a, e_1, _b, _c;
168
- if (options.prefix === "") {
169
- options.prefix = undefined;
170
- }
171
- let marker;
172
- try {
173
- for (var _d = true, _e = tslib_1.__asyncValues(this.listSegments(marker, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
174
- _c = _f.value;
175
- _d = false;
176
- const segment = _c;
177
- if (segment.queueItems) {
178
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(segment.queueItems)));
179
- }
180
- }
181
- }
182
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
183
- finally {
184
- try {
185
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
186
- }
187
- finally { if (e_1) throw e_1.error; }
170
+ async *listItems(options = {}) {
171
+ if (options.prefix === "") {
172
+ options.prefix = undefined;
173
+ }
174
+ let marker;
175
+ for await (const segment of this.listSegments(marker, options)) {
176
+ if (segment.queueItems) {
177
+ yield* segment.queueItems;
188
178
  }
189
- });
179
+ }
190
180
  }
191
181
  /**
192
182
  * Returns an async iterable iterator to list all the queues
@@ -294,7 +284,10 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
294
284
  if (options.prefix === "") {
295
285
  options.prefix = undefined;
296
286
  }
297
- const updatedOptions = Object.assign(Object.assign({}, options), (options.includeMetadata ? { include: "metadata" } : {}));
287
+ const updatedOptions = {
288
+ ...options,
289
+ ...(options.includeMetadata ? { include: "metadata" } : {}),
290
+ };
298
291
  // AsyncIterableIterator to iterate over queues
299
292
  const iter = this.listItems(updatedOptions);
300
293
  return {
@@ -314,7 +307,10 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
314
307
  * Return an AsyncIterableIterator that works a page at a time
315
308
  */
316
309
  byPage: (settings = {}) => {
317
- return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
310
+ return this.listSegments(settings.continuationToken, {
311
+ maxPageSize: settings.maxPageSize,
312
+ ...updatedOptions,
313
+ });
318
314
  },
319
315
  };
320
316
  }
@@ -400,16 +396,20 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
400
396
  * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
401
397
  */
402
398
  generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) {
403
- if (!(this.credential instanceof storage_blob_1.StorageSharedKeyCredential)) {
399
+ if (!(this.credential instanceof storage_common_1.StorageSharedKeyCredential)) {
404
400
  throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential");
405
401
  }
406
402
  if (expiresOn === undefined) {
407
403
  const now = new Date();
408
404
  expiresOn = new Date(now.getTime() + 3600 * 1000);
409
405
  }
410
- const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)(Object.assign({ permissions,
406
+ const sas = (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParameters)({
407
+ permissions,
411
408
  expiresOn,
412
- resourceTypes, services: AccountSASServices_js_1.AccountSASServices.parse("q").toString() }, options), this.credential).toString();
409
+ resourceTypes,
410
+ services: AccountSASServices_js_1.AccountSASServices.parse("q").toString(),
411
+ ...options,
412
+ }, this.credential).toString();
413
413
  return (0, utils_common_js_1.appendToURLQuery)(this.url, sas);
414
414
  }
415
415
  /**
@@ -427,16 +427,20 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
427
427
  * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
428
428
  */
429
429
  generateSasStringToSign(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) {
430
- if (!(this.credential instanceof storage_blob_1.StorageSharedKeyCredential)) {
430
+ if (!(this.credential instanceof storage_common_1.StorageSharedKeyCredential)) {
431
431
  throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential");
432
432
  }
433
433
  if (expiresOn === undefined) {
434
434
  const now = new Date();
435
435
  expiresOn = new Date(now.getTime() + 3600 * 1000);
436
436
  }
437
- return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)(Object.assign({ permissions,
437
+ return (0, AccountSASSignatureValues_js_1.generateAccountSASQueryParametersInternal)({
438
+ permissions,
438
439
  expiresOn,
439
- resourceTypes, services: AccountSASServices_js_1.AccountSASServices.parse("q").toString() }, options), this.credential).stringToSign;
440
+ resourceTypes,
441
+ services: AccountSASServices_js_1.AccountSASServices.parse("q").toString(),
442
+ ...options,
443
+ }, this.credential).stringToSign;
440
444
  }
441
445
  }
442
446
  exports.QueueServiceClient = QueueServiceClient;
@@ -1 +1 @@
1
- {"version":3,"file":"QueueServiceClient.js","sourceRoot":"","sources":["../../src/QueueServiceClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAGlC,gDAAqD;AACrD,gDAA8C;AAoB9C,+CAA4D;AAE5D,yDAAmD;AAEnD,6DAKiC;AACjC,sDAAiE;AACjE,sDAA0D;AAC1D,mDAAmD;AAEnD,qDAA+C;AAC/C,yEAAmE;AACnE,iFAGwC;AACxC,mEAA6D;AAG7D,kEAAoE;AAsHpE;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,gCAAa;IACnD;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,oBAAoB,CAChC,gBAAwB;IACxB,2FAA2F;IAC3F,iEAAiE;IACjE,OAAgC;QAEhC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QACxB,MAAM,cAAc,GAAG,IAAA,8CAA4B,EAAC,gBAAgB,CAAC,CAAC;QACtE,IAAI,cAAc,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;YAChD,IAAI,sBAAU,EAAE,CAAC;gBACf,MAAM,mBAAmB,GAAG,IAAI,yCAA0B,CACxD,cAAc,CAAC,WAAY,EAC3B,cAAc,CAAC,UAAU,CAC1B,CAAC;gBACF,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;oBAC1B,OAAO,CAAC,YAAY,GAAG,IAAA,4CAAuB,EAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;gBAC1E,CAAC;gBACD,MAAM,QAAQ,GAAG,IAAA,yBAAW,EAAC,mBAAmB,EAAE,OAAO,CAAC,CA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AC5B,SAAgB,EAChB,cAAqC,gDAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,EACrE,gBAAwB,KAAK,EAC7B,UAA+C,EAAE;QAEjD,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,yCAA0B,CAAC,EAAE,CAAC;YAC7D,MAAM,UAAU,CACd,+FAA+F,CAChG,CAAC;QACJ,CAAC;QAED,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,IAAA,wEAAyC,kBAE5C,WAAW;YACX,SAAS;YACT,aAAa,EACb,QAAQ,EAAE,0CAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,IAC/C,OAAO,GAEZ,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF;AA9lBD,gDA8lBC","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 { isNodeLike } from \"@azure/core-util\";\nimport type {\n QueueCreateResponse,\n QueueDeleteResponse,\n QueueItem,\n QueueServiceProperties,\n ServiceGetPropertiesResponse,\n ServiceGetPropertiesHeaders,\n ServiceGetStatisticsResponse,\n ServiceListQueuesSegmentResponse,\n ServiceSetPropertiesResponse,\n ServiceListQueuesSegmentHeaders,\n ListQueuesSegmentResponse,\n ServiceSetPropertiesHeaders,\n ServiceGetStatisticsHeaders,\n QueueServiceStatistics,\n} from \"./generatedModels.js\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { Service } 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 } from \"./StorageClient.js\";\nimport type { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n extractConnectionStringParts,\n assertResponse,\n} from \"./utils/utils.common.js\";\nimport { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport type { QueueCreateOptions, QueueDeleteOptions } from \"./QueueClient.js\";\nimport { QueueClient } from \"./QueueClient.js\";\nimport { AccountSASPermissions } from \"./AccountSASPermissions.js\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./AccountSASSignatureValues.js\";\nimport { AccountSASServices } from \"./AccountSASServices.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { getDefaultProxySettings } from \"@azure/core-rest-pipeline\";\n\n/**\n * Options to configure {@link QueueServiceClient.getProperties} operation\n */\nexport interface ServiceGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure {@link QueueServiceClient.setProperties} operation\n */\nexport interface ServiceSetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure {@link QueueServiceClient.getStatistics} operation\n */\nexport interface ServiceGetStatisticsOptions 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 Queue Service - List Queues Segment operation\n *\n * See:\n * - {@link QueueServiceClient.listSegments}\n * - {@link QueueServiceClient.listQueuesSegment}\n * - {@link QueueServiceClient.listItems}\n */\ninterface ServiceListQueuesSegmentOptions 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 * Filters the results to return only queues\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of queues\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n */\n maxPageSize?: number;\n /**\n * Include this parameter to\n * specify that the queue's metadata be returned as part of the response\n * body. Possible values include: 'metadata'\n */\n include?: string;\n}\n\n/**\n * Options to configure {@link QueueServiceClient.listQueues} operation\n */\nexport interface ServiceListQueuesOptions 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 * Filters the results to return only queues\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies whether the queue's metadata be returned as part of the response\n * body.\n */\n includeMetadata?: boolean;\n}\n\n/**\n * Options to configure {@link QueueServiceClient.generateAccountSasUrl} operation.\n */\nexport interface ServiceGenerateAccountSasUrlOptions {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n}\n\n/**\n * A QueueServiceClient represents a URL to the Azure Storage Queue service allowing you\n * to manipulate queues.\n */\nexport class QueueServiceClient extends StorageClient {\n /**\n * Creates an instance of QueueServiceClient.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param options - Options to configure the HTTP pipeline.\n * @returns A new QueueServiceClient object from the given connection string.\n */\n public static fromConnectionString(\n connectionString: string,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: StoragePipelineOptions,\n ): QueueServiceClient {\n options = options || {};\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNodeLike) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey,\n );\n if (!options.proxyOptions) {\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n }\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new QueueServiceClient(extractedCreds.url, pipeline);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new QueueServiceClient(extractedCreds.url + \"?\" + extractedCreds.accountSas, pipeline);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\",\n );\n }\n }\n\n /**\n * serviceContext provided by protocol layer.\n */\n private serviceContext: Service;\n\n /**\n * Creates an instance of QueueServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage queue service, such as\n * \"https://myaccount.queue.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.queue.core.windows.net?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 * Example using DefaultAzureCredential from `@azure/identity`:\n *\n * ```ts snippet:ReadmeSampleCreateClient_DefaultAzureCredential\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { QueueServiceClient } from \"@azure/storage-queue\";\n *\n * const account = \"<account>\";\n * const credential = new DefaultAzureCredential();\n *\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * credential,\n * );\n * ```\n *\n * Example using an account name/key:\n *\n * ```ts snippet:ReadmeSampleCreateClient_StorageSharedKeyCredential\n * import { StorageSharedKeyCredential, QueueServiceClient } from \"@azure/storage-queue\";\n *\n * // Enter your storage account name and shared key\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * // Use StorageSharedKeyCredential with storage account and account key\n * // StorageSharedKeyCredential is only available in Node.js runtime, not in browsers\n * const sharedKeyCredential = new StorageSharedKeyCredential(account, accountKey);\n *\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * sharedKeyCredential,\n * {\n * retryOptions: { maxTries: 4 }, // Retry options\n * userAgentOptions: {\n * userAgentPrefix: \"BasicSample V10.0.0\",\n * }, // Customized telemetry string\n * },\n * );\n * ```\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 QueueServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage queue service, such as\n * \"https://myaccount.queue.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.queue.core.windows.net?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 url: string,\n credentialOrPipeline?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: StoragePipelineOptions,\n ) {\n let pipeline: Pipeline;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n } else if (\n (isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential) ||\n credentialOrPipeline instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipeline)\n ) {\n pipeline = newPipeline(credentialOrPipeline, options);\n } else {\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n super(url, pipeline);\n this.serviceContext = this.storageClientContext.service;\n }\n\n /**\n * Creates a {@link QueueClient} object.\n *\n * @param queueName -\n * @returns a new QueueClient\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 getQueueClient(queueName: string): QueueClient {\n return new QueueClient(appendToURLPath(this.url, queueName), this.pipeline);\n }\n\n /**\n * Returns a list of the queues under the specified account.\n * @see https://learn.microsoft.com/rest/api/storageservices/list-queues1\n *\n * @param marker - A string value that identifies the portion of\n * the list of queues to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all queues remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list queues operation.\n * @returns Response data for the list queues segment operation.\n */\n private async listQueuesSegment(\n marker?: string,\n options: ServiceListQueuesSegmentOptions = {},\n ): Promise<ServiceListQueuesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n return tracingClient.withSpan(\n \"QueueServiceClient-listQueuesSegment\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceListQueuesSegmentHeaders & ListQueuesSegmentResponse,\n ServiceListQueuesSegmentHeaders,\n ListQueuesSegmentResponse\n >(\n await this.serviceContext.listQueuesSegment({\n ...updatedOptions,\n marker,\n include: options.include === undefined ? undefined : [options.include],\n }),\n );\n },\n );\n }\n\n /**\n * Returns an AsyncIterableIterator for {@link ServiceListQueuesSegmentResponse} objects\n *\n * @param marker - A string value that identifies the portion of\n * the list of queues to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all queues remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list queues operation.\n */\n private async *listSegments(\n marker?: string,\n options: ServiceListQueuesSegmentOptions = {},\n ): AsyncIterableIterator<ServiceListQueuesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let listQueuesResponse;\n do {\n listQueuesResponse = await this.listQueuesSegment(marker, options);\n marker = listQueuesResponse.continuationToken;\n yield await listQueuesResponse;\n } while (marker);\n }\n\n /**\n * Returns an AsyncIterableIterator for {@link QueueItem} objects\n *\n * @param options - Options to list queues operation.\n */\n private async *listItems(\n options: ServiceListQueuesSegmentOptions = {},\n ): AsyncIterableIterator<QueueItem> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let marker: string | undefined;\n for await (const segment of this.listSegments(marker, options)) {\n if (segment.queueItems) {\n yield* segment.queueItems;\n }\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the queues\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the queues in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListQueues\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 * let i = 1;\n * for await (const item of queueServiceClient.listQueues()) {\n * console.log(`Queue${i++}: ${item.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListQueues_Iterator\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 * let i = 1;\n * const iterator = queueServiceClient.listQueues();\n * let { done, value } = await iterator.next();\n * while (!done) {\n * console.log(`Queue${i++}: ${value.name}`);\n * ({ done, value } = await iterator.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListQueues_ByPage\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 * let i = 1;\n * for await (const page of queueServiceClient.listQueues().byPage({ maxPageSize: 20 })) {\n * for (const item of page.queueItems || []) {\n * console.log(`Queue${i++}: ${item.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListQueues_Continuation\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 * let i = 1;\n * let iterator = queueServiceClient.listQueues().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n * // Prints 2 queues\n * if (response.queueItems) {\n * for (const item of response.queueItems) {\n * console.log(`Queue${i++}: ${item.name}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = queueServiceClient.listQueues().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n * // Prints 10 queues\n * if (response.queueItems) {\n * for (const item of response.queueItems) {\n * console.log(`Queue${i++}: ${item.name}`);\n * }\n * }\n * ```\n *\n * @param options - Options to list queues operation.\n * @returns An asyncIterableIterator that supports paging.\n */\n public listQueues(\n options: ServiceListQueuesOptions = {},\n ): PagedAsyncIterableIterator<QueueItem, ServiceListQueuesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const updatedOptions: ServiceListQueuesSegmentOptions = {\n ...options,\n ...(options.includeMetadata ? { include: \"metadata\" } : {}),\n };\n\n // AsyncIterableIterator to iterate over queues\n const iter = this.listItems(updatedOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...updatedOptions,\n });\n },\n };\n }\n\n /**\n * Gets the properties of a storage account’s Queue service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://learn.microsoft.com/rest/api/storageservices/get-queue-service-properties\n *\n * @param options - Options to get properties operation.\n * @returns Response data including the queue service properties.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<ServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"QueueServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceGetPropertiesHeaders & QueueServiceProperties,\n ServiceGetPropertiesHeaders,\n QueueServiceProperties\n >(await this.serviceContext.getProperties(updatedOptions));\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s Queue service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://learn.microsoft.com/rest/api/storageservices/set-queue-service-properties\n *\n * @param properties -\n * @param options - Options to set properties operation.\n * @returns Response data for the Set Properties operation.\n */\n public async setProperties(\n properties: QueueServiceProperties,\n options: ServiceGetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"QueueServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceSetPropertiesHeaders, ServiceSetPropertiesHeaders>(\n await this.serviceContext.setProperties(properties, updatedOptions),\n );\n },\n );\n }\n\n /**\n * Retrieves statistics related to replication for the Queue service. It is only\n * available on the secondary location endpoint when read-access geo-redundant\n * replication is enabled for the storage account.\n * @see https://learn.microsoft.com/rest/api/storageservices/get-queue-service-stats\n *\n * @param options - Options to get statistics operation.\n * @returns Response data for get statistics the operation.\n */\n public async getStatistics(\n options: ServiceGetStatisticsOptions = {},\n ): Promise<ServiceGetStatisticsResponse> {\n return tracingClient.withSpan(\n \"QueueServiceClient-getStatistics\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceGetStatisticsHeaders & QueueServiceStatistics,\n ServiceGetStatisticsHeaders,\n QueueServiceStatistics\n >(await this.serviceContext.getStatistics(updatedOptions));\n },\n );\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 queueName - name of the queue to create\n * @param options - Options to Queue create operation.\n * @returns Response data for the Queue create operation.\n */\n public async createQueue(\n queueName: string,\n options: QueueCreateOptions = {},\n ): Promise<QueueCreateResponse> {\n return tracingClient.withSpan(\n \"QueueServiceClient-createQueue\",\n options,\n async (updatedOptions) => {\n return this.getQueueClient(queueName).create(updatedOptions);\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 queueName - name of the queue to delete.\n * @param options - Options to Queue delete operation.\n * @returns Response data for the Queue delete operation.\n */\n public async deleteQueue(\n queueName: string,\n options: QueueDeleteOptions = {},\n ): Promise<QueueDeleteResponse> {\n return tracingClient.withSpan(\n \"QueueServiceClient-deleteQueue\",\n options,\n async (updatedOptions) => {\n return this.getQueueClient(queueName).delete(updatedOptions);\n },\n );\n }\n\n /**\n * Only available for QueueServiceClient constructed with a shared key credential.\n *\n * Generates an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateAccountSasUrl(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n const sas = generateAccountSASQueryParameters(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"q\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for QueueServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasStringToSign(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n return generateAccountSASQueryParametersInternal(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"q\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n}\n"]}
1
+ {"version":3,"file":"QueueServiceClient.js","sourceRoot":"","sources":["../../src/QueueServiceClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,gDAAqD;AACrD,gDAA8C;AAoB9C,+CAA4D;AAE5D,yDAAmD;AAEnD,6DAKiC;AACjC,0DAAmE;AACnE,0DAA4D;AAC5D,mDAAmD;AAEnD,qDAA+C;AAC/C,yEAAmE;AACnE,iFAGwC;AACxC,mEAA6D;AAG7D,kEAAoE;AAsHpE;;;GAGG;AACH,MAAa,kBAAmB,SAAQ,gCAAa;IACnD;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,oBAAoB,CAChC,gBAAwB;IACxB,2FAA2F;IAC3F,i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Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport type {\n QueueCreateResponse,\n QueueDeleteResponse,\n QueueItem,\n QueueServiceProperties,\n ServiceGetPropertiesResponse,\n ServiceGetPropertiesHeaders,\n ServiceGetStatisticsResponse,\n ServiceListQueuesSegmentResponse,\n ServiceSetPropertiesResponse,\n ServiceListQueuesSegmentHeaders,\n ListQueuesSegmentResponse,\n ServiceSetPropertiesHeaders,\n ServiceGetStatisticsHeaders,\n QueueServiceStatistics,\n} from \"./generatedModels.js\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { Service } 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 } from \"./StorageClient.js\";\nimport type { PageSettings, PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n extractConnectionStringParts,\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 { QueueCreateOptions, QueueDeleteOptions } from \"./QueueClient.js\";\nimport { QueueClient } from \"./QueueClient.js\";\nimport { AccountSASPermissions } from \"./AccountSASPermissions.js\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./AccountSASSignatureValues.js\";\nimport { AccountSASServices } from \"./AccountSASServices.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { getDefaultProxySettings } from \"@azure/core-rest-pipeline\";\n\n/**\n * Options to configure {@link QueueServiceClient.getProperties} operation\n */\nexport interface ServiceGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure {@link QueueServiceClient.setProperties} operation\n */\nexport interface ServiceSetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the &commat;azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure {@link QueueServiceClient.getStatistics} operation\n */\nexport interface ServiceGetStatisticsOptions 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 Queue Service - List Queues Segment operation\n *\n * See:\n * - {@link QueueServiceClient.listSegments}\n * - {@link QueueServiceClient.listQueuesSegment}\n * - {@link QueueServiceClient.listItems}\n */\ninterface ServiceListQueuesSegmentOptions 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 * Filters the results to return only queues\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of queues\n * to return. If the request does not specify maxPageSize, or specifies a\n * value greater than 5000, the server will return up to 5000 items. Note\n * that if the listing operation crosses a partition boundary, then the\n * service will return a continuation token for retrieving the remainder of\n * the results. For this reason, it is possible that the service will return\n * fewer results than specified by maxPageSize, or than the default of 5000.\n */\n maxPageSize?: number;\n /**\n * Include this parameter to\n * specify that the queue's metadata be returned as part of the response\n * body. Possible values include: 'metadata'\n */\n include?: string;\n}\n\n/**\n * Options to configure {@link QueueServiceClient.listQueues} operation\n */\nexport interface ServiceListQueuesOptions 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 * Filters the results to return only queues\n * whose name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies whether the queue's metadata be returned as part of the response\n * body.\n */\n includeMetadata?: boolean;\n}\n\n/**\n * Options to configure {@link QueueServiceClient.generateAccountSasUrl} operation.\n */\nexport interface ServiceGenerateAccountSasUrlOptions {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n}\n\n/**\n * A QueueServiceClient represents a URL to the Azure Storage Queue service allowing you\n * to manipulate queues.\n */\nexport class QueueServiceClient extends StorageClient {\n /**\n * Creates an instance of QueueServiceClient.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param options - Options to configure the HTTP pipeline.\n * @returns A new QueueServiceClient object from the given connection string.\n */\n public static fromConnectionString(\n connectionString: string,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: StoragePipelineOptions,\n ): QueueServiceClient {\n options = options || {};\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNodeLike) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey,\n );\n if (!options.proxyOptions) {\n options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);\n }\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new QueueServiceClient(extractedCreds.url, pipeline);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new QueueServiceClient(extractedCreds.url + \"?\" + extractedCreds.accountSas, pipeline);\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\",\n );\n }\n }\n\n /**\n * serviceContext provided by protocol layer.\n */\n private serviceContext: Service;\n\n /**\n * Creates an instance of QueueServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage queue service, such as\n * \"https://myaccount.queue.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.queue.core.windows.net?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 * Example using DefaultAzureCredential from `@azure/identity`:\n *\n * ```ts snippet:ReadmeSampleCreateClient_DefaultAzureCredential\n * import { DefaultAzureCredential } from \"@azure/identity\";\n * import { QueueServiceClient } from \"@azure/storage-queue\";\n *\n * const account = \"<account>\";\n * const credential = new DefaultAzureCredential();\n *\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * credential,\n * );\n * ```\n *\n * Example using an account name/key:\n *\n * ```ts snippet:ReadmeSampleCreateClient_StorageSharedKeyCredential\n * import { StorageSharedKeyCredential, QueueServiceClient } from \"@azure/storage-queue\";\n *\n * // Enter your storage account name and shared key\n * const account = \"<account>\";\n * const accountKey = \"<accountkey>\";\n *\n * // Use StorageSharedKeyCredential with storage account and account key\n * // StorageSharedKeyCredential is only available in Node.js runtime, not in browsers\n * const sharedKeyCredential = new StorageSharedKeyCredential(account, accountKey);\n *\n * const queueServiceClient = new QueueServiceClient(\n * `https://${account}.queue.core.windows.net`,\n * sharedKeyCredential,\n * {\n * retryOptions: { maxTries: 4 }, // Retry options\n * userAgentOptions: {\n * userAgentPrefix: \"BasicSample V10.0.0\",\n * }, // Customized telemetry string\n * },\n * );\n * ```\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 QueueServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage queue service, such as\n * \"https://myaccount.queue.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.queue.core.windows.net?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 url: string,\n credentialOrPipeline?:\n | StorageSharedKeyCredential\n | AnonymousCredential\n | TokenCredential\n | Pipeline,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: StoragePipelineOptions,\n ) {\n let pipeline: Pipeline;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n } else if (\n (isNodeLike && credentialOrPipeline instanceof StorageSharedKeyCredential) ||\n credentialOrPipeline instanceof AnonymousCredential ||\n isTokenCredential(credentialOrPipeline)\n ) {\n pipeline = newPipeline(credentialOrPipeline, options);\n } else {\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n super(url, pipeline);\n this.serviceContext = this.storageClientContext.service;\n }\n\n /**\n * Creates a {@link QueueClient} object.\n *\n * @param queueName -\n * @returns a new QueueClient\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 getQueueClient(queueName: string): QueueClient {\n return new QueueClient(appendToURLPath(this.url, queueName), this.pipeline);\n }\n\n /**\n * Returns a list of the queues under the specified account.\n * @see https://learn.microsoft.com/rest/api/storageservices/list-queues1\n *\n * @param marker - A string value that identifies the portion of\n * the list of queues to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all queues remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list queues operation.\n * @returns Response data for the list queues segment operation.\n */\n private async listQueuesSegment(\n marker?: string,\n options: ServiceListQueuesSegmentOptions = {},\n ): Promise<ServiceListQueuesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n return tracingClient.withSpan(\n \"QueueServiceClient-listQueuesSegment\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceListQueuesSegmentHeaders & ListQueuesSegmentResponse,\n ServiceListQueuesSegmentHeaders,\n ListQueuesSegmentResponse\n >(\n await this.serviceContext.listQueuesSegment({\n ...updatedOptions,\n marker,\n include: options.include === undefined ? undefined : [options.include],\n }),\n );\n },\n );\n }\n\n /**\n * Returns an AsyncIterableIterator for {@link ServiceListQueuesSegmentResponse} objects\n *\n * @param marker - A string value that identifies the portion of\n * the list of queues to be returned with the next listing operation. The\n * operation returns the continuationToken value within the response body if the\n * listing operation did not return all queues remaining to be listed\n * with the current page. The continuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list queues operation.\n */\n private async *listSegments(\n marker?: string,\n options: ServiceListQueuesSegmentOptions = {},\n ): AsyncIterableIterator<ServiceListQueuesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let listQueuesResponse;\n do {\n listQueuesResponse = await this.listQueuesSegment(marker, options);\n marker = listQueuesResponse.continuationToken;\n yield await listQueuesResponse;\n } while (marker);\n }\n\n /**\n * Returns an AsyncIterableIterator for {@link QueueItem} objects\n *\n * @param options - Options to list queues operation.\n */\n private async *listItems(\n options: ServiceListQueuesSegmentOptions = {},\n ): AsyncIterableIterator<QueueItem> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let marker: string | undefined;\n for await (const segment of this.listSegments(marker, options)) {\n if (segment.queueItems) {\n yield* segment.queueItems;\n }\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the queues\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the queues in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListQueues\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 * let i = 1;\n * for await (const item of queueServiceClient.listQueues()) {\n * console.log(`Queue${i++}: ${item.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListQueues_Iterator\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 * let i = 1;\n * const iterator = queueServiceClient.listQueues();\n * let { done, value } = await iterator.next();\n * while (!done) {\n * console.log(`Queue${i++}: ${value.name}`);\n * ({ done, value } = await iterator.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListQueues_ByPage\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 * let i = 1;\n * for await (const page of queueServiceClient.listQueues().byPage({ maxPageSize: 20 })) {\n * for (const item of page.queueItems || []) {\n * console.log(`Queue${i++}: ${item.name}`);\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListQueues_Continuation\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 * let i = 1;\n * let iterator = queueServiceClient.listQueues().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n * // Prints 2 queues\n * if (response.queueItems) {\n * for (const item of response.queueItems) {\n * console.log(`Queue${i++}: ${item.name}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * iterator = queueServiceClient.listQueues().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n * // Prints 10 queues\n * if (response.queueItems) {\n * for (const item of response.queueItems) {\n * console.log(`Queue${i++}: ${item.name}`);\n * }\n * }\n * ```\n *\n * @param options - Options to list queues operation.\n * @returns An asyncIterableIterator that supports paging.\n */\n public listQueues(\n options: ServiceListQueuesOptions = {},\n ): PagedAsyncIterableIterator<QueueItem, ServiceListQueuesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const updatedOptions: ServiceListQueuesSegmentOptions = {\n ...options,\n ...(options.includeMetadata ? { include: \"metadata\" } : {}),\n };\n\n // AsyncIterableIterator to iterate over queues\n const iter = this.listItems(updatedOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(settings.continuationToken, {\n maxPageSize: settings.maxPageSize,\n ...updatedOptions,\n });\n },\n };\n }\n\n /**\n * Gets the properties of a storage account’s Queue service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://learn.microsoft.com/rest/api/storageservices/get-queue-service-properties\n *\n * @param options - Options to get properties operation.\n * @returns Response data including the queue service properties.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<ServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"QueueServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceGetPropertiesHeaders & QueueServiceProperties,\n ServiceGetPropertiesHeaders,\n QueueServiceProperties\n >(await this.serviceContext.getProperties(updatedOptions));\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s Queue service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://learn.microsoft.com/rest/api/storageservices/set-queue-service-properties\n *\n * @param properties -\n * @param options - Options to set properties operation.\n * @returns Response data for the Set Properties operation.\n */\n public async setProperties(\n properties: QueueServiceProperties,\n options: ServiceGetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"QueueServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceSetPropertiesHeaders, ServiceSetPropertiesHeaders>(\n await this.serviceContext.setProperties(properties, updatedOptions),\n );\n },\n );\n }\n\n /**\n * Retrieves statistics related to replication for the Queue service. It is only\n * available on the secondary location endpoint when read-access geo-redundant\n * replication is enabled for the storage account.\n * @see https://learn.microsoft.com/rest/api/storageservices/get-queue-service-stats\n *\n * @param options - Options to get statistics operation.\n * @returns Response data for get statistics the operation.\n */\n public async getStatistics(\n options: ServiceGetStatisticsOptions = {},\n ): Promise<ServiceGetStatisticsResponse> {\n return tracingClient.withSpan(\n \"QueueServiceClient-getStatistics\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceGetStatisticsHeaders & QueueServiceStatistics,\n ServiceGetStatisticsHeaders,\n QueueServiceStatistics\n >(await this.serviceContext.getStatistics(updatedOptions));\n },\n );\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 queueName - name of the queue to create\n * @param options - Options to Queue create operation.\n * @returns Response data for the Queue create operation.\n */\n public async createQueue(\n queueName: string,\n options: QueueCreateOptions = {},\n ): Promise<QueueCreateResponse> {\n return tracingClient.withSpan(\n \"QueueServiceClient-createQueue\",\n options,\n async (updatedOptions) => {\n return this.getQueueClient(queueName).create(updatedOptions);\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 queueName - name of the queue to delete.\n * @param options - Options to Queue delete operation.\n * @returns Response data for the Queue delete operation.\n */\n public async deleteQueue(\n queueName: string,\n options: QueueDeleteOptions = {},\n ): Promise<QueueDeleteResponse> {\n return tracingClient.withSpan(\n \"QueueServiceClient-deleteQueue\",\n options,\n async (updatedOptions) => {\n return this.getQueueClient(queueName).delete(updatedOptions);\n },\n );\n }\n\n /**\n * Only available for QueueServiceClient constructed with a shared key credential.\n *\n * Generates an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateAccountSasUrl(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n const sas = generateAccountSASQueryParameters(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"q\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for QueueServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasStringToSign(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n return generateAccountSASQueryParametersInternal(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"q\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n}\n"]}
@@ -29,6 +29,55 @@ var SASProtocol;
29
29
  * NOTE: Instances of this class are immutable.
30
30
  */
31
31
  class SASQueryParameters {
32
+ /**
33
+ * The storage API version.
34
+ */
35
+ version;
36
+ /**
37
+ * Optional. The allowed HTTP protocol(s).
38
+ */
39
+ protocol;
40
+ /**
41
+ * Optional. The start time for this SAS token.
42
+ */
43
+ startsOn;
44
+ /**
45
+ * Optional only when identifier is provided. The expiry time for this SAS token.
46
+ */
47
+ expiresOn;
48
+ /**
49
+ * Optional only when identifier is provided.
50
+ * Please refer to {@link AccountSASPermissions}, {@link QueueSASPermissions} for more details.
51
+ */
52
+ permissions;
53
+ /**
54
+ * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}
55
+ * for more details.
56
+ */
57
+ services;
58
+ /**
59
+ * Optional. The storage resource types being accessed (only for Account SAS). Please refer to
60
+ * {@link AccountSASResourceTypes} for more details.
61
+ */
62
+ resourceTypes;
63
+ /**
64
+ * Optional. The signed identifier (only for {@link QueueSASSignatureValues}).
65
+ *
66
+ * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy
67
+ */
68
+ identifier;
69
+ /**
70
+ * Optional. The storage queue (only for {@link QueueSASSignatureValues}).
71
+ */
72
+ resource;
73
+ /**
74
+ * The signature for the SAS token.
75
+ */
76
+ signature;
77
+ /**
78
+ * Inner value of getter ipRange.
79
+ */
80
+ ipRangeInner;
32
81
  /**
33
82
  * Optional. IP range allowed for this SAS.
34
83
  *
@@ -1 +1 @@
1
- {"version":3,"file":"SASQueryParameters.js","sourceRoot":"","sources":["../../src/SASQueryParameters.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,mDAAkD;AAClD,6DAA+D;AAE/D;;GAEG;AACH,IAAY,WAUX;AAVD,WAAY,WAAW;IACrB;;OAEG;IACH,8BAAe,CAAA;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;oBACP,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;oBAC9D,MAAM;gBACR,KAAK,IAAI;oBACP,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAC5D,MAAM;gBACR,KAAK,IAAI;oBACP,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;oBAC/D,MAAM;gBACR,KAAK,KAAK;oBACR,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;oBAC7D,MAAM;YACV,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED;;;;;;OAMG;IACK,uBAAuB,CAAC,OAAiB,EAAE,GAAW,EAAE,KAAc;QAC5E,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO;QACT,CAAC;QAED,GAAG,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC9B,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;CACF;AAnMD,gDAmMC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\n\n/**\n * Protocols for generated SAS.\n */\nexport enum SASProtocol {\n /**\n * Protocol that allows HTTPS only\n */\n Https = \"https\",\n\n /**\n * Protocol that allows both HTTPS and HTTP\n */\n HttpsAndHttp = \"https,http\",\n}\n\n/**\n * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly\n * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link QueueSASSignatureValues}\n * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should\n * be taken here in case there are existing query parameters, which might affect the appropriate means of appending\n * these query parameters).\n *\n * NOTE: Instances of this class are immutable.\n */\nexport class SASQueryParameters {\n /**\n * The storage API version.\n */\n public readonly version: string;\n\n /**\n * Optional. The allowed HTTP protocol(s).\n */\n public readonly protocol?: SASProtocol;\n\n /**\n * Optional. The start time for this SAS token.\n */\n public readonly startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n */\n public readonly expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link QueueSASPermissions} for more details.\n */\n public readonly permissions?: string;\n\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n */\n public readonly services?: string;\n\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n */\n public readonly resourceTypes?: string;\n\n /**\n * Optional. The signed identifier (only for {@link QueueSASSignatureValues}).\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy\n */\n public readonly identifier?: string;\n\n /**\n * Optional. The storage queue (only for {@link QueueSASSignatureValues}).\n */\n public readonly resource?: string;\n\n /**\n * The signature for the SAS token.\n */\n public readonly signature: string;\n\n /**\n * Inner value of getter ipRange.\n */\n private readonly ipRangeInner?: SasIPRange;\n\n /**\n * Optional. IP range allowed for this SAS.\n *\n * @readonly\n */\n public get ipRange(): SasIPRange | undefined {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start,\n };\n }\n return undefined;\n }\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param version - Representing the storage version\n * @param signature - Representing the signature for the SAS token\n * @param permissions - Representing the storage permissions\n * @param services - Representing the storage services being accessed (only for Account SAS)\n * @param resourceTypes - Representing the storage resource types being accessed (only for Account SAS)\n * @param protocol - Representing the allowed HTTP protocol(s)\n * @param startsOn - Representing the start time for this SAS token\n * @param expiresOn - Representing the expiry time for this SAS token\n * @param ipRange - Representing the range of valid IP addresses for this SAS token\n * @param identifier - Representing the signed identifier (only for Service SAS)\n * @param resource - Representing the storage queue (only for Service SAS)\n */\n constructor(\n version: string,\n signature: string,\n permissions?: string,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n ) {\n this.version = version;\n this.services = services;\n this.resourceTypes = resourceTypes;\n this.expiresOn = expiresOn;\n this.permissions = permissions;\n this.protocol = protocol;\n this.startsOn = startsOn;\n this.ipRangeInner = ipRange;\n this.identifier = identifier;\n this.resource = resource;\n this.signature = signature;\n }\n\n /**\n * Encodes all SAS query parameters into a string that can be appended to a URL.\n *\n */\n public toString(): string {\n const params: string[] = [\"sv\", \"ss\", \"srt\", \"spr\", \"st\", \"se\", \"sip\", \"si\", \"sr\", \"sp\", \"sig\"];\n const queries: string[] = [];\n\n for (const param of params) {\n switch (param) {\n case \"sv\":\n this.tryAppendQueryParameter(queries, param, this.version);\n break;\n case \"ss\":\n this.tryAppendQueryParameter(queries, param, this.services);\n break;\n case \"srt\":\n this.tryAppendQueryParameter(queries, param, this.resourceTypes);\n break;\n case \"spr\":\n this.tryAppendQueryParameter(queries, param, this.protocol);\n break;\n case \"st\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined,\n );\n break;\n case \"se\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined,\n );\n break;\n case \"sip\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.ipRange ? ipRangeToString(this.ipRange) : undefined,\n );\n break;\n case \"si\":\n this.tryAppendQueryParameter(queries, param, this.identifier);\n break;\n case \"sr\":\n this.tryAppendQueryParameter(queries, param, this.resource);\n break;\n case \"sp\":\n this.tryAppendQueryParameter(queries, param, this.permissions);\n break;\n case \"sig\":\n this.tryAppendQueryParameter(queries, param, this.signature);\n break;\n }\n }\n return queries.join(\"&\");\n }\n\n /**\n * A private helper method used to filter and append query key/value pairs into an array.\n *\n * @param queries -\n * @param key -\n * @param value -\n */\n private tryAppendQueryParameter(queries: string[], key: string, value?: string): void {\n if (!value) {\n return;\n }\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n if (key.length > 0 && value.length > 0) {\n queries.push(`${key}=${value}`);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"SASQueryParameters.js","sourceRoot":"","sources":["../../src/SASQueryParameters.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAGlC,mDAAkD;AAClD,6DAA+D;AAE/D;;GAEG;AACH,IAAY,WAUX;AAVD,WAAY,WAAW;IACrB;;OAEG;IACH,8BAAe,CAAA;IAEf;;OAEG;IACH,0CAA2B,CAAA;AAC7B,CAAC,EAVW,WAAW,2BAAX,WAAW,QAUtB;AAED;;;;;;;;GAQG;AACH,MAAa,kBAAkB;IAC7B;;OAEG;IACa,OAAO,CAAS;IAEhC;;OAEG;IACa,QAAQ,CAAe;IAEvC;;OAEG;IACa,QAAQ,CAAQ;IAEhC;;OAEG;IACa,SAAS,CAAQ;IAEjC;;;OAGG;IACa,WAAW,CAAU;IAErC;;;OAGG;IACa,QAAQ,CAAU;IAElC;;;OAGG;IACa,aAAa,CAAU;IAEvC;;;;OAIG;IACa,UAAU,CAAU;IAEpC;;OAEG;IACa,QAAQ,CAAU;IAElC;;OAEG;IACa,SAAS,CAAS;IAElC;;OAEG;IACc,YAAY,CAAc;IAE3C;;;;OAIG;IACH,IAAW,OAAO;QAChB,IAAI,IAAI,CAAC,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,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAC5D,MAAM;gBACR,KAAK,IAAI;oBACP,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;oBAC/D,MAAM;gBACR,KAAK,KAAK;oBACR,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;oBAC7D,MAAM;YACV,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED;;;;;;OAMG;IACK,uBAAuB,CAAC,OAAiB,EAAE,GAAW,EAAE,KAAc;QAC5E,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO;QACT,CAAC;QAED,GAAG,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC9B,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;CACF;AAnMD,gDAmMC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\n\n/**\n * Protocols for generated SAS.\n */\nexport enum SASProtocol {\n /**\n * Protocol that allows HTTPS only\n */\n Https = \"https\",\n\n /**\n * Protocol that allows both HTTPS and HTTP\n */\n HttpsAndHttp = \"https,http\",\n}\n\n/**\n * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly\n * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link QueueSASSignatureValues}\n * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should\n * be taken here in case there are existing query parameters, which might affect the appropriate means of appending\n * these query parameters).\n *\n * NOTE: Instances of this class are immutable.\n */\nexport class SASQueryParameters {\n /**\n * The storage API version.\n */\n public readonly version: string;\n\n /**\n * Optional. The allowed HTTP protocol(s).\n */\n public readonly protocol?: SASProtocol;\n\n /**\n * Optional. The start time for this SAS token.\n */\n public readonly startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n */\n public readonly expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link QueueSASPermissions} for more details.\n */\n public readonly permissions?: string;\n\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n */\n public readonly services?: string;\n\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n */\n public readonly resourceTypes?: string;\n\n /**\n * Optional. The signed identifier (only for {@link QueueSASSignatureValues}).\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy\n */\n public readonly identifier?: string;\n\n /**\n * Optional. The storage queue (only for {@link QueueSASSignatureValues}).\n */\n public readonly resource?: string;\n\n /**\n * The signature for the SAS token.\n */\n public readonly signature: string;\n\n /**\n * Inner value of getter ipRange.\n */\n private readonly ipRangeInner?: SasIPRange;\n\n /**\n * Optional. IP range allowed for this SAS.\n *\n * @readonly\n */\n public get ipRange(): SasIPRange | undefined {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start,\n };\n }\n return undefined;\n }\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param version - Representing the storage version\n * @param signature - Representing the signature for the SAS token\n * @param permissions - Representing the storage permissions\n * @param services - Representing the storage services being accessed (only for Account SAS)\n * @param resourceTypes - Representing the storage resource types being accessed (only for Account SAS)\n * @param protocol - Representing the allowed HTTP protocol(s)\n * @param startsOn - Representing the start time for this SAS token\n * @param expiresOn - Representing the expiry time for this SAS token\n * @param ipRange - Representing the range of valid IP addresses for this SAS token\n * @param identifier - Representing the signed identifier (only for Service SAS)\n * @param resource - Representing the storage queue (only for Service SAS)\n */\n constructor(\n version: string,\n signature: string,\n permissions?: string,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n ) {\n this.version = version;\n this.services = services;\n this.resourceTypes = resourceTypes;\n this.expiresOn = expiresOn;\n this.permissions = permissions;\n this.protocol = protocol;\n this.startsOn = startsOn;\n this.ipRangeInner = ipRange;\n this.identifier = identifier;\n this.resource = resource;\n this.signature = signature;\n }\n\n /**\n * Encodes all SAS query parameters into a string that can be appended to a URL.\n *\n */\n public toString(): string {\n const params: string[] = [\"sv\", \"ss\", \"srt\", \"spr\", \"st\", \"se\", \"sip\", \"si\", \"sr\", \"sp\", \"sig\"];\n const queries: string[] = [];\n\n for (const param of params) {\n switch (param) {\n case \"sv\":\n this.tryAppendQueryParameter(queries, param, this.version);\n break;\n case \"ss\":\n this.tryAppendQueryParameter(queries, param, this.services);\n break;\n case \"srt\":\n this.tryAppendQueryParameter(queries, param, this.resourceTypes);\n break;\n case \"spr\":\n this.tryAppendQueryParameter(queries, param, this.protocol);\n break;\n case \"st\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined,\n );\n break;\n case \"se\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined,\n );\n break;\n case \"sip\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.ipRange ? ipRangeToString(this.ipRange) : undefined,\n );\n break;\n case \"si\":\n this.tryAppendQueryParameter(queries, param, this.identifier);\n break;\n case \"sr\":\n this.tryAppendQueryParameter(queries, param, this.resource);\n break;\n case \"sp\":\n this.tryAppendQueryParameter(queries, param, this.permissions);\n break;\n case \"sig\":\n this.tryAppendQueryParameter(queries, param, this.signature);\n break;\n }\n }\n return queries.join(\"&\");\n }\n\n /**\n * A private helper method used to filter and append query key/value pairs into an array.\n *\n * @param queries -\n * @param key -\n * @param value -\n */\n private tryAppendQueryParameter(queries: string[], key: string, value?: string): void {\n if (!value) {\n return;\n }\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n if (key.length > 0 && value.length > 0) {\n queries.push(`${key}=${value}`);\n }\n }\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  import type { StorageClient as StorageClientContext } from "./generated/src/index.js";
2
2
  import type { Pipeline } from "./Pipeline.js";
3
3
  import type { OperationTracingOptions } from "@azure/core-tracing";
4
- import type { AnonymousCredential } from "@azure/storage-blob";
5
- import type { StorageSharedKeyCredential } from "@azure/storage-blob";
4
+ import type { AnonymousCredential } from "@azure/storage-common";
5
+ import type { StorageSharedKeyCredential } from "@azure/storage-common";
6
6
  import type { TokenCredential } from "@azure/core-auth";
7
7
  /**
8
8
  * An interface for options common to every remote operation.
@@ -1 +1 @@
1
- {"version":3,"file":"StorageClient.d.ts","sourceRoot":"","sources":["../../src/StorageClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEtF,OAAO,KAAK,EAAE,QAAQ,EAA0B,MAAM,eAAe,CAAC;AAGtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAC;CAC1C;AAED;;GAEG;AACH,8BAAsB,aAAa;IACj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M,CAAC;IAEpC;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAEtC;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,0BAA0B,GAAG,mBAAmB,GAAG,eAAe,CAAC;IAElG;;;OAGG;IACH,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAE9D;;;;OAIG;IACH,SAAS,aAAa,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;CAOtD;AAMD;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC;AAE/C;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,oBAAoB,CAa7F"}
@@ -11,6 +11,29 @@ const utils_common_js_1 = require("./utils/utils.common.js");
11
11
  * A StorageClient represents a based client class for {@link QueueServiceClient}, {@link QueueClient} and etc.
12
12
  */
13
13
  class StorageClient {
14
+ /**
15
+ * URL string value.
16
+ */
17
+ url;
18
+ accountName;
19
+ /**
20
+ * Request policy pipeline.
21
+ *
22
+ * @internal
23
+ */
24
+ pipeline;
25
+ /**
26
+ * Credential factory in the pipeline to authenticate requests to the service, such as AnonymousCredential, StorageSharedKeyCredential.
27
+ * Initialized to an AnonymousCredential if not able to retrieve it from the pipeline.
28
+ *
29
+ * @internal
30
+ */
31
+ credential;
32
+ /**
33
+ * StorageClientContext is a reference to protocol layer operations entry, which is
34
+ * generated by AutoRest generator.
35
+ */
36
+ storageClientContext;
14
37
  /**
15
38
  * Creates an instance of StorageClient.
16
39
  * @param url -
@@ -1 +1 @@
1
- {"version":3,"file":"StorageClient.js","sourceRoot":"","sources":["../../src/StorageClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAiFlC,0DAaC;AA3FD,uEAAiE;AAEjE,+CAAgF;AAChF,6DAAgE;AAgBhE;;GAEG;AACH,MAAsB,aAAa;IA4BjC;;;;OAIG;IACH,YAAsB,GAAW,EAAE,QAAkB;QACnD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,WAAW,GAAG,IAAA,uCAAqB,EAAC,GAAG,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,oBAAoB,GAAG,uBAAuB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7E,IAAI,CAAC,UAAU,GAAG,IAAA,uCAAyB,EAAC,QAAQ,CAAC,CAAC;IACxD,CAAC;CACF;AAxCD,sCAwCC;AAaD;;GAEG;AACH,SAAgB,uBAAuB,CAAC,GAAW,EAAE,QAAkB;IACrE,MAAM,eAAe,GAAG,QAAQ,CAAC,OAAiC,CAAC;IACnE,4CAA4C;IAC5C,iFAAiF;IACjF,qGAAqG;IACrG,IAAI,eAAe,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/C,eAAe,CAAC,YAAY,GAAG;YAC7B,cAAc,EAAE,EAAE,GAAG,IAAI;SAC1B,CAAC;IACJ,CAAC;SAAM,IAAI,eAAe,CAAC,YAAY,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;QACpE,eAAe,CAAC,YAAoB,CAAC,cAAc,GAAG,EAAE,GAAG,IAAI,CAAC;IACnE,CAAC;IACD,OAAO,IAAI,8CAAoB,CAAC,GAAG,EAAE,IAAA,kCAAoB,EAAC,QAAQ,CAAC,CAAC,CAAC;AACvE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageClient as StorageClientContext } from \"./generated/src/index.js\";\nimport { StorageContextClient } from \"./StorageContextClient.js\";\nimport type { Pipeline, StoragePipelineOptions } from \"./Pipeline.js\";\nimport { getCoreClientOptions, getCredentialFromPipeline } from \"./Pipeline.js\";\nimport { getAccountNameFromUrl } from \"./utils/utils.common.js\";\nimport type { OperationTracingOptions } from \"@azure/core-tracing\";\nimport type { AnonymousCredential } from \"@azure/storage-blob\";\nimport type { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/**\n * An interface for options common to every remote operation.\n */\nexport interface CommonOptions {\n /**\n * Options to configure spans created when tracing is enabled.\n */\n tracingOptions?: OperationTracingOptions;\n}\n\n/**\n * A StorageClient represents a based client class for {@link QueueServiceClient}, {@link QueueClient} and etc.\n */\nexport abstract class StorageClient {\n /**\n * URL string value.\n */\n public readonly url: string;\n public readonly accountName: string;\n\n /**\n * Request policy pipeline.\n *\n * @internal\n */\n protected readonly pipeline: Pipeline;\n\n /**\n * Credential factory in the pipeline to authenticate requests to the service, such as AnonymousCredential, StorageSharedKeyCredential.\n * Initialized to an AnonymousCredential if not able to retrieve it from the pipeline.\n *\n * @internal\n */\n protected readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n\n /**\n * StorageClientContext is a reference to protocol layer operations entry, which is\n * generated by AutoRest generator.\n */\n protected readonly storageClientContext: StorageClientContext;\n\n /**\n * Creates an instance of StorageClient.\n * @param url -\n * @param pipeline -\n */\n protected constructor(url: string, pipeline: Pipeline) {\n this.url = url;\n this.accountName = getAccountNameFromUrl(url);\n this.pipeline = pipeline;\n this.storageClientContext = getStorageClientContext(this.url, this.pipeline);\n this.credential = getCredentialFromPipeline(pipeline);\n }\n}\n\n// The following type is introduced to avoid a breaking change during the\n// migration of V6 SDK generator. Can be removed later when a really\n// breaking change is released.\n\n/**\n * Defines values for ListQueuesIncludeType.\n * Possible values include: 'metadata'\n * @readonly\n */\nexport type ListQueuesIncludeType = \"metadata\";\n\n/**\n * @internal\n */\nexport function getStorageClientContext(url: string, pipeline: Pipeline): StorageClientContext {\n const pipelineOptions = pipeline.options as StoragePipelineOptions;\n // Set maximum timeout for queue operations.\n // This was previously set manually in the retry policy specific to this package.\n // https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-queue-service-operations\n if (pipelineOptions.retryOptions === undefined) {\n pipelineOptions.retryOptions = {\n tryTimeoutInMs: 30 * 1000,\n };\n } else if (pipelineOptions.retryOptions.tryTimeoutInMs === undefined) {\n (pipelineOptions.retryOptions as any).tryTimeoutInMs = 30 * 1000;\n }\n return new StorageContextClient(url, getCoreClientOptions(pipeline));\n}\n"]}
1
+ {"version":3,"file":"StorageClient.js","sourceRoot":"","sources":["../../src/StorageClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAiFlC,0DAaC;AA3FD,uEAAiE;AAEjE,+CAAgF;AAChF,6DAAgE;AAgBhE;;GAEG;AACH,MAAsB,aAAa;IACjC;;OAEG;IACa,GAAG,CAAS;IACZ,WAAW,CAAS;IAEpC;;;;OAIG;IACgB,QAAQ,CAAW;IAEtC;;;;;OAKG;IACgB,UAAU,CAAqE;IAElG;;;OAGG;IACgB,oBAAoB,CAAuB;IAE9D;;;;OAIG;IACH,YAAsB,GAAW,EAAE,QAAkB;QACnD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,WAAW,GAAG,IAAA,uCAAqB,EAAC,GAAG,CAAC,CAAC;QAC9C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,oBAAoB,GAAG,uBAAuB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC7E,IAAI,CAAC,UAAU,GAAG,IAAA,uCAAyB,EAAC,QAAQ,CAAC,CAAC;IACxD,CAAC;CACF;AAxCD,sCAwCC;AAaD;;GAEG;AACH,SAAgB,uBAAuB,CAAC,GAAW,EAAE,QAAkB;IACrE,MAAM,eAAe,GAAG,QAAQ,CAAC,OAAiC,CAAC;IACnE,4CAA4C;IAC5C,iFAAiF;IACjF,qGAAqG;IACrG,IAAI,eAAe,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/C,eAAe,CAAC,YAAY,GAAG;YAC7B,cAAc,EAAE,EAAE,GAAG,IAAI;SAC1B,CAAC;IACJ,CAAC;SAAM,IAAI,eAAe,CAAC,YAAY,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;QACpE,eAAe,CAAC,YAAoB,CAAC,cAAc,GAAG,EAAE,GAAG,IAAI,CAAC;IACnE,CAAC;IACD,OAAO,IAAI,8CAAoB,CAAC,GAAG,EAAE,IAAA,kCAAoB,EAAC,QAAQ,CAAC,CAAC,CAAC;AACvE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageClient as StorageClientContext } from \"./generated/src/index.js\";\nimport { StorageContextClient } from \"./StorageContextClient.js\";\nimport type { Pipeline, StoragePipelineOptions } from \"./Pipeline.js\";\nimport { getCoreClientOptions, getCredentialFromPipeline } from \"./Pipeline.js\";\nimport { getAccountNameFromUrl } from \"./utils/utils.common.js\";\nimport type { OperationTracingOptions } from \"@azure/core-tracing\";\nimport type { AnonymousCredential } from \"@azure/storage-common\";\nimport type { StorageSharedKeyCredential } from \"@azure/storage-common\";\nimport type { TokenCredential } from \"@azure/core-auth\";\n\n/**\n * An interface for options common to every remote operation.\n */\nexport interface CommonOptions {\n /**\n * Options to configure spans created when tracing is enabled.\n */\n tracingOptions?: OperationTracingOptions;\n}\n\n/**\n * A StorageClient represents a based client class for {@link QueueServiceClient}, {@link QueueClient} and etc.\n */\nexport abstract class StorageClient {\n /**\n * URL string value.\n */\n public readonly url: string;\n public readonly accountName: string;\n\n /**\n * Request policy pipeline.\n *\n * @internal\n */\n protected readonly pipeline: Pipeline;\n\n /**\n * Credential factory in the pipeline to authenticate requests to the service, such as AnonymousCredential, StorageSharedKeyCredential.\n * Initialized to an AnonymousCredential if not able to retrieve it from the pipeline.\n *\n * @internal\n */\n protected readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n\n /**\n * StorageClientContext is a reference to protocol layer operations entry, which is\n * generated by AutoRest generator.\n */\n protected readonly storageClientContext: StorageClientContext;\n\n /**\n * Creates an instance of StorageClient.\n * @param url -\n * @param pipeline -\n */\n protected constructor(url: string, pipeline: Pipeline) {\n this.url = url;\n this.accountName = getAccountNameFromUrl(url);\n this.pipeline = pipeline;\n this.storageClientContext = getStorageClientContext(this.url, this.pipeline);\n this.credential = getCredentialFromPipeline(pipeline);\n }\n}\n\n// The following type is introduced to avoid a breaking change during the\n// migration of V6 SDK generator. Can be removed later when a really\n// breaking change is released.\n\n/**\n * Defines values for ListQueuesIncludeType.\n * Possible values include: 'metadata'\n * @readonly\n */\nexport type ListQueuesIncludeType = \"metadata\";\n\n/**\n * @internal\n */\nexport function getStorageClientContext(url: string, pipeline: Pipeline): StorageClientContext {\n const pipelineOptions = pipeline.options as StoragePipelineOptions;\n // Set maximum timeout for queue operations.\n // This was previously set manually in the retry policy specific to this package.\n // https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-queue-service-operations\n if (pipelineOptions.retryOptions === undefined) {\n pipelineOptions.retryOptions = {\n tryTimeoutInMs: 30 * 1000,\n };\n } else if (pipelineOptions.retryOptions.tryTimeoutInMs === undefined) {\n (pipelineOptions.retryOptions as any).tryTimeoutInMs = 30 * 1000;\n }\n return new StorageContextClient(url, getCoreClientOptions(pipeline));\n}\n"]}