@azure/storage-queue 12.27.0-alpha.20250617.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
@@ -1,5 +1,5 @@
1
1
  import { QueueSASPermissions } from "./QueueSASPermissions.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":"QueueSASSignatureValues.d.ts","sourceRoot":"","sources":["../../src/QueueSASSignatureValues.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,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;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;IAEjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAElC;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC;IAErB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,+BAA+B,CAC7C,uBAAuB,EAAE,uBAAuB,EAChD,mBAAmB,EAAE,0BAA0B,GAC9C,kBAAkB,CAGpB;AAED,wBAAgB,uCAAuC,CACrD,uBAAuB,EAAE,uBAAuB,EAChD,mBAAmB,EAAE,0BAA0B,GAC9C;IAAE,kBAAkB,EAAE,kBAAkB,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAuDlE"}
1
+ {"version":3,"file":"QueueSASSignatureValues.d.ts","sourceRoot":"","sources":["../../src/QueueSASSignatureValues.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAI7D;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC;IAEjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAElC;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC;IAErB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,+BAA+B,CAC7C,uBAAuB,EAAE,uBAAuB,EAChD,mBAAmB,EAAE,0BAA0B,GAC9C,kBAAkB,CAGpB;AAED,wBAAgB,uCAAuC,CACrD,uBAAuB,EAAE,uBAAuB,EAChD,mBAAmB,EAAE,0BAA0B,GAC9C;IAAE,kBAAkB,EAAE,kBAAkB,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAuDlE"}
@@ -1 +1 @@
1
- {"version":3,"file":"QueueSAS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AC9B,CAAC,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,QAAQ,EAAE,KAAK,CAAC;YAC/D,CAAC,CAAC,EAAE;QACN,uBAAuB,CAAC,SAAS;YAC/B,CAAC,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,EAAE,KAAK,CAAC;YAChE,CAAC,CAAC,EAAE;QACN,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,EAAE,uBAAuB,CAAC,SAAS,CAAC;QACpF,uBAAuB,CAAC,UAAU;QAClC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;QACvF,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;QACxE,OAAO;KACR,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEb,MAAM,SAAS,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAEtE,OAAO;QACL,kBAAkB,EAAE,IAAI,kBAAkB,CACxC,OAAO,EACP,SAAS,EACT,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,uBAAuB,CAAC,QAAQ,EAChC,uBAAuB,CAAC,QAAQ,EAChC,uBAAuB,CAAC,SAAS,EACjC,uBAAuB,CAAC,OAAO,EAC/B,uBAAuB,CAAC,UAAU,CACnC;QACD,YAAY,EAAE,YAAY;KAC3B,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,WAAmB,EAAE,SAAiB;IAC9D,oCAAoC;IACpC,OAAO,UAAU,WAAW,IAAI,SAAS,EAAE,CAAC;AAC9C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { QueueSASPermissions } from \"./QueueSASPermissions.js\";\nimport type { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport { SASQueryParameters } from \"./SASQueryParameters.js\";\nimport { SERVICE_VERSION } from \"./utils/constants.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * QueueSASSignatureValues is used to help generating Queue service SAS tokens for queues.\n */\nexport interface QueueSASSignatureValues {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n */\n expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link QueueSASPermissions}\n * being accessed for help constructing the permissions string.\n */\n permissions?: QueueSASPermissions;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n\n /**\n * The name of the queue the SAS user may access.\n */\n queueName: string;\n\n /**\n * Optional. The name of the access policy on the queue this SAS references if any.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param queueSASSignatureValues -\n * @param sharedKeyCredential -\n */\nexport function generateQueueSASQueryParameters(\n queueSASSignatureValues: QueueSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): SASQueryParameters {\n return generateQueueSASQueryParametersInternal(queueSASSignatureValues, sharedKeyCredential)\n .sasQueryParameters;\n}\n\nexport function generateQueueSASQueryParametersInternal(\n queueSASSignatureValues: QueueSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n if (\n !queueSASSignatureValues.identifier &&\n !(queueSASSignatureValues.permissions && queueSASSignatureValues.expiresOn)\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Queue SAS generation when 'identifier' is not provided.\",\n );\n }\n\n const version = queueSASSignatureValues.version\n ? queueSASSignatureValues.version\n : SERVICE_VERSION;\n let verifiedPermissions: string | undefined;\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n if (queueSASSignatureValues.permissions) {\n verifiedPermissions = QueueSASPermissions.parse(\n queueSASSignatureValues.permissions.toString(),\n ).toString();\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n queueSASSignatureValues.startsOn\n ? truncatedISO8061Date(queueSASSignatureValues.startsOn, false)\n : \"\",\n queueSASSignatureValues.expiresOn\n ? truncatedISO8061Date(queueSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(sharedKeyCredential.accountName, queueSASSignatureValues.queueName),\n queueSASSignatureValues.identifier,\n queueSASSignatureValues.ipRange ? ipRangeToString(queueSASSignatureValues.ipRange) : \"\",\n queueSASSignatureValues.protocol ? queueSASSignatureValues.protocol : \"\",\n version,\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n version,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n queueSASSignatureValues.protocol,\n queueSASSignatureValues.startsOn,\n queueSASSignatureValues.expiresOn,\n queueSASSignatureValues.ipRange,\n queueSASSignatureValues.identifier,\n ),\n stringToSign: stringToSign,\n };\n}\n\nfunction getCanonicalName(accountName: string, queueName: string): string {\n // Queue: \"/queue/account/queueName\"\n return `/queue/${accountName}/${queueName}`;\n}\n"]}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,uBAAuB,CAAC,QAAQ;YAC9B,CAAC,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,QAAQ,EAAE,KAAK,CAAC;YAC/D,CAAC,CAAC,EAAE;QACN,uBAAuB,CAAC,SAAS;YAC/B,CAAC,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,SAAS,EAAE,KAAK,CAAC;YAChE,CAAC,CAAC,EAAE;QACN,gBAAgB,CAAC,mBAAmB,CAAC,WAAW,EAAE,uBAAuB,CAAC,SAAS,CAAC;QACpF,uBAAuB,CAAC,UAAU;QAClC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;QACvF,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE;QACxE,OAAO;KACR,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEb,MAAM,SAAS,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAEtE,OAAO;QACL,kBAAkB,EAAE,IAAI,kBAAkB,CACxC,OAAO,EACP,SAAS,EACT,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,uBAAuB,CAAC,QAAQ,EAChC,uBAAuB,CAAC,QAAQ,EAChC,uBAAuB,CAAC,SAAS,EACjC,uBAAuB,CAAC,OAAO,EAC/B,uBAAuB,CAAC,UAAU,CACnC;QACD,YAAY,EAAE,YAAY;KAC3B,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,WAAmB,EAAE,SAAiB;IAC9D,oCAAoC;IACpC,OAAO,UAAU,WAAW,IAAI,SAAS,EAAE,CAAC;AAC9C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { QueueSASPermissions } from \"./QueueSASPermissions.js\";\nimport type { StorageSharedKeyCredential } from \"@azure/storage-common\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport { SASQueryParameters } from \"./SASQueryParameters.js\";\nimport { SERVICE_VERSION } from \"./utils/constants.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * QueueSASSignatureValues is used to help generating Queue service SAS tokens for queues.\n */\nexport interface QueueSASSignatureValues {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n */\n expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link QueueSASPermissions}\n * being accessed for help constructing the permissions string.\n */\n permissions?: QueueSASPermissions;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n\n /**\n * The name of the queue the SAS user may access.\n */\n queueName: string;\n\n /**\n * Optional. The name of the access policy on the queue this SAS references if any.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param queueSASSignatureValues -\n * @param sharedKeyCredential -\n */\nexport function generateQueueSASQueryParameters(\n queueSASSignatureValues: QueueSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): SASQueryParameters {\n return generateQueueSASQueryParametersInternal(queueSASSignatureValues, sharedKeyCredential)\n .sasQueryParameters;\n}\n\nexport function generateQueueSASQueryParametersInternal(\n queueSASSignatureValues: QueueSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n if (\n !queueSASSignatureValues.identifier &&\n !(queueSASSignatureValues.permissions && queueSASSignatureValues.expiresOn)\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for Queue SAS generation when 'identifier' is not provided.\",\n );\n }\n\n const version = queueSASSignatureValues.version\n ? queueSASSignatureValues.version\n : SERVICE_VERSION;\n let verifiedPermissions: string | undefined;\n\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n if (queueSASSignatureValues.permissions) {\n verifiedPermissions = QueueSASPermissions.parse(\n queueSASSignatureValues.permissions.toString(),\n ).toString();\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions ? verifiedPermissions : \"\",\n queueSASSignatureValues.startsOn\n ? truncatedISO8061Date(queueSASSignatureValues.startsOn, false)\n : \"\",\n queueSASSignatureValues.expiresOn\n ? truncatedISO8061Date(queueSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(sharedKeyCredential.accountName, queueSASSignatureValues.queueName),\n queueSASSignatureValues.identifier,\n queueSASSignatureValues.ipRange ? ipRangeToString(queueSASSignatureValues.ipRange) : \"\",\n queueSASSignatureValues.protocol ? queueSASSignatureValues.protocol : \"\",\n version,\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n version,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n queueSASSignatureValues.protocol,\n queueSASSignatureValues.startsOn,\n queueSASSignatureValues.expiresOn,\n queueSASSignatureValues.ipRange,\n queueSASSignatureValues.identifier,\n ),\n stringToSign: stringToSign,\n };\n}\n\nfunction getCanonicalName(accountName: string, queueName: string): string {\n // Queue: \"/queue/account/queueName\"\n return `/queue/${accountName}/${queueName}`;\n}\n"]}
@@ -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,CA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AI,EAChB,WAAW,GAAE,qBAAwD,EACrE,aAAa,GAAE,MAAc,EAC7B,OAAO,GAAE,mCAAwC,GAChD,MAAM;CAuBV"}
@@ -6,8 +6,8 @@ import { isNodeLike } from "@azure/core-util";
6
6
  import { newPipeline, isPipelineLike } from "./Pipeline.js";
