@azure/storage-queue 12.27.0-alpha.20250619.1 → 12.27.0-alpha.20250717.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/browser/AccountSASSignatureValues.d.ts +1 -1
  2. package/dist/browser/AccountSASSignatureValues.d.ts.map +1 -1
  3. package/dist/browser/AccountSASSignatureValues.js.map +1 -1
  4. package/dist/browser/Pipeline.d.ts +2 -3
  5. package/dist/browser/Pipeline.d.ts.map +1 -1
  6. package/dist/browser/Pipeline.js +1 -9
  7. package/dist/browser/Pipeline.js.map +1 -1
  8. package/dist/browser/QueueClient.d.ts +2 -2
  9. package/dist/browser/QueueClient.d.ts.map +1 -1
  10. package/dist/browser/QueueClient.js +2 -2
  11. package/dist/browser/QueueClient.js.map +1 -1
  12. package/dist/browser/QueueSASSignatureValues.d.ts +1 -1
  13. package/dist/browser/QueueSASSignatureValues.d.ts.map +1 -1
  14. package/dist/browser/QueueSASSignatureValues.js.map +1 -1
  15. package/dist/browser/QueueServiceClient.d.ts +2 -2
  16. package/dist/browser/QueueServiceClient.d.ts.map +1 -1
  17. package/dist/browser/QueueServiceClient.js +2 -2
  18. package/dist/browser/QueueServiceClient.js.map +1 -1
  19. package/dist/browser/StorageClient.d.ts +2 -2
  20. package/dist/browser/StorageClient.d.ts.map +1 -1
  21. package/dist/browser/StorageClient.js.map +1 -1
  22. package/dist/browser/index-browser.d.mts.map +1 -1
  23. package/dist/browser/index-browser.mjs.map +1 -1
  24. package/dist/browser/index.d.ts +1 -7
  25. package/dist/browser/index.js +1 -7
  26. package/dist/commonjs/AccountSASSignatureValues.d.ts +1 -1
  27. package/dist/commonjs/AccountSASSignatureValues.d.ts.map +1 -1
  28. package/dist/commonjs/AccountSASSignatureValues.js.map +1 -1
  29. package/dist/commonjs/Pipeline.d.ts +2 -3
  30. package/dist/commonjs/Pipeline.d.ts.map +1 -1
  31. package/dist/commonjs/Pipeline.js +12 -20
  32. package/dist/commonjs/Pipeline.js.map +1 -1
  33. package/dist/commonjs/QueueClient.d.ts +2 -2
  34. package/dist/commonjs/QueueClient.d.ts.map +1 -1
  35. package/dist/commonjs/QueueClient.js +9 -9
  36. package/dist/commonjs/QueueClient.js.map +1 -1
  37. package/dist/commonjs/QueueSASSignatureValues.d.ts +1 -1
  38. package/dist/commonjs/QueueSASSignatureValues.d.ts.map +1 -1
  39. package/dist/commonjs/QueueSASSignatureValues.js.map +1 -1
  40. package/dist/commonjs/QueueServiceClient.d.ts +2 -2
  41. package/dist/commonjs/QueueServiceClient.d.ts.map +1 -1
  42. package/dist/commonjs/QueueServiceClient.js +9 -9
  43. package/dist/commonjs/QueueServiceClient.js.map +1 -1
  44. package/dist/commonjs/StorageClient.d.ts +2 -2
  45. package/dist/commonjs/StorageClient.d.ts.map +1 -1
  46. package/dist/commonjs/StorageClient.js.map +1 -1
  47. package/dist/commonjs/index.d.ts +1 -9
  48. package/dist/commonjs/index.d.ts.map +1 -1
  49. package/dist/commonjs/index.js +13 -19
  50. package/dist/commonjs/index.js.map +1 -1
  51. package/dist/esm/AccountSASSignatureValues.d.ts +1 -1
  52. package/dist/esm/AccountSASSignatureValues.d.ts.map +1 -1
  53. package/dist/esm/AccountSASSignatureValues.js.map +1 -1
  54. package/dist/esm/Pipeline.d.ts +2 -3
  55. package/dist/esm/Pipeline.d.ts.map +1 -1
  56. package/dist/esm/Pipeline.js +1 -9
  57. package/dist/esm/Pipeline.js.map +1 -1
  58. package/dist/esm/QueueClient.d.ts +2 -2
  59. package/dist/esm/QueueClient.d.ts.map +1 -1
  60. package/dist/esm/QueueClient.js +2 -2
  61. package/dist/esm/QueueClient.js.map +1 -1
  62. package/dist/esm/QueueSASSignatureValues.d.ts +1 -1
  63. package/dist/esm/QueueSASSignatureValues.d.ts.map +1 -1
  64. package/dist/esm/QueueSASSignatureValues.js.map +1 -1
  65. package/dist/esm/QueueServiceClient.d.ts +2 -2
  66. package/dist/esm/QueueServiceClient.d.ts.map +1 -1
  67. package/dist/esm/QueueServiceClient.js +2 -2
  68. package/dist/esm/QueueServiceClient.js.map +1 -1
  69. package/dist/esm/StorageClient.d.ts +2 -2
  70. package/dist/esm/StorageClient.d.ts.map +1 -1
  71. package/dist/esm/StorageClient.js.map +1 -1
  72. package/dist/esm/index.d.ts +1 -9
  73. package/dist/esm/index.d.ts.map +1 -1
  74. package/dist/esm/index.js +1 -9
  75. package/dist/esm/index.js.map +1 -1
  76. package/dist/react-native/AccountSASSignatureValues.d.ts +1 -1
  77. package/dist/react-native/AccountSASSignatureValues.d.ts.map +1 -1
  78. package/dist/react-native/AccountSASSignatureValues.js.map +1 -1
  79. package/dist/react-native/Pipeline.d.ts +2 -3
  80. package/dist/react-native/Pipeline.d.ts.map +1 -1
  81. package/dist/react-native/Pipeline.js +1 -9
  82. package/dist/react-native/Pipeline.js.map +1 -1
  83. package/dist/react-native/QueueClient.d.ts +2 -2
  84. package/dist/react-native/QueueClient.d.ts.map +1 -1
  85. package/dist/react-native/QueueClient.js +2 -2
  86. package/dist/react-native/QueueClient.js.map +1 -1
  87. package/dist/react-native/QueueSASSignatureValues.d.ts +1 -1
  88. package/dist/react-native/QueueSASSignatureValues.d.ts.map +1 -1
  89. package/dist/react-native/QueueSASSignatureValues.js.map +1 -1
  90. package/dist/react-native/QueueServiceClient.d.ts +2 -2
  91. package/dist/react-native/QueueServiceClient.d.ts.map +1 -1
  92. package/dist/react-native/QueueServiceClient.js +2 -2
  93. package/dist/react-native/QueueServiceClient.js.map +1 -1
  94. package/dist/react-native/StorageClient.d.ts +2 -2
  95. package/dist/react-native/StorageClient.d.ts.map +1 -1
  96. package/dist/react-native/StorageClient.js.map +1 -1
  97. package/dist/react-native/index.d.ts +1 -9
  98. package/dist/react-native/index.d.ts.map +1 -1
  99. package/dist/react-native/index.js +1 -9
  100. package/dist/react-native/index.js.map +1 -1
  101. package/package.json +1 -2
