@azure/storage-file-datalake 12.28.0-beta.1 → 12.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/dist/browser/DataLakeFileSystemClient.js +123 -80
  2. package/dist/browser/DataLakeFileSystemClient.js.map +1 -1
  3. package/dist/browser/DataLakeLeaseClient.js +1 -0
  4. package/dist/browser/DataLakeLeaseClient.js.map +1 -1
  5. package/dist/browser/DataLakeServiceClient.js +22 -5
  6. package/dist/browser/DataLakeServiceClient.js.map +1 -1
  7. package/dist/browser/Pipeline.js +24 -15
  8. package/dist/browser/Pipeline.js.map +1 -1
  9. package/dist/browser/StorageClient.js +43 -3
  10. package/dist/browser/StorageClient.js.map +1 -1
  11. package/dist/browser/StorageContextClient.js +2 -3
  12. package/dist/browser/StorageContextClient.js.map +1 -1
  13. package/dist/browser/clients.js +246 -66
  14. package/dist/browser/clients.js.map +1 -1
  15. package/dist/browser/generated/src/operations/fileSystemOperations.js +1 -0
  16. package/dist/browser/generated/src/operations/fileSystemOperations.js.map +1 -1
  17. package/dist/browser/generated/src/operations/pathOperations.js +1 -0
  18. package/dist/browser/generated/src/operations/pathOperations.js.map +1 -1
  19. package/dist/browser/generated/src/operations/service.js +1 -0
  20. package/dist/browser/generated/src/operations/service.js.map +1 -1
  21. package/dist/browser/generated/src/storageClient.js +15 -4
  22. package/dist/browser/generated/src/storageClient.js.map +1 -1
  23. package/dist/browser/index-browser.d.mts.map +1 -1
  24. package/dist/browser/index-browser.mjs.map +1 -1
  25. package/dist/browser/index.d.ts +1 -1
  26. package/dist/browser/index.js +1 -1
  27. package/dist/browser/sas/AccountSASPermissions.js +32 -34
  28. package/dist/browser/sas/AccountSASPermissions.js.map +1 -1
  29. package/dist/browser/sas/AccountSASResourceTypes.js +12 -14
  30. package/dist/browser/sas/AccountSASResourceTypes.js.map +1 -1
  31. package/dist/browser/sas/AccountSASServices.js +16 -18
  32. package/dist/browser/sas/AccountSASServices.js.map +1 -1
  33. package/dist/browser/sas/DataLakeSASPermissions.js +39 -41
  34. package/dist/browser/sas/DataLakeSASPermissions.js.map +1 -1
  35. package/dist/browser/sas/DataLakeSASSignatureValues.js +3 -2
  36. package/dist/browser/sas/DataLakeSASSignatureValues.js.map +1 -1
  37. package/dist/browser/sas/DirectorySASPermissions.js +43 -45
  38. package/dist/browser/sas/DirectorySASPermissions.js.map +1 -1
  39. package/dist/browser/sas/FileSystemSASPermissions.js +43 -45
  40. package/dist/browser/sas/FileSystemSASPermissions.js.map +1 -1
  41. package/dist/browser/sas/SASQueryParameters.js +131 -2
  42. package/dist/browser/sas/SASQueryParameters.js.map +1 -1
  43. package/dist/browser/transforms.js +8 -1
  44. package/dist/browser/transforms.js.map +1 -1
  45. package/dist/browser/utils/Batch.js +29 -21
  46. package/dist/browser/utils/Batch.js.map +1 -1
  47. package/dist/browser/utils/BufferScheduler.js +70 -44
  48. package/dist/browser/utils/BufferScheduler.js.map +1 -1
  49. package/dist/browser/utils/DataLakeAclChangeFailedError.js +8 -0
  50. package/dist/browser/utils/DataLakeAclChangeFailedError.js.map +1 -1
  51. package/dist/browser/utils/PathClientInternal.js +4 -0
  52. package/dist/browser/utils/PathClientInternal.js.map +1 -1
  53. package/dist/browser/utils/constants.d.ts.map +1 -1
  54. package/dist/browser/utils/constants.js +1 -1
  55. package/dist/browser/utils/constants.js.map +1 -1
  56. package/dist/browser/utils/utils.common.js +2 -4
  57. package/dist/browser/utils/utils.common.js.map +1 -1
  58. package/dist/commonjs/DataLakeFileSystemClient.js +123 -80
  59. package/dist/commonjs/DataLakeFileSystemClient.js.map +1 -1
  60. package/dist/commonjs/DataLakeLeaseClient.js +1 -0
  61. package/dist/commonjs/DataLakeLeaseClient.js.map +1 -1
  62. package/dist/commonjs/DataLakeServiceClient.js +22 -5
  63. package/dist/commonjs/DataLakeServiceClient.js.map +1 -1
  64. package/dist/commonjs/Pipeline.js +32 -23
  65. package/dist/commonjs/Pipeline.js.map +1 -1
  66. package/dist/commonjs/StorageClient.js +43 -3
  67. package/dist/commonjs/StorageClient.js.map +1 -1
  68. package/dist/commonjs/StorageContextClient.js +2 -3
  69. package/dist/commonjs/StorageContextClient.js.map +1 -1
  70. package/dist/commonjs/clients.js +246 -66
  71. package/dist/commonjs/clients.js.map +1 -1
  72. package/dist/commonjs/credentials/UserDelegationKeyCredential.js +12 -0
  73. package/dist/commonjs/credentials/UserDelegationKeyCredential.js.map +1 -1
  74. package/dist/commonjs/generated/src/operations/fileSystemOperations.js +1 -0
  75. package/dist/commonjs/generated/src/operations/fileSystemOperations.js.map +1 -1
  76. package/dist/commonjs/generated/src/operations/pathOperations.js +1 -0
  77. package/dist/commonjs/generated/src/operations/pathOperations.js.map +1 -1
  78. package/dist/commonjs/generated/src/operations/service.js +1 -0
  79. package/dist/commonjs/generated/src/operations/service.js.map +1 -1
  80. package/dist/commonjs/generated/src/storageClient.js +15 -4
  81. package/dist/commonjs/generated/src/storageClient.js.map +1 -1
  82. package/dist/commonjs/sas/AccountSASPermissions.js +32 -34
  83. package/dist/commonjs/sas/AccountSASPermissions.js.map +1 -1
  84. package/dist/commonjs/sas/AccountSASResourceTypes.js +12 -14
  85. package/dist/commonjs/sas/AccountSASResourceTypes.js.map +1 -1
  86. package/dist/commonjs/sas/AccountSASServices.js +16 -18
  87. package/dist/commonjs/sas/AccountSASServices.js.map +1 -1
  88. package/dist/commonjs/sas/DataLakeSASPermissions.js +39 -41
  89. package/dist/commonjs/sas/DataLakeSASPermissions.js.map +1 -1
  90. package/dist/commonjs/sas/DataLakeSASSignatureValues.js +3 -2
  91. package/dist/commonjs/sas/DataLakeSASSignatureValues.js.map +1 -1
  92. package/dist/commonjs/sas/DirectorySASPermissions.js +43 -45
  93. package/dist/commonjs/sas/DirectorySASPermissions.js.map +1 -1
  94. package/dist/commonjs/sas/FileSystemSASPermissions.js +43 -45
  95. package/dist/commonjs/sas/FileSystemSASPermissions.js.map +1 -1
  96. package/dist/commonjs/sas/SASQueryParameters.js +131 -2
  97. package/dist/commonjs/sas/SASQueryParameters.js.map +1 -1
  98. package/dist/commonjs/transforms.js +8 -1
  99. package/dist/commonjs/transforms.js.map +1 -1
  100. package/dist/commonjs/tsdoc-metadata.json +11 -11
  101. package/dist/commonjs/utils/Batch.js +29 -21
  102. package/dist/commonjs/utils/Batch.js.map +1 -1
  103. package/dist/commonjs/utils/BufferScheduler.js +70 -44
  104. package/dist/commonjs/utils/BufferScheduler.js.map +1 -1
  105. package/dist/commonjs/utils/DataLakeAclChangeFailedError.js +8 -0
  106. package/dist/commonjs/utils/DataLakeAclChangeFailedError.js.map +1 -1
  107. package/dist/commonjs/utils/PathClientInternal.js +4 -0
  108. package/dist/commonjs/utils/PathClientInternal.js.map +1 -1
  109. package/dist/commonjs/utils/constants.d.ts.map +1 -1
  110. package/dist/commonjs/utils/constants.js +1 -1
  111. package/dist/commonjs/utils/constants.js.map +1 -1
  112. package/dist/commonjs/utils/utils.common.js +2 -4
  113. package/dist/commonjs/utils/utils.common.js.map +1 -1
  114. package/dist/commonjs/utils/utils.d.ts +1 -1
  115. package/dist/commonjs/utils/utils.d.ts.map +1 -1
  116. package/dist/commonjs/utils/utils.js +4 -4
  117. package/dist/commonjs/utils/utils.js.map +1 -1
  118. package/dist/esm/DataLakeFileSystemClient.js +123 -80
  119. package/dist/esm/DataLakeFileSystemClient.js.map +1 -1
  120. package/dist/esm/DataLakeLeaseClient.js +1 -0
  121. package/dist/esm/DataLakeLeaseClient.js.map +1 -1
  122. package/dist/esm/DataLakeServiceClient.js +22 -5
  123. package/dist/esm/DataLakeServiceClient.js.map +1 -1
  124. package/dist/esm/Pipeline.js +24 -15
  125. package/dist/esm/Pipeline.js.map +1 -1
  126. package/dist/esm/StorageClient.js +43 -3
  127. package/dist/esm/StorageClient.js.map +1 -1
  128. package/dist/esm/StorageContextClient.js +2 -3
  129. package/dist/esm/StorageContextClient.js.map +1 -1
  130. package/dist/esm/clients.js +246 -66
  131. package/dist/esm/clients.js.map +1 -1
  132. package/dist/esm/credentials/UserDelegationKeyCredential.js +12 -0
  133. package/dist/esm/credentials/UserDelegationKeyCredential.js.map +1 -1
  134. package/dist/esm/generated/src/operations/fileSystemOperations.js +1 -0
  135. package/dist/esm/generated/src/operations/fileSystemOperations.js.map +1 -1
  136. package/dist/esm/generated/src/operations/pathOperations.js +1 -0
  137. package/dist/esm/generated/src/operations/pathOperations.js.map +1 -1
  138. package/dist/esm/generated/src/operations/service.js +1 -0
  139. package/dist/esm/generated/src/operations/service.js.map +1 -1
  140. package/dist/esm/generated/src/storageClient.js +15 -4
  141. package/dist/esm/generated/src/storageClient.js.map +1 -1
  142. package/dist/esm/sas/AccountSASPermissions.js +32 -34
  143. package/dist/esm/sas/AccountSASPermissions.js.map +1 -1
  144. package/dist/esm/sas/AccountSASResourceTypes.js +12 -14
  145. package/dist/esm/sas/AccountSASResourceTypes.js.map +1 -1
  146. package/dist/esm/sas/AccountSASServices.js +16 -18
  147. package/dist/esm/sas/AccountSASServices.js.map +1 -1
  148. package/dist/esm/sas/DataLakeSASPermissions.js +39 -41
  149. package/dist/esm/sas/DataLakeSASPermissions.js.map +1 -1
  150. package/dist/esm/sas/DataLakeSASSignatureValues.js +3 -2
  151. package/dist/esm/sas/DataLakeSASSignatureValues.js.map +1 -1
  152. package/dist/esm/sas/DirectorySASPermissions.js +43 -45
  153. package/dist/esm/sas/DirectorySASPermissions.js.map +1 -1
  154. package/dist/esm/sas/FileSystemSASPermissions.js +43 -45
  155. package/dist/esm/sas/FileSystemSASPermissions.js.map +1 -1
  156. package/dist/esm/sas/SASQueryParameters.js +131 -2
  157. package/dist/esm/sas/SASQueryParameters.js.map +1 -1
  158. package/dist/esm/transforms.js +8 -1
  159. package/dist/esm/transforms.js.map +1 -1
  160. package/dist/esm/utils/Batch.js +29 -21
  161. package/dist/esm/utils/Batch.js.map +1 -1
  162. package/dist/esm/utils/BufferScheduler.js +70 -44
  163. package/dist/esm/utils/BufferScheduler.js.map +1 -1
  164. package/dist/esm/utils/DataLakeAclChangeFailedError.js +8 -0
  165. package/dist/esm/utils/DataLakeAclChangeFailedError.js.map +1 -1
  166. package/dist/esm/utils/PathClientInternal.js +4 -0
  167. package/dist/esm/utils/PathClientInternal.js.map +1 -1
  168. package/dist/esm/utils/constants.d.ts.map +1 -1
  169. package/dist/esm/utils/constants.js +1 -1
  170. package/dist/esm/utils/constants.js.map +1 -1
  171. package/dist/esm/utils/utils.common.js +2 -4
  172. package/dist/esm/utils/utils.common.js.map +1 -1
  173. package/dist/esm/utils/utils.d.ts +1 -1
  174. package/dist/esm/utils/utils.d.ts.map +1 -1
  175. package/dist/esm/utils/utils.js +2 -2
  176. package/dist/esm/utils/utils.js.map +1 -1
  177. package/dist/react-native/DataLakeFileSystemClient.js +123 -80
  178. package/dist/react-native/DataLakeFileSystemClient.js.map +1 -1
  179. package/dist/react-native/DataLakeLeaseClient.js +1 -0
  180. package/dist/react-native/DataLakeLeaseClient.js.map +1 -1
  181. package/dist/react-native/DataLakeServiceClient.js +22 -5
  182. package/dist/react-native/DataLakeServiceClient.js.map +1 -1
  183. package/dist/react-native/Pipeline.js +24 -15
  184. package/dist/react-native/Pipeline.js.map +1 -1
  185. package/dist/react-native/StorageClient.js +43 -3
  186. package/dist/react-native/StorageClient.js.map +1 -1
  187. package/dist/react-native/StorageContextClient.js +2 -3
  188. package/dist/react-native/StorageContextClient.js.map +1 -1
  189. package/dist/react-native/clients.js +246 -66
  190. package/dist/react-native/clients.js.map +1 -1
  191. package/dist/react-native/credentials/UserDelegationKeyCredential.js +12 -0
  192. package/dist/react-native/credentials/UserDelegationKeyCredential.js.map +1 -1
  193. package/dist/react-native/generated/src/operations/fileSystemOperations.js +1 -0
  194. package/dist/react-native/generated/src/operations/fileSystemOperations.js.map +1 -1
  195. package/dist/react-native/generated/src/operations/pathOperations.js +1 -0
  196. package/dist/react-native/generated/src/operations/pathOperations.js.map +1 -1
  197. package/dist/react-native/generated/src/operations/service.js +1 -0
  198. package/dist/react-native/generated/src/operations/service.js.map +1 -1
  199. package/dist/react-native/generated/src/storageClient.js +15 -4
  200. package/dist/react-native/generated/src/storageClient.js.map +1 -1
  201. package/dist/react-native/sas/AccountSASPermissions.js +32 -34
  202. package/dist/react-native/sas/AccountSASPermissions.js.map +1 -1
  203. package/dist/react-native/sas/AccountSASResourceTypes.js +12 -14
  204. package/dist/react-native/sas/AccountSASResourceTypes.js.map +1 -1
  205. package/dist/react-native/sas/AccountSASServices.js +16 -18
  206. package/dist/react-native/sas/AccountSASServices.js.map +1 -1
  207. package/dist/react-native/sas/DataLakeSASPermissions.js +39 -41
  208. package/dist/react-native/sas/DataLakeSASPermissions.js.map +1 -1
  209. package/dist/react-native/sas/DataLakeSASSignatureValues.js +3 -2
  210. package/dist/react-native/sas/DataLakeSASSignatureValues.js.map +1 -1
  211. package/dist/react-native/sas/DirectorySASPermissions.js +43 -45
  212. package/dist/react-native/sas/DirectorySASPermissions.js.map +1 -1
  213. package/dist/react-native/sas/FileSystemSASPermissions.js +43 -45
  214. package/dist/react-native/sas/FileSystemSASPermissions.js.map +1 -1
  215. package/dist/react-native/sas/SASQueryParameters.js +131 -2
  216. package/dist/react-native/sas/SASQueryParameters.js.map +1 -1
  217. package/dist/react-native/transforms.js +8 -1
  218. package/dist/react-native/transforms.js.map +1 -1
  219. package/dist/react-native/utils/Batch.js +29 -21
  220. package/dist/react-native/utils/Batch.js.map +1 -1
  221. package/dist/react-native/utils/BufferScheduler.js +70 -44
  222. package/dist/react-native/utils/BufferScheduler.js.map +1 -1
  223. package/dist/react-native/utils/DataLakeAclChangeFailedError.js +8 -0
  224. package/dist/react-native/utils/DataLakeAclChangeFailedError.js.map +1 -1
  225. package/dist/react-native/utils/PathClientInternal.js +4 -0
  226. package/dist/react-native/utils/PathClientInternal.js.map +1 -1
  227. package/dist/react-native/utils/constants.d.ts.map +1 -1
  228. package/dist/react-native/utils/constants.js +1 -1
  229. package/dist/react-native/utils/constants.js.map +1 -1
  230. package/dist/react-native/utils/utils.common.js +2 -4
  231. package/dist/react-native/utils/utils.common.js.map +1 -1
  232. package/dist/react-native/utils/utils.d.ts +1 -1
  233. package/dist/react-native/utils/utils.d.ts.map +1 -1
  234. package/dist/react-native/utils/utils.js +2 -2
  235. package/dist/react-native/utils/utils.js.map +1 -1
  236. package/package.json +36 -36
