@azure/storage-file-share 12.15.0-beta.1 → 12.20.0-alpha.20230608.4

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 (324) hide show
  1. package/dist/index.js +5967 -6568
  2. package/dist/index.js.map +1 -1
  3. package/dist-esm/storage-blob/src/BatchResponse.js +4 -0
  4. package/dist-esm/storage-blob/src/BatchResponse.js.map +1 -0
  5. package/dist-esm/storage-blob/src/BatchResponseParser.js +137 -0
  6. package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -0
  7. package/dist-esm/storage-blob/src/BatchUtils.browser.js +11 -0
  8. package/dist-esm/storage-blob/src/BatchUtils.browser.js.map +1 -0
  9. package/dist-esm/storage-blob/src/BatchUtils.js +15 -0
  10. package/dist-esm/storage-blob/src/BatchUtils.js.map +1 -0
  11. package/dist-esm/storage-blob/src/BlobBatch.js +267 -0
  12. package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -0
  13. package/dist-esm/storage-blob/src/BlobBatchClient.js +140 -0
  14. package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -0
  15. package/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js +7 -0
  16. package/dist-esm/storage-blob/src/BlobDownloadResponse.browser.js.map +1 -0
  17. package/dist-esm/storage-blob/src/BlobDownloadResponse.js +455 -0
  18. package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -0
  19. package/dist-esm/storage-blob/src/BlobLeaseClient.js +192 -0
  20. package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -0
  21. package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js +362 -0
  22. package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +1 -0
  23. package/dist-esm/storage-blob/src/BlobQueryResponse.js +367 -0
  24. package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -0
  25. package/dist-esm/storage-blob/src/BlobServiceClient.js +702 -0
  26. package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -0
  27. package/dist-esm/storage-blob/src/Clients.js +2527 -0
  28. package/dist-esm/storage-blob/src/Clients.js.map +1 -0
  29. package/dist-esm/storage-blob/src/ContainerClient.js +1161 -0
  30. package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -0
  31. package/dist-esm/storage-blob/src/PageBlobRangeResponse.js +24 -0
  32. package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -0
  33. package/dist-esm/storage-blob/src/Pipeline.js +259 -0
  34. package/dist-esm/storage-blob/src/Pipeline.js.map +1 -0
  35. package/dist-esm/storage-blob/src/Range.js +21 -0
  36. package/dist-esm/storage-blob/src/Range.js.map +1 -0
  37. package/dist-esm/{src → storage-blob/src}/StorageBrowserPolicyFactory.js +1 -1
  38. package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +1 -0
  39. package/dist-esm/storage-blob/src/StorageClient.js +29 -0
  40. package/dist-esm/storage-blob/src/StorageClient.js.map +1 -0
  41. package/dist-esm/storage-blob/src/StorageContextClient.js +17 -0
  42. package/dist-esm/storage-blob/src/StorageContextClient.js.map +1 -0
  43. package/dist-esm/{src → storage-blob/src}/StorageRetryPolicyFactory.js +2 -1
  44. package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -0
  45. package/dist-esm/{src → storage-blob/src}/credentials/AnonymousCredential.js +1 -1
  46. package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map +1 -0
  47. package/dist-esm/storage-blob/src/credentials/Credential.js.map +1 -0
  48. package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js.map +1 -0
  49. package/dist-esm/{src → storage-blob/src}/credentials/StorageSharedKeyCredential.js +1 -1
  50. package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +1 -0
  51. package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js +5 -0
  52. package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js.map +1 -0
  53. package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js +31 -0
  54. package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map +1 -0
  55. package/dist-esm/{src → storage-blob/src}/generated/src/index.js +1 -1
  56. package/dist-esm/storage-blob/src/generated/src/index.js.map +1 -0
  57. package/dist-esm/storage-blob/src/generated/src/models/index.js +256 -0
  58. package/dist-esm/storage-blob/src/generated/src/models/index.js.map +1 -0
  59. package/dist-esm/storage-blob/src/generated/src/models/mappers.js +8196 -0
  60. package/dist-esm/storage-blob/src/generated/src/models/mappers.js.map +1 -0
  61. package/dist-esm/storage-blob/src/generated/src/models/parameters.js +1610 -0
  62. package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +1 -0
  63. package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js +221 -0
  64. package/dist-esm/storage-blob/src/generated/src/operations/appendBlob.js.map +1 -0
  65. package/dist-esm/storage-blob/src/generated/src/operations/blob.js +997 -0
  66. package/dist-esm/storage-blob/src/generated/src/operations/blob.js.map +1 -0
  67. package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js +365 -0
  68. package/dist-esm/storage-blob/src/generated/src/operations/blockBlob.js.map +1 -0
  69. package/dist-esm/storage-blob/src/generated/src/operations/container.js +705 -0
  70. package/dist-esm/storage-blob/src/generated/src/operations/container.js.map +1 -0
  71. package/dist-esm/storage-blob/src/generated/src/operations/index.js +14 -0
  72. package/dist-esm/storage-blob/src/generated/src/operations/index.js.map +1 -0
  73. package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js +456 -0
  74. package/dist-esm/storage-blob/src/generated/src/operations/pageBlob.js.map +1 -0
  75. package/dist-esm/storage-blob/src/generated/src/operations/service.js +315 -0
  76. package/dist-esm/storage-blob/src/generated/src/operations/service.js.map +1 -0
  77. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js +9 -0
  78. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/appendBlob.js.map +1 -0
  79. package/dist-esm/{src/generated/src/models/index.js → storage-blob/src/generated/src/operationsInterfaces/blob.js} +1 -1
  80. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blob.js.map +1 -0
  81. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js +9 -0
  82. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/blockBlob.js.map +1 -0
  83. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js +9 -0
  84. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/container.js.map +1 -0
  85. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js +14 -0
  86. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/index.js.map +1 -0
  87. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js +9 -0
  88. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/pageBlob.js.map +1 -0
  89. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js +9 -0
  90. package/dist-esm/storage-blob/src/generated/src/operationsInterfaces/service.js.map +1 -0
  91. package/dist-esm/storage-blob/src/generated/src/storageClient.js +49 -0
  92. package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -0
  93. package/dist-esm/storage-blob/src/generatedModels.js +4 -0
  94. package/dist-esm/storage-blob/src/generatedModels.js.map +1 -0
  95. package/dist-esm/storage-blob/src/index.browser.js +23 -0
  96. package/dist-esm/storage-blob/src/index.browser.js.map +1 -0
  97. package/dist-esm/storage-blob/src/index.js +33 -0
  98. package/dist-esm/storage-blob/src/index.js.map +1 -0
  99. package/dist-esm/storage-blob/src/log.js +8 -0
  100. package/dist-esm/storage-blob/src/log.js.map +1 -0
  101. package/dist-esm/storage-blob/src/models.js +108 -0
  102. package/dist-esm/storage-blob/src/models.js.map +1 -0
  103. package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +1 -0
  104. package/dist-esm/{src → storage-blob/src}/policies/CredentialPolicy.js +1 -1
  105. package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +1 -0
  106. package/dist-esm/storage-blob/src/policies/RequestPolicy.js +40 -0
  107. package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +1 -0
  108. package/dist-esm/{src → storage-blob/src}/policies/StorageBrowserPolicy.js +2 -1
  109. package/dist-esm/{src → storage-blob/src}/policies/StorageBrowserPolicy.js.map +1 -1
  110. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js +31 -0
  111. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +1 -0
  112. package/dist-esm/{src → storage-blob/src}/policies/StorageRetryPolicy.js +15 -6
  113. package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -0
  114. package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +165 -0
  115. package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +1 -0
  116. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -0
  117. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js +18 -0
  118. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +1 -0
  119. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +131 -0
  120. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -0
  121. package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js +130 -0
  122. package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -0
  123. package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js +227 -0
  124. package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map +1 -0
  125. package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map +1 -0
  126. package/dist-esm/storage-blob/src/sas/AccountSASServices.js.map +1 -0
  127. package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +93 -0
  128. package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -0
  129. package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js +195 -0
  130. package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js.map +1 -0
  131. package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +555 -0
  132. package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -0
  133. package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js +221 -0
  134. package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map +1 -0
  135. package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +234 -0
  136. package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -0
  137. package/dist-esm/storage-blob/src/sas/SasIPRange.js +13 -0
  138. package/dist-esm/storage-blob/src/sas/SasIPRange.js.map +1 -0
  139. package/dist-esm/storage-blob/src/utils/Batch.js.map +1 -0
  140. package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js +111 -0
  141. package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -0
  142. package/dist-esm/storage-blob/src/utils/Mutex.js +66 -0
  143. package/dist-esm/storage-blob/src/utils/Mutex.js.map +1 -0
  144. package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +119 -0
  145. package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -0
  146. package/dist-esm/storage-blob/src/utils/cache.js +11 -0
  147. package/dist-esm/storage-blob/src/utils/cache.js.map +1 -0
  148. package/dist-esm/storage-blob/src/utils/constants.js +223 -0
  149. package/dist-esm/storage-blob/src/utils/constants.js.map +1 -0
  150. package/dist-esm/storage-blob/src/utils/tracing.js +14 -0
  151. package/dist-esm/storage-blob/src/utils/tracing.js.map +1 -0
  152. package/dist-esm/storage-blob/src/utils/utils.browser.js +48 -0
  153. package/dist-esm/storage-blob/src/utils/utils.browser.js.map +1 -0
  154. package/dist-esm/storage-blob/src/utils/utils.common.js +754 -0
  155. package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -0
  156. package/dist-esm/storage-blob/src/utils/utils.node.js +132 -0
  157. package/dist-esm/storage-blob/src/utils/utils.node.js.map +1 -0
  158. package/dist-esm/storage-file-share/src/AccountSASPermissions.js.map +1 -0
  159. package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js +72 -0
  160. package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js.map +1 -0
  161. package/dist-esm/storage-file-share/src/AccountSASServices.js +80 -0
  162. package/dist-esm/storage-file-share/src/AccountSASServices.js.map +1 -0
  163. package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js.map +1 -0
  164. package/dist-esm/{src → storage-file-share/src}/Clients.js +476 -1253
  165. package/dist-esm/storage-file-share/src/Clients.js.map +1 -0
  166. package/dist-esm/storage-file-share/src/FileDownloadResponse.browser.js.map +1 -0
  167. package/dist-esm/{src → storage-file-share/src}/FileDownloadResponse.js +15 -14
  168. package/dist-esm/storage-file-share/src/FileDownloadResponse.js.map +1 -0
  169. package/dist-esm/storage-file-share/src/FileSASPermissions.js.map +1 -0
  170. package/dist-esm/storage-file-share/src/FileSASSignatureValues.js.map +1 -0
  171. package/dist-esm/storage-file-share/src/FileSystemAttributes.js.map +1 -0
  172. package/dist-esm/storage-file-share/src/Range.js.map +1 -0
  173. package/dist-esm/{src → storage-file-share/src}/SASQueryParameters.js +14 -14
  174. package/dist-esm/storage-file-share/src/SASQueryParameters.js.map +1 -0
  175. package/dist-esm/storage-file-share/src/SasIPRange.js.map +1 -0
  176. package/dist-esm/{src → storage-file-share/src}/ShareClientInternal.js +1 -2
  177. package/dist-esm/storage-file-share/src/ShareClientInternal.js.map +1 -0
  178. package/dist-esm/storage-file-share/src/ShareSASPermissions.js.map +1 -0
  179. package/dist-esm/{src → storage-file-share/src}/ShareServiceClient.js +58 -121
  180. package/dist-esm/storage-file-share/src/ShareServiceClient.js.map +1 -0
  181. package/dist-esm/{src → storage-file-share/src}/StorageClient.js +8 -14
  182. package/dist-esm/storage-file-share/src/StorageClient.js.map +1 -0
  183. package/dist-esm/storage-file-share/src/StorageContextClient.js +18 -0
  184. package/dist-esm/storage-file-share/src/StorageContextClient.js.map +1 -0
  185. package/dist-esm/storage-file-share/src/generated/src/index.js +11 -0
  186. package/dist-esm/storage-file-share/src/generated/src/index.js.map +1 -0
  187. package/dist-esm/storage-file-share/src/generated/src/models/index.js +144 -0
  188. package/dist-esm/storage-file-share/src/generated/src/models/index.js.map +1 -0
  189. package/dist-esm/{src → storage-file-share/src}/generated/src/models/mappers.js +16 -64
  190. package/dist-esm/storage-file-share/src/generated/src/models/mappers.js.map +1 -0
  191. package/dist-esm/{src → storage-file-share/src}/generated/src/models/parameters.js +17 -37
  192. package/dist-esm/storage-file-share/src/generated/src/models/parameters.js.map +1 -0
  193. package/dist-esm/{src → storage-file-share/src}/generated/src/operations/directory.js +17 -73
  194. package/dist-esm/storage-file-share/src/generated/src/operations/directory.js.map +1 -0
  195. package/dist-esm/{src → storage-file-share/src}/generated/src/operations/file.js +33 -142
  196. package/dist-esm/storage-file-share/src/generated/src/operations/file.js.map +1 -0
  197. package/dist-esm/storage-file-share/src/generated/src/operations/index.js.map +1 -0
  198. package/dist-esm/{src → storage-file-share/src}/generated/src/operations/service.js +7 -17
  199. package/dist-esm/storage-file-share/src/generated/src/operations/service.js.map +1 -0
  200. package/dist-esm/{src → storage-file-share/src}/generated/src/operations/share.js +26 -85
  201. package/dist-esm/storage-file-share/src/generated/src/operations/share.js.map +1 -0
  202. package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/directory.js +9 -0
  203. package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/directory.js.map +1 -0
  204. package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/file.js +9 -0
  205. package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/file.js.map +1 -0
  206. package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/index.js +12 -0
  207. package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/index.js.map +1 -0
  208. package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/service.js +9 -0
  209. package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/service.js.map +1 -0
  210. package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/share.js +9 -0
  211. package/dist-esm/storage-file-share/src/generated/src/operationsInterfaces/share.js.map +1 -0
  212. package/dist-esm/storage-file-share/src/generated/src/storageClient.js +48 -0
  213. package/dist-esm/storage-file-share/src/generated/src/storageClient.js.map +1 -0
  214. package/dist-esm/storage-file-share/src/generatedModels.js +4 -0
  215. package/dist-esm/storage-file-share/src/generatedModels.js.map +1 -0
  216. package/dist-esm/storage-file-share/src/index.browser.js +18 -0
  217. package/dist-esm/storage-file-share/src/index.browser.js.map +1 -0
  218. package/dist-esm/storage-file-share/src/index.js +28 -0
  219. package/dist-esm/storage-file-share/src/index.js.map +1 -0
  220. package/dist-esm/storage-file-share/src/log.js.map +1 -0
  221. package/dist-esm/storage-file-share/src/models.js.map +1 -0
  222. package/dist-esm/storage-file-share/src/utils/Batch.js +122 -0
  223. package/dist-esm/storage-file-share/src/utils/Batch.js.map +1 -0
  224. package/dist-esm/storage-file-share/src/utils/BufferScheduler.js.map +1 -0
  225. package/dist-esm/{src → storage-file-share/src}/utils/RetriableReadableStream.js +51 -48
  226. package/dist-esm/storage-file-share/src/utils/RetriableReadableStream.js.map +1 -0
  227. package/dist-esm/{src → storage-file-share/src}/utils/constants.js +2 -6
  228. package/dist-esm/storage-file-share/src/utils/constants.js.map +1 -0
  229. package/dist-esm/storage-file-share/src/utils/tracing.js +14 -0
  230. package/dist-esm/storage-file-share/src/utils/tracing.js.map +1 -0
  231. package/dist-esm/storage-file-share/src/utils/utils.browser.js.map +1 -0
  232. package/dist-esm/{src → storage-file-share/src}/utils/utils.common.js +77 -94
  233. package/dist-esm/storage-file-share/src/utils/utils.common.js.map +1 -0
  234. package/dist-esm/storage-file-share/src/utils/utils.node.js.map +1 -0
  235. package/package.json +36 -31
  236. package/types/3.1/storage-file-share.d.ts +1454 -532
  237. package/types/latest/storage-file-share.d.ts +1571 -544
  238. package/dist-esm/src/AccountSASPermissions.js.map +0 -1
  239. package/dist-esm/src/AccountSASResourceTypes.js.map +0 -1
  240. package/dist-esm/src/AccountSASServices.js.map +0 -1
  241. package/dist-esm/src/AccountSASSignatureValues.js.map +0 -1
  242. package/dist-esm/src/Clients.js.map +0 -1
  243. package/dist-esm/src/FileDownloadResponse.browser.js.map +0 -1
  244. package/dist-esm/src/FileDownloadResponse.js.map +0 -1
  245. package/dist-esm/src/FileSASPermissions.js.map +0 -1
  246. package/dist-esm/src/FileSASSignatureValues.js.map +0 -1
  247. package/dist-esm/src/FileSystemAttributes.js.map +0 -1
  248. package/dist-esm/src/Pipeline.js +0 -88
  249. package/dist-esm/src/Pipeline.js.map +0 -1
  250. package/dist-esm/src/Range.js.map +0 -1
  251. package/dist-esm/src/SASQueryParameters.js.map +0 -1
  252. package/dist-esm/src/SasIPRange.js.map +0 -1
  253. package/dist-esm/src/ShareClientInternal.js.map +0 -1
  254. package/dist-esm/src/ShareSASPermissions.js.map +0 -1
  255. package/dist-esm/src/ShareServiceClient.js.map +0 -1
  256. package/dist-esm/src/StorageBrowserPolicyFactory.js.map +0 -1
  257. package/dist-esm/src/StorageClient.js.map +0 -1
  258. package/dist-esm/src/StorageRetryPolicyFactory.js.map +0 -1
  259. package/dist-esm/src/TelemetryPolicyFactory.js +0 -50
  260. package/dist-esm/src/TelemetryPolicyFactory.js.map +0 -1
  261. package/dist-esm/src/credentials/AnonymousCredential.js.map +0 -1
  262. package/dist-esm/src/credentials/Credential.js.map +0 -1
  263. package/dist-esm/src/credentials/StorageSharedKeyCredential.browser.js.map +0 -1
  264. package/dist-esm/src/credentials/StorageSharedKeyCredential.js.map +0 -1
  265. package/dist-esm/src/generated/src/index.js.map +0 -1
  266. package/dist-esm/src/generated/src/models/index.js.map +0 -1
  267. package/dist-esm/src/generated/src/models/mappers.js.map +0 -1
  268. package/dist-esm/src/generated/src/models/parameters.js.map +0 -1
  269. package/dist-esm/src/generated/src/operations/directory.js.map +0 -1
  270. package/dist-esm/src/generated/src/operations/file.js.map +0 -1
  271. package/dist-esm/src/generated/src/operations/index.js.map +0 -1
  272. package/dist-esm/src/generated/src/operations/service.js.map +0 -1
  273. package/dist-esm/src/generated/src/operations/share.js.map +0 -1
  274. package/dist-esm/src/generated/src/storageClient.js +0 -25
  275. package/dist-esm/src/generated/src/storageClient.js.map +0 -1
  276. package/dist-esm/src/generated/src/storageClientContext.js +0 -40
  277. package/dist-esm/src/generated/src/storageClientContext.js.map +0 -1
  278. package/dist-esm/src/generatedModels.js +0 -8
  279. package/dist-esm/src/generatedModels.js.map +0 -1
  280. package/dist-esm/src/index.browser.js +0 -17
  281. package/dist-esm/src/index.browser.js.map +0 -1
  282. package/dist-esm/src/index.js +0 -27
  283. package/dist-esm/src/index.js.map +0 -1
  284. package/dist-esm/src/log.js.map +0 -1
  285. package/dist-esm/src/models.js.map +0 -1
  286. package/dist-esm/src/policies/AnonymousCredentialPolicy.js.map +0 -1
  287. package/dist-esm/src/policies/CredentialPolicy.js.map +0 -1
  288. package/dist-esm/src/policies/StorageRetryPolicy.js.map +0 -1
  289. package/dist-esm/src/policies/StorageSharedKeyCredentialPolicy.js.map +0 -1
  290. package/dist-esm/src/policies/TelemetryPolicy.js +0 -36
  291. package/dist-esm/src/policies/TelemetryPolicy.js.map +0 -1
  292. package/dist-esm/src/utils/Batch.js.map +0 -1
  293. package/dist-esm/src/utils/BufferScheduler.js.map +0 -1
  294. package/dist-esm/src/utils/RetriableReadableStream.js.map +0 -1
  295. package/dist-esm/src/utils/cache.js +0 -8
  296. package/dist-esm/src/utils/cache.js.map +0 -1
  297. package/dist-esm/src/utils/constants.js.map +0 -1
  298. package/dist-esm/src/utils/tracing.js +0 -27
  299. package/dist-esm/src/utils/tracing.js.map +0 -1
  300. package/dist-esm/src/utils/utils.browser.js.map +0 -1
  301. package/dist-esm/src/utils/utils.common.js.map +0 -1
  302. package/dist-esm/src/utils/utils.node.js.map +0 -1
  303. /package/dist-esm/{src → storage-blob/src}/credentials/Credential.js +0 -0
  304. /package/dist-esm/{src → storage-blob/src}/credentials/StorageSharedKeyCredential.browser.js +0 -0
  305. /package/dist-esm/{src → storage-blob/src}/policies/AnonymousCredentialPolicy.js +0 -0
  306. /package/dist-esm/{src → storage-blob/src}/policies/StorageSharedKeyCredentialPolicy.js +0 -0
  307. /package/dist-esm/{src → storage-blob/src/sas}/AccountSASResourceTypes.js +0 -0
  308. /package/dist-esm/{src → storage-blob/src/sas}/AccountSASServices.js +0 -0
  309. /package/dist-esm/{src → storage-blob/src}/utils/Batch.js +0 -0
  310. /package/dist-esm/{src → storage-file-share/src}/AccountSASPermissions.js +0 -0
  311. /package/dist-esm/{src → storage-file-share/src}/AccountSASSignatureValues.js +0 -0
  312. /package/dist-esm/{src → storage-file-share/src}/FileDownloadResponse.browser.js +0 -0
  313. /package/dist-esm/{src → storage-file-share/src}/FileSASPermissions.js +0 -0
  314. /package/dist-esm/{src → storage-file-share/src}/FileSASSignatureValues.js +0 -0
  315. /package/dist-esm/{src → storage-file-share/src}/FileSystemAttributes.js +0 -0
  316. /package/dist-esm/{src → storage-file-share/src}/Range.js +0 -0
  317. /package/dist-esm/{src → storage-file-share/src}/SasIPRange.js +0 -0
  318. /package/dist-esm/{src → storage-file-share/src}/ShareSASPermissions.js +0 -0
  319. /package/dist-esm/{src → storage-file-share/src}/generated/src/operations/index.js +0 -0
  320. /package/dist-esm/{src → storage-file-share/src}/log.js +0 -0
  321. /package/dist-esm/{src → storage-file-share/src}/models.js +0 -0
  322. /package/dist-esm/{src → storage-file-share/src}/utils/BufferScheduler.js +0 -0
  323. /package/dist-esm/{src → storage-file-share/src}/utils/utils.browser.js +0 -0
  324. /package/dist-esm/{src → storage-file-share/src}/utils/utils.node.js +0 -0