@@ -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,CAAC;AAOnF,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,q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AAwC,GAChD,MAAM;CAuBV"}
@@ -9,8 +9,8 @@ const core_util_1 = require("@azure/core-util");
9
9
  const Pipeline_js_1 = require("./Pipeline.js");
10
10
  const StorageClient_js_1 = require("./StorageClient.js");
11
11
  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");
12
+ const storage_common_1 = require("@azure/storage-common");
13
+ const storage_common_2 = require("@azure/storage-common");
14
14
  const tracing_js_1 = require("./utils/tracing.js");
15
15
  const QueueClient_js_1 = require("./QueueClient.js");
16
16
  const AccountSASPermissions_js_1 = require("./AccountSASPermissions.js");
@@ -42,7 +42,7 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
42
42
  const extractedCreds = (0, utils_common_js_1.extractConnectionStringParts)(connectionString);
43
43
  if (extractedCreds.kind === "AccountConnString") {
44
44
  if (core_util_1.isNodeLike) {
45
- const sharedKeyCredential = new storage_blob_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
45
+ const sharedKeyCredential = new storage_common_1.StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
46
46
  if (!options.proxyOptions) {
47
47
  options.proxyOptions = (0, core_rest_pipeline_1.getDefaultProxySettings)(extractedCreds.proxyUri);
48
48
  }
@@ -54,7 +54,7 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
54
54
  }
55
55
  }
56
56
  else if (extractedCreds.kind === "SASConnString") {
57
- const pipeline = (0, Pipeline_js_1.newPipeline)(new storage_blob_2.AnonymousCredential(), options);
57
+ const pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_2.AnonymousCredential(), options);
58
58
  return new QueueServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline);
59
59
  }