@@ -1 +1 @@
1
- {"version":3,"file":"DataLakeFileSystemClient.js","sourceRoot":"","sources":["../../src/DataLakeFileSystemClient.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAmC7F,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,0BAA0B,GAC3B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EACL,kCAAkC,EAClC,0CAA0C,GAC3C,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;;GAGG;AACH,MAAM,OAAO,wBAAyB,SAAQ,aAAa;IA4Cz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,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,0BAA0B,CAAC,EAAE,CAAC;YAC7D,MAAM,UAAU,CACd,uFAAuF,CACxF,CAAC;QACJ,CAAC;QAED,OAAO,0CAA0C,iBAE7C,cAAc,EAAE,IAAI,CAAC,IAAI,IACtB,OAAO,GAEZ,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;IAED;;;;;;;;;OASG;IACI,4BAA4B,CACjC,OAAwC,EACxC,iBAAoC;QAEpC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,MAAM,GAAG,GAAG,kCAAkC,iBAE1C,cAAc,EAAE,IAAI,CAAC,IAAI,IACtB,OAAO,GAEZ,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,CAAC,QAAQ,EAAE,CAAC;YAEb,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IAEI,qCAAqC,CAC1C,OAAwC,EACxC,iBAAoC;QAEpC,OAAO,0CAA0C,iBAE7C,cAAc,EAAE,IAAI,CAAC,IAAI,IACtB,OAAO,GAEZ,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ContainerClient } from \"@azure/storage-blob\";\nimport type { Pipeline, StoragePipelineOptions } from \"./Pipeline.js\";\nimport { isPipelineLike, newPipeline } from \"./Pipeline.js\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential.js\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport { DataLakeLeaseClient } from \"./DataLakeLeaseClient.js\";\nimport { FileSystemOperationsImpl as FileSystem } from \"./generated/src/operations/index.js\";\nimport type {\n AccessPolicy,\n FileSystemCreateOptions,\n FileSystemCreateResponse,\n FileSystemDeleteOptions,\n FileSystemDeleteResponse,\n FileSystemExistsOptions,\n FileSystemGetAccessPolicyOptions,\n FileSystemGetAccessPolicyResponse,\n FileSystemGetPropertiesOptions,\n FileSystemGetPropertiesResponse,\n FileSystemSetAccessPolicyOptions,\n FileSystemSetAccessPolicyResponse,\n FileSystemSetMetadataOptions,\n FileSystemSetMetadataResponse,\n ListPathsOptions,\n ListPathsSegmentOptions,\n Metadata,\n Path,\n PublicAccessType,\n SignedIdentifier,\n FileSystemListPathsResponse,\n FileSystemCreateIfNotExistsResponse,\n FileSystemDeleteIfExistsResponse,\n FileSystemGenerateSasUrlOptions,\n FileSystemListDeletedPathsResponse,\n ListDeletedPathsOptions,\n DeletedPath,\n FileSystemUndeletePathResponse,\n FileSystemUndeletePathOption,\n ListDeletedPathsSegmentOptions,\n PathUndeleteHeaders,\n UserDelegationKey,\n} from \"./models.js\";\nimport { StorageClient } from \"./StorageClient.js\";\nimport { toContainerPublicAccessType, toPublicAccessType, toPermissions } from \"./transforms.js\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n assertResponse,\n EscapePath,\n windowsFileTimeTicksToTime,\n} from \"./utils/utils.common.js\";\nimport { DataLakeFileClient, DataLakeDirectoryClient } from \"./clients.js\";\nimport {\n generateDataLakeSASQueryParameters,\n generateDataLakeSASQueryParametersInternal,\n} from \"./sas/DataLakeSASSignatureValues.js\";\nimport { DeletionIdKey, PathResultTypeConstants } from \"./utils/constants.js\";\nimport { PathClientInternal } from \"./utils/PathClientInternal.js\";\n\n/**\n * A DataLakeFileSystemClient represents a URL to the Azure Storage file system\n * allowing you to manipulate its directories and files.\n */\nexport class DataLakeFileSystemClient extends StorageClient {\n /**\n * fileSystemContext provided by protocol layer.\n */\n private fileSystemContext: FileSystem;\n\n /**\n * fileSystemContext provided by protocol layer.\n */\n private fileSystemContextToBlobEndpoint: FileSystem;\n\n /**\n * blobContainerClient provided by `@azure/storage-blob` package.\n */\n private blobContainerClient: ContainerClient;\n\n /**\n * Creates an instance of DataLakeFileSystemClient from url and credential.\n *\n * @param url - A Client string pointing to Azure Storage data lake file system, such as\n * \"https://myaccount.dfs.core.windows.net/filesystem\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net/filesystem?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 - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: StoragePipelineOptions,\n );\n\n /**\n * Creates an instance of DataLakeFileSystemClient from url and pipeline.\n *\n * @param url - A Client string pointing to Azure Storage data lake file system, such as\n * \"https://myaccount.dfs.core.windows.net/filesystem\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net/filesystem?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\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 if (isPipelineLike(credentialOrPipeline)) {\n super(url, credentialOrPipeline);\n } else {\n let credential;\n if (credentialOrPipeline === undefined) {\n credential = new AnonymousCredential();\n } else {\n credential = credentialOrPipeline;\n }\n\n const pipeline = newPipeline(credential, options);\n super(url, pipeline);\n }\n\n this.fileSystemContext = new FileSystem(this.storageClientContext);\n this.fileSystemContextToBlobEndpoint = new FileSystem(this.storageClientContextToBlobEndpoint);\n this.blobContainerClient = new ContainerClient(this.blobEndpointUrl, this.pipeline);\n }\n\n /**\n * Name of current file system.\n *\n * @readonly\n */\n public get name(): string {\n return this.blobContainerClient.containerName;\n }\n\n /**\n * Creates a {@link DataLakeDirectoryClient} object under current file system.\n *\n * @param directoryName -\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getDirectoryClient(directoryName: string): DataLakeDirectoryClient {\n return new DataLakeDirectoryClient(\n appendToURLPath(this.url, EscapePath(directoryName)),\n this.pipeline,\n );\n }\n\n /**\n * Creates a {@link DataLakeFileClient} object under current file system.\n *\n * @param fileName -\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getFileClient(fileName: string): DataLakeFileClient {\n return new DataLakeFileClient(appendToURLPath(this.url, EscapePath(fileName)), this.pipeline);\n }\n\n /**\n * Get a {@link DataLakeLeaseClient} that manages leases on the file system.\n *\n * @param proposeLeaseId - Optional. Initial proposed lease Id.\n */\n public getDataLakeLeaseClient(proposeLeaseId?: string): DataLakeLeaseClient {\n return new DataLakeLeaseClient(this.blobContainerClient.getBlobLeaseClient(proposeLeaseId));\n }\n\n /**\n * Creates a new file system under the specified account. If the file system with\n * the same name already exists, the operation fails.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-container\n *\n * @param options - Optional. Options when creating file system.\n */\n public async create(options: FileSystemCreateOptions = {}): Promise<FileSystemCreateResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-create\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.create({\n ...options,\n access: toContainerPublicAccessType(options.access),\n tracingOptions: updatedOptions.tracingOptions,\n containerEncryptionScope: options.fileSystemEncryptionScope,\n });\n },\n );\n }\n\n /**\n * Creates a new file system under the specified account. If the file system with\n * the same name already exists, it is not changed.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-container\n *\n * @param options -\n */\n public async createIfNotExists(\n options: FileSystemCreateOptions = {},\n ): Promise<FileSystemCreateIfNotExistsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-createIfNotExists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.createIfNotExists({\n ...options,\n access: toContainerPublicAccessType(options.access),\n containerEncryptionScope: options.fileSystemEncryptionScope,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Returns true if the File system represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing file system might be deleted by other clients or\n * applications. Vice versa new file system with the same name might be added by other clients or\n * applications after this function completes.\n *\n * @param options -\n */\n public async exists(options: FileSystemExistsOptions = {}): Promise<boolean> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-exists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.exists(updatedOptions);\n },\n );\n }\n\n /**\n * Delete current file system.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/delete-container\n *\n * @param options - Optional. Options when deleting file system.\n */\n public async delete(options: FileSystemDeleteOptions = {}): Promise<FileSystemDeleteResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-delete\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.delete({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Delete current file system if it exists.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/delete-container\n *\n * @param options -\n */\n public async deleteIfExists(\n options: FileSystemDeleteOptions = {},\n ): Promise<FileSystemDeleteIfExistsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-deleteIfExists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.deleteIfExists(updatedOptions);\n },\n );\n }\n\n /**\n * Returns all user-defined metadata and system properties for the specified\n * file system.\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the `listFileSystems` method of {@link DataLakeServiceClient} using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties\n *\n * @param options - Optional. Options when getting file system properties.\n */\n public async getProperties(\n options: FileSystemGetPropertiesOptions = {},\n ): Promise<FileSystemGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-getProperties\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.blobContainerClient.getProperties({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n // Transfer and rename blobPublicAccess to publicAccess\n const response = rawResponse as FileSystemGetPropertiesResponse;\n\n response.publicAccess = toPublicAccessType(rawResponse.blobPublicAccess);\n response._response.parsedHeaders.publicAccess = response.publicAccess;\n\n delete rawResponse.blobPublicAccess;\n delete rawResponse._response.parsedHeaders.blobPublicAccess;\n\n return response;\n },\n );\n }\n\n /**\n * Sets one or more user-defined name-value pairs for the specified file system.\n *\n * If no option provided, or no metadata defined in the parameter, the file system\n * metadata will be removed.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata\n *\n * @param metadata - Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param options - Optional. Options when setting file system metadata.\n */\n public async setMetadata(\n metadata?: Metadata,\n options: FileSystemSetMetadataOptions = {},\n ): Promise<FileSystemSetMetadataResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-setMetadata\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.setMetadata(metadata, {\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Gets the permissions for the specified file system. The permissions indicate\n * whether file system data may be accessed publicly.\n *\n * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings.\n * For example, new Date(\"2018-12-31T03:44:23.8827891Z\").toISOString() will get \"2018-12-31T03:44:23.882Z\".\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl\n *\n * @param options - Optional. Options when getting file system access policy.\n */\n public async getAccessPolicy(\n options: FileSystemGetAccessPolicyOptions = {},\n ): Promise<FileSystemGetAccessPolicyResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-getAccessPolicy\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.blobContainerClient.getAccessPolicy({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n // Transfer and rename blobPublicAccess to publicAccess\n const response = rawResponse as unknown as FileSystemGetAccessPolicyResponse;\n\n response.publicAccess = toPublicAccessType(rawResponse.blobPublicAccess);\n response._response.parsedHeaders.publicAccess = response.publicAccess;\n\n delete rawResponse.blobPublicAccess;\n delete rawResponse._response.parsedHeaders.blobPublicAccess;\n\n return response;\n },\n );\n }\n\n /**\n * Sets the permissions for the specified file system. The permissions indicate\n * whether directories or files in a file system may be accessed publicly.\n *\n * When you set permissions for a file system, the existing permissions are replaced.\n * If no access or containerAcl provided, the existing file system ACL will be\n * removed.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl\n *\n * @param access - Optional. The level of public access to data in the file system.\n * @param fileSystemAcl - Optional. Array of elements each having a unique Id and details of the access policy.\n * @param options - Optional. Options when setting file system access policy.\n */\n public async setAccessPolicy(\n access?: PublicAccessType,\n fileSystemAcl?: SignedIdentifier<AccessPolicy>[],\n options: FileSystemSetAccessPolicyOptions = {},\n ): Promise<FileSystemSetAccessPolicyResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-setAccessPolicy\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.setAccessPolicy(\n toContainerPublicAccessType(access),\n fileSystemAcl,\n {\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n },\n );\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the paths (directories and files)\n * under the specified file system.\n *\n * .byPage() returns an async iterable iterator to list the paths in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListPaths\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const paths = fileSystemClient.listPaths();\n * for await (const path of paths) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListPaths_Iterator\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const paths = fileSystemClient.listPaths();\n * let { value, done } = await paths.next();\n * while (!done) {\n * console.log(`Path ${i++}: ${value.name}, is directory: ${value.isDirectory}`);\n * ({ value, done } = await paths.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListPaths_ByPage\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * for await (const response of fileSystemClient.listPaths().byPage({ maxPageSize: 20 })) {\n * if (response.pathItems) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListPaths_Continuation\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * let paths = fileSystemClient.listPaths().byPage({ maxPageSize: 2 });\n * let response = (await paths.next()).value;\n * // Prints 2 paths\n * if (response.pathItems) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * paths = fileSystemClient.listPaths().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await paths.next()).value;\n * // Prints 10 paths\n * if (response.pathItems) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * }\n * ```\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param options - Optional. Options when listing paths.\n */\n public listPaths(\n options: ListPathsOptions = {},\n ): PagedAsyncIterableIterator<Path, FileSystemListPathsResponse> {\n options.path = options.path === \"\" ? undefined : options.path;\n\n const iter = this.listItems(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(settings.continuationToken, {\n maxResults: settings.maxPageSize,\n ...options,\n });\n },\n };\n }\n\n private async *listItems(options: ListPathsSegmentOptions = {}): AsyncIterableIterator<Path> {\n for await (const response of this.listSegments(undefined, options)) {\n yield* response.pathItems || [];\n }\n }\n\n private async *listSegments(\n continuation?: string,\n options: ListPathsSegmentOptions = {},\n ): AsyncIterableIterator<FileSystemListPathsResponse> {\n let response;\n if (!!continuation || continuation === undefined) {\n do {\n response = await this.listPathsSegment(continuation, options);\n continuation = response.continuation;\n yield response;\n } while (continuation);\n }\n }\n\n private async listPathsSegment(\n continuation?: string,\n options: ListPathsSegmentOptions = {},\n ): Promise<FileSystemListPathsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-listPathsSegment\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.fileSystemContext.listPaths(options.recursive || false, {\n continuation,\n ...updatedOptions,\n upn: options.userPrincipalName,\n });\n\n const response = rawResponse as FileSystemListPathsResponse;\n response.pathItems = [];\n for (const path of rawResponse.paths || []) {\n response.pathItems.push({\n ...path,\n permissions: toPermissions(path.permissions),\n createdOn: windowsFileTimeTicksToTime(path.creationTime),\n expiresOn: windowsFileTimeTicksToTime(path.expiryTime),\n });\n }\n delete rawResponse.paths;\n\n return response;\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the paths (directories and files)\n * under the specified file system.\n *\n * .byPage() returns an async iterable iterator to list the paths in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const deletedPaths = fileSystemClient.listDeletedPaths();\n * for await (const deletedPath of deletedPaths) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths_Iterator\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const deletedPaths = fileSystemClient.listDeletedPaths();\n * let { value, done } = await deletedPaths.next();\n * while (!done) {\n * console.log(`Deleted path ${i++}: ${value.name}, deleted on: ${value.deletedOn}`);\n * ({ value, done } = await deletedPaths.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths_ByPage\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * for await (const response of fileSystemClient.listDeletedPaths().byPage({ maxPageSize: 20 })) {\n * if (response.pathItems) {\n * for (const deletedPath of response.pathItems) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths_Continuation\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * let deletedPaths = fileSystemClient.listDeletedPaths().byPage({ maxPageSize: 2 });\n * let response = (await deletedPaths.next()).value;\n * // Prints 2 deleted paths\n * if (response.deletedPathItems) {\n * for (const deletedPath of response.deletedPathItems) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * deletedPaths = fileSystemClient\n * .listDeletedPaths()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await deletedPaths.next()).value;\n * // Prints 10 deleted paths\n * if (response.deletedPathItems) {\n * for (const deletedPath of response.deletedPathItems) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * }\n * ```\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param options - Optional. Options when listing deleted paths.\n */\n public listDeletedPaths(\n options: ListDeletedPathsOptions = {},\n ): PagedAsyncIterableIterator<DeletedPath, FileSystemListDeletedPathsResponse> {\n const iter = this.listDeletedItems(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => {\n return this.listDeletedSegments(settings.continuationToken, {\n maxResults: settings.maxPageSize,\n ...options,\n });\n },\n };\n }\n private async *listDeletedItems(\n options: ListDeletedPathsOptions = {},\n ): AsyncIterableIterator<DeletedPath> {\n for await (const response of this.listDeletedSegments(undefined, options)) {\n yield* response.pathItems || [];\n }\n }\n\n private async *listDeletedSegments(\n continuation?: string,\n options: ListDeletedPathsSegmentOptions = {},\n ): AsyncIterableIterator<FileSystemListDeletedPathsResponse> {\n let response;\n if (!!continuation || continuation === undefined) {\n do {\n response = await this.listDeletedPathsSegment(continuation, options);\n continuation = response.continuation;\n yield response;\n } while (continuation);\n }\n }\n\n private async listDeletedPathsSegment(\n continuation?: string,\n options: ListDeletedPathsSegmentOptions = {},\n ): Promise<FileSystemListDeletedPathsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-listDeletedPathsSegment\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.fileSystemContextToBlobEndpoint.listBlobHierarchySegment({\n marker: continuation,\n ...updatedOptions,\n prefix: options.prefix === \"\" ? undefined : options.prefix,\n });\n\n const response = rawResponse as FileSystemListDeletedPathsResponse;\n response.pathItems = [];\n for (const path of rawResponse.segment.blobItems || []) {\n response.pathItems.push({\n name: path.name,\n deletionId: path.deletionId,\n deletedOn: path.properties.deletedTime,\n remainingRetentionDays: path.properties.remainingRetentionDays,\n });\n }\n\n if (response.nextMarker) {\n response.continuation = response.nextMarker;\n }\n\n return response;\n },\n );\n }\n\n /**\n * Restores a soft deleted path.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob\n *\n * @param deletedPath - Required. The path of the deleted path.\n *\n * @param deletionId - Required. The deletion ID associated with the soft deleted path.\n *\n */\n\n public async undeletePath(\n deletedPath: string,\n deletionId: string,\n options: FileSystemUndeletePathOption = {},\n ): Promise<FileSystemUndeletePathResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-undeletePath\",\n options,\n async (updatedOptions) => {\n const pathClient = new PathClientInternal(\n appendToURLPath(this.blobEndpointUrl, EscapePath(deletedPath)),\n this.pipeline,\n );\n\n const rawResponse = assertResponse<PathUndeleteHeaders, PathUndeleteHeaders>(\n await pathClient.blobPathContext.undelete({\n undeleteSource: \"?\" + DeletionIdKey + \"=\" + deletionId,\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n\n if (rawResponse.resourceType === PathResultTypeConstants.DirectoryResourceType) {\n return {\n pathClient: this.getDirectoryClient(deletedPath),\n ...rawResponse,\n };\n } else {\n return {\n pathClient: this.getFileClient(deletedPath),\n ...rawResponse,\n };\n }\n },\n );\n }\n\n /**\n * Only available for DataLakeFileSystemClient constructed with a shared key credential.\n *\n * Generates a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasUrl(options: FileSystemGenerateSasUrlOptions): Promise<string> {\n return new Promise((resolve) => {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the SAS when the client is initialized with a shared key credential\",\n );\n }\n\n const sas = generateDataLakeSASQueryParameters(\n {\n fileSystemName: this.name,\n ...options,\n },\n this.credential,\n ).toString();\n\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n\n /**\n * Only available for DataLakeFileSystemClient constructed with a shared key credential.\n *\n * Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n public generateSasStringToSign(options: FileSystemGenerateSasUrlOptions): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the SAS when the client is initialized with a shared key credential\",\n );\n }\n\n return generateDataLakeSASQueryParametersInternal(\n {\n fileSystemName: this.name,\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n\n /**\n * Generates a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the input user delegation key.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateUserDelegationSasUrl(\n options: FileSystemGenerateSasUrlOptions,\n userDelegationKey: UserDelegationKey,\n ): Promise<string> {\n return new Promise((resolve) => {\n const sas = generateDataLakeSASQueryParameters(\n {\n fileSystemName: this.name,\n ...options,\n },\n userDelegationKey,\n this.accountName,\n ).toString();\n\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n\n /**\n * Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the input user delegation key.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n\n public generateUserDelegationSasStringToSign(\n options: FileSystemGenerateSasUrlOptions,\n userDelegationKey: UserDelegationKey,\n ): string {\n return generateDataLakeSASQueryParametersInternal(\n {\n fileSystemName: this.name,\n ...options,\n },\n userDelegationKey,\n this.accountName,\n ).stringToSign;\n }\n}\n"]}
1
+ {"version":3,"file":"DataLakeFileSystemClient.js","sourceRoot":"","sources":["../../src/DataLakeFileSystemClient.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,wBAAwB,IAAI,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAmC7F,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACL,eAAe,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AAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IAEI,qCAAqC,CAC1C,OAAwC,EACxC,iBAAoC;QAEpC,OAAO,0CAA0C,CAC/C;YACE,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,GAAG,OAAO;SACX,EACD,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ContainerClient } from \"@azure/storage-blob\";\nimport type { Pipeline, StoragePipelineOptions } from \"./Pipeline.js\";\nimport { isPipelineLike, newPipeline } from \"./Pipeline.js\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential.js\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport { DataLakeLeaseClient } from \"./DataLakeLeaseClient.js\";\nimport { FileSystemOperationsImpl as FileSystem } from \"./generated/src/operations/index.js\";\nimport type {\n AccessPolicy,\n FileSystemCreateOptions,\n FileSystemCreateResponse,\n FileSystemDeleteOptions,\n FileSystemDeleteResponse,\n FileSystemExistsOptions,\n FileSystemGetAccessPolicyOptions,\n FileSystemGetAccessPolicyResponse,\n FileSystemGetPropertiesOptions,\n FileSystemGetPropertiesResponse,\n FileSystemSetAccessPolicyOptions,\n FileSystemSetAccessPolicyResponse,\n FileSystemSetMetadataOptions,\n FileSystemSetMetadataResponse,\n ListPathsOptions,\n ListPathsSegmentOptions,\n Metadata,\n Path,\n PublicAccessType,\n SignedIdentifier,\n FileSystemListPathsResponse,\n FileSystemCreateIfNotExistsResponse,\n FileSystemDeleteIfExistsResponse,\n FileSystemGenerateSasUrlOptions,\n FileSystemListDeletedPathsResponse,\n ListDeletedPathsOptions,\n DeletedPath,\n FileSystemUndeletePathResponse,\n FileSystemUndeletePathOption,\n ListDeletedPathsSegmentOptions,\n PathUndeleteHeaders,\n UserDelegationKey,\n} from \"./models.js\";\nimport { StorageClient } from \"./StorageClient.js\";\nimport { toContainerPublicAccessType, toPublicAccessType, toPermissions } from \"./transforms.js\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n assertResponse,\n EscapePath,\n windowsFileTimeTicksToTime,\n} from \"./utils/utils.common.js\";\nimport { DataLakeFileClient, DataLakeDirectoryClient } from \"./clients.js\";\nimport {\n generateDataLakeSASQueryParameters,\n generateDataLakeSASQueryParametersInternal,\n} from \"./sas/DataLakeSASSignatureValues.js\";\nimport { DeletionIdKey, PathResultTypeConstants } from \"./utils/constants.js\";\nimport { PathClientInternal } from \"./utils/PathClientInternal.js\";\n\n/**\n * A DataLakeFileSystemClient represents a URL to the Azure Storage file system\n * allowing you to manipulate its directories and files.\n */\nexport class DataLakeFileSystemClient extends StorageClient {\n /**\n * fileSystemContext provided by protocol layer.\n */\n private fileSystemContext: FileSystem;\n\n /**\n * fileSystemContext provided by protocol layer.\n */\n private fileSystemContextToBlobEndpoint: FileSystem;\n\n /**\n * blobContainerClient provided by `@azure/storage-blob` package.\n */\n private blobContainerClient: ContainerClient;\n\n /**\n * Creates an instance of DataLakeFileSystemClient from url and credential.\n *\n * @param url - A Client string pointing to Azure Storage data lake file system, such as\n * \"https://myaccount.dfs.core.windows.net/filesystem\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net/filesystem?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 - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n url: string,\n credential?: StorageSharedKeyCredential | AnonymousCredential | TokenCredential,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: StoragePipelineOptions,\n );\n\n /**\n * Creates an instance of DataLakeFileSystemClient from url and pipeline.\n *\n * @param url - A Client string pointing to Azure Storage data lake file system, such as\n * \"https://myaccount.dfs.core.windows.net/filesystem\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net/filesystem?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\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 if (isPipelineLike(credentialOrPipeline)) {\n super(url, credentialOrPipeline);\n } else {\n let credential;\n if (credentialOrPipeline === undefined) {\n credential = new AnonymousCredential();\n } else {\n credential = credentialOrPipeline;\n }\n\n const pipeline = newPipeline(credential, options);\n super(url, pipeline);\n }\n\n this.fileSystemContext = new FileSystem(this.storageClientContext);\n this.fileSystemContextToBlobEndpoint = new FileSystem(this.storageClientContextToBlobEndpoint);\n this.blobContainerClient = new ContainerClient(this.blobEndpointUrl, this.pipeline);\n }\n\n /**\n * Name of current file system.\n *\n * @readonly\n */\n public get name(): string {\n return this.blobContainerClient.containerName;\n }\n\n /**\n * Creates a {@link DataLakeDirectoryClient} object under current file system.\n *\n * @param directoryName -\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getDirectoryClient(directoryName: string): DataLakeDirectoryClient {\n return new DataLakeDirectoryClient(\n appendToURLPath(this.url, EscapePath(directoryName)),\n this.pipeline,\n );\n }\n\n /**\n * Creates a {@link DataLakeFileClient} object under current file system.\n *\n * @param fileName -\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getFileClient(fileName: string): DataLakeFileClient {\n return new DataLakeFileClient(appendToURLPath(this.url, EscapePath(fileName)), this.pipeline);\n }\n\n /**\n * Get a {@link DataLakeLeaseClient} that manages leases on the file system.\n *\n * @param proposeLeaseId - Optional. Initial proposed lease Id.\n */\n public getDataLakeLeaseClient(proposeLeaseId?: string): DataLakeLeaseClient {\n return new DataLakeLeaseClient(this.blobContainerClient.getBlobLeaseClient(proposeLeaseId));\n }\n\n /**\n * Creates a new file system under the specified account. If the file system with\n * the same name already exists, the operation fails.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-container\n *\n * @param options - Optional. Options when creating file system.\n */\n public async create(options: FileSystemCreateOptions = {}): Promise<FileSystemCreateResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-create\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.create({\n ...options,\n access: toContainerPublicAccessType(options.access),\n tracingOptions: updatedOptions.tracingOptions,\n containerEncryptionScope: options.fileSystemEncryptionScope,\n });\n },\n );\n }\n\n /**\n * Creates a new file system under the specified account. If the file system with\n * the same name already exists, it is not changed.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/create-container\n *\n * @param options -\n */\n public async createIfNotExists(\n options: FileSystemCreateOptions = {},\n ): Promise<FileSystemCreateIfNotExistsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-createIfNotExists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.createIfNotExists({\n ...options,\n access: toContainerPublicAccessType(options.access),\n containerEncryptionScope: options.fileSystemEncryptionScope,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Returns true if the File system represented by this client exists; false otherwise.\n *\n * NOTE: use this function with care since an existing file system might be deleted by other clients or\n * applications. Vice versa new file system with the same name might be added by other clients or\n * applications after this function completes.\n *\n * @param options -\n */\n public async exists(options: FileSystemExistsOptions = {}): Promise<boolean> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-exists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.exists(updatedOptions);\n },\n );\n }\n\n /**\n * Delete current file system.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/delete-container\n *\n * @param options - Optional. Options when deleting file system.\n */\n public async delete(options: FileSystemDeleteOptions = {}): Promise<FileSystemDeleteResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-delete\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.delete({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Delete current file system if it exists.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/delete-container\n *\n * @param options -\n */\n public async deleteIfExists(\n options: FileSystemDeleteOptions = {},\n ): Promise<FileSystemDeleteIfExistsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-deleteIfExists\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.deleteIfExists(updatedOptions);\n },\n );\n }\n\n /**\n * Returns all user-defined metadata and system properties for the specified\n * file system.\n *\n * WARNING: The `metadata` object returned in the response will have its keys in lowercase, even if\n * they originally contained uppercase characters. This differs from the metadata keys returned by\n * the `listFileSystems` method of {@link DataLakeServiceClient} using the `includeMetadata` option, which\n * will retain their original casing.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/get-container-properties\n *\n * @param options - Optional. Options when getting file system properties.\n */\n public async getProperties(\n options: FileSystemGetPropertiesOptions = {},\n ): Promise<FileSystemGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-getProperties\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.blobContainerClient.getProperties({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n // Transfer and rename blobPublicAccess to publicAccess\n const response = rawResponse as FileSystemGetPropertiesResponse;\n\n response.publicAccess = toPublicAccessType(rawResponse.blobPublicAccess);\n response._response.parsedHeaders.publicAccess = response.publicAccess;\n\n delete rawResponse.blobPublicAccess;\n delete rawResponse._response.parsedHeaders.blobPublicAccess;\n\n return response;\n },\n );\n }\n\n /**\n * Sets one or more user-defined name-value pairs for the specified file system.\n *\n * If no option provided, or no metadata defined in the parameter, the file system\n * metadata will be removed.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/set-container-metadata\n *\n * @param metadata - Replace existing metadata with this value.\n * If no value provided the existing metadata will be removed.\n * @param options - Optional. Options when setting file system metadata.\n */\n public async setMetadata(\n metadata?: Metadata,\n options: FileSystemSetMetadataOptions = {},\n ): Promise<FileSystemSetMetadataResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-setMetadata\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.setMetadata(metadata, {\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Gets the permissions for the specified file system. The permissions indicate\n * whether file system data may be accessed publicly.\n *\n * WARNING: JavaScript Date will potentially lose precision when parsing startsOn and expiresOn strings.\n * For example, new Date(\"2018-12-31T03:44:23.8827891Z\").toISOString() will get \"2018-12-31T03:44:23.882Z\".\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/get-container-acl\n *\n * @param options - Optional. Options when getting file system access policy.\n */\n public async getAccessPolicy(\n options: FileSystemGetAccessPolicyOptions = {},\n ): Promise<FileSystemGetAccessPolicyResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-getAccessPolicy\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.blobContainerClient.getAccessPolicy({\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n });\n\n // Transfer and rename blobPublicAccess to publicAccess\n const response = rawResponse as unknown as FileSystemGetAccessPolicyResponse;\n\n response.publicAccess = toPublicAccessType(rawResponse.blobPublicAccess);\n response._response.parsedHeaders.publicAccess = response.publicAccess;\n\n delete rawResponse.blobPublicAccess;\n delete rawResponse._response.parsedHeaders.blobPublicAccess;\n\n return response;\n },\n );\n }\n\n /**\n * Sets the permissions for the specified file system. The permissions indicate\n * whether directories or files in a file system may be accessed publicly.\n *\n * When you set permissions for a file system, the existing permissions are replaced.\n * If no access or containerAcl provided, the existing file system ACL will be\n * removed.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/set-container-acl\n *\n * @param access - Optional. The level of public access to data in the file system.\n * @param fileSystemAcl - Optional. Array of elements each having a unique Id and details of the access policy.\n * @param options - Optional. Options when setting file system access policy.\n */\n public async setAccessPolicy(\n access?: PublicAccessType,\n fileSystemAcl?: SignedIdentifier<AccessPolicy>[],\n options: FileSystemSetAccessPolicyOptions = {},\n ): Promise<FileSystemSetAccessPolicyResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-setAccessPolicy\",\n options,\n async (updatedOptions) => {\n return this.blobContainerClient.setAccessPolicy(\n toContainerPublicAccessType(access),\n fileSystemAcl,\n {\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n },\n );\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the paths (directories and files)\n * under the specified file system.\n *\n * .byPage() returns an async iterable iterator to list the paths in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListPaths\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const paths = fileSystemClient.listPaths();\n * for await (const path of paths) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListPaths_Iterator\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const paths = fileSystemClient.listPaths();\n * let { value, done } = await paths.next();\n * while (!done) {\n * console.log(`Path ${i++}: ${value.name}, is directory: ${value.isDirectory}`);\n * ({ value, done } = await paths.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListPaths_ByPage\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * for await (const response of fileSystemClient.listPaths().byPage({ maxPageSize: 20 })) {\n * if (response.pathItems) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListPaths_Continuation\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * let paths = fileSystemClient.listPaths().byPage({ maxPageSize: 2 });\n * let response = (await paths.next()).value;\n * // Prints 2 paths\n * if (response.pathItems) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * paths = fileSystemClient.listPaths().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await paths.next()).value;\n * // Prints 10 paths\n * if (response.pathItems) {\n * for (const path of response.pathItems) {\n * console.log(`Path ${i++}: ${path.name}, is directory: ${path.isDirectory}`);\n * }\n * }\n * ```\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param options - Optional. Options when listing paths.\n */\n public listPaths(\n options: ListPathsOptions = {},\n ): PagedAsyncIterableIterator<Path, FileSystemListPathsResponse> {\n options.path = options.path === \"\" ? undefined : options.path;\n\n const iter = this.listItems(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(settings.continuationToken, {\n maxResults: settings.maxPageSize,\n ...options,\n });\n },\n };\n }\n\n private async *listItems(options: ListPathsSegmentOptions = {}): AsyncIterableIterator<Path> {\n for await (const response of this.listSegments(undefined, options)) {\n yield* response.pathItems || [];\n }\n }\n\n private async *listSegments(\n continuation?: string,\n options: ListPathsSegmentOptions = {},\n ): AsyncIterableIterator<FileSystemListPathsResponse> {\n let response;\n if (!!continuation || continuation === undefined) {\n do {\n response = await this.listPathsSegment(continuation, options);\n continuation = response.continuation;\n yield response;\n } while (continuation);\n }\n }\n\n private async listPathsSegment(\n continuation?: string,\n options: ListPathsSegmentOptions = {},\n ): Promise<FileSystemListPathsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-listPathsSegment\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.fileSystemContext.listPaths(options.recursive || false, {\n continuation,\n ...updatedOptions,\n upn: options.userPrincipalName,\n });\n\n const response = rawResponse as FileSystemListPathsResponse;\n response.pathItems = [];\n for (const path of rawResponse.paths || []) {\n response.pathItems.push({\n ...path,\n permissions: toPermissions(path.permissions),\n createdOn: windowsFileTimeTicksToTime(path.creationTime),\n expiresOn: windowsFileTimeTicksToTime(path.expiryTime),\n });\n }\n delete rawResponse.paths;\n\n return response;\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the paths (directories and files)\n * under the specified file system.\n *\n * .byPage() returns an async iterable iterator to list the paths in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const deletedPaths = fileSystemClient.listDeletedPaths();\n * for await (const deletedPath of deletedPaths) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths_Iterator\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * const deletedPaths = fileSystemClient.listDeletedPaths();\n * let { value, done } = await deletedPaths.next();\n * while (!done) {\n * console.log(`Deleted path ${i++}: ${value.name}, deleted on: ${value.deletedOn}`);\n * ({ value, done } = await deletedPaths.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths_ByPage\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * for await (const response of fileSystemClient.listDeletedPaths().byPage({ maxPageSize: 20 })) {\n * if (response.pathItems) {\n * for (const deletedPath of response.pathItems) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListDeletedPaths_Continuation\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const fileSystemClient = datalakeServiceClient.getFileSystemClient(fileSystemName);\n *\n * let i = 1;\n * let deletedPaths = fileSystemClient.listDeletedPaths().byPage({ maxPageSize: 2 });\n * let response = (await deletedPaths.next()).value;\n * // Prints 2 deleted paths\n * if (response.deletedPathItems) {\n * for (const deletedPath of response.deletedPathItems) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * deletedPaths = fileSystemClient\n * .listDeletedPaths()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await deletedPaths.next()).value;\n * // Prints 10 deleted paths\n * if (response.deletedPathItems) {\n * for (const deletedPath of response.deletedPathItems) {\n * console.log(`Deleted path ${i++}: ${deletedPath.name}, deleted on: ${deletedPath.deletedOn}`);\n * }\n * }\n * ```\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/list-blobs\n *\n * @param options - Optional. Options when listing deleted paths.\n */\n public listDeletedPaths(\n options: ListDeletedPathsOptions = {},\n ): PagedAsyncIterableIterator<DeletedPath, FileSystemListDeletedPathsResponse> {\n const iter = this.listDeletedItems(options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings: PageSettings = {}) => {\n return this.listDeletedSegments(settings.continuationToken, {\n maxResults: settings.maxPageSize,\n ...options,\n });\n },\n };\n }\n private async *listDeletedItems(\n options: ListDeletedPathsOptions = {},\n ): AsyncIterableIterator<DeletedPath> {\n for await (const response of this.listDeletedSegments(undefined, options)) {\n yield* response.pathItems || [];\n }\n }\n\n private async *listDeletedSegments(\n continuation?: string,\n options: ListDeletedPathsSegmentOptions = {},\n ): AsyncIterableIterator<FileSystemListDeletedPathsResponse> {\n let response;\n if (!!continuation || continuation === undefined) {\n do {\n response = await this.listDeletedPathsSegment(continuation, options);\n continuation = response.continuation;\n yield response;\n } while (continuation);\n }\n }\n\n private async listDeletedPathsSegment(\n continuation?: string,\n options: ListDeletedPathsSegmentOptions = {},\n ): Promise<FileSystemListDeletedPathsResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-listDeletedPathsSegment\",\n options,\n async (updatedOptions) => {\n const rawResponse = await this.fileSystemContextToBlobEndpoint.listBlobHierarchySegment({\n marker: continuation,\n ...updatedOptions,\n prefix: options.prefix === \"\" ? undefined : options.prefix,\n });\n\n const response = rawResponse as FileSystemListDeletedPathsResponse;\n response.pathItems = [];\n for (const path of rawResponse.segment.blobItems || []) {\n response.pathItems.push({\n name: path.name,\n deletionId: path.deletionId,\n deletedOn: path.properties.deletedTime,\n remainingRetentionDays: path.properties.remainingRetentionDays,\n });\n }\n\n if (response.nextMarker) {\n response.continuation = response.nextMarker;\n }\n\n return response;\n },\n );\n }\n\n /**\n * Restores a soft deleted path.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/undelete-blob\n *\n * @param deletedPath - Required. The path of the deleted path.\n *\n * @param deletionId - Required. The deletion ID associated with the soft deleted path.\n *\n */\n\n public async undeletePath(\n deletedPath: string,\n deletionId: string,\n options: FileSystemUndeletePathOption = {},\n ): Promise<FileSystemUndeletePathResponse> {\n return tracingClient.withSpan(\n \"DataLakeFileSystemClient-undeletePath\",\n options,\n async (updatedOptions) => {\n const pathClient = new PathClientInternal(\n appendToURLPath(this.blobEndpointUrl, EscapePath(deletedPath)),\n this.pipeline,\n );\n\n const rawResponse = assertResponse<PathUndeleteHeaders, PathUndeleteHeaders>(\n await pathClient.blobPathContext.undelete({\n undeleteSource: \"?\" + DeletionIdKey + \"=\" + deletionId,\n ...options,\n tracingOptions: updatedOptions.tracingOptions,\n }),\n );\n\n if (rawResponse.resourceType === PathResultTypeConstants.DirectoryResourceType) {\n return {\n pathClient: this.getDirectoryClient(deletedPath),\n ...rawResponse,\n };\n } else {\n return {\n pathClient: this.getFileClient(deletedPath),\n ...rawResponse,\n };\n }\n },\n );\n }\n\n /**\n * Only available for DataLakeFileSystemClient constructed with a shared key credential.\n *\n * Generates a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasUrl(options: FileSystemGenerateSasUrlOptions): Promise<string> {\n return new Promise((resolve) => {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the SAS when the client is initialized with a shared key credential\",\n );\n }\n\n const sas = generateDataLakeSASQueryParameters(\n {\n fileSystemName: this.name,\n ...options,\n },\n this.credential,\n ).toString();\n\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n\n /**\n * Only available for DataLakeFileSystemClient constructed with a shared key credential.\n *\n * Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/\n public generateSasStringToSign(options: FileSystemGenerateSasUrlOptions): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the SAS when the client is initialized with a shared key credential\",\n );\n }\n\n return generateDataLakeSASQueryParametersInternal(\n {\n fileSystemName: this.name,\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n\n /**\n * Generates a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the input user delegation key.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateUserDelegationSasUrl(\n options: FileSystemGenerateSasUrlOptions,\n userDelegationKey: UserDelegationKey,\n ): Promise<string> {\n return new Promise((resolve) => {\n const sas = generateDataLakeSASQueryParameters(\n {\n fileSystemName: this.name,\n ...options,\n },\n userDelegationKey,\n this.accountName,\n ).toString();\n\n resolve(appendToURLQuery(this.url, sas));\n });\n }\n\n /**\n * Generates string to sign for a Service Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the input user delegation key.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n * @param options - Optional parameters.\n * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`\n * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n\n public generateUserDelegationSasStringToSign(\n options: FileSystemGenerateSasUrlOptions,\n userDelegationKey: UserDelegationKey,\n ): string {\n return generateDataLakeSASQueryParametersInternal(\n {\n fileSystemName: this.name,\n ...options,\n },\n userDelegationKey,\n this.accountName,\n ).stringToSign;\n }\n}\n"]}
@@ -2,6 +2,7 @@
2
2
  // Licensed under the MIT License.