@@ -0,0 +1,702 @@
1
+ import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT license.
4
+ import { isTokenCredential } from "@azure/core-auth";
5
+ import { getDefaultProxySettings } from "@azure/core-rest-pipeline";
6
+ import { isNode } from "@azure/core-util";
7
+ import { newPipeline, isPipelineLike } from "./Pipeline";
8
+ import { ContainerClient, } from "./ContainerClient";
9
+ import { appendToURLPath, appendToURLQuery, extractConnectionStringParts, toTags, } from "./utils/utils.common";
10
+ import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential";
11
+ import { AnonymousCredential } from "./credentials/AnonymousCredential";
12
+ import { truncatedISO8061Date, assertResponse } from "./utils/utils.common";
13
+ import { tracingClient } from "./utils/tracing";
14
+ import { BlobBatchClient } from "./BlobBatchClient";
15
+ import { StorageClient } from "./StorageClient";
16
+ import { AccountSASPermissions } from "./sas/AccountSASPermissions";
17
+ import { generateAccountSASQueryParameters } from "./sas/AccountSASSignatureValues";
18
+ import { AccountSASServices } from "./sas/AccountSASServices";
19
+ /**
20
+ * A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you
21
+ * to manipulate blob containers.
22
+ */
23
+ export class BlobServiceClient extends StorageClient {
24
+ /**
25
+ *
26
+ * Creates an instance of BlobServiceClient from connection string.
27
+ *
28
+ * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.
29
+ * [ Note - Account connection string can only be used in NODE.JS runtime. ]
30
+ * Account connection string example -
31
+ * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`
32
+ * SAS connection string example -
33
+ * `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`
34
+ * @param options - Optional. Options to configure the HTTP pipeline.
35
+ */
36
+ static fromConnectionString(connectionString,
37
+ // Legacy, no fix for eslint error without breaking. Disable it for this interface.
38
+ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
39
+ options) {
40
+ options = options || {};
41
+ const extractedCreds = extractConnectionStringParts(connectionString);
42
+ if (extractedCreds.kind === "AccountConnString") {
43
+ if (isNode) {
44
+ const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
45
+ if (!options.proxyOptions) {
46
+ options.proxyOptions = getDefaultProxySettings(extractedCreds.proxyUri);
47
+ }
48
+ const pipeline = newPipeline(sharedKeyCredential, options);
49
+ return new BlobServiceClient(extractedCreds.url, pipeline);
50
+ }
51
+ else {
52
+ throw new Error("Account connection string is only supported in Node.js environment");
53
+ }
54
+ }
55
+ else if (extractedCreds.kind === "SASConnString") {
56
+ const pipeline = newPipeline(new AnonymousCredential(), options);
57
+ return new BlobServiceClient(extractedCreds.url + "?" + extractedCreds.accountSas, pipeline);
58
+ }
59
+ else {
60
+ throw new Error("Connection string must be either an Account connection string or a SAS connection string");
61
+ }
62
+ }
63
+ constructor(url, credentialOrPipeline,
64
+ // Legacy, no fix for eslint error without breaking. Disable it for this interface.
65
+ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
66
+ options) {
67
+ let pipeline;
68
+ if (isPipelineLike(credentialOrPipeline)) {
69
+ pipeline = credentialOrPipeline;
70
+ }
71
+ else if ((isNode && credentialOrPipeline instanceof StorageSharedKeyCredential) ||
72
+ credentialOrPipeline instanceof AnonymousCredential ||
73
+ isTokenCredential(credentialOrPipeline)) {
74
+ pipeline = newPipeline(credentialOrPipeline, options);
75
+ }
76
+ else {
77
+ // The second parameter is undefined. Use anonymous credential
78
+ pipeline = newPipeline(new AnonymousCredential(), options);
79
+ }
80
+ super(url, pipeline);
81
+ this.serviceContext = this.storageClientContext.service;
82
+ }
83
+ /**
84
+ * Creates a {@link ContainerClient} object
85
+ *
86
+ * @param containerName - A container name
87
+ * @returns A new ContainerClient object for the given container name.
88
+ *
89
+ * Example usage:
90
+ *
91
+ * ```js
92
+ * const containerClient = blobServiceClient.getContainerClient("<container name>");
93
+ * ```
94
+ */
95
+ getContainerClient(containerName) {
96
+ return new ContainerClient(appendToURLPath(this.url, encodeURIComponent(containerName)), this.pipeline);
97
+ }
98
+ /**
99
+ * Create a Blob container. @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-container
100
+ *
101
+ * @param containerName - Name of the container to create.
102
+ * @param options - Options to configure Container Create operation.
103
+ * @returns Container creation response and the corresponding container client.
104
+ */
105
+ async createContainer(containerName, options = {}) {
106
+ return tracingClient.withSpan("BlobServiceClient-createContainer", options, async (updatedOptions) => {
107
+ const containerClient = this.getContainerClient(containerName);
108
+ const containerCreateResponse = await containerClient.create(updatedOptions);
109
+ return {
110
+ containerClient,
111
+ containerCreateResponse,
112
+ };
113
+ });
114
+ }
115
+ /**
116
+ * Deletes a Blob container.
117
+ *
118
+ * @param containerName - Name of the container to delete.
119
+ * @param options - Options to configure Container Delete operation.
120
+ * @returns Container deletion response.
121
+ */
122
+ async deleteContainer(containerName, options = {}) {
123
+ return tracingClient.withSpan("BlobServiceClient-deleteContainer", options, async (updatedOptions) => {
124
+ const containerClient = this.getContainerClient(containerName);
125
+ return containerClient.delete(updatedOptions);
126
+ });
127
+ }
128
+ /**
129
+ * Restore a previously deleted Blob container.
130
+ * This API is only functional if Container Soft Delete is enabled for the storage account associated with the container.
131
+ *
132
+ * @param deletedContainerName - Name of the previously deleted container.
133
+ * @param deletedContainerVersion - Version of the previously deleted container, used to uniquely identify the deleted container.
134
+ * @param options - Options to configure Container Restore operation.
135
+ * @returns Container deletion response.
136
+ */
137
+ async undeleteContainer(deletedContainerName, deletedContainerVersion, options = {}) {
138
+ return tracingClient.withSpan("BlobServiceClient-undeleteContainer", options, async (updatedOptions) => {
139
+ const containerClient = this.getContainerClient(options.destinationContainerName || deletedContainerName);
140
+ // Hack to access a protected member.
141
+ const containerContext = containerClient["storageClientContext"].container;
142
+ const containerUndeleteResponse = assertResponse(await containerContext.restore({
143
+ deletedContainerName,
144
+ deletedContainerVersion,
145
+ tracingOptions: updatedOptions.tracingOptions,
146
+ }));
147
+ return { containerClient, containerUndeleteResponse };
148
+ });
149
+ }
150
+ /**
151
+ * Rename an existing Blob Container.
152
+ *
153
+ * @param sourceContainerName - The name of the source container.
154
+ * @param destinationContainerName - The new name of the container.
155
+ * @param options - Options to configure Container Rename operation.
156
+ */
157
+ /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */
158
+ // @ts-ignore Need to hide this interface for now. Make it public and turn on the live tests for it when the service is ready.
159
+ async renameContainer(sourceContainerName, destinationContainerName, options = {}) {
160
+ return tracingClient.withSpan("BlobServiceClient-renameContainer", options, async (updatedOptions) => {
161
+ var _a;
162
+ const containerClient = this.getContainerClient(destinationContainerName);
163
+ // Hack to access a protected member.
164
+ const containerContext = containerClient["storageClientContext"].container;
165
+ const containerRenameResponse = assertResponse(await containerContext.rename(sourceContainerName, Object.assign(Object.assign({}, updatedOptions), { sourceLeaseId: (_a = options.sourceCondition) === null || _a === void 0 ? void 0 : _a.leaseId })));
166
+ return { containerClient, containerRenameResponse };
167
+ });
168
+ }
169
+ /**
170
+ * Gets the properties of a storage account’s Blob service, including properties
171
+ * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
172
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties
173
+ *
174
+ * @param options - Options to the Service Get Properties operation.
175
+ * @returns Response data for the Service Get Properties operation.
176
+ */
177
+ async getProperties(options = {}) {
178
+ return tracingClient.withSpan("BlobServiceClient-getProperties", options, async (updatedOptions) => {
179
+ return assertResponse(await this.serviceContext.getProperties({
180
+ abortSignal: options.abortSignal,
181
+ tracingOptions: updatedOptions.tracingOptions,
182
+ }));
183
+ });
184
+ }
185
+ /**
186
+ * Sets properties for a storage account’s Blob service endpoint, including properties
187
+ * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
188
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties
189
+ *
190
+ * @param properties -
191
+ * @param options - Options to the Service Set Properties operation.
192
+ * @returns Response data for the Service Set Properties operation.
193
+ */
194
+ async setProperties(properties, options = {}) {
195
+ return tracingClient.withSpan("BlobServiceClient-setProperties", options, async (updatedOptions) => {
196
+ return assertResponse(await this.serviceContext.setProperties(properties, {
197
+ abortSignal: options.abortSignal,
198
+ tracingOptions: updatedOptions.tracingOptions,
199
+ }));
200
+ });
201
+ }
202
+ /**
203
+ * Retrieves statistics related to replication for the Blob service. It is only
204
+ * available on the secondary location endpoint when read-access geo-redundant
205
+ * replication is enabled for the storage account.
206
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-stats
207
+ *
208
+ * @param options - Options to the Service Get Statistics operation.
209
+ * @returns Response data for the Service Get Statistics operation.
210
+ */
211
+ async getStatistics(options = {}) {
212
+ return tracingClient.withSpan("BlobServiceClient-getStatistics", options, async (updatedOptions) => {
213
+ return assertResponse(await this.serviceContext.getStatistics({
214
+ abortSignal: options.abortSignal,
215
+ tracingOptions: updatedOptions.tracingOptions,
216
+ }));
217
+ });
218
+ }
219
+ /**
220
+ * The Get Account Information operation returns the sku name and account kind
221
+ * for the specified account.
222
+ * The Get Account Information operation is available on service versions beginning
223
+ * with version 2018-03-28.
224
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-account-information
225
+ *
226
+ * @param options - Options to the Service Get Account Info operation.
227
+ * @returns Response data for the Service Get Account Info operation.
228
+ */
229
+ async getAccountInfo(options = {}) {
230
+ return tracingClient.withSpan("BlobServiceClient-getAccountInfo", options, async (updatedOptions) => {
231
+ return assertResponse(await this.serviceContext.getAccountInfo({
232
+ abortSignal: options.abortSignal,
233
+ tracingOptions: updatedOptions.tracingOptions,
234
+ }));
235
+ });
236
+ }
237
+ /**
238
+ * Returns a list of the containers under the specified account.
239
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/list-containers2
240
+ *
241
+ * @param marker - A string value that identifies the portion of
242
+ * the list of containers to be returned with the next listing operation. The
243
+ * operation returns the continuationToken value within the response body if the
244
+ * listing operation did not return all containers remaining to be listed
245
+ * with the current page. The continuationToken value can be used as the value for
246
+ * the marker parameter in a subsequent call to request the next page of list
247
+ * items. The marker value is opaque to the client.
248
+ * @param options - Options to the Service List Container Segment operation.
249
+ * @returns Response data for the Service List Container Segment operation.
250
+ */
251
+ async listContainersSegment(marker, options = {}) {
252
+ return tracingClient.withSpan("BlobServiceClient-listContainersSegment", options, async (updatedOptions) => {
253
+ return assertResponse(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({ abortSignal: options.abortSignal, marker }, options), { include: typeof options.include === "string" ? [options.include] : options.include, tracingOptions: updatedOptions.tracingOptions })));
254
+ });
255
+ }
256
+ /**
257
+ * The Filter Blobs operation enables callers to list blobs across all containers whose tags
258
+ * match a given search expression. Filter blobs searches across all containers within a
259
+ * storage account but can be scoped within the expression to a single container.
260
+ *
261
+ * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
262
+ * The given expression must evaluate to true for a blob to be returned in the results.
263
+ * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
264
+ * however, only a subset of the OData filter syntax is supported in the Blob service.
265
+ * @param marker - A string value that identifies the portion of
266
+ * the list of blobs to be returned with the next listing operation. The
267
+ * operation returns the continuationToken value within the response body if the
268
+ * listing operation did not return all blobs remaining to be listed
269
+ * with the current page. The continuationToken value can be used as the value for
270
+ * the marker parameter in a subsequent call to request the next page of list
271
+ * items. The marker value is opaque to the client.
272
+ * @param options - Options to find blobs by tags.
273
+ */
274
+ async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) {
275
+ return tracingClient.withSpan("BlobServiceClient-findBlobsByTagsSegment", options, async (updatedOptions) => {
276
+ const response = assertResponse(await this.serviceContext.filterBlobs({
277
+ abortSignal: options.abortSignal,
278
+ where: tagFilterSqlExpression,
279
+ marker,
280
+ maxPageSize: options.maxPageSize,
281
+ tracingOptions: updatedOptions.tracingOptions,
282
+ }));
283
+ const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {
284
+ var _a;
285
+ let tagValue = "";
286
+ if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {
287
+ tagValue = blob.tags.blobTagSet[0].value;
288
+ }
289
+ return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });
290
+ }) });
291
+ return wrappedResponse;
292
+ });
293
+ }
294
+ /**
295
+ * Returns an AsyncIterableIterator for ServiceFindBlobsByTagsSegmentResponse.
296
+ *
297
+ * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
298
+ * The given expression must evaluate to true for a blob to be returned in the results.
299
+ * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
300
+ * however, only a subset of the OData filter syntax is supported in the Blob service.
301
+ * @param marker - A string value that identifies the portion of
302
+ * the list of blobs to be returned with the next listing operation. The
303
+ * operation returns the continuationToken value within the response body if the
304
+ * listing operation did not return all blobs remaining to be listed
305
+ * with the current page. The continuationToken value can be used as the value for
306
+ * the marker parameter in a subsequent call to request the next page of list
307
+ * items. The marker value is opaque to the client.
308
+ * @param options - Options to find blobs by tags.
309
+ */
310
+ findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) {
311
+ return __asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() {
312
+ let response;
313
+ if (!!marker || marker === undefined) {
314
+ do {
315
+ response = yield __await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));
316
+ response.blobs = response.blobs || [];
317
+ marker = response.continuationToken;
318
+ yield yield __await(response);
319
+ } while (marker);
320
+ }
321
+ });
322
+ }
323
+ /**
324
+ * Returns an AsyncIterableIterator for blobs.
325
+ *
326
+ * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
327
+ * The given expression must evaluate to true for a blob to be returned in the results.
328
+ * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
329
+ * however, only a subset of the OData filter syntax is supported in the Blob service.
330
+ * @param options - Options to findBlobsByTagsItems.
331
+ */
332
+ findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
333
+ return __asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
334
+ var _a, e_1, _b, _c;
335
+ let marker;
336
+ try {
337
+ for (var _d = true, _e = __asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
338
+ _c = _f.value;
339
+ _d = false;
340
+ try {
341
+ const segment = _c;
342
+ yield __await(yield* __asyncDelegator(__asyncValues(segment.blobs)));
343
+ }
344
+ finally {
345
+ _d = true;
346
+ }
347
+ }
348
+ }
349
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
350
+ finally {
351
+ try {
352
+ if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
353
+ }
354
+ finally { if (e_1) throw e_1.error; }
355
+ }
356
+ });
357
+ }
358
+ /**
359
+ * Returns an async iterable iterator to find all blobs with specified tag
360
+ * under the specified account.
361
+ *
362
+ * .byPage() returns an async iterable iterator to list the blobs in pages.
363
+ *
364
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-blob-service-properties
365
+ *
366
+ * Example using `for await` syntax:
367
+ *
368
+ * ```js
369
+ * let i = 1;
370
+ * for await (const blob of blobServiceClient.findBlobsByTags("tagkey='tagvalue'")) {
371
+ * console.log(`Blob ${i++}: ${container.name}`);
372
+ * }
373
+ * ```
374
+ *
375
+ * Example using `iter.next()`:
376
+ *
377
+ * ```js
378
+ * let i = 1;
379
+ * const iter = blobServiceClient.findBlobsByTags("tagkey='tagvalue'");
380
+ * let blobItem = await iter.next();
381
+ * while (!blobItem.done) {
382
+ * console.log(`Blob ${i++}: ${blobItem.value.name}`);
383
+ * blobItem = await iter.next();
384
+ * }
385
+ * ```
386
+ *
387
+ * Example using `byPage()`:
388
+ *
389
+ * ```js
390
+ * // passing optional maxPageSize in the page settings
391
+ * let i = 1;
392
+ * for await (const response of blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) {
393
+ * if (response.blobs) {
394
+ * for (const blob of response.blobs) {
395
+ * console.log(`Blob ${i++}: ${blob.name}`);
396
+ * }
397
+ * }
398
+ * }
399
+ * ```
400
+ *
401
+ * Example using paging with a marker:
402
+ *
403
+ * ```js
404
+ * let i = 1;
405
+ * let iterator = blobServiceClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 });
406
+ * let response = (await iterator.next()).value;
407
+ *
408
+ * // Prints 2 blob names
409
+ * if (response.blobs) {
410
+ * for (const blob of response.blobs) {
411
+ * console.log(`Blob ${i++}: ${blob.name}`);
412
+ * }
413
+ * }
414
+ *
415
+ * // Gets next marker
416
+ * let marker = response.continuationToken;
417
+ * // Passing next marker as continuationToken
418
+ * iterator = blobServiceClient
419
+ * .findBlobsByTags("tagkey='tagvalue'")
420
+ * .byPage({ continuationToken: marker, maxPageSize: 10 });
421
+ * response = (await iterator.next()).value;
422
+ *
423
+ * // Prints blob names
424
+ * if (response.blobs) {
425
+ * for (const blob of response.blobs) {
426
+ * console.log(`Blob ${i++}: ${blob.name}`);
427
+ * }
428
+ * }
429
+ * ```
430
+ *
431
+ * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
432
+ * The given expression must evaluate to true for a blob to be returned in the results.
433
+ * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
434
+ * however, only a subset of the OData filter syntax is supported in the Blob service.
435
+ * @param options - Options to find blobs by tags.
436
+ */
437
+ findBlobsByTags(tagFilterSqlExpression, options = {}) {
438
+ // AsyncIterableIterator to iterate over blobs
439
+ const listSegmentOptions = Object.assign({}, options);
440
+ const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);
441
+ return {
442
+ /**
443
+ * The next method, part of the iteration protocol
444
+ */
445
+ next() {
446
+ return iter.next();
447
+ },
448
+ /**
449
+ * The connection to the async iterator, part of the iteration protocol
450
+ */
451
+ [Symbol.asyncIterator]() {
452
+ return this;
453
+ },
454
+ /**
455
+ * Return an AsyncIterableIterator that works a page at a time
456
+ */
457
+ byPage: (settings = {}) => {
458
+ return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
459
+ },
460
+ };
461
+ }
462
+ /**
463
+ * Returns an AsyncIterableIterator for ServiceListContainersSegmentResponses
464
+ *
465
+ * @param marker - A string value that identifies the portion of
466
+ * the list of containers to be returned with the next listing operation. The
467
+ * operation returns the continuationToken value within the response body if the
468
+ * listing operation did not return all containers remaining to be listed
469
+ * with the current page. The continuationToken value can be used as the value for
470
+ * the marker parameter in a subsequent call to request the next page of list
471
+ * items. The marker value is opaque to the client.
472
+ * @param options - Options to list containers operation.
473
+ */
474
+ listSegments(marker, options = {}) {
475
+ return __asyncGenerator(this, arguments, function* listSegments_1() {
476
+ let listContainersSegmentResponse;
477
+ if (!!marker || marker === undefined) {
478
+ do {
479
+ listContainersSegmentResponse = yield __await(this.listContainersSegment(marker, options));
480
+ listContainersSegmentResponse.containerItems =
481
+ listContainersSegmentResponse.containerItems || [];
482
+ marker = listContainersSegmentResponse.continuationToken;
483
+ yield yield __await(yield __await(listContainersSegmentResponse));
484
+ } while (marker);
485
+ }
486
+ });
487
+ }
488
+ /**
489
+ * Returns an AsyncIterableIterator for Container Items
490
+ *
491
+ * @param options - Options to list containers operation.
492
+ */
493
+ listItems(options = {}) {
494
+ return __asyncGenerator(this, arguments, function* listItems_1() {
495
+ var _a, e_2, _b, _c;
496
+ let marker;
497
+ try {
498
+ for (var _d = true, _e = __asyncValues(this.listSegments(marker, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a;) {
499
+ _c = _f.value;
500
+ _d = false;
501
+ try {
502
+ const segment = _c;
503
+ yield __await(yield* __asyncDelegator(__asyncValues(segment.containerItems)));
504
+ }
505
+ finally {
506
+ _d = true;
507
+ }
508
+ }
509
+ }
510
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
511
+ finally {
512
+ try {
513
+ if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
514
+ }
515
+ finally { if (e_2) throw e_2.error; }
516
+ }
517
+ });
518
+ }
519
+ /**
520
+ * Returns an async iterable iterator to list all the containers
521
+ * under the specified account.
522
+ *
523
+ * .byPage() returns an async iterable iterator to list the containers in pages.
524
+ *
525
+ * Example using `for await` syntax:
526
+ *
527
+ * ```js
528
+ * let i = 1;
529
+ * for await (const container of blobServiceClient.listContainers()) {
530
+ * console.log(`Container ${i++}: ${container.name}`);
531
+ * }
532
+ * ```
533
+ *
534
+ * Example using `iter.next()`:
535
+ *
536
+ * ```js
537
+ * let i = 1;
538
+ * const iter = blobServiceClient.listContainers();
539
+ * let containerItem = await iter.next();
540
+ * while (!containerItem.done) {
541
+ * console.log(`Container ${i++}: ${containerItem.value.name}`);
542
+ * containerItem = await iter.next();
543
+ * }
544
+ * ```
545
+ *
546
+ * Example using `byPage()`:
547
+ *
548
+ * ```js
549
+ * // passing optional maxPageSize in the page settings
550
+ * let i = 1;
551
+ * for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) {
552
+ * if (response.containerItems) {
553
+ * for (const container of response.containerItems) {
554
+ * console.log(`Container ${i++}: ${container.name}`);
555
+ * }
556
+ * }
557
+ * }
558
+ * ```
559
+ *
560
+ * Example using paging with a marker:
561
+ *
562
+ * ```js
563
+ * let i = 1;
564
+ * let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 });
565
+ * let response = (await iterator.next()).value;
566
+ *
567
+ * // Prints 2 container names
568
+ * if (response.containerItems) {
569
+ * for (const container of response.containerItems) {
570
+ * console.log(`Container ${i++}: ${container.name}`);
571
+ * }
572
+ * }
573
+ *
574
+ * // Gets next marker
575
+ * let marker = response.continuationToken;
576
+ * // Passing next marker as continuationToken
577
+ * iterator = blobServiceClient
578
+ * .listContainers()
579
+ * .byPage({ continuationToken: marker, maxPageSize: 10 });
580
+ * response = (await iterator.next()).value;
581
+ *
582
+ * // Prints 10 container names
583
+ * if (response.containerItems) {
584
+ * for (const container of response.containerItems) {
585
+ * console.log(`Container ${i++}: ${container.name}`);
586
+ * }
587
+ * }
588
+ * ```
589
+ *
590
+ * @param options - Options to list containers.
591
+ * @returns An asyncIterableIterator that supports paging.
592
+ */
593
+ listContainers(options = {}) {
594
+ if (options.prefix === "") {
595
+ options.prefix = undefined;
596
+ }
597
+ const include = [];
598
+ if (options.includeDeleted) {
599
+ include.push("deleted");
600
+ }
601
+ if (options.includeMetadata) {
602
+ include.push("metadata");
603
+ }
604
+ if (options.includeSystem) {
605
+ include.push("system");
606
+ }
607
+ // AsyncIterableIterator to iterate over containers
608
+ const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {}));
609
+ const iter = this.listItems(listSegmentOptions);
610
+ return {
611
+ /**
612
+ * The next method, part of the iteration protocol
613
+ */
614
+ next() {
615
+ return iter.next();
616
+ },
617
+ /**
618
+ * The connection to the async iterator, part of the iteration protocol
619
+ */
620
+ [Symbol.asyncIterator]() {
621
+ return this;
622
+ },
623
+ /**
624
+ * Return an AsyncIterableIterator that works a page at a time
625
+ */
626
+ byPage: (settings = {}) => {
627
+ return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
628
+ },
629
+ };
630
+ }
631
+ /**
632
+ * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).
633
+ *
634
+ * Retrieves a user delegation key for the Blob service. This is only a valid operation when using
635
+ * bearer token authentication.
636
+ *
637
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-user-delegation-key
638
+ *
639
+ * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time
640
+ * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time
641
+ */
642
+ async getUserDelegationKey(startsOn, expiresOn, options = {}) {
643
+ return tracingClient.withSpan("BlobServiceClient-getUserDelegationKey", options, async (updatedOptions) => {
644
+ const response = assertResponse(await this.serviceContext.getUserDelegationKey({
645
+ startsOn: truncatedISO8061Date(startsOn, false),
646
+ expiresOn: truncatedISO8061Date(expiresOn, false),
647
+ }, {
648
+ abortSignal: options.abortSignal,
649
+ tracingOptions: updatedOptions.tracingOptions,
650
+ }));
651
+ const userDelegationKey = {
652
+ signedObjectId: response.signedObjectId,
653
+ signedTenantId: response.signedTenantId,
654
+ signedStartsOn: new Date(response.signedStartsOn),
655
+ signedExpiresOn: new Date(response.signedExpiresOn),
656
+ signedService: response.signedService,
657
+ signedVersion: response.signedVersion,
658
+ value: response.value,
659
+ };
660
+ const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey);
661
+ return res;
662
+ });
663
+ }
664
+ /**
665
+ * Creates a BlobBatchClient object to conduct batch operations.
666
+ *
667
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch
668
+ *
669
+ * @returns A new BlobBatchClient object for this service.
670
+ */
671
+ getBlobBatchClient() {
672
+ return new BlobBatchClient(this.url, this.pipeline);
673
+ }
674
+ /**
675
+ * Only available for BlobServiceClient constructed with a shared key credential.
676
+ *
677
+ * Generates a Blob account Shared Access Signature (SAS) URI based on the client properties
678
+ * and parameters passed in. The SAS is signed by the shared key credential of the client.
679
+ *
680
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas
681
+ *
682
+ * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not provided.
683
+ * @param permissions - Specifies the list of permissions to be associated with the SAS.
684
+ * @param resourceTypes - Specifies the resource types associated with the shared access signature.
685
+ * @param options - Optional parameters.
686
+ * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
687
+ */
688
+ generateAccountSasUrl(expiresOn, permissions = AccountSASPermissions.parse("r"), resourceTypes = "sco", options = {}) {
689
+ if (!(this.credential instanceof StorageSharedKeyCredential)) {
690
+ throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential");
691
+ }
692
+ if (expiresOn === undefined) {
693
+ const now = new Date();
694
+ expiresOn = new Date(now.getTime() + 3600 * 1000);
695
+ }
696
+ const sas = generateAccountSASQueryParameters(Object.assign({ permissions,
697
+ expiresOn,
698
+ resourceTypes, services: AccountSASServices.parse("b").toString() }, options), this.credential).toString();
699
+ return appendToURLQuery(this.url, sas);
700
+ }
701
+ }
702
+ //# sourceMappingURL=BlobServiceClient.js.map