60
60
  else {
@@ -69,14 +69,14 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
69
69
  if ((0, Pipeline_js_1.isPipelineLike)(credentialOrPipeline)) {
70
70
  pipeline = credentialOrPipeline;
71
71
  }
72
- else if ((core_util_1.isNodeLike && credentialOrPipeline instanceof storage_blob_1.StorageSharedKeyCredential) ||
73
- credentialOrPipeline instanceof storage_blob_2.AnonymousCredential ||
72
+ else if ((core_util_1.isNodeLike && credentialOrPipeline instanceof storage_common_1.StorageSharedKeyCredential) ||
73
+ credentialOrPipeline instanceof storage_common_2.AnonymousCredential ||
74
74
  (0, core_auth_1.isTokenCredential)(credentialOrPipeline)) {
75
75
  pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options);
76
76
  }
77
77
  else {
78
78
  // The second parameter is undefined. Use anonymous credential.
79
- pipeline = (0, Pipeline_js_1.newPipeline)(new storage_blob_2.AnonymousCredential(), options);
79
+ pipeline = (0, Pipeline_js_1.newPipeline)(new storage_common_2.AnonymousCredential(), options);
80
80
  }
81
81
  super(url, pipeline);
82
82
  this.serviceContext = this.storageClientContext.service;
@@ -400,7 +400,7 @@ class QueueServiceClient extends StorageClient_js_1.StorageClient {
400
400
  * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
401
401
  */
402
402
  generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions_js_1.AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) {
403
- if (!(this.credential instanceof storage_blob_1.StorageSharedKeyCredential)) {
403
+ if (!(this.credential instanceof storage_common_1.StorageSharedKeyCredential)) {
404
404
  throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential");
405
405
  }
406
406
  if (expiresOn === undefined) {
@@ -427,7 +427,7 @@ 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) {
@@ -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,CAAC;gBAC3D,OAAO,IAAI,kBAAkB,CAAC,cAAc,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAC9D,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,oEAAoE,C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,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,iEAAiE;IACjE,OAAgC;QAEhC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QACxB,MAAM,cAAc,GAAG,IAAA,8CAA4B,EAAC,gBAAgB,CAAC,CAAC;QACtE,IAAI,cAAc,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GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,GAAG,GAAG,IAAA,gEAAiC,kBAEzC,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,QAAQ,EAAE,CAAC;QAEb,OAAO,IAAA,kCAAgB,EAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;;;;;;;OAaG;IACI,uBAAuB,CAC5B,SAAgB,EAChB,cAAqC,gDAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,EACrE,gBAAwB,KAAK,EAC7B,UAA+C,EAAE;QAEjD,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,2CAA0B,CAAC,EAAE,CAAC;YAC7D,MAAM,UAAU,CACd,+FAA+F,CAChG,CAAC;QACJ,CAAC;QAED,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,IAAA,wEAAyC,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-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"]}
@@ -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;IACjC;;OAEG;IACH,SAAgB,GAAG,EAAE,MAAM,CAAC;IAC5B,SAAgB,WAAW,EAAE,MAAM,CAAC;IAEpC;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAEtC;;;;;OAKG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,0BAA0B,GAAG,mBAAmB,GAAG,eAAe,CAAC;IAElG;;;OAGG;IACH,SAAS,CAAC,QAAQ,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;IAE9D;;;;OAIG;IACH,SAAS,aAA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I,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;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-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"]}
@@ -3,17 +3,9 @@ export * from "./AccountSASPermissions.js";
3
3
  export * from "./AccountSASResourceTypes.js";
4
4
  export * from "./AccountSASServices.js";
5
5
  export { AccountSASSignatureValues, generateAccountSASQueryParameters, } from "./AccountSASSignatureValues.js";
6
- export { AnonymousCredential } from "@azure/storage-blob";
7
- export { Credential } from "@azure/storage-blob";
8
- export { StorageSharedKeyCredential } from "@azure/storage-blob";
9
6
  export { SasIPRange } from "./SasIPRange.js";
10
- export { BaseRequestPolicy } from "@azure/storage-blob";
7
+ export { AnonymousCredential, Credential, StorageSharedKeyCredential, BaseRequestPolicy, AnonymousCredentialPolicy, CredentialPolicy, StorageRetryOptions, StorageRetryPolicyType, StorageRetryPolicy, StorageRetryPolicyFactory, StorageSharedKeyCredentialPolicy, StorageBrowserPolicyFactory, } from "@azure/storage-common";
11
8
  export { Pipeline, PipelineLike, PipelineOptions, isPipelineLike, newPipeline, StoragePipelineOptions, RequestPolicyFactory, RequestPolicy, RequestPolicyOptions, WebResource, HttpOperationResponse, HttpHeaders, HttpRequestBody, IHttpClient, StorageOAuthScopes, ServiceClientOptions, } from "./Pipeline.js";
12
- export { AnonymousCredentialPolicy } from "@azure/storage-blob";
13
- export { CredentialPolicy } from "@azure/storage-blob";
14
- export { StorageRetryPolicyFactory } from "@azure/storage-blob";
15
- export { StorageSharedKeyCredentialPolicy } from "@azure/storage-blob";
16
- export { StorageBrowserPolicyFactory } from "@azure/storage-blob";
17
9
  export { Metadata, StorageQueueAudience, getQueueServiceAccountAudience } from "./models.js";
18
10
  export * from "./QueueClient.js";
19
11
  export * from "./QueueSASPermissions.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,OAAO,EACL,yBAAyB,EACzB,iCAAiC,GAClC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OA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BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,OAAO,EACL,yBAAyB,EACzB,iCAAiC,GAClC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EACL,mBAAmB,EACnB,UAAU,EACV,0BAA0B,EAC1B,iBAAiB,EACjB,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,EACzB,gCAAgC,EAChC,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,qBAAqB,EACrB,WAAW,EACX,eAAe,EACf,WAAW,EACX,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAC7F,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,OAAO,EACL,uBAAuB,EACvB,+BAA+B,GAChC,MAAM,8BAA8B,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,cAAc,sBAAsB,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -2,7 +2,7 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.logger = exports.RestError = exports.generateQueueSASQueryParameters = exports.getQueueServiceAccountAudience = exports.StorageQueueAudience = exports.StorageBrowserPolicyFactory = exports.StorageSharedKeyCredentialPolicy = exports.StorageRetryPolicyFactory = exports.CredentialPolicy = exports.AnonymousCredentialPolicy = exports.StorageOAuthScopes = exports.newPipeline = exports.isPipelineLike = exports.Pipeline = exports.BaseRequestPolicy = exports.StorageSharedKeyCredential = exports.Credential = exports.AnonymousCredential = exports.generateAccountSASQueryParameters = void 0;
5
+ exports.logger = exports.RestError = exports.generateQueueSASQueryParameters = exports.getQueueServiceAccountAudience = exports.StorageQueueAudience = exports.StorageOAuthScopes = exports.newPipeline = exports.isPipelineLike = exports.Pipeline = exports.StorageBrowserPolicyFactory = exports.StorageSharedKeyCredentialPolicy = exports.StorageRetryPolicyFactory = exports.StorageRetryPolicy = exports.StorageRetryPolicyType = exports.CredentialPolicy = exports.AnonymousCredentialPolicy = exports.BaseRequestPolicy = exports.StorageSharedKeyCredential = exports.Credential = exports.AnonymousCredential = exports.generateAccountSASQueryParameters = void 0;
6
6
  const tslib_1 = require("tslib");
7
7
  const core_rest_pipeline_1 = require("@azure/core-rest-pipeline");
8
8
  Object.defineProperty(exports, "RestError", { enumerable: true, get: function () { return core_rest_pipeline_1.RestError; } });
@@ -11,29 +11,23 @@ tslib_1.__exportStar(require("./AccountSASResourceTypes.js"), exports);
11
11
  tslib_1.__exportStar(require("./AccountSASServices.js"), exports);
12
12
  var AccountSASSignatureValues_js_1 = require("./AccountSASSignatureValues.js");
13
13
  Object.defineProperty(exports, "generateAccountSASQueryParameters", { enumerable: true, get: function () { return AccountSASSignatureValues_js_1.generateAccountSASQueryParameters; } });
14
- var storage_blob_1 = require("@azure/storage-blob");
15
- Object.defineProperty(exports, "AnonymousCredential", { enumerable: true, get: function () { return storage_blob_1.AnonymousCredential; } });
16
- var storage_blob_2 = require("@azure/storage-blob");
17
- Object.defineProperty(exports, "Credential", { enumerable: true, get: function () { return storage_blob_2.Credential; } });
18
- var storage_blob_3 = require("@azure/storage-blob");
19
- Object.defineProperty(exports, "StorageSharedKeyCredential", { enumerable: true, get: function () { return storage_blob_3.StorageSharedKeyCredential; } });
20
- var storage_blob_4 = require("@azure/storage-blob");
21
- Object.defineProperty(exports, "BaseRequestPolicy", { enumerable: true, get: function () { return storage_blob_4.BaseRequestPolicy; } });
14
+ var storage_common_1 = require("@azure/storage-common");
15
+ Object.defineProperty(exports, "AnonymousCredential", { enumerable: true, get: function () { return storage_common_1.AnonymousCredential; } });
16
+ Object.defineProperty(exports, "Credential", { enumerable: true, get: function () { return storage_common_1.Credential; } });
17
+ Object.defineProperty(exports, "StorageSharedKeyCredential", { enumerable: true, get: function () { return storage_common_1.StorageSharedKeyCredential; } });
18
+ Object.defineProperty(exports, "BaseRequestPolicy", { enumerable: true, get: function () { return storage_common_1.BaseRequestPolicy; } });
19
+ Object.defineProperty(exports, "AnonymousCredentialPolicy", { enumerable: true, get: function () { return storage_common_1.AnonymousCredentialPolicy; } });
20
+ Object.defineProperty(exports, "CredentialPolicy", { enumerable: true, get: function () { return storage_common_1.CredentialPolicy; } });
21
+ Object.defineProperty(exports, "StorageRetryPolicyType", { enumerable: true, get: function () { return storage_common_1.StorageRetryPolicyType; } });
22
+ Object.defineProperty(exports, "StorageRetryPolicy", { enumerable: true, get: function () { return storage_common_1.StorageRetryPolicy; } });
23
+ Object.defineProperty(exports, "StorageRetryPolicyFactory", { enumerable: true, get: function () { return storage_common_1.StorageRetryPolicyFactory; } });
24
+ Object.defineProperty(exports, "StorageSharedKeyCredentialPolicy", { enumerable: true, get: function () { return storage_common_1.StorageSharedKeyCredentialPolicy; } });
25
+ Object.defineProperty(exports, "StorageBrowserPolicyFactory", { enumerable: true, get: function () { return storage_common_1.StorageBrowserPolicyFactory; } });
22
26
  var Pipeline_js_1 = require("./Pipeline.js");
23
27
  Object.defineProperty(exports, "Pipeline", { enumerable: true, get: function () { return Pipeline_js_1.Pipeline; } });
24
28
  Object.defineProperty(exports, "isPipelineLike", { enumerable: true, get: function () { return Pipeline_js_1.isPipelineLike; } });
25
29
  Object.defineProperty(exports, "newPipeline", { enumerable: true, get: function () { return Pipeline_js_1.newPipeline; } });
26
30
  Object.defineProperty(exports, "StorageOAuthScopes", { enumerable: true, get: function () { return Pipeline_js_1.StorageOAuthScopes; } });
27
- var storage_blob_5 = require("@azure/storage-blob");
28
- Object.defineProperty(exports, "AnonymousCredentialPolicy", { enumerable: true, get: function () { return storage_blob_5.AnonymousCredentialPolicy; } });
29
- var storage_blob_6 = require("@azure/storage-blob");
30
- Object.defineProperty(exports, "CredentialPolicy", { enumerable: true, get: function () { return storage_blob_6.CredentialPolicy; } });
31
- var storage_blob_7 = require("@azure/storage-blob");
32
- Object.defineProperty(exports, "StorageRetryPolicyFactory", { enumerable: true, get: function () { return storage_blob_7.StorageRetryPolicyFactory; } });
33
- var storage_blob_8 = require("@azure/storage-blob");
34
- Object.defineProperty(exports, "StorageSharedKeyCredentialPolicy", { enumerable: true, get: function () { return storage_blob_8.StorageSharedKeyCredentialPolicy; } });
35
- var storage_blob_9 = require("@azure/storage-blob");
36
- Object.defineProperty(exports, "StorageBrowserPolicyFactory", { enumerable: true, get: function () { return storage_blob_9.StorageBrowserPolicyFactory; } });
37
31
  var models_js_1 = require("./models.js");
38
32
  Object.defineProperty(exports, "StorageQueueAudience", { enumerable: true, get: function () { return models_js_1.StorageQueueAudience; } });
39
33
  Object.defineProperty(exports, "getQueueServiceAccountAudience", { enumerable: true, get: function () { return models_js_1.getQueueServiceAccountAudience; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,kEAAsD;AAuD7C,0FAvDA,8BAAS,OAuDA;AArDlB,qEAA2C;AAC3C,uEAA6C;AAC7C,kEAAwC;AACxC,+EAGwC;AADtC,iJAAA,iCAAiC,OAAA;AAEnC,oDAA0D;AAAjD,mHAAA,mBAAmB,OAAA;AAC5B,oDAAiD;AAAxC,0GAAA,UAAU,OAAA;AACnB,oDAAiE;AAAxD,0HAAA,0BAA0B,OAAA;AAEnC,oDAAwD;AAA/C,iHAAA,iBAAiB,OAAA;AAC1B,6CAiBuB;AAhBrB,uGAAA,QAAQ,OAAA;AAGR,6GAAA,cAAc,OAAA;AACd,0GAAA,WAAW,OAAA;AAUX,iHAAA,kBAAkB,OAAA;AAGpB,oDAAgE;AAAvD,yHAAA,yBAAyB,OAAA;AAClC,oDAAuD;AAA9C,gHAAA,gBAAgB,OAAA;AACzB,oDAAgE;AAAvD,yHAAA,yBAAyB,OAAA;AAClC,oDAAuE;AAA9D,gIAAA,gCAAgC,OAAA;AACzC,oDAAkE;AAAzD,2HAAA,2BAA2B,OAAA;AACpC,yCAA6F;AAA1E,iHAAA,oBAAoB,OAAA;AAAE,2HAAA,8BAA8B,OAAA;AACvE,2DAAiC;AACjC,mEAAyC;AACzC,2EAGsC;AADpC,6IAAA,+BAA+B,OAAA;AAEjC,kEAAwC;AACxC,kEAAwC;AAExC,+DAAqC;AASrC,mCAAkC;AAAzB,gGAAA,MAAM,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RestError } from \"@azure/core-rest-pipeline\";\n\nexport * from \"./AccountSASPermissions.js\";\nexport * from \"./AccountSASResourceTypes.js\";\nexport * from \"./AccountSASServices.js\";\nexport {\n AccountSASSignatureValues,\n generateAccountSASQueryParameters,\n} from \"./AccountSASSignatureValues.js\";\nexport { AnonymousCredential } from \"@azure/storage-blob\";\nexport { Credential } from \"@azure/storage-blob\";\nexport { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nexport { SasIPRange } from \"./SasIPRange.js\";\nexport { BaseRequestPolicy } from \"@azure/storage-blob\";\nexport {\n Pipeline,\n PipelineLike,\n PipelineOptions,\n isPipelineLike,\n newPipeline,\n StoragePipelineOptions,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions,\n WebResource,\n HttpOperationResponse,\n HttpHeaders,\n HttpRequestBody,\n IHttpClient,\n StorageOAuthScopes,\n ServiceClientOptions,\n} from \"./Pipeline.js\";\nexport { AnonymousCredentialPolicy } from \"@azure/storage-blob\";\nexport { CredentialPolicy } from \"@azure/storage-blob\";\nexport { StorageRetryPolicyFactory } from \"@azure/storage-blob\";\nexport { StorageSharedKeyCredentialPolicy } from \"@azure/storage-blob\";\nexport { StorageBrowserPolicyFactory } from \"@azure/storage-blob\";\nexport { Metadata, StorageQueueAudience, getQueueServiceAccountAudience } from \"./models.js\";\nexport * from \"./QueueClient.js\";\nexport * from \"./QueueSASPermissions.js\";\nexport {\n QueueSASSignatureValues,\n generateQueueSASQueryParameters,\n} from \"./QueueSASSignatureValues.js\";\nexport * from \"./QueueServiceClient.js\";\nexport * from \"./SASQueryParameters.js\";\nexport { CommonOptions, ListQueuesIncludeType } from \"./StorageClient.js\";\nexport * from \"./generatedModels.js\";\nexport {\n WithResponse,\n ResponseLike,\n ResponseWithBody,\n ResponseWithHeaders,\n HttpResponse,\n} from \"./utils/utils.common.js\";\nexport { RestError };\nexport { logger } from \"./log.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;;AAElC,kEAAsD;AA+D7C,0FA/DA,8BAAS,OA+DA;AA7DlB,qEAA2C;AAC3C,uEAA6C;AAC7C,kEAAwC;AACxC,+EAGwC;AADtC,iJAAA,iCAAiC,OAAA;AAInC,wDAa+B;AAZ7B,qHAAA,mBAAmB,OAAA;AACnB,4GAAA,UAAU,OAAA;AACV,4HAAA,0BAA0B,OAAA;AAC1B,mHAAA,iBAAiB,OAAA;AACjB,2HAAA,yBAAyB,OAAA;AACzB,kHAAA,gBAAgB,OAAA;AAEhB,wHAAA,sBAAsB,OAAA;AACtB,oHAAA,kBAAkB,OAAA;AAClB,2HAAA,yBAAyB,OAAA;AACzB,kIAAA,gCAAgC,OAAA;AAChC,6HAAA,2BAA2B,OAAA;AAG7B,6CAiBuB;AAhBrB,uGAAA,QAAQ,OAAA;AAGR,6GAAA,cAAc,OAAA;AACd,0GAAA,WAAW,OAAA;AAUX,iHAAA,kBAAkB,OAAA;AAIpB,yCAA6F;AAA1E,iHAAA,oBAAoB,OAAA;AAAE,2HAAA,8BAA8B,OAAA;AACvE,2DAAiC;AACjC,mEAAyC;AACzC,2EAGsC;AADpC,6IAAA,+BAA+B,OAAA;AAEjC,kEAAwC;AACxC,kEAAwC;AAExC,+DAAqC;AASrC,mCAAkC;AAAzB,gGAAA,MAAM,OAAA","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RestError } from \"@azure/core-rest-pipeline\";\n\nexport * from \"./AccountSASPermissions.js\";\nexport * from \"./AccountSASResourceTypes.js\";\nexport * from \"./AccountSASServices.js\";\nexport {\n AccountSASSignatureValues,\n generateAccountSASQueryParameters,\n} from \"./AccountSASSignatureValues.js\";\nexport { SasIPRange } from \"./SasIPRange.js\";\n\nexport {\n AnonymousCredential,\n Credential,\n StorageSharedKeyCredential,\n BaseRequestPolicy,\n AnonymousCredentialPolicy,\n CredentialPolicy,\n StorageRetryOptions,\n StorageRetryPolicyType,\n StorageRetryPolicy,\n StorageRetryPolicyFactory,\n StorageSharedKeyCredentialPolicy,\n StorageBrowserPolicyFactory,\n} from \"@azure/storage-common\";\n\nexport {\n Pipeline,\n PipelineLike,\n PipelineOptions,\n isPipelineLike,\n newPipeline,\n StoragePipelineOptions,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions,\n WebResource,\n HttpOperationResponse,\n HttpHeaders,\n HttpRequestBody,\n IHttpClient,\n StorageOAuthScopes,\n ServiceClientOptions,\n} from \"./Pipeline.js\";\n\nexport { Metadata, StorageQueueAudience, getQueueServiceAccountAudience } from \"./models.js\";\nexport * from \"./QueueClient.js\";\nexport * from \"./QueueSASPermissions.js\";\nexport {\n QueueSASSignatureValues,\n generateQueueSASQueryParameters,\n} from \"./QueueSASSignatureValues.js\";\nexport * from \"./QueueServiceClient.js\";\nexport * from \"./SASQueryParameters.js\";\nexport { CommonOptions, ListQueuesIncludeType } from \"./StorageClient.js\";\nexport * from \"./generatedModels.js\";\nexport {\n WithResponse,\n ResponseLike,\n ResponseWithBody,\n ResponseWithHeaders,\n HttpResponse,\n} from \"./utils/utils.common.js\";\nexport { RestError };\nexport { logger } from \"./log.js\";\n"]}
@@ -1,5 +1,5 @@
1
1
  import { AccountSASPermissions } from "./AccountSASPermissions.js";
2
- import type { StorageSharedKeyCredential } from "@azure/storage-blob";
2
+ import type { StorageSharedKeyCredential } from "@azure/storage-common";
3
3
  import type { SasIPRange } from "./SasIPRange.js";
4
4
  import type { SASProtocol } from "./SASQueryParameters.js";
5
5
  import { SASQueryParameters } from "./SASQueryParameters.js";
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSASSignatureValues.d.ts","sourceRoot":"","sources":["../../src/AccountSASSignatureValues.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAI7D;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAEhB;;;OAGG;IACH,WAAW,EAAE,qBAAqB,CAAC;IAEnC;;OAEG;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AAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;YAC3F,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;YAC5E,OAAO;YACP,EAAE,EAAE,uDAAuD;SAC5D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;IAED,MAAM,SAAS,GAAW,mBAAmB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAE9E,OAAO;QACL,kBAAkB,EAAE,IAAI,kBAAkB,CACxC,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,yBAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,SAAS,EACnC,yBAAyB,CAAC,OAAO,CAClC;QACD,YAAY,EAAE,YAAY;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AccountSASPermissions } from \"./AccountSASPermissions.js\";\nimport { AccountSASResourceTypes } from \"./AccountSASResourceTypes.js\";\nimport { AccountSASServices } from \"./AccountSASServices.js\";\nimport type { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport { SASQueryParameters } from \"./SASQueryParameters.js\";\nimport { SERVICE_VERSION } from \"./utils/constants.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once\n * all the values here are set appropriately, call generateSASQueryParameters() to obtain a representation of the SAS\n * which can actually be applied to queue urls. Note: that both this class and {@link SASQueryParameters} exist because\n * the former is mutable and a logical representation while the latter is immutable and used to generate actual REST\n * requests.\n *\n * @see https://learn.microsoft.com/azure/storage/common/storage-dotnet-shared-access-signature-part-1\n * for more conceptual information on SAS\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas\n * for descriptions of the parameters, including which are required\n */\nexport interface AccountSASSignatureValues {\n /**\n * If not provided, this defaults to the service version targeted by this version of the 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 /**\n * The time after which the SAS will no longer work.\n */\n expiresOn: Date;\n\n /**\n * Specifies which operations the SAS user may perform. Please refer to {@link AccountSASPermissions} for help\n * constructing the permissions string.\n */\n permissions: AccountSASPermissions;\n\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n\n /**\n * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to\n * construct this value.\n */\n services: string;\n\n /**\n * The values that indicate the resource types accessible with this SAS. Please refer\n * to {@link AccountSASResourceTypes} to construct this value.\n */\n resourceTypes: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual\n * REST request.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas\n *\n * @param accountSASSignatureValues - SAS Signature values of the account\n * @param sharedKeyCredential - Shared key credential.\n */\nexport function generateAccountSASQueryParameters(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): SASQueryParameters {\n return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential)\n .sasQueryParameters;\n}\n\nexport function generateAccountSASQueryParametersInternal(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n const version = accountSASSignatureValues.version\n ? accountSASSignatureValues.version\n : SERVICE_VERSION;\n\n const parsedPermissions = AccountSASPermissions.parse(\n accountSASSignatureValues.permissions.toString(),\n ).toString();\n const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();\n const parsedResourceTypes = AccountSASResourceTypes.parse(\n accountSASSignatureValues.resourceTypes,\n ).toString();\n\n let stringToSign: string;\n\n if (version >= \"2020-12-06\") {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Reserved for encryption scope\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n } else {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n }\n\n const signature: string = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n version,\n signature,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.protocol,\n accountSASSignatureValues.startsOn,\n accountSASSignatureValues.expiresOn,\n accountSASSignatureValues.ipRange,\n ),\n stringToSign: stringToSign,\n };\n}\n"]}
1
+ {"version":3,"file":"AccountSASSignatureValues.js","sourceRoot":"","sources":["../../src/AccountSASSignatureValues.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,q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BAAyB,CAAC,QAAQ,EAClC,yBAAyB,CAAC,SAAS,EACnC,yBAAyB,CAAC,OAAO,CAClC;QACD,YAAY,EAAE,YAAY;KAC3B,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AccountSASPermissions } from \"./AccountSASPermissions.js\";\nimport { AccountSASResourceTypes } from \"./AccountSASResourceTypes.js\";\nimport { AccountSASServices } from \"./AccountSASServices.js\";\nimport type { StorageSharedKeyCredential } from \"@azure/storage-common\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport { SASQueryParameters } from \"./SASQueryParameters.js\";\nimport { SERVICE_VERSION } from \"./utils/constants.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * AccountSASSignatureValues is used to generate a Shared Access Signature (SAS) for an Azure Storage account. Once\n * all the values here are set appropriately, call generateSASQueryParameters() to obtain a representation of the SAS\n * which can actually be applied to queue urls. Note: that both this class and {@link SASQueryParameters} exist because\n * the former is mutable and a logical representation while the latter is immutable and used to generate actual REST\n * requests.\n *\n * @see https://learn.microsoft.com/azure/storage/common/storage-dotnet-shared-access-signature-part-1\n * for more conceptual information on SAS\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas\n * for descriptions of the parameters, including which are required\n */\nexport interface AccountSASSignatureValues {\n /**\n * If not provided, this defaults to the service version targeted by this version of the 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 /**\n * The time after which the SAS will no longer work.\n */\n expiresOn: Date;\n\n /**\n * Specifies which operations the SAS user may perform. Please refer to {@link AccountSASPermissions} for help\n * constructing the permissions string.\n */\n permissions: AccountSASPermissions;\n\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n\n /**\n * The values that indicate the services accessible with this SAS. Please refer to {@link AccountSASServices} to\n * construct this value.\n */\n services: string;\n\n /**\n * The values that indicate the resource types accessible with this SAS. Please refer\n * to {@link AccountSASResourceTypes} to construct this value.\n */\n resourceTypes: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Generates a {@link SASQueryParameters} object which contains all SAS query parameters needed to make an actual\n * REST request.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-an-account-sas\n *\n * @param accountSASSignatureValues - SAS Signature values of the account\n * @param sharedKeyCredential - Shared key credential.\n */\nexport function generateAccountSASQueryParameters(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): SASQueryParameters {\n return generateAccountSASQueryParametersInternal(accountSASSignatureValues, sharedKeyCredential)\n .sasQueryParameters;\n}\n\nexport function generateAccountSASQueryParametersInternal(\n accountSASSignatureValues: AccountSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n const version = accountSASSignatureValues.version\n ? accountSASSignatureValues.version\n : SERVICE_VERSION;\n\n const parsedPermissions = AccountSASPermissions.parse(\n accountSASSignatureValues.permissions.toString(),\n ).toString();\n const parsedServices = AccountSASServices.parse(accountSASSignatureValues.services).toString();\n const parsedResourceTypes = AccountSASResourceTypes.parse(\n accountSASSignatureValues.resourceTypes,\n ).toString();\n\n let stringToSign: string;\n\n if (version >= \"2020-12-06\") {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Reserved for encryption scope\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n } else {\n stringToSign = [\n sharedKeyCredential.accountName,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.startsOn\n ? truncatedISO8061Date(accountSASSignatureValues.startsOn, false)\n : \"\",\n truncatedISO8061Date(accountSASSignatureValues.expiresOn, false),\n accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : \"\",\n accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : \"\",\n version,\n \"\", // Account SAS requires an additional newline character\n ].join(\"\\n\");\n }\n\n const signature: string = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n version,\n signature,\n parsedPermissions,\n parsedServices,\n parsedResourceTypes,\n accountSASSignatureValues.protocol,\n accountSASSignatureValues.startsOn,\n accountSASSignatureValues.expiresOn,\n accountSASSignatureValues.ipRange,\n ),\n stringToSign: stringToSign,\n };\n}\n"]}
@@ -3,9 +3,8 @@ import { CompatResponse as HttpOperationResponse, RequestPolicy as IHttpClient,
3
3
  import type { ProxySettings as ProxyOptions, UserAgentPolicyOptions as UserAgentOptions } from "@azure/core-rest-pipeline";
4
4
  import { RequestBodyType as HttpRequestBody } from "@azure/core-rest-pipeline";
5
5
  import type { TokenCredential } from "@azure/core-auth";
6
- import type { StorageRetryOptions } from "@azure/storage-blob";
7
- import { StorageSharedKeyCredential } from "@azure/storage-blob";
8
- import { AnonymousCredential } from "@azure/storage-blob";
6
+ import type { StorageRetryOptions } from "@azure/storage-common";
7
+ import { StorageSharedKeyCredential, AnonymousCredential } from "@azure/storage-common";
9
8
  import { StorageOAuthScopes } from "./utils/constants.js";
10
9
  export { StorageOAuthScopes, IHttpClient, HttpHeaders, HttpRequestBody, HttpOperationResponse, WebResource, RequestPolicyFactory, RequestPolicy, RequestPolicyOptions, };
11
10
  /**
@@ -1 +1 @@
1
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,GAAG,mBAAmB,GAAG,eAAe,CAiBpE"}
@@ -7,16 +7,8 @@ import { authorizeRequestOnTenantChallenge, createClientPipeline } from "@azure/
7
7
  import { parseXML, stringifyXML } from "@azure/core-xml";
8
8
  import { isTokenCredential } from "@azure/core-auth";
9
9
  import { logger } from "./log.js";
10
- import { StorageRetryPolicyFactory } from "@azure/storage-blob";
11
- import { StorageSharedKeyCredential } from "@azure/storage-blob";
12
- import { AnonymousCredential } from "@azure/storage-blob";
10
+ import { StorageRetryPolicyFactory, StorageSharedKeyCredential, AnonymousCredential, getCachedDefaultHttpClient, storageBrowserPolicy, storageRetryPolicy, storageSharedKeyCredentialPolicy, StorageBrowserPolicyFactory, storageCorrectContentLengthPolicy, } from "@azure/storage-common";
13
11
  import { StorageOAuthScopes, StorageQueueLoggingAllowedHeaderNames, StorageQueueLoggingAllowedQueryParameters, SDK_VERSION, } from "./utils/constants.js";
14
- import { getCachedDefaultHttpClient } from "@azure/storage-common";
15
- import { storageBrowserPolicy } from "@azure/storage-blob";
16
- import { storageRetryPolicy } from "@azure/storage-blob";
17
- import { storageSharedKeyCredentialPolicy } from "@azure/storage-blob";
18
- import { StorageBrowserPolicyFactory } from "@azure/storage-blob";
19
- import { storageCorrectContentLengthPolicy } from "@azure/storage-blob";
20
12
  // Export following interfaces and types for customers who want to implement their
21
13
  // own RequestPolicy or HTTPClient
22
14
  export { StorageOAuthScopes, };