3
3
  import { tracingClient } from "./utils/tracing.js";
4
4
  export class DataLakeLeaseClient {
5
+ client;
5
6
  get leaseId() {
6
7
  return this.client.leaseId;
7
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DataLakeLeaseClient.js","sourceRoot":"","sources":["../../src/DataLakeLeaseClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,OAAO,mBAAmB;IAC9B,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IAC7B,CAAC;IAED,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;IACzB,CAAC;IAED,YAA6B,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;IAAG,CAAC;IAEjD,KAAK,CAAC,YAAY,CACvB,QAAgB,EAChB,UAAiC,EAAE;QAEnC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,kCAAkC,EAClC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC;QAC5D,CAAC,CACF,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,WAAW,CACtB,eAAuB,EACvB,UAAiC,EAAE;QAEnC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,EACjC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;QAClE,CAAC,CACF,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,UAAiC,EAAE;QAC3D,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,kCAAkC,EAClC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;QAClD,CAAC,CACF,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,UAAiC,EAAE;QACzD,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,gCAAgC,EAChC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;QAChD,CAAC,CACF,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,UAAU,CACrB,WAAmB,EACnB,UAAiC,EAAE;QAEnC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,gCAAgC,EAChC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAC7D,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { BlobLeaseClient } from \"@azure/storage-blob\";\nimport type { Lease, LeaseOperationOptions, LeaseOperationResponse } from \"./models.js\";\nimport { tracingClient } from \"./utils/tracing.js\";\n\nexport class DataLakeLeaseClient {\n public get leaseId(): string {\n return this.client.leaseId;\n }\n\n public get url(): string {\n return this.client.url;\n }\n\n constructor(private readonly client: BlobLeaseClient) {}\n\n public async acquireLease(\n duration: number,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-acquireLease\",\n options,\n async (updatedOptions) => {\n return this.client.acquireLease(duration, updatedOptions);\n },\n );\n }\n\n public async changeLease(\n proposedLeaseId: string,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-changeLease\",\n options,\n async (updatedOptions) => {\n return this.client.changeLease(proposedLeaseId, updatedOptions);\n },\n );\n }\n\n public async releaseLease(options: LeaseOperationOptions = {}): Promise<LeaseOperationResponse> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-releaseLease\",\n options,\n async (updatedOptions) => {\n return this.client.releaseLease(updatedOptions);\n },\n );\n }\n\n public async renewLease(options: LeaseOperationOptions = {}): Promise<Lease> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-renewLease\",\n options,\n async (updatedOptions) => {\n return this.client.renewLease(updatedOptions);\n },\n );\n }\n\n public async breakLease(\n breakPeriod: number,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-renewLease\",\n options,\n async (updatedOptions) => {\n return this.client.breakLease(breakPeriod, updatedOptions);\n },\n );\n }\n}\n"]}
1
+ {"version":3,"file":"DataLakeLeaseClient.js","sourceRoot":"","sources":["../../src/DataLakeLeaseClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,OAAO,mBAAmB;IASD;IAR7B,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IAC7B,CAAC;IAED,IAAW,GAAG;QACZ,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,CAC3B,gCAAgC,EAChC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;QAChD,CAAC,CACF,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,UAAU,CACrB,WAAmB,EACnB,UAAiC,EAAE;QAEnC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC9C,OAAO,aAAa,CAAC,QAAQ,CAC3B,gCAAgC,EAChC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;QAC7D,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { BlobLeaseClient } from \"@azure/storage-blob\";\nimport type { Lease, LeaseOperationOptions, LeaseOperationResponse } from \"./models.js\";\nimport { tracingClient } from \"./utils/tracing.js\";\n\nexport class DataLakeLeaseClient {\n public get leaseId(): string {\n return this.client.leaseId;\n }\n\n public get url(): string {\n return this.client.url;\n }\n\n constructor(private readonly client: BlobLeaseClient) {}\n\n public async acquireLease(\n duration: number,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-acquireLease\",\n options,\n async (updatedOptions) => {\n return this.client.acquireLease(duration, updatedOptions);\n },\n );\n }\n\n public async changeLease(\n proposedLeaseId: string,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-changeLease\",\n options,\n async (updatedOptions) => {\n return this.client.changeLease(proposedLeaseId, updatedOptions);\n },\n );\n }\n\n public async releaseLease(options: LeaseOperationOptions = {}): Promise<LeaseOperationResponse> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-releaseLease\",\n options,\n async (updatedOptions) => {\n return this.client.releaseLease(updatedOptions);\n },\n );\n }\n\n public async renewLease(options: LeaseOperationOptions = {}): Promise<Lease> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-renewLease\",\n options,\n async (updatedOptions) => {\n return this.client.renewLease(updatedOptions);\n },\n );\n }\n\n public async breakLease(\n breakPeriod: number,\n options: LeaseOperationOptions = {},\n ): Promise<LeaseOperationResponse> {\n options.conditions = options.conditions || {};\n return tracingClient.withSpan(\n \"DataLakeLeaseClient-renewLease\",\n options,\n async (updatedOptions) => {\n return this.client.breakLease(breakPeriod, updatedOptions);\n },\n );\n }\n}\n"]}
@@ -20,6 +20,11 @@ import { AccountSASServices } from "./sas/AccountSASServices.js";
20
20
  * the top-level namespace for the Data Lake service.
21
21
  */
22
22
  export class DataLakeServiceClient extends StorageClient {
23
+ // private serviceContext: Service;
24
+ /**
25
+ * blobServiceClient provided by `@azure/storage-blob` package.
26
+ */
27
+ blobServiceClient;
23
28
  /**
24
29
  *
25
30
  * Creates an instance of DataLakeServiceClient from connection string.
@@ -282,9 +287,13 @@ export class DataLakeServiceClient extends StorageClient {
282
287
  const now = new Date();
283
288
  expiresOn = new Date(now.getTime() + 3600 * 1000);
284
289
  }
285
- const sas = generateAccountSASQueryParameters(Object.assign({ permissions,
290
+ const sas = generateAccountSASQueryParameters({
291
+ permissions,
286
292
  expiresOn,
287
- resourceTypes, services: AccountSASServices.parse("b").toString() }, options), this.credential).toString();
293
+ resourceTypes,
294
+ services: AccountSASServices.parse("b").toString(),
295
+ ...options,
296
+ }, this.credential).toString();
288
297
  return appendToURLQuery(this.url, sas);
289
298
  }
290
299
  /**
@@ -309,9 +318,13 @@ export class DataLakeServiceClient extends StorageClient {
309
318
  const now = new Date();
310
319
  expiresOn = new Date(now.getTime() + 3600 * 1000);
311
320
  }
312
- return generateAccountSASQueryParametersInternal(Object.assign({ permissions,
321
+ return generateAccountSASQueryParametersInternal({
322
+ permissions,
313
323
  expiresOn,
314
- resourceTypes, services: AccountSASServices.parse("b").toString() }, options), this.credential).stringToSign;
324
+ resourceTypes,
325
+ services: AccountSASServices.parse("b").toString(),
326
+ ...options,
327
+ }, this.credential).stringToSign;
315
328
  }
316
329
  /**
317
330
  * Restore a previously deleted File System.
@@ -323,7 +336,11 @@ export class DataLakeServiceClient extends StorageClient {
323
336
  */
324
337
  async undeleteFileSystem(deletedFileSystemName, deleteFileSystemVersion, options = {}) {
325
338
  return tracingClient.withSpan("DataLakeServiceClient-undeleteFileSystem", options, async (updatedOptions) => {
326
- const res = await this.blobServiceClient.undeleteContainer(deletedFileSystemName, deleteFileSystemVersion, Object.assign(Object.assign({}, options), { destinationContainerName: options.destinationFileSystemName, tracingOptions: updatedOptions.tracingOptions }));
339
+ const res = await this.blobServiceClient.undeleteContainer(deletedFileSystemName, deleteFileSystemVersion, {
340
+ ...options,
341
+ destinationContainerName: options.destinationFileSystemName,
342
+ tracingOptions: updatedOptions.tracingOptions,
343
+ });
327
344
  const fileSystemClient = this.getFileSystemClient(options.destinationFileSystemName || deletedFileSystemName);
328
345
  return {
329
346
  fileSystemClient,
@@ -1 +1 @@
1
- {"version":3,"file":"DataLakeServiceClient.js","sourceRoot":"","sources":["../../src/DataLakeServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAM9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,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,EAAE;YACvB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CACxD,qBAAqB,EACrB,uBAAuB,kCAElB,OAAO,KACV,wBAAwB,EAAE,OAAO,CAAC,yBAAyB,EAC3D,cAAc,EAAE,cAAc,CAAC,cAAc,IAEhD,CAAC;YAEF,MAAM,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,CAC/C,OAAO,CAAC,yBAAyB,IAAI,qBAAqB,CAC3D,CAAC;YACF,OAAO;gBACL,gBAAgB;gBAChB,0BAA0B,EAAE,GAAG,CAAC,yBAAyB;aAC1D,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,aAAa,CACxB,UAAuC,EAAE;QAEzC,OAAO,aAAa,CAAC,QAAQ,CAC3B,qCAAqC,EACrC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC;gBAC1C,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,cAAc,EAAE,cAAc,CAAC,cAAc;aAC9C,CAAC,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACI,KAAK,CAAC,aAAa,CACxB,UAAqC,EACrC,UAAuC,EAAE;QAEzC,OAAO,aAAa,CAAC,QAAQ,CAC3B,qCAAqC,EACrC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,UAAU,EAAE;gBACtD,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,cAAc,EAAE,cAAc,CAAC,cAAc;aAC9C,CAAC,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { getDefaultProxySettings } from \"@azure/core-rest-pipeline\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport type {\n ServiceGetPropertiesOptions,\n ServiceSetPropertiesOptions,\n ServiceSetPropertiesResponse,\n} from \"@azure/storage-blob\";\nimport { BlobServiceClient } from \"@azure/storage-blob\";\nimport type { Pipeline, StoragePipelineOptions } from \"./Pipeline.js\";\nimport { isPipelineLike, newPipeline } from \"./Pipeline.js\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential.js\";\nimport { DataLakeFileSystemClient } from \"./DataLakeFileSystemClient.js\";\nimport type {\n FileSystemItem,\n ServiceGenerateAccountSasUrlOptions,\n ServiceListFileSystemsOptions,\n ServiceListFileSystemsSegmentResponse,\n ServiceUndeleteFileSystemOptions,\n FileSystemUndeleteResponse,\n} from \"./models.js\";\nimport { StorageClient } from \"./StorageClient.js\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n extractConnectionStringParts,\n} from \"./utils/utils.common.js\";\nimport { toDfsEndpointUrl, toFileSystemPagedAsyncIterableIterator } from \"./transforms.js\";\nimport type {\n ServiceGetUserDelegationKeyOptions,\n ServiceGetUserDelegationKeyResponse,\n} from \"./models.js\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport { AccountSASPermissions } from \"./sas/AccountSASPermissions.js\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./sas/AccountSASSignatureValues.js\";\nimport { AccountSASServices } from \"./sas/AccountSASServices.js\";\nimport type { DataLakeServiceGetPropertiesResponse, DataLakeServiceProperties } from \"./index.js\";\n\n/**\n * DataLakeServiceClient allows you to manipulate Azure\n * Data Lake service resources and file systems. The storage account provides\n * the top-level namespace for the Data Lake service.\n */\nexport class DataLakeServiceClient extends StorageClient {\n // private serviceContext: Service;\n\n /**\n * blobServiceClient provided by `@azure/storage-blob` package.\n */\n private blobServiceClient: BlobServiceClient;\n\n /**\n *\n * Creates an instance of DataLakeServiceClient from connection string.\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 - Optional. Options to configure the HTTP pipeline.\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n\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 ): DataLakeServiceClient {\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 DataLakeServiceClient(toDfsEndpointUrl(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 DataLakeServiceClient(\n toDfsEndpointUrl(extractedCreds.url) + \"?\" + extractedCreds.accountSas,\n pipeline,\n );\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 * Creates an instance of DataLakeServiceClient from url.\n *\n * @param url - A Client string pointing to Azure Storage data lake service, such as\n * \"https://myaccount.dfs.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.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 - Optional. Options to configure the HTTP pipeline.\n */\n public 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 /**\n * Creates an instance of DataLakeServiceClient from url and pipeline.\n *\n * @param url - A Client string pointing to Azure Storage data lake service, such as\n * \"https://myaccount.dfs.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n public constructor(url: string, pipeline: Pipeline);\n\n public 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 if (isPipelineLike(credentialOrPipeline)) {\n super(url, credentialOrPipeline);\n } else {\n let credential;\n if (credentialOrPipeline === undefined) {\n credential = new AnonymousCredential();\n } else {\n credential = credentialOrPipeline;\n }\n\n const pipeline = newPipeline(credential, options);\n super(url, pipeline);\n }\n\n // this.serviceContext = new Service(this.storageClientContext);\n this.blobServiceClient = new BlobServiceClient(this.blobEndpointUrl, this.pipeline);\n }\n\n /**\n * Creates a {@link DataLakeFileSystemClient} object.\n *\n * @param fileSystemName - File system name.\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getFileSystemClient(fileSystemName: string): DataLakeFileSystemClient {\n return new DataLakeFileSystemClient(\n appendToURLPath(this.url, encodeURIComponent(fileSystemName)),\n this.pipeline,\n );\n }\n\n /**\n * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).\n *\n * Retrieves a user delegation key for the Data Lake service. This is only a valid operation when using\n * bearer token authentication.\n *\n * @example\n * ```ts snippet:DatalakeServiceClientGetUserDelegationKey\n * import {\n * DataLakeServiceClient,\n * generateDataLakeSASQueryParameters,\n * FileSystemSASPermissions,\n * SASProtocol,\n * } from \"@azure/storage-file-datalake\";\n *\n * const account = \"<account>\";\n * const sas = \"<sas token>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net${sas}`,\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const accountName = \"<account name>\";\n * const startsOn = new Date();\n * const expiresOn = new Date(+new Date() + 86400 * 1000);\n * // Generate user delegation SAS for a file system\n * const userDelegationKey = await datalakeServiceClient.getUserDelegationKey(startsOn, expiresOn);\n * const fileSystemSAS = generateDataLakeSASQueryParameters(\n * {\n * fileSystemName, // Required\n * permissions: FileSystemSASPermissions.parse(\"racwdl\"), // Required\n * startsOn, // Required. Date type\n * expiresOn, // Optional. Date type\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2018-11-09\", // Must greater than or equal to 2018-11-09 to generate user delegation SAS\n * },\n * userDelegationKey, // UserDelegationKey\n * accountName,\n * ).toString();\n * ```\n * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key\n *\n * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time.\n * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time.\n * @param options -\n */\n public async getUserDelegationKey(\n startsOn: Date,\n expiresOn: Date,\n options: ServiceGetUserDelegationKeyOptions = {},\n ): Promise<ServiceGetUserDelegationKeyResponse> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-getUserDelegationKey\",\n options,\n async (updatedOptions) => {\n return this.blobServiceClient.getUserDelegationKey(startsOn, expiresOn, updatedOptions);\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the file systems\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the file systems in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListFileSystems\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * let i = 1;\n * const fileSystems = datalakeServiceClient.listFileSystems();\n * for await (const fileSystem of fileSystems) {\n * console.log(`File system ${i++}: ${fileSystem.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListFileSystems_Iterator\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * let i = 1;\n * const fileSystems = datalakeServiceClient.listFileSystems();\n * let { value, done } = await fileSystems.next();\n * while (!done) {\n * console.log(`File system ${i++}: ${value.name}`);\n * ({ value, done } = await fileSystems.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListFileSystems_ByPage\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * let i = 1;\n * for await (const response of datalakeServiceClient.listFileSystems().byPage({ maxPageSize: 20 })) {\n * if (response.fileSystemItems) {\n * for (const fileSystem of response.fileSystemItems) {\n * console.log(`File System ${i++}: ${fileSystem.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListFileSystems_Continuation\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * let i = 1;\n * let fileSystems = datalakeServiceClient.listFileSystems().byPage({ maxPageSize: 2 });\n * let response = (await fileSystems.next()).value;\n * // Prints 2 file systems\n * if (response.fileSystemItems) {\n * for (const fileSystem of response.fileSystemItems) {\n * console.log(`File system ${i++}: ${fileSystem.name}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * fileSystems = datalakeServiceClient\n * .listFileSystems()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await fileSystems.next()).value;\n * // Prints 10 file systems\n * if (response.fileSystemItems) {\n * for (const fileSystem of response.fileSystemItems) {\n * console.log(`File system ${i++}: ${fileSystem.name}`);\n * }\n * }\n * ```\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2\n *\n * @param options -\n */\n public listFileSystems(\n options: ServiceListFileSystemsOptions = {},\n ): PagedAsyncIterableIterator<FileSystemItem, ServiceListFileSystemsSegmentResponse> {\n return toFileSystemPagedAsyncIterableIterator(this.blobServiceClient.listContainers(options));\n }\n\n // public async createFileSystem(): Promise<DataLakeFileSystemClient> {\n // throw Error(\"NotImplemented\");\n // }\n\n // public async deleteFileSystem(fileSystem: string): Promise<ServiceDeleteFileSystemResponse> {\n // throw Error(\"NotImplemented\");\n // }\n\n /**\n * Only available for DataLakeServiceClient 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(\"b\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for DataLakeServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for an account Shared Access Signature (SAS) 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(\"b\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n\n /**\n * Restore a previously deleted File System.\n * This API is only functional if Container Soft Delete is enabled for the storage account.\n *\n * @param deletedFileSystemName - The name of the source File System.\n * @param deleteFileSystemVersion - The new name of the File System.\n * @param options - Options to configure File System Restore operation.\n */\n public async undeleteFileSystem(\n deletedFileSystemName: string,\n deleteFileSystemVersion: string,\n options: ServiceUndeleteFileSystemOptions = {},\n ): Promise<{\n fileSystemClient: DataLakeFileSystemClient;\n fileSystemUndeleteResponse: FileSystemUndeleteResponse;\n }> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-undeleteFileSystem\",\n options,\n async (updatedOptions) => {\n const res = await this.blobServiceClient.undeleteContainer(\n deletedFileSystemName,\n deleteFileSystemVersion,\n {\n ...options,\n destinationContainerName: options.destinationFileSystemName,\n tracingOptions: updatedOptions.tracingOptions,\n },\n );\n\n const fileSystemClient = this.getFileSystemClient(\n options.destinationFileSystemName || deletedFileSystemName,\n );\n return {\n fileSystemClient,\n fileSystemUndeleteResponse: res.containerUndeleteResponse,\n };\n },\n );\n }\n\n /**\n * Gets the properties of a storage account’s Blob service endpoint, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties\n *\n * @param options - Options to the Service Get Properties operation.\n * @returns Response data for the Service Get Properties operation.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<DataLakeServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return this.blobServiceClient.getProperties({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s Blob 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-blob-service-properties\n *\n * @param properties -\n * @param options - Options to the Service Set Properties operation.\n * @returns Response data for the Service Set Properties operation.\n */\n public async setProperties(\n properties: DataLakeServiceProperties,\n options: ServiceSetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return this.blobServiceClient.setProperties(properties, {\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n}\n"]}
1
+ {"version":3,"file":"DataLakeServiceClient.js","sourceRoot":"","sources":["../../src/DataLakeServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAM9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AASzE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,sCAAsC,EAAE,MAAM,iBAAiB,CAAC;AAK3F,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,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AmB,CAC/C,OAAO,CAAC,yBAAyB,IAAI,qBAAqB,CAC3D,CAAC;YACF,OAAO;gBACL,gBAAgB;gBAChB,0BAA0B,EAAE,GAAG,CAAC,yBAAyB;aAC1D,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,aAAa,CACxB,UAAuC,EAAE;QAEzC,OAAO,aAAa,CAAC,QAAQ,CAC3B,qCAAqC,EACrC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC;gBAC1C,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,cAAc,EAAE,cAAc,CAAC,cAAc;aAC9C,CAAC,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;OAQG;IACI,KAAK,CAAC,aAAa,CACxB,UAAqC,EACrC,UAAuC,EAAE;QAEzC,OAAO,aAAa,CAAC,QAAQ,CAC3B,qCAAqC,EACrC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,UAAU,EAAE;gBACtD,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,cAAc,EAAE,cAAc,CAAC,cAAc;aAC9C,CAAC,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport type { PagedAsyncIterableIterator } from \"@azure/core-paging\";\nimport { getDefaultProxySettings } from \"@azure/core-rest-pipeline\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport type {\n ServiceGetPropertiesOptions,\n ServiceSetPropertiesOptions,\n ServiceSetPropertiesResponse,\n} from \"@azure/storage-blob\";\nimport { BlobServiceClient } from \"@azure/storage-blob\";\nimport type { Pipeline, StoragePipelineOptions } from \"./Pipeline.js\";\nimport { isPipelineLike, newPipeline } from \"./Pipeline.js\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\nimport { StorageSharedKeyCredential } from \"./credentials/StorageSharedKeyCredential.js\";\nimport { DataLakeFileSystemClient } from \"./DataLakeFileSystemClient.js\";\nimport type {\n FileSystemItem,\n ServiceGenerateAccountSasUrlOptions,\n ServiceListFileSystemsOptions,\n ServiceListFileSystemsSegmentResponse,\n ServiceUndeleteFileSystemOptions,\n FileSystemUndeleteResponse,\n} from \"./models.js\";\nimport { StorageClient } from \"./StorageClient.js\";\nimport {\n appendToURLPath,\n appendToURLQuery,\n extractConnectionStringParts,\n} from \"./utils/utils.common.js\";\nimport { toDfsEndpointUrl, toFileSystemPagedAsyncIterableIterator } from \"./transforms.js\";\nimport type {\n ServiceGetUserDelegationKeyOptions,\n ServiceGetUserDelegationKeyResponse,\n} from \"./models.js\";\nimport { tracingClient } from \"./utils/tracing.js\";\nimport { AccountSASPermissions } from \"./sas/AccountSASPermissions.js\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./sas/AccountSASSignatureValues.js\";\nimport { AccountSASServices } from \"./sas/AccountSASServices.js\";\nimport type { DataLakeServiceGetPropertiesResponse, DataLakeServiceProperties } from \"./index.js\";\n\n/**\n * DataLakeServiceClient allows you to manipulate Azure\n * Data Lake service resources and file systems. The storage account provides\n * the top-level namespace for the Data Lake service.\n */\nexport class DataLakeServiceClient extends StorageClient {\n // private serviceContext: Service;\n\n /**\n * blobServiceClient provided by `@azure/storage-blob` package.\n */\n private blobServiceClient: BlobServiceClient;\n\n /**\n *\n * Creates an instance of DataLakeServiceClient from connection string.\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 - Optional. Options to configure the HTTP pipeline.\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n\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 ): DataLakeServiceClient {\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 DataLakeServiceClient(toDfsEndpointUrl(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 DataLakeServiceClient(\n toDfsEndpointUrl(extractedCreds.url) + \"?\" + extractedCreds.accountSas,\n pipeline,\n );\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 * Creates an instance of DataLakeServiceClient from url.\n *\n * @param url - A Client string pointing to Azure Storage data lake service, such as\n * \"https://myaccount.dfs.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.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 - Optional. Options to configure the HTTP pipeline.\n */\n public 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 /**\n * Creates an instance of DataLakeServiceClient from url and pipeline.\n *\n * @param url - A Client string pointing to Azure Storage data lake service, such as\n * \"https://myaccount.dfs.core.windows.net\". You can append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.dfs.core.windows.net?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n */\n public constructor(url: string, pipeline: Pipeline);\n\n public 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 if (isPipelineLike(credentialOrPipeline)) {\n super(url, credentialOrPipeline);\n } else {\n let credential;\n if (credentialOrPipeline === undefined) {\n credential = new AnonymousCredential();\n } else {\n credential = credentialOrPipeline;\n }\n\n const pipeline = newPipeline(credential, options);\n super(url, pipeline);\n }\n\n // this.serviceContext = new Service(this.storageClientContext);\n this.blobServiceClient = new BlobServiceClient(this.blobEndpointUrl, this.pipeline);\n }\n\n /**\n * Creates a {@link DataLakeFileSystemClient} object.\n *\n * @param fileSystemName - File system name.\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-subclients */\n public getFileSystemClient(fileSystemName: string): DataLakeFileSystemClient {\n return new DataLakeFileSystemClient(\n appendToURLPath(this.url, encodeURIComponent(fileSystemName)),\n this.pipeline,\n );\n }\n\n /**\n * ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).\n *\n * Retrieves a user delegation key for the Data Lake service. This is only a valid operation when using\n * bearer token authentication.\n *\n * @example\n * ```ts snippet:DatalakeServiceClientGetUserDelegationKey\n * import {\n * DataLakeServiceClient,\n * generateDataLakeSASQueryParameters,\n * FileSystemSASPermissions,\n * SASProtocol,\n * } from \"@azure/storage-file-datalake\";\n *\n * const account = \"<account>\";\n * const sas = \"<sas token>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net${sas}`,\n * );\n *\n * const fileSystemName = \"<file system name>\";\n * const accountName = \"<account name>\";\n * const startsOn = new Date();\n * const expiresOn = new Date(+new Date() + 86400 * 1000);\n * // Generate user delegation SAS for a file system\n * const userDelegationKey = await datalakeServiceClient.getUserDelegationKey(startsOn, expiresOn);\n * const fileSystemSAS = generateDataLakeSASQueryParameters(\n * {\n * fileSystemName, // Required\n * permissions: FileSystemSASPermissions.parse(\"racwdl\"), // Required\n * startsOn, // Required. Date type\n * expiresOn, // Optional. Date type\n * ipRange: { start: \"0.0.0.0\", end: \"255.255.255.255\" }, // Optional\n * protocol: SASProtocol.HttpsAndHttp, // Optional\n * version: \"2018-11-09\", // Must greater than or equal to 2018-11-09 to generate user delegation SAS\n * },\n * userDelegationKey, // UserDelegationKey\n * accountName,\n * ).toString();\n * ```\n * @see https://learn.microsoft.com/rest/api/storageservices/get-user-delegation-key\n *\n * @param startsOn - The start time for the user delegation SAS. Must be within 7 days of the current time.\n * @param expiresOn - The end time for the user delegation SAS. Must be within 7 days of the current time.\n * @param options -\n */\n public async getUserDelegationKey(\n startsOn: Date,\n expiresOn: Date,\n options: ServiceGetUserDelegationKeyOptions = {},\n ): Promise<ServiceGetUserDelegationKeyResponse> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-getUserDelegationKey\",\n options,\n async (updatedOptions) => {\n return this.blobServiceClient.getUserDelegationKey(startsOn, expiresOn, updatedOptions);\n },\n );\n }\n\n /**\n * Returns an async iterable iterator to list all the file systems\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the file systems in pages.\n *\n * Example using `for await` syntax:\n *\n * ```ts snippet:ReadmeSampleListFileSystems\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * let i = 1;\n * const fileSystems = datalakeServiceClient.listFileSystems();\n * for await (const fileSystem of fileSystems) {\n * console.log(`File system ${i++}: ${fileSystem.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```ts snippet:ReadmeSampleListFileSystems_Iterator\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * let i = 1;\n * const fileSystems = datalakeServiceClient.listFileSystems();\n * let { value, done } = await fileSystems.next();\n * while (!done) {\n * console.log(`File system ${i++}: ${value.name}`);\n * ({ value, done } = await fileSystems.next());\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```ts snippet:ReadmeSampleListFileSystems_ByPage\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * let i = 1;\n * for await (const response of datalakeServiceClient.listFileSystems().byPage({ maxPageSize: 20 })) {\n * if (response.fileSystemItems) {\n * for (const fileSystem of response.fileSystemItems) {\n * console.log(`File System ${i++}: ${fileSystem.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```ts snippet:ReadmeSampleListFileSystems_Continuation\n * import { DataLakeServiceClient } from \"@azure/storage-file-datalake\";\n * import { DefaultAzureCredential } from \"@azure/identity\";\n *\n * const account = \"<account>\";\n * const datalakeServiceClient = new DataLakeServiceClient(\n * `https://${account}.dfs.core.windows.net`,\n * new DefaultAzureCredential(),\n * );\n *\n * let i = 1;\n * let fileSystems = datalakeServiceClient.listFileSystems().byPage({ maxPageSize: 2 });\n * let response = (await fileSystems.next()).value;\n * // Prints 2 file systems\n * if (response.fileSystemItems) {\n * for (const fileSystem of response.fileSystemItems) {\n * console.log(`File system ${i++}: ${fileSystem.name}`);\n * }\n * }\n * // Gets next marker\n * let marker = response.continuationToken;\n * // Passing next marker as continuationToken\n * fileSystems = datalakeServiceClient\n * .listFileSystems()\n * .byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await fileSystems.next()).value;\n * // Prints 10 file systems\n * if (response.fileSystemItems) {\n * for (const fileSystem of response.fileSystemItems) {\n * console.log(`File system ${i++}: ${fileSystem.name}`);\n * }\n * }\n * ```\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/list-containers2\n *\n * @param options -\n */\n public listFileSystems(\n options: ServiceListFileSystemsOptions = {},\n ): PagedAsyncIterableIterator<FileSystemItem, ServiceListFileSystemsSegmentResponse> {\n return toFileSystemPagedAsyncIterableIterator(this.blobServiceClient.listContainers(options));\n }\n\n // public async createFileSystem(): Promise<DataLakeFileSystemClient> {\n // throw Error(\"NotImplemented\");\n // }\n\n // public async deleteFileSystem(fileSystem: string): Promise<ServiceDeleteFileSystemResponse> {\n // throw Error(\"NotImplemented\");\n // }\n\n /**\n * Only available for DataLakeServiceClient 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(\"b\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for DataLakeServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for an account Shared Access Signature (SAS) 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(\"b\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n\n /**\n * Restore a previously deleted File System.\n * This API is only functional if Container Soft Delete is enabled for the storage account.\n *\n * @param deletedFileSystemName - The name of the source File System.\n * @param deleteFileSystemVersion - The new name of the File System.\n * @param options - Options to configure File System Restore operation.\n */\n public async undeleteFileSystem(\n deletedFileSystemName: string,\n deleteFileSystemVersion: string,\n options: ServiceUndeleteFileSystemOptions = {},\n ): Promise<{\n fileSystemClient: DataLakeFileSystemClient;\n fileSystemUndeleteResponse: FileSystemUndeleteResponse;\n }> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-undeleteFileSystem\",\n options,\n async (updatedOptions) => {\n const res = await this.blobServiceClient.undeleteContainer(\n deletedFileSystemName,\n deleteFileSystemVersion,\n {\n ...options,\n destinationContainerName: options.destinationFileSystemName,\n tracingOptions: updatedOptions.tracingOptions,\n },\n );\n\n const fileSystemClient = this.getFileSystemClient(\n options.destinationFileSystemName || deletedFileSystemName,\n );\n return {\n fileSystemClient,\n fileSystemUndeleteResponse: res.containerUndeleteResponse,\n };\n },\n );\n }\n\n /**\n * Gets the properties of a storage account’s Blob service endpoint, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://learn.microsoft.com/rest/api/storageservices/get-blob-service-properties\n *\n * @param options - Options to the Service Get Properties operation.\n * @returns Response data for the Service Get Properties operation.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<DataLakeServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return this.blobServiceClient.getProperties({\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s Blob 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-blob-service-properties\n *\n * @param properties -\n * @param options - Options to the Service Set Properties operation.\n * @returns Response data for the Service Set Properties operation.\n */\n public async setProperties(\n properties: DataLakeServiceProperties,\n options: ServiceSetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"DataLakeServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return this.blobServiceClient.setProperties(properties, {\n abortSignal: options.abortSignal,\n tracingOptions: updatedOptions.tracingOptions,\n });\n },\n );\n }\n}\n"]}
@@ -1,6 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { __rest } from "tslib";
4
3
  import { convertHttpClient, createRequestPolicyFactoryPolicy, } from "@azure/core-http-compat";
5
4
  import { bearerTokenAuthenticationPolicy, decompressResponsePolicyName, } from "@azure/core-rest-pipeline";
6
5
  import { authorizeRequestOnTenantChallenge, createClientPipeline } from "@azure/core-client";
@@ -12,11 +11,11 @@ import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCreden
12
11
  import { AnonymousCredential } from "@azure/storage-blob";
13
12
  import { StorageOAuthScopes, StorageDataLakeLoggingAllowedHeaderNames, StorageDataLakeLoggingAllowedQueryParameters, SDK_VERSION, } from "./utils/constants.js";
14
13
  import { getCachedDefaultHttpClient, storageRequestFailureDetailsParserPolicy, } from "@azure/storage-common";
15
- import { storageBrowserPolicy } from "@azure/storage-blob";
16
- import { StorageBrowserPolicyFactory } from "@azure/storage-blob";
17
- import { storageCorrectContentLengthPolicy } from "@azure/storage-blob";
18
- import { storageRetryPolicy } from "@azure/storage-blob";
19
- import { storageSharedKeyCredentialPolicy } from "@azure/storage-blob";
14
+ import { storageBrowserPolicy } from "@azure/storage-common";
15
+ import { StorageBrowserPolicyFactory } from "@azure/storage-common";
16
+ import { storageCorrectContentLengthPolicy } from "@azure/storage-common";
17
+ import { storageRetryPolicy } from "@azure/storage-common";
18
+ import { storageSharedKeyCredentialPolicy } from "@azure/storage-common";
20
19
  import { isPipelineLike, Pipeline, } from "@azure/storage-blob";
21
20
  // Export following interfaces and types for customers who want to implement their
22
21
  // own RequestPolicy or HTTPClient
@@ -62,8 +61,7 @@ function processDownlevelPipeline(pipeline) {
62
61
  return undefined;
63
62
  }
64
63
  export function getCoreClientOptions(pipeline) {
65
- var _a;
66
- const _b = pipeline.options, { httpClient: v1Client } = _b, restOptions = __rest(_b, ["httpClient"]);
64
+ const { httpClient: v1Client, ...restOptions } = pipeline.options;
67
65
  let httpClient = pipeline._coreHttpClient;
68
66
  if (!httpClient) {
69
67
  httpClient = v1Client ? convertHttpClient(v1Client) : getCachedDefaultHttpClient();
@@ -75,13 +73,17 @@ export function getCoreClientOptions(pipeline) {
75
73
  const userAgentPrefix = restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix
76
74
  ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}`
77
75
  : `${packageDetails}`;
78
- corePipeline = createClientPipeline(Object.assign(Object.assign({}, restOptions), { loggingOptions: {
76
+ corePipeline = createClientPipeline({
77
+ ...restOptions,
78
+ loggingOptions: {
79
79
  additionalAllowedHeaderNames: StorageDataLakeLoggingAllowedHeaderNames,
80
80
  additionalAllowedQueryParameters: StorageDataLakeLoggingAllowedQueryParameters,
81
81
  logger: logger.info,
82
- }, userAgentOptions: {
82
+ },
83
+ userAgentOptions: {
83
84
  userAgentPrefix,
84
- }, serializationOptions: {
85
+ },
86
+ serializationOptions: {
85
87
  stringifyXML,
86
88
  serializerOptions: {
87
89
  xml: {
@@ -90,7 +92,8 @@ export function getCoreClientOptions(pipeline) {
90
92
  xmlCharKey: "#",
91
93
  },
92
94
  },
93
- }, deserializationOptions: {
95
+ },
96
+ deserializationOptions: {
94
97
  parseXML,
95
98
  serializerOptions: {
96
99
  xml: {
@@ -99,7 +102,8 @@ export function getCoreClientOptions(pipeline) {
99
102
  xmlCharKey: "#",
100
103
  },
101
104
  },
102
- } }));
105
+ },
106
+ });
103
107
  corePipeline.removePolicy({ phase: "Retry" });
104
108
  corePipeline.removePolicy({ name: decompressResponsePolicyName });
105
109
  corePipeline.addPolicy(storageCorrectContentLengthPolicy());
@@ -114,7 +118,7 @@ export function getCoreClientOptions(pipeline) {
114
118
  if (isTokenCredential(credential)) {
115
119
  corePipeline.addPolicy(bearerTokenAuthenticationPolicy({
116
120
  credential,
117
- scopes: (_a = restOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes,
121
+ scopes: restOptions.audience ?? StorageOAuthScopes,
118
122
  challengeCallbacks: { authorizeRequestOnChallenge: authorizeRequestOnTenantChallenge },
119
123
  }), { phase: "Sign" });
120
124
  }
@@ -126,7 +130,12 @@ export function getCoreClientOptions(pipeline) {
126
130
  }
127
131
  pipeline._corePipeline = corePipeline;
128
132
  }
129
- return Object.assign(Object.assign({}, restOptions), { allowInsecureConnection: true, httpClient, pipeline: corePipeline });
133
+ return {
134
+ ...restOptions,
135
+ allowInsecureConnection: true,
136
+ httpClient,
137
+ pipeline: corePipeline,
138
+ };
130
139
  }
131
140
  export function getCredentialFromPipeline(pipeline) {
132
141
  // see if we squirreled one away on the type itself