7
7
  import { StorageClient } from "./StorageClient.js";
8
8
  import { appendToURLPath, appendToURLQuery, extractConnectionStringParts, assertResponse, } from "./utils/utils.common.js";
9
- import { StorageSharedKeyCredential } from "@azure/storage-blob";
10
- import { AnonymousCredential } from "@azure/storage-blob";
9
+ import { StorageSharedKeyCredential } from "@azure/storage-common";
10
+ import { AnonymousCredential } from "@azure/storage-common";
11
11
  import { tracingClient } from "./utils/tracing.js";
12
12
  import { QueueClient } from "./QueueClient.js";
13
13
  import { AccountSASPermissions } from "./AccountSASPermissions.js";
@@ -1 +1 @@
1
- {"version":3,"file":"QueueServiceClient.js","sourceRoot":"","sources":["../../src/QueueServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAoB9C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,4BAA4B,EAC5B,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,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AE,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,IAC/C,OAAO,GAEZ,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { 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,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAoB9C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,4BAA4B,EAC5B,cAAc,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EACL,iCAAiC,EACjC,yCAAyC,GAC1C,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAsHpE;;;GAGG;AACH,MAAM,OAAO,kBAAmB,SAAQ,aAAa;IACnD;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,oBAAoB,CAChC,gBAAwB;I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;YACvB,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,MAAM,GAAG,GAAG,iCAAiC,iBAEzC,WAAW;YACX,SAAS;YACT,aAAa,EACb,QAAQ,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,IAC/C,OAAO,GAEZ,IAAI,CAAC,UAAU,CAChB,CAAC,QAAQ,EAAE,CAAC;QAEb,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;;;;;;;OAaG;IACI,uBAAuB,CAC5B,SAAgB,EAChB,cAAqC,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,EACrE,gBAAwB,KAAK,EAC7B,UAA+C,EAAE;QAEjD,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,0BAA0B,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,yCAAyC,iBAE5C,WAAW;YACX,SAAS;YACT,aAAa,EACb,QAAQ,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,IAC/C,OAAO,GAEZ,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { 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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KAAK,SAAS,EAAE,CAAC;QACpE,eAAe,CAAC,YAAoB,CAAC,cAAc,GAAG,EAAE,GAAG,IAAI,CAAC;IACnE,CAAC;IACD,OAAO,IAAI,oBAAoB,CAAC,GAAG,EAAE,oBAAoB,CAAC,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;AAGlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAgBhE;;GAEG;AACH,MAAM,OAAgB,aAAa;IA4BjC;;;;OAIG;IACH,YAAsB,GAAW,EAAE,QAAkB;QACnD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,WAAW,GAAG,qBAAqB,CAAC,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,yBAAyB,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC;CACF;AAaD;;GAEG;AACH,MAAM,UAAU,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,oBAAoB,CAAC,GAAG,EAAE,oBAAoB,CAAC,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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index-browser.d.mts","sourceRoot":"","sources":["../../src/index-browser.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,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"}
1
+ {"version":3,"file":"index-browser.d.mts","sourceRoot":"","sources":["../../src/index-browser.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,eAAe,E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AC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AAExC,cAAc,sBAAsB,CAAC;AAQrC,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RestError } from \"@azure/core-rest-pipeline\";\nexport { AnonymousCredential } from \"@azure/storage-blob\";\nexport { Credential } from \"@azure/storage-blob\";\nexport { SasIPRange } from \"./SasIPRange.js\";\nexport {\n Pipeline,\n PipelineLike,\n PipelineOptions,\n isPipelineLike,\n newPipeline,\n StoragePipelineOptions,\n ServiceClientOptions,\n} from \"./Pipeline.js\";\nexport { BaseRequestPolicy } from \"@azure/storage-blob\";\nexport { AnonymousCredentialPolicy } from \"@azure/storage-blob\";\nexport { CredentialPolicy } from \"@azure/storage-blob\";\nexport { StorageRetryPolicyFactory } from \"@azure/storage-blob\";\nexport { StorageBrowserPolicyFactory } from \"@azure/storage-blob\";\nexport { Metadata } from \"./models.js\";\nexport * from \"./QueueClient.js\";\nexport * from \"./QueueSASPermissions.js\";\nexport * from \"./QueueServiceClient.js\";\nexport { CommonOptions } 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-browser.mjs","sourceRoot":"","sources":["../../src/index-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EACL,QAAQ,EAGR,cAAc,EACd,WAAW,GAGZ,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACH,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAEtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AAExC,cAAc,sBAAsB,CAAC;AAQrC,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RestError } from \"@azure/core-rest-pipeline\";\nexport { SasIPRange } from \"./SasIPRange.js\";\nexport {\n Pipeline,\n PipelineLike,\n PipelineOptions,\n isPipelineLike,\n newPipeline,\n StoragePipelineOptions,\n ServiceClientOptions,\n} from \"./Pipeline.js\";\nexport {\n AnonymousCredential,\n BaseRequestPolicy,\n Credential,\n AnonymousCredentialPolicy,\n CredentialPolicy,\n StorageRetryPolicyFactory,\n StorageBrowserPolicyFactory,\n } from \"@azure/storage-common\";\nexport { Metadata } from \"./models.js\";\nexport * from \"./QueueClient.js\";\nexport * from \"./QueueSASPermissions.js\";\nexport * from \"./QueueServiceClient.js\";\nexport { CommonOptions } 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,13 +1,7 @@
1
1
  import { RestError } from "@azure/core-rest-pipeline";
2
- export { AnonymousCredential } from "@azure/storage-blob";
3
- export { Credential } from "@azure/storage-blob";
4
2
  export { SasIPRange } from "./SasIPRange.js";
5
3
  export { Pipeline, PipelineLike, PipelineOptions, isPipelineLike, newPipeline, StoragePipelineOptions, ServiceClientOptions, } from "./Pipeline.js";
6
- export { BaseRequestPolicy } from "@azure/storage-blob";
7
- export { AnonymousCredentialPolicy } from "@azure/storage-blob";
8
- export { CredentialPolicy } from "@azure/storage-blob";
9
- export { StorageRetryPolicyFactory } from "@azure/storage-blob";
10
- export { StorageBrowserPolicyFactory } from "@azure/storage-blob";
4
+ export { AnonymousCredential, BaseRequestPolicy, Credential, AnonymousCredentialPolicy, CredentialPolicy, StorageRetryPolicyFactory, StorageBrowserPolicyFactory, } from "@azure/storage-common";
11
5
  export { Metadata } from "./models.js";
12
6
  export * from "./QueueClient.js";
13
7
  export * from "./QueueSASPermissions.js";
@@ -1,14 +1,8 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import { RestError } from "@azure/core-rest-pipeline";
4
- export { AnonymousCredential } from "@azure/storage-blob";
5
- export { Credential } from "@azure/storage-blob";
6
4
  export { Pipeline, isPipelineLike, newPipeline, } from "./Pipeline.js";
7
- export { BaseRequestPolicy } from "@azure/storage-blob";
8
- export { AnonymousCredentialPolicy } from "@azure/storage-blob";
9
- export { CredentialPolicy } from "@azure/storage-blob";
10
- export { StorageRetryPolicyFactory } from "@azure/storage-blob";
11
- export { StorageBrowserPolicyFactory } from "@azure/storage-blob";
5
+ export { AnonymousCredential, BaseRequestPolicy, Credential, AnonymousCredentialPolicy, CredentialPolicy, StorageRetryPolicyFactory, StorageBrowserPolicyFactory, } from "@azure/storage-common";
12
6
  export * from "./QueueClient.js";
13
7
  export * from "./QueueSASPermissions.js";
14
8
  export * from "./QueueServiceClient.js";
@@ -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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b,mBAAmB,CAAC,WAAW;YAC/B,iBAAiB;YACjB,cAAc;YACd,mBAAmB;YACnB,yBAAyB,CAAC,QAAQ;gBAChC,CAAC,CAAC,IAAA,sCAAoB,EAAC,yBAAyB,CAAC,QAAQ,EAAE,KAAK,CAAC;gBACjE,CAAC,CAAC,EAAE;YACN,IAAA,sCAAoB,EAAC,yBAAyB,CAAC,SAAS,EAAE,KAAK,CAAC;YAChE,yBAAyB,CAAC,OAAO,CAAC,CAAC,CAAC,IAAA,+BAAe,EAAC,yBAAyB,CAAC,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,0CAAkB,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;;AAoFlC,8EAMC;AAED,8FAmEC;AA7JD,yEAAmE;AACnE,6EAAuE;AACvE,mEAA6D;AAG7D,mDAAkD;AAElD,mEAA6D;AAC7D,uDAAuD;AACvD,6DAA+D;AA8D/D;;;;;;;;;;GAUG;AACH,SAAgB,iCAAiC,CAC/C,yBAAoD,EACpD,mBAA+C;IAE/C,OAAO,yCAAyC,CAAC,yBAAyB,EAAE,mBAAmB,CAAC;SAC7F,kBAAkB,CAAC;AACxB,CAAC;AAED,SAAgB,yCAAyC,CACvD,yBAAoD,EACpD,mBAA+C;IAE/C,MAAM,OAAO,GAAG,yBAAyB,CAAC,OAAO;QAC/C,CAAC,CAAC,yBAAyB,CAAC,OAAO;QACnC,CAAC,CAAC,8BAAe,CAAC;IAEpB,MAAM,iBAAiB,GAAG,gDAAqB,CAAC,KAAK,CACnD,yBAAyB,CAAC,WAAW,CAAC,QAAQ,EAAE,CACjD,CAAC,QAAQ,EAAE,CAAC;IACb,MAAM,cAAc,GAAG,0CAAkB,CAAC,KAAK,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC/F,MAAM,mBAAmB,GAAG,oDAAuB,CAAC,KAAK,CACvD,yBAAyB,CAAC,aAAa,CACxC,CAAC,QAAQ,EAAE,CAAC;IAEb,IAAI,YAAoB,CAAC;IAEzB,IAAI,OAAO,IAAI,YAAY,EAAE,CAAC;QAC5B,YAAY,GAAG;YACb,mBAAmB,CAAC,WAAW;YAC/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QACL,kBAAkB,EAAE,IAAI,0CAAkB,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-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
- {"version":3,"file":"Pipeline.d.ts","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gBAAgB,EAChB,4BAA4B,EAE7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,IAAI,qBAAqB,EACvC,aAAa,IAAI,WAAW,EAC5B,eAAe,IAAI,WAAW,EAC9B,aAAa,EACb,oBAAoB,EACpB,wBAAwB,IAAI,oBAAoB,EAChD,eAAe,IAAI,WAAW,EAG/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,aAAa,IAAI,YAAY,EAC7B,sBAAsB,IAAI,gBAAgB,EAI3C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,eAAe,IAAI,eAAe,EAGnC,MAAM,2BAA2B,CAAC;AAGnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EACL,kBAAkB,EAInB,MAAM,sBAAsB,CAAC;AAU9B,OAAO,EACL,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,oBAAoB,GACrB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB;;OAEG;IACH,sBAAsB,CAAC,EACnB,oBAAoB,EAAE,GACtB,CAAC,CAAC,6BAA6B,EAAE,oBAAoB,EAAE,K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8BD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,YAAY,GAAG,4BAA4B,CAsFzF;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,YAAY,GACrB,0BAA0B,GAAG,mBAAmB,GAAG,eAAe,CAiBpE"}
@@ -14,17 +14,9 @@ const core_client_1 = require("@azure/core-client");
14
14
  const core_xml_1 = require("@azure/core-xml");
15
15
  const core_auth_1 = require("@azure/core-auth");
16
16
  const log_js_1 = require("./log.js");
17
- const storage_blob_1 = require("@azure/storage-blob");
18
- const storage_blob_2 = require("@azure/storage-blob");
19
- const storage_blob_3 = require("@azure/storage-blob");
17
+ const storage_common_1 = require("@azure/storage-common");
20
18
  const constants_js_1 = require("./utils/constants.js");
21
19
  Object.defineProperty(exports, "StorageOAuthScopes", { enumerable: true, get: function () { return constants_js_1.StorageOAuthScopes; } });
22
- const storage_common_1 = require("@azure/storage-common");
23
- const storage_blob_4 = require("@azure/storage-blob");
24
- const storage_blob_5 = require("@azure/storage-blob");
25
- const storage_blob_6 = require("@azure/storage-blob");
26
- const storage_blob_7 = require("@azure/storage-blob");
27
- const storage_blob_8 = require("@azure/storage-blob");
28
20
  /**
29
21
  * A helper to decide if a given argument satisfies the Pipeline contract
30
22
  * @param pipeline - An argument that may be a Pipeline
@@ -81,7 +73,7 @@ exports.Pipeline = Pipeline;
81
73
  */
82
74
  function newPipeline(credential, pipelineOptions = {}) {
83
75
  if (!credential) {
84
- credential = new storage_blob_3.AnonymousCredential();
76
+ credential = new storage_common_1.AnonymousCredential();
85
77
  }
86
78
  const pipeline = new Pipeline([], pipelineOptions);
87
79
  pipeline._credential = credential;
@@ -153,9 +145,9 @@ function getCoreClientOptions(pipeline) {
153
145
  } }));
154
146
  corePipeline.removePolicy({ phase: "Retry" });
155
147
  corePipeline.removePolicy({ name: core_rest_pipeline_1.decompressResponsePolicyName });
156
- corePipeline.addPolicy((0, storage_blob_8.storageCorrectContentLengthPolicy)());
157
- corePipeline.addPolicy((0, storage_blob_5.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" });
158
- corePipeline.addPolicy((0, storage_blob_4.storageBrowserPolicy)());
148
+ corePipeline.addPolicy((0, storage_common_1.storageCorrectContentLengthPolicy)());
149
+ corePipeline.addPolicy((0, storage_common_1.storageRetryPolicy)(restOptions.retryOptions), { phase: "Retry" });
150
+ corePipeline.addPolicy((0, storage_common_1.storageBrowserPolicy)());
159
151
  const downlevelResults = processDownlevelPipeline(pipeline);
160
152
  if (downlevelResults) {
161
153
  corePipeline.addPolicy(downlevelResults.wrappedPolicies, downlevelResults.afterRetry ? { afterPhase: "Retry" } : undefined);
@@ -168,8 +160,8 @@ function getCoreClientOptions(pipeline) {
168
160
  challengeCallbacks: { authorizeRequestOnChallenge: core_client_1.authorizeRequestOnTenantChallenge },
169
161
  }), { phase: "Sign" });
170
162
  }
171
- else if (credential instanceof storage_blob_2.StorageSharedKeyCredential) {
172
- corePipeline.addPolicy((0, storage_blob_6.storageSharedKeyCredentialPolicy)({
163
+ else if (credential instanceof storage_common_1.StorageSharedKeyCredential) {
164
+ corePipeline.addPolicy((0, storage_common_1.storageSharedKeyCredentialPolicy)({
173
165
  accountName: credential.accountName,
174
166
  accountKey: credential.accountKey,
175
167
  }), { phase: "Sign" });
@@ -184,7 +176,7 @@ function getCredentialFromPipeline(pipeline) {
184
176
  return pipeline._credential;
185
177
  }
186
178
  // if it came from another package, loop over the factories and look for one like before
187
- let credential = new storage_blob_3.AnonymousCredential();
179
+ let credential = new storage_common_1.AnonymousCredential();
188
180
  for (const factory of pipeline.factories) {
189
181
  if ((0, core_auth_1.isTokenCredential)(factory.credential)) {
190
182
  // Only works if the factory has been attached a "credential" property.
@@ -198,13 +190,13 @@ function getCredentialFromPipeline(pipeline) {
198
190
  return credential;
199
191
  }
200
192
  function isStorageSharedKeyCredential(factory) {
201
- if (factory instanceof storage_blob_2.StorageSharedKeyCredential) {
193
+ if (factory instanceof storage_common_1.StorageSharedKeyCredential) {
202
194
  return true;
203
195
  }
204
196
  return factory.constructor.name === "StorageSharedKeyCredential";
205
197
  }
206
198
  function isAnonymousCredential(factory) {
207
- if (factory instanceof storage_blob_3.AnonymousCredential) {
199
+ if (factory instanceof storage_common_1.AnonymousCredential) {
208
200
  return true;
209
201
  }
210
202
  return factory.constructor.name === "AnonymousCredential";
@@ -213,13 +205,13 @@ function isCoreHttpBearerTokenFactory(factory) {
213
205
  return (0, core_auth_1.isTokenCredential)(factory.credential);
214
206
  }
215
207
  function isStorageBrowserPolicyFactory(factory) {
216
- if (factory instanceof storage_blob_7.StorageBrowserPolicyFactory) {
208
+ if (factory instanceof storage_common_1.StorageBrowserPolicyFactory) {
217
209
  return true;
218
210
  }
219
211
  return factory.constructor.name === "StorageBrowserPolicyFactory";
220
212
  }
221
213
  function isStorageRetryPolicyFactory(factory) {
222
- if (factory instanceof storage_blob_1.StorageRetryPolicyFactory) {
214
+ if (factory instanceof storage_common_1.StorageRetryPolicyFactory) {
223
215
  return true;
224
216
  }
225
217
  return factory.constructor.name === "StorageRetryPolicyFactory";