@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,4 +1,3 @@
1
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
2
1
  import { ContainerClient } from "@azure/storage-blob";
3
2
  import { isPipelineLike, newPipeline } from "./Pipeline.js";
4
3
  import { StorageSharedKeyCredential } from "./credentials/StorageSharedKeyCredential.js";
@@ -18,6 +17,18 @@ import { PathClientInternal } from "./utils/PathClientInternal.js";
18
17
  * allowing you to manipulate its directories and files.
19
18
  */
20
19
  export class DataLakeFileSystemClient extends StorageClient {
20
+ /**
21
+ * fileSystemContext provided by protocol layer.
22
+ */
23
+ fileSystemContext;
24
+ /**
25
+ * fileSystemContext provided by protocol layer.
26
+ */
27
+ fileSystemContextToBlobEndpoint;
28
+ /**
29
+ * blobContainerClient provided by `@azure/storage-blob` package.
30
+ */
31
+ blobContainerClient;
21
32
  constructor(url, credentialOrPipeline,
22
33
  // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
23
34
  /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
@@ -86,7 +97,12 @@ export class DataLakeFileSystemClient extends StorageClient {
86
97
  */
87
98
  async create(options = {}) {
88
99
  return tracingClient.withSpan("DataLakeFileSystemClient-create", options, async (updatedOptions) => {
89
- return this.blobContainerClient.create(Object.assign(Object.assign({}, options), { access: toContainerPublicAccessType(options.access), tracingOptions: updatedOptions.tracingOptions, containerEncryptionScope: options.fileSystemEncryptionScope }));
100
+ return this.blobContainerClient.create({
101
+ ...options,
102
+ access: toContainerPublicAccessType(options.access),
103
+ tracingOptions: updatedOptions.tracingOptions,
104
+ containerEncryptionScope: options.fileSystemEncryptionScope,
105
+ });
90
106
  });
91
107
  }
92
108
  /**
@@ -99,7 +115,12 @@ export class DataLakeFileSystemClient extends StorageClient {
99
115
  */
100
116
  async createIfNotExists(options = {}) {
101
117
  return tracingClient.withSpan("DataLakeFileSystemClient-createIfNotExists", options, async (updatedOptions) => {
102
- return this.blobContainerClient.createIfNotExists(Object.assign(Object.assign({}, options), { access: toContainerPublicAccessType(options.access), containerEncryptionScope: options.fileSystemEncryptionScope, tracingOptions: updatedOptions.tracingOptions }));
118
+ return this.blobContainerClient.createIfNotExists({
119
+ ...options,
120
+ access: toContainerPublicAccessType(options.access),
121
+ containerEncryptionScope: options.fileSystemEncryptionScope,
122
+ tracingOptions: updatedOptions.tracingOptions,
123
+ });
103
124
  });
104
125
  }
105
126
  /**
@@ -125,7 +146,10 @@ export class DataLakeFileSystemClient extends StorageClient {
125
146
  */
126
147
  async delete(options = {}) {
127
148
  return tracingClient.withSpan("DataLakeFileSystemClient-delete", options, async (updatedOptions) => {
128
- return this.blobContainerClient.delete(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
149
+ return this.blobContainerClient.delete({
150
+ ...options,
151
+ tracingOptions: updatedOptions.tracingOptions,
152
+ });
129
153
  });
130
154
  }
131
155
  /**
@@ -155,7 +179,10 @@ export class DataLakeFileSystemClient extends StorageClient {
155
179
  */
156
180
  async getProperties(options = {}) {
157
181
  return tracingClient.withSpan("DataLakeFileSystemClient-getProperties", options, async (updatedOptions) => {
158
- const rawResponse = await this.blobContainerClient.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
182
+ const rawResponse = await this.blobContainerClient.getProperties({
183
+ ...options,
184
+ tracingOptions: updatedOptions.tracingOptions,
185
+ });
159
186
  // Transfer and rename blobPublicAccess to publicAccess
160
187
  const response = rawResponse;
161
188
  response.publicAccess = toPublicAccessType(rawResponse.blobPublicAccess);
@@ -179,7 +206,10 @@ export class DataLakeFileSystemClient extends StorageClient {
179
206
  */
180
207
  async setMetadata(metadata, options = {}) {
181
208
  return tracingClient.withSpan("DataLakeFileSystemClient-setMetadata", options, async (updatedOptions) => {
182
- return this.blobContainerClient.setMetadata(metadata, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
209
+ return this.blobContainerClient.setMetadata(metadata, {
210
+ ...options,
211
+ tracingOptions: updatedOptions.tracingOptions,
212
+ });
183
213
  });
184
214
  }
185
215
  /**
@@ -195,7 +225,10 @@ export class DataLakeFileSystemClient extends StorageClient {
195
225
  */
196
226
  async getAccessPolicy(options = {}) {
197
227
  return tracingClient.withSpan("DataLakeFileSystemClient-getAccessPolicy", options, async (updatedOptions) => {
198
- const rawResponse = await this.blobContainerClient.getAccessPolicy(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
228
+ const rawResponse = await this.blobContainerClient.getAccessPolicy({
229
+ ...options,
230
+ tracingOptions: updatedOptions.tracingOptions,
231
+ });
199
232
  // Transfer and rename blobPublicAccess to publicAccess
200
233
  const response = rawResponse;
201
234
  response.publicAccess = toPublicAccessType(rawResponse.blobPublicAccess);
@@ -221,7 +254,10 @@ export class DataLakeFileSystemClient extends StorageClient {
221
254
  */
222
255
  async setAccessPolicy(access, fileSystemAcl, options = {}) {
223
256
  return tracingClient.withSpan("DataLakeFileSystemClient-setAccessPolicy", options, async (updatedOptions) => {
224
- return this.blobContainerClient.setAccessPolicy(toContainerPublicAccessType(access), fileSystemAcl, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
257
+ return this.blobContainerClient.setAccessPolicy(toContainerPublicAccessType(access), fileSystemAcl, {
258
+ ...options,
259
+ tracingOptions: updatedOptions.tracingOptions,
260
+ });
225
261
  });
226
262
  }
227
263
  /**
@@ -353,49 +389,44 @@ export class DataLakeFileSystemClient extends StorageClient {
353
389
  return this;
354
390
  },
355
391
  byPage: (settings = {}) => {
356
- return this.listSegments(settings.continuationToken, Object.assign({ maxResults: settings.maxPageSize }, options));
392
+ return this.listSegments(settings.continuationToken, {
393
+ maxResults: settings.maxPageSize,
394
+ ...options,
395
+ });
357
396
  },
358
397
  };
359
398
  }
360
- listItems() {
361
- return __asyncGenerator(this, arguments, function* listItems_1(options = {}) {
362
- var _a, e_1, _b, _c;
363
- try {
364
- for (var _d = true, _e = __asyncValues(this.listSegments(undefined, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
365
- _c = _f.value;
366
- _d = false;
367
- const response = _c;
368
- yield __await(yield* __asyncDelegator(__asyncValues(response.pathItems || [])));
369
- }
370
- }
371
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
372
- finally {
373
- try {
374
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
375
- }
376
- finally { if (e_1) throw e_1.error; }
377
- }
378
- });
399
+ async *listItems(options = {}) {
400
+ for await (const response of this.listSegments(undefined, options)) {
401
+ yield* response.pathItems || [];
402
+ }
379
403
  }
380
- listSegments(continuation_1) {
381
- return __asyncGenerator(this, arguments, function* listSegments_1(continuation, options = {}) {
382
- let response;
383
- if (!!continuation || continuation === undefined) {
384
- do {
385
- response = yield __await(this.listPathsSegment(continuation, options));
386
- continuation = response.continuation;
387
- yield yield __await(response);
388
- } while (continuation);
389
- }
390
- });
404
+ async *listSegments(continuation, options = {}) {
405
+ let response;
406
+ if (!!continuation || continuation === undefined) {
407
+ do {
408
+ response = await this.listPathsSegment(continuation, options);
409
+ continuation = response.continuation;
410
+ yield response;
411
+ } while (continuation);
412
+ }
391
413
  }
392
414
  async listPathsSegment(continuation, options = {}) {
393
415
  return tracingClient.withSpan("DataLakeFileSystemClient-listPathsSegment", options, async (updatedOptions) => {
394
- const rawResponse = await this.fileSystemContext.listPaths(options.recursive || false, Object.assign(Object.assign({ continuation }, updatedOptions), { upn: options.userPrincipalName }));
416
+ const rawResponse = await this.fileSystemContext.listPaths(options.recursive || false, {
417
+ continuation,
418
+ ...updatedOptions,
419
+ upn: options.userPrincipalName,
420
+ });
395
421
  const response = rawResponse;
396
422
  response.pathItems = [];
397
423
  for (const path of rawResponse.paths || []) {
398
- response.pathItems.push(Object.assign(Object.assign({}, path), { permissions: toPermissions(path.permissions), createdOn: windowsFileTimeTicksToTime(path.creationTime), expiresOn: windowsFileTimeTicksToTime(path.expiryTime) }));
424
+ response.pathItems.push({
425
+ ...path,
426
+ permissions: toPermissions(path.permissions),
427
+ createdOn: windowsFileTimeTicksToTime(path.creationTime),
428
+ expiresOn: windowsFileTimeTicksToTime(path.expiryTime),
429
+ });
399
430
  }
400
431
  delete rawResponse.paths;
401
432
  return response;
@@ -531,45 +562,35 @@ export class DataLakeFileSystemClient extends StorageClient {
531
562
  return this;
532
563
  },
533
564
  byPage: (settings = {}) => {
534
- return this.listDeletedSegments(settings.continuationToken, Object.assign({ maxResults: settings.maxPageSize }, options));
565
+ return this.listDeletedSegments(settings.continuationToken, {
566
+ maxResults: settings.maxPageSize,
567
+ ...options,
568
+ });
535
569
  },
536
570
  };
537
571
  }
538
- listDeletedItems() {
539
- return __asyncGenerator(this, arguments, function* listDeletedItems_1(options = {}) {
540
- var _a, e_2, _b, _c;
541
- try {
542
- for (var _d = true, _e = __asyncValues(this.listDeletedSegments(undefined, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
543
- _c = _f.value;
544
- _d = false;
545
- const response = _c;
546
- yield __await(yield* __asyncDelegator(__asyncValues(response.pathItems || [])));
547
- }
548
- }
549
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
550
- finally {
551
- try {
552
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
553
- }
554
- finally { if (e_2) throw e_2.error; }
555
- }
556
- });
572
+ async *listDeletedItems(options = {}) {
573
+ for await (const response of this.listDeletedSegments(undefined, options)) {
574
+ yield* response.pathItems || [];
575
+ }
557
576
  }
558
- listDeletedSegments(continuation_1) {
559
- return __asyncGenerator(this, arguments, function* listDeletedSegments_1(continuation, options = {}) {
560
- let response;
561
- if (!!continuation || continuation === undefined) {
562
- do {
563
- response = yield __await(this.listDeletedPathsSegment(continuation, options));
564
- continuation = response.continuation;
565
- yield yield __await(response);
566
- } while (continuation);
567
- }
568
- });
577
+ async *listDeletedSegments(continuation, options = {}) {
578
+ let response;
579
+ if (!!continuation || continuation === undefined) {
580
+ do {
581
+ response = await this.listDeletedPathsSegment(continuation, options);
582
+ continuation = response.continuation;
583
+ yield response;
584
+ } while (continuation);
585
+ }
569
586
  }
570
587
  async listDeletedPathsSegment(continuation, options = {}) {
571
588
  return tracingClient.withSpan("DataLakeFileSystemClient-listDeletedPathsSegment", options, async (updatedOptions) => {
572
- const rawResponse = await this.fileSystemContextToBlobEndpoint.listBlobHierarchySegment(Object.assign(Object.assign({ marker: continuation }, updatedOptions), { prefix: options.prefix === "" ? undefined : options.prefix }));
589
+ const rawResponse = await this.fileSystemContextToBlobEndpoint.listBlobHierarchySegment({
590
+ marker: continuation,
591
+ ...updatedOptions,
592
+ prefix: options.prefix === "" ? undefined : options.prefix,
593
+ });
573
594
  const response = rawResponse;
574
595
  response.pathItems = [];
575
596
  for (const path of rawResponse.segment.blobItems || []) {
@@ -599,12 +620,22 @@ export class DataLakeFileSystemClient extends StorageClient {
599
620
  async undeletePath(deletedPath, deletionId, options = {}) {
600
621
  return tracingClient.withSpan("DataLakeFileSystemClient-undeletePath", options, async (updatedOptions) => {
601
622
  const pathClient = new PathClientInternal(appendToURLPath(this.blobEndpointUrl, EscapePath(deletedPath)), this.pipeline);
602
- const rawResponse = assertResponse(await pathClient.blobPathContext.undelete(Object.assign(Object.assign({ undeleteSource: "?" + DeletionIdKey + "=" + deletionId }, options), { tracingOptions: updatedOptions.tracingOptions })));
623
+ const rawResponse = assertResponse(await pathClient.blobPathContext.undelete({
624
+ undeleteSource: "?" + DeletionIdKey + "=" + deletionId,
625
+ ...options,
626
+ tracingOptions: updatedOptions.tracingOptions,
627
+ }));
603
628
  if (rawResponse.resourceType === PathResultTypeConstants.DirectoryResourceType) {
604
- return Object.assign({ pathClient: this.getDirectoryClient(deletedPath) }, rawResponse);
629
+ return {
630
+ pathClient: this.getDirectoryClient(deletedPath),
631
+ ...rawResponse,
632
+ };
605
633
  }
606
634
  else {
607
- return Object.assign({ pathClient: this.getFileClient(deletedPath) }, rawResponse);
635
+ return {
636
+ pathClient: this.getFileClient(deletedPath),
637
+ ...rawResponse,
638
+ };
608
639
  }
609
640
  });
610
641
  }
@@ -624,7 +655,10 @@ export class DataLakeFileSystemClient extends StorageClient {
624
655
  if (!(this.credential instanceof StorageSharedKeyCredential)) {
625
656
  throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
626
657
  }
627
- const sas = generateDataLakeSASQueryParameters(Object.assign({ fileSystemName: this.name }, options), this.credential).toString();
658
+ const sas = generateDataLakeSASQueryParameters({
659
+ fileSystemName: this.name,
660
+ ...options,
661
+ }, this.credential).toString();
628
662
  resolve(appendToURLQuery(this.url, sas));
629
663
  });
630
664
  }
@@ -644,7 +678,10 @@ export class DataLakeFileSystemClient extends StorageClient {
644
678
  if (!(this.credential instanceof StorageSharedKeyCredential)) {
645
679
  throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
646
680
  }
647
- return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.name }, options), this.credential).stringToSign;
681
+ return generateDataLakeSASQueryParametersInternal({
682
+ fileSystemName: this.name,
683
+ ...options,
684
+ }, this.credential).stringToSign;
648
685
  }
649
686
  /**
650
687
  * Generates a Service Shared Access Signature (SAS) URI based on the client properties
@@ -658,7 +695,10 @@ export class DataLakeFileSystemClient extends StorageClient {
658
695
  */
659
696
  generateUserDelegationSasUrl(options, userDelegationKey) {
660
697
  return new Promise((resolve) => {
661
- const sas = generateDataLakeSASQueryParameters(Object.assign({ fileSystemName: this.name }, options), userDelegationKey, this.accountName).toString();
698
+ const sas = generateDataLakeSASQueryParameters({
699
+ fileSystemName: this.name,
700
+ ...options,
701
+ }, userDelegationKey, this.accountName).toString();
662
702
  resolve(appendToURLQuery(this.url, sas));
663
703
  });
664
704
  }
@@ -673,7 +713,10 @@ export class DataLakeFileSystemClient extends StorageClient {
673
713
  * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
674
714
  */
675
715
  generateUserDelegationSasStringToSign(options, userDelegationKey) {
676
- return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.name }, options), userDelegationKey, this.accountName).stringToSign;
716
+ return generateDataLakeSASQueryParametersInternal({
717
+ fileSystemName: this.name,
718
+ ...options,
719
+ }, userDelegationKey, this.accountName).stringToSign;
677
720
  }
678
721
  }
679
722
  //# sourceMappingURL=DataLakeFileSystemClient.js.map
@@ -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,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,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;OAUG;IACH,gEAAgE;IACzD,uBAAuB,CAAC,OAAwC;QACrE,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,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I,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,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,C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;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"]}