@azure/storage-file-datalake 12.27.0-alpha.20250717.2 → 12.27.0-alpha.20250718.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) 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 +19 -10
  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 +14 -3
  22. package/dist/browser/generated/src/storageClient.js.map +1 -1
  23. package/dist/browser/sas/AccountSASPermissions.js +32 -34
  24. package/dist/browser/sas/AccountSASPermissions.js.map +1 -1
  25. package/dist/browser/sas/AccountSASResourceTypes.js +12 -14
  26. package/dist/browser/sas/AccountSASResourceTypes.js.map +1 -1
  27. package/dist/browser/sas/AccountSASServices.js +16 -18
  28. package/dist/browser/sas/AccountSASServices.js.map +1 -1
  29. package/dist/browser/sas/DataLakeSASPermissions.js +39 -41
  30. package/dist/browser/sas/DataLakeSASPermissions.js.map +1 -1
  31. package/dist/browser/sas/DataLakeSASSignatureValues.js +3 -2
  32. package/dist/browser/sas/DataLakeSASSignatureValues.js.map +1 -1
  33. package/dist/browser/sas/DirectorySASPermissions.js +43 -45
  34. package/dist/browser/sas/DirectorySASPermissions.js.map +1 -1
  35. package/dist/browser/sas/FileSystemSASPermissions.js +43 -45
  36. package/dist/browser/sas/FileSystemSASPermissions.js.map +1 -1
  37. package/dist/browser/sas/SASQueryParameters.js +131 -2
  38. package/dist/browser/sas/SASQueryParameters.js.map +1 -1
  39. package/dist/browser/transforms.js +8 -1
  40. package/dist/browser/transforms.js.map +1 -1
  41. package/dist/browser/utils/Batch.js +29 -21
  42. package/dist/browser/utils/Batch.js.map +1 -1
  43. package/dist/browser/utils/BufferScheduler.js +70 -44
  44. package/dist/browser/utils/BufferScheduler.js.map +1 -1
  45. package/dist/browser/utils/DataLakeAclChangeFailedError.js +8 -0
  46. package/dist/browser/utils/DataLakeAclChangeFailedError.js.map +1 -1
  47. package/dist/browser/utils/PathClientInternal.js +4 -0
  48. package/dist/browser/utils/PathClientInternal.js.map +1 -1
  49. package/dist/browser/utils/utils.common.js +2 -4
  50. package/dist/browser/utils/utils.common.js.map +1 -1
  51. package/dist/commonjs/DataLakeFileSystemClient.js +123 -80
  52. package/dist/commonjs/DataLakeFileSystemClient.js.map +1 -1
  53. package/dist/commonjs/DataLakeLeaseClient.js +1 -0
  54. package/dist/commonjs/DataLakeLeaseClient.js.map +1 -1
  55. package/dist/commonjs/DataLakeServiceClient.js +22 -5
  56. package/dist/commonjs/DataLakeServiceClient.js.map +1 -1
  57. package/dist/commonjs/Pipeline.js +19 -10
  58. package/dist/commonjs/Pipeline.js.map +1 -1
  59. package/dist/commonjs/StorageClient.js +43 -3
  60. package/dist/commonjs/StorageClient.js.map +1 -1
  61. package/dist/commonjs/StorageContextClient.js +2 -3
  62. package/dist/commonjs/StorageContextClient.js.map +1 -1
  63. package/dist/commonjs/clients.js +246 -66
  64. package/dist/commonjs/clients.js.map +1 -1
  65. package/dist/commonjs/credentials/UserDelegationKeyCredential.js +12 -0
  66. package/dist/commonjs/credentials/UserDelegationKeyCredential.js.map +1 -1
  67. package/dist/commonjs/generated/src/operations/fileSystemOperations.js +1 -0
  68. package/dist/commonjs/generated/src/operations/fileSystemOperations.js.map +1 -1
  69. package/dist/commonjs/generated/src/operations/pathOperations.js +1 -0
  70. package/dist/commonjs/generated/src/operations/pathOperations.js.map +1 -1
  71. package/dist/commonjs/generated/src/operations/service.js +1 -0
  72. package/dist/commonjs/generated/src/operations/service.js.map +1 -1
  73. package/dist/commonjs/generated/src/storageClient.js +14 -3
  74. package/dist/commonjs/generated/src/storageClient.js.map +1 -1
  75. package/dist/commonjs/sas/AccountSASPermissions.js +32 -34
  76. package/dist/commonjs/sas/AccountSASPermissions.js.map +1 -1
  77. package/dist/commonjs/sas/AccountSASResourceTypes.js +12 -14
  78. package/dist/commonjs/sas/AccountSASResourceTypes.js.map +1 -1
  79. package/dist/commonjs/sas/AccountSASServices.js +16 -18
  80. package/dist/commonjs/sas/AccountSASServices.js.map +1 -1
  81. package/dist/commonjs/sas/DataLakeSASPermissions.js +39 -41
  82. package/dist/commonjs/sas/DataLakeSASPermissions.js.map +1 -1
  83. package/dist/commonjs/sas/DataLakeSASSignatureValues.js +3 -2
  84. package/dist/commonjs/sas/DataLakeSASSignatureValues.js.map +1 -1
  85. package/dist/commonjs/sas/DirectorySASPermissions.js +43 -45
  86. package/dist/commonjs/sas/DirectorySASPermissions.js.map +1 -1
  87. package/dist/commonjs/sas/FileSystemSASPermissions.js +43 -45
  88. package/dist/commonjs/sas/FileSystemSASPermissions.js.map +1 -1
  89. package/dist/commonjs/sas/SASQueryParameters.js +131 -2
  90. package/dist/commonjs/sas/SASQueryParameters.js.map +1 -1
  91. package/dist/commonjs/transforms.js +8 -1
  92. package/dist/commonjs/transforms.js.map +1 -1
  93. package/dist/commonjs/tsdoc-metadata.json +11 -11
  94. package/dist/commonjs/utils/Batch.js +29 -21
  95. package/dist/commonjs/utils/Batch.js.map +1 -1
  96. package/dist/commonjs/utils/BufferScheduler.js +70 -44
  97. package/dist/commonjs/utils/BufferScheduler.js.map +1 -1
  98. package/dist/commonjs/utils/DataLakeAclChangeFailedError.js +8 -0
  99. package/dist/commonjs/utils/DataLakeAclChangeFailedError.js.map +1 -1
  100. package/dist/commonjs/utils/PathClientInternal.js +4 -0
  101. package/dist/commonjs/utils/PathClientInternal.js.map +1 -1
  102. package/dist/commonjs/utils/utils.common.js +2 -4
  103. package/dist/commonjs/utils/utils.common.js.map +1 -1
  104. package/dist/esm/DataLakeFileSystemClient.js +123 -80
  105. package/dist/esm/DataLakeFileSystemClient.js.map +1 -1
  106. package/dist/esm/DataLakeLeaseClient.js +1 -0
  107. package/dist/esm/DataLakeLeaseClient.js.map +1 -1
  108. package/dist/esm/DataLakeServiceClient.js +22 -5
  109. package/dist/esm/DataLakeServiceClient.js.map +1 -1
  110. package/dist/esm/Pipeline.js +19 -10
  111. package/dist/esm/Pipeline.js.map +1 -1
  112. package/dist/esm/StorageClient.js +43 -3
  113. package/dist/esm/StorageClient.js.map +1 -1
  114. package/dist/esm/StorageContextClient.js +2 -3
  115. package/dist/esm/StorageContextClient.js.map +1 -1
  116. package/dist/esm/clients.js +246 -66
  117. package/dist/esm/clients.js.map +1 -1
  118. package/dist/esm/credentials/UserDelegationKeyCredential.js +12 -0
  119. package/dist/esm/credentials/UserDelegationKeyCredential.js.map +1 -1
  120. package/dist/esm/generated/src/operations/fileSystemOperations.js +1 -0
  121. package/dist/esm/generated/src/operations/fileSystemOperations.js.map +1 -1
  122. package/dist/esm/generated/src/operations/pathOperations.js +1 -0
  123. package/dist/esm/generated/src/operations/pathOperations.js.map +1 -1
  124. package/dist/esm/generated/src/operations/service.js +1 -0
  125. package/dist/esm/generated/src/operations/service.js.map +1 -1
  126. package/dist/esm/generated/src/storageClient.js +14 -3
  127. package/dist/esm/generated/src/storageClient.js.map +1 -1
  128. package/dist/esm/sas/AccountSASPermissions.js +32 -34
  129. package/dist/esm/sas/AccountSASPermissions.js.map +1 -1
  130. package/dist/esm/sas/AccountSASResourceTypes.js +12 -14
  131. package/dist/esm/sas/AccountSASResourceTypes.js.map +1 -1
  132. package/dist/esm/sas/AccountSASServices.js +16 -18
  133. package/dist/esm/sas/AccountSASServices.js.map +1 -1
  134. package/dist/esm/sas/DataLakeSASPermissions.js +39 -41
  135. package/dist/esm/sas/DataLakeSASPermissions.js.map +1 -1
  136. package/dist/esm/sas/DataLakeSASSignatureValues.js +3 -2
  137. package/dist/esm/sas/DataLakeSASSignatureValues.js.map +1 -1
  138. package/dist/esm/sas/DirectorySASPermissions.js +43 -45
  139. package/dist/esm/sas/DirectorySASPermissions.js.map +1 -1
  140. package/dist/esm/sas/FileSystemSASPermissions.js +43 -45
  141. package/dist/esm/sas/FileSystemSASPermissions.js.map +1 -1
  142. package/dist/esm/sas/SASQueryParameters.js +131 -2
  143. package/dist/esm/sas/SASQueryParameters.js.map +1 -1
  144. package/dist/esm/transforms.js +8 -1
  145. package/dist/esm/transforms.js.map +1 -1
  146. package/dist/esm/utils/Batch.js +29 -21
  147. package/dist/esm/utils/Batch.js.map +1 -1
  148. package/dist/esm/utils/BufferScheduler.js +70 -44
  149. package/dist/esm/utils/BufferScheduler.js.map +1 -1
  150. package/dist/esm/utils/DataLakeAclChangeFailedError.js +8 -0
  151. package/dist/esm/utils/DataLakeAclChangeFailedError.js.map +1 -1
  152. package/dist/esm/utils/PathClientInternal.js +4 -0
  153. package/dist/esm/utils/PathClientInternal.js.map +1 -1
  154. package/dist/esm/utils/utils.common.js +2 -4
  155. package/dist/esm/utils/utils.common.js.map +1 -1
  156. package/dist/react-native/DataLakeFileSystemClient.js +123 -80
  157. package/dist/react-native/DataLakeFileSystemClient.js.map +1 -1
  158. package/dist/react-native/DataLakeLeaseClient.js +1 -0
  159. package/dist/react-native/DataLakeLeaseClient.js.map +1 -1
  160. package/dist/react-native/DataLakeServiceClient.js +22 -5
  161. package/dist/react-native/DataLakeServiceClient.js.map +1 -1
  162. package/dist/react-native/Pipeline.js +19 -10
  163. package/dist/react-native/Pipeline.js.map +1 -1
  164. package/dist/react-native/StorageClient.js +43 -3
  165. package/dist/react-native/StorageClient.js.map +1 -1
  166. package/dist/react-native/StorageContextClient.js +2 -3
  167. package/dist/react-native/StorageContextClient.js.map +1 -1
  168. package/dist/react-native/clients.js +246 -66
  169. package/dist/react-native/clients.js.map +1 -1
  170. package/dist/react-native/credentials/UserDelegationKeyCredential.js +12 -0
  171. package/dist/react-native/credentials/UserDelegationKeyCredential.js.map +1 -1
  172. package/dist/react-native/generated/src/operations/fileSystemOperations.js +1 -0
  173. package/dist/react-native/generated/src/operations/fileSystemOperations.js.map +1 -1
  174. package/dist/react-native/generated/src/operations/pathOperations.js +1 -0
  175. package/dist/react-native/generated/src/operations/pathOperations.js.map +1 -1
  176. package/dist/react-native/generated/src/operations/service.js +1 -0
  177. package/dist/react-native/generated/src/operations/service.js.map +1 -1
  178. package/dist/react-native/generated/src/storageClient.js +14 -3
  179. package/dist/react-native/generated/src/storageClient.js.map +1 -1
  180. package/dist/react-native/sas/AccountSASPermissions.js +32 -34
  181. package/dist/react-native/sas/AccountSASPermissions.js.map +1 -1
  182. package/dist/react-native/sas/AccountSASResourceTypes.js +12 -14
  183. package/dist/react-native/sas/AccountSASResourceTypes.js.map +1 -1
  184. package/dist/react-native/sas/AccountSASServices.js +16 -18
  185. package/dist/react-native/sas/AccountSASServices.js.map +1 -1
  186. package/dist/react-native/sas/DataLakeSASPermissions.js +39 -41
  187. package/dist/react-native/sas/DataLakeSASPermissions.js.map +1 -1
  188. package/dist/react-native/sas/DataLakeSASSignatureValues.js +3 -2
  189. package/dist/react-native/sas/DataLakeSASSignatureValues.js.map +1 -1
  190. package/dist/react-native/sas/DirectorySASPermissions.js +43 -45
  191. package/dist/react-native/sas/DirectorySASPermissions.js.map +1 -1
  192. package/dist/react-native/sas/FileSystemSASPermissions.js +43 -45
  193. package/dist/react-native/sas/FileSystemSASPermissions.js.map +1 -1
  194. package/dist/react-native/sas/SASQueryParameters.js +131 -2
  195. package/dist/react-native/sas/SASQueryParameters.js.map +1 -1
  196. package/dist/react-native/transforms.js +8 -1
  197. package/dist/react-native/transforms.js.map +1 -1
  198. package/dist/react-native/utils/Batch.js +29 -21
  199. package/dist/react-native/utils/Batch.js.map +1 -1
  200. package/dist/react-native/utils/BufferScheduler.js +70 -44
  201. package/dist/react-native/utils/BufferScheduler.js.map +1 -1
  202. package/dist/react-native/utils/DataLakeAclChangeFailedError.js +8 -0
  203. package/dist/react-native/utils/DataLakeAclChangeFailedError.js.map +1 -1
  204. package/dist/react-native/utils/PathClientInternal.js +4 -0
  205. package/dist/react-native/utils/PathClientInternal.js.map +1 -1
  206. package/dist/react-native/utils/utils.common.js +2 -4
  207. package/dist/react-native/utils/utils.common.js.map +1 -1
  208. package/package.json +2 -2
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataLakeFileSystemClient = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const storage_blob_1 = require("@azure/storage-blob");
6
5
  const Pipeline_js_1 = require("./Pipeline.js");
7
6
  const StorageSharedKeyCredential_js_1 = require("./credentials/StorageSharedKeyCredential.js");
@@ -21,6 +20,18 @@ const PathClientInternal_js_1 = require("./utils/PathClientInternal.js");
21
20
  * allowing you to manipulate its directories and files.
22
21
  */
23
22
  class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
23
+ /**
24
+ * fileSystemContext provided by protocol layer.
25
+ */
26
+ fileSystemContext;
27
+ /**
28
+ * fileSystemContext provided by protocol layer.
29
+ */
30
+ fileSystemContextToBlobEndpoint;
31
+ /**
32
+ * blobContainerClient provided by `@azure/storage-blob` package.
33
+ */
34
+ blobContainerClient;
24
35
  constructor(url, credentialOrPipeline,
25
36
  // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
26
37
  /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
@@ -89,7 +100,12 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
89
100
  */
90
101
  async create(options = {}) {
91
102
  return tracing_js_1.tracingClient.withSpan("DataLakeFileSystemClient-create", options, async (updatedOptions) => {
92
- return this.blobContainerClient.create(Object.assign(Object.assign({}, options), { access: (0, transforms_js_1.toContainerPublicAccessType)(options.access), tracingOptions: updatedOptions.tracingOptions, containerEncryptionScope: options.fileSystemEncryptionScope }));
103
+ return this.blobContainerClient.create({
104
+ ...options,
105
+ access: (0, transforms_js_1.toContainerPublicAccessType)(options.access),
106
+ tracingOptions: updatedOptions.tracingOptions,
107
+ containerEncryptionScope: options.fileSystemEncryptionScope,
108
+ });
93
109
  });
94
110
  }
95
111
  /**
@@ -102,7 +118,12 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
102
118
  */
103
119
  async createIfNotExists(options = {}) {
104
120
  return tracing_js_1.tracingClient.withSpan("DataLakeFileSystemClient-createIfNotExists", options, async (updatedOptions) => {
105
- return this.blobContainerClient.createIfNotExists(Object.assign(Object.assign({}, options), { access: (0, transforms_js_1.toContainerPublicAccessType)(options.access), containerEncryptionScope: options.fileSystemEncryptionScope, tracingOptions: updatedOptions.tracingOptions }));
121
+ return this.blobContainerClient.createIfNotExists({
122
+ ...options,
123
+ access: (0, transforms_js_1.toContainerPublicAccessType)(options.access),
124
+ containerEncryptionScope: options.fileSystemEncryptionScope,
125
+ tracingOptions: updatedOptions.tracingOptions,
126
+ });
106
127
  });
107
128
  }
108
129
  /**
@@ -128,7 +149,10 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
128
149
  */
129
150
  async delete(options = {}) {
130
151
  return tracing_js_1.tracingClient.withSpan("DataLakeFileSystemClient-delete", options, async (updatedOptions) => {
131
- return this.blobContainerClient.delete(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
152
+ return this.blobContainerClient.delete({
153
+ ...options,
154
+ tracingOptions: updatedOptions.tracingOptions,
155
+ });
132
156
  });
133
157
  }
134
158
  /**
@@ -158,7 +182,10 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
158
182
  */
159
183
  async getProperties(options = {}) {
160
184
  return tracing_js_1.tracingClient.withSpan("DataLakeFileSystemClient-getProperties", options, async (updatedOptions) => {
161
- const rawResponse = await this.blobContainerClient.getProperties(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
185
+ const rawResponse = await this.blobContainerClient.getProperties({
186
+ ...options,
187
+ tracingOptions: updatedOptions.tracingOptions,
188
+ });
162
189
  // Transfer and rename blobPublicAccess to publicAccess
163
190
  const response = rawResponse;
164
191
  response.publicAccess = (0, transforms_js_1.toPublicAccessType)(rawResponse.blobPublicAccess);
@@ -182,7 +209,10 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
182
209
  */
183
210
  async setMetadata(metadata, options = {}) {
184
211
  return tracing_js_1.tracingClient.withSpan("DataLakeFileSystemClient-setMetadata", options, async (updatedOptions) => {
185
- return this.blobContainerClient.setMetadata(metadata, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
212
+ return this.blobContainerClient.setMetadata(metadata, {
213
+ ...options,
214
+ tracingOptions: updatedOptions.tracingOptions,
215
+ });
186
216
  });
187
217
  }
188
218
  /**
@@ -198,7 +228,10 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
198
228
  */
199
229
  async getAccessPolicy(options = {}) {
200
230
  return tracing_js_1.tracingClient.withSpan("DataLakeFileSystemClient-getAccessPolicy", options, async (updatedOptions) => {
201
- const rawResponse = await this.blobContainerClient.getAccessPolicy(Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
231
+ const rawResponse = await this.blobContainerClient.getAccessPolicy({
232
+ ...options,
233
+ tracingOptions: updatedOptions.tracingOptions,
234
+ });
202
235
  // Transfer and rename blobPublicAccess to publicAccess
203
236
  const response = rawResponse;
204
237
  response.publicAccess = (0, transforms_js_1.toPublicAccessType)(rawResponse.blobPublicAccess);
@@ -224,7 +257,10 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
224
257
  */
225
258
  async setAccessPolicy(access, fileSystemAcl, options = {}) {
226
259
  return tracing_js_1.tracingClient.withSpan("DataLakeFileSystemClient-setAccessPolicy", options, async (updatedOptions) => {
227
- return this.blobContainerClient.setAccessPolicy((0, transforms_js_1.toContainerPublicAccessType)(access), fileSystemAcl, Object.assign(Object.assign({}, options), { tracingOptions: updatedOptions.tracingOptions }));
260
+ return this.blobContainerClient.setAccessPolicy((0, transforms_js_1.toContainerPublicAccessType)(access), fileSystemAcl, {
261
+ ...options,
262
+ tracingOptions: updatedOptions.tracingOptions,
263
+ });
228
264
  });
229
265
  }
230
266
  /**
@@ -356,49 +392,44 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
356
392
  return this;
357
393
  },
358
394
  byPage: (settings = {}) => {
359
- return this.listSegments(settings.continuationToken, Object.assign({ maxResults: settings.maxPageSize }, options));
395
+ return this.listSegments(settings.continuationToken, {
396
+ maxResults: settings.maxPageSize,
397
+ ...options,
398
+ });
360
399
  },
361
400
  };
362
401
  }
363
- listItems() {
364
- return tslib_1.__asyncGenerator(this, arguments, function* listItems_1(options = {}) {
365
- var _a, e_1, _b, _c;
366
- try {
367
- for (var _d = true, _e = tslib_1.__asyncValues(this.listSegments(undefined, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
368
- _c = _f.value;
369
- _d = false;
370
- const response = _c;
371
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(response.pathItems || [])));
372
- }
373
- }
374
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
375
- finally {
376
- try {
377
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
378
- }
379
- finally { if (e_1) throw e_1.error; }
380
- }
381
- });
402
+ async *listItems(options = {}) {
403
+ for await (const response of this.listSegments(undefined, options)) {
404
+ yield* response.pathItems || [];
405
+ }
382
406
  }
383
- listSegments(continuation_1) {
384
- return tslib_1.__asyncGenerator(this, arguments, function* listSegments_1(continuation, options = {}) {
385
- let response;
386
- if (!!continuation || continuation === undefined) {
387
- do {
388
- response = yield tslib_1.__await(this.listPathsSegment(continuation, options));
389
- continuation = response.continuation;
390
- yield yield tslib_1.__await(response);
391
- } while (continuation);
392
- }
393
- });
407
+ async *listSegments(continuation, options = {}) {
408
+ let response;
409
+ if (!!continuation || continuation === undefined) {
410
+ do {
411
+ response = await this.listPathsSegment(continuation, options);
412
+ continuation = response.continuation;
413
+ yield response;
414
+ } while (continuation);
415
+ }
394
416
  }
395
417
  async listPathsSegment(continuation, options = {}) {
396
418
  return tracing_js_1.tracingClient.withSpan("DataLakeFileSystemClient-listPathsSegment", options, async (updatedOptions) => {
397
- const rawResponse = await this.fileSystemContext.listPaths(options.recursive || false, Object.assign(Object.assign({ continuation }, updatedOptions), { upn: options.userPrincipalName }));
419
+ const rawResponse = await this.fileSystemContext.listPaths(options.recursive || false, {
420
+ continuation,
421
+ ...updatedOptions,
422
+ upn: options.userPrincipalName,
423
+ });
398
424
  const response = rawResponse;
399
425
  response.pathItems = [];
400
426
  for (const path of rawResponse.paths || []) {
401
- response.pathItems.push(Object.assign(Object.assign({}, path), { permissions: (0, transforms_js_1.toPermissions)(path.permissions), createdOn: (0, utils_common_js_1.windowsFileTimeTicksToTime)(path.creationTime), expiresOn: (0, utils_common_js_1.windowsFileTimeTicksToTime)(path.expiryTime) }));
427
+ response.pathItems.push({
428
+ ...path,
429
+ permissions: (0, transforms_js_1.toPermissions)(path.permissions),
430
+ createdOn: (0, utils_common_js_1.windowsFileTimeTicksToTime)(path.creationTime),
431
+ expiresOn: (0, utils_common_js_1.windowsFileTimeTicksToTime)(path.expiryTime),
432
+ });
402
433
  }
403
434
  delete rawResponse.paths;
404
435
  return response;
@@ -534,45 +565,35 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
534
565
  return this;
535
566
  },
536
567
  byPage: (settings = {}) => {
537
- return this.listDeletedSegments(settings.continuationToken, Object.assign({ maxResults: settings.maxPageSize }, options));
568
+ return this.listDeletedSegments(settings.continuationToken, {
569
+ maxResults: settings.maxPageSize,
570
+ ...options,
571
+ });
538
572
  },
539
573
  };
540
574
  }
541
- listDeletedItems() {
542
- return tslib_1.__asyncGenerator(this, arguments, function* listDeletedItems_1(options = {}) {
543
- var _a, e_2, _b, _c;
544
- try {
545
- for (var _d = true, _e = tslib_1.__asyncValues(this.listDeletedSegments(undefined, options)), _f; _f = yield tslib_1.__await(_e.next()), _a = _f.done, !_a; _d = true) {
546
- _c = _f.value;
547
- _d = false;
548
- const response = _c;
549
- yield tslib_1.__await(yield* tslib_1.__asyncDelegator(tslib_1.__asyncValues(response.pathItems || [])));
550
- }
551
- }
552
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
553
- finally {
554
- try {
555
- if (!_d && !_a && (_b = _e.return)) yield tslib_1.__await(_b.call(_e));
556
- }
557
- finally { if (e_2) throw e_2.error; }
558
- }
559
- });
575
+ async *listDeletedItems(options = {}) {
576
+ for await (const response of this.listDeletedSegments(undefined, options)) {
577
+ yield* response.pathItems || [];
578
+ }
560
579
  }
561
- listDeletedSegments(continuation_1) {
562
- return tslib_1.__asyncGenerator(this, arguments, function* listDeletedSegments_1(continuation, options = {}) {
563
- let response;
564
- if (!!continuation || continuation === undefined) {
565
- do {
566
- response = yield tslib_1.__await(this.listDeletedPathsSegment(continuation, options));
567
- continuation = response.continuation;
568
- yield yield tslib_1.__await(response);
569
- } while (continuation);
570
- }
571
- });
580
+ async *listDeletedSegments(continuation, options = {}) {
581
+ let response;
582
+ if (!!continuation || continuation === undefined) {
583
+ do {
584
+ response = await this.listDeletedPathsSegment(continuation, options);
585
+ continuation = response.continuation;
586
+ yield response;
587
+ } while (continuation);
588
+ }
572
589
  }
573
590
  async listDeletedPathsSegment(continuation, options = {}) {
574
591
  return tracing_js_1.tracingClient.withSpan("DataLakeFileSystemClient-listDeletedPathsSegment", options, async (updatedOptions) => {
575
- const rawResponse = await this.fileSystemContextToBlobEndpoint.listBlobHierarchySegment(Object.assign(Object.assign({ marker: continuation }, updatedOptions), { prefix: options.prefix === "" ? undefined : options.prefix }));
592
+ const rawResponse = await this.fileSystemContextToBlobEndpoint.listBlobHierarchySegment({
593
+ marker: continuation,
594
+ ...updatedOptions,
595
+ prefix: options.prefix === "" ? undefined : options.prefix,
596
+ });
576
597
  const response = rawResponse;
577
598
  response.pathItems = [];
578
599
  for (const path of rawResponse.segment.blobItems || []) {
@@ -602,12 +623,22 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
602
623
  async undeletePath(deletedPath, deletionId, options = {}) {
603
624
  return tracing_js_1.tracingClient.withSpan("DataLakeFileSystemClient-undeletePath", options, async (updatedOptions) => {
604
625
  const pathClient = new PathClientInternal_js_1.PathClientInternal((0, utils_common_js_1.appendToURLPath)(this.blobEndpointUrl, (0, utils_common_js_1.EscapePath)(deletedPath)), this.pipeline);
605
- const rawResponse = (0, utils_common_js_1.assertResponse)(await pathClient.blobPathContext.undelete(Object.assign(Object.assign({ undeleteSource: "?" + constants_js_1.DeletionIdKey + "=" + deletionId }, options), { tracingOptions: updatedOptions.tracingOptions })));
626
+ const rawResponse = (0, utils_common_js_1.assertResponse)(await pathClient.blobPathContext.undelete({
627
+ undeleteSource: "?" + constants_js_1.DeletionIdKey + "=" + deletionId,
628
+ ...options,
629
+ tracingOptions: updatedOptions.tracingOptions,
630
+ }));
606
631
  if (rawResponse.resourceType === constants_js_1.PathResultTypeConstants.DirectoryResourceType) {
607
- return Object.assign({ pathClient: this.getDirectoryClient(deletedPath) }, rawResponse);
632
+ return {
633
+ pathClient: this.getDirectoryClient(deletedPath),
634
+ ...rawResponse,
635
+ };
608
636
  }
609
637
  else {
610
- return Object.assign({ pathClient: this.getFileClient(deletedPath) }, rawResponse);
638
+ return {
639
+ pathClient: this.getFileClient(deletedPath),
640
+ ...rawResponse,
641
+ };
611
642
  }
612
643
  });
613
644
  }
@@ -627,7 +658,10 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
627
658
  if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) {
628
659
  throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
629
660
  }
630
- const sas = (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParameters)(Object.assign({ fileSystemName: this.name }, options), this.credential).toString();
661
+ const sas = (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParameters)({
662
+ fileSystemName: this.name,
663
+ ...options,
664
+ }, this.credential).toString();
631
665
  resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas));
632
666
  });
633
667
  }
@@ -647,7 +681,10 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
647
681
  if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) {
648
682
  throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
649
683
  }
650
- return (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParametersInternal)(Object.assign({ fileSystemName: this.name }, options), this.credential).stringToSign;
684
+ return (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParametersInternal)({
685
+ fileSystemName: this.name,
686
+ ...options,
687
+ }, this.credential).stringToSign;
651
688
  }
652
689
  /**
653
690
  * Generates a Service Shared Access Signature (SAS) URI based on the client properties
@@ -661,7 +698,10 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
661
698
  */
662
699
  generateUserDelegationSasUrl(options, userDelegationKey) {
663
700
  return new Promise((resolve) => {
664
- const sas = (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParameters)(Object.assign({ fileSystemName: this.name }, options), userDelegationKey, this.accountName).toString();
701
+ const sas = (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParameters)({
702
+ fileSystemName: this.name,
703
+ ...options,
704
+ }, userDelegationKey, this.accountName).toString();
665
705
  resolve((0, utils_common_js_1.appendToURLQuery)(this.url, sas));
666
706
  });
667
707
  }
@@ -676,7 +716,10 @@ class DataLakeFileSystemClient extends StorageClient_js_1.StorageClient {
676
716
  * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
677
717
  */
678
718
  generateUserDelegationSasStringToSign(options, userDelegationKey) {
679
- return (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParametersInternal)(Object.assign({ fileSystemName: this.name }, options), userDelegationKey, this.accountName).stringToSign;
719
+ return (0, DataLakeSASSignatureValues_js_1.generateDataLakeSASQueryParametersInternal)({
720
+ fileSystemName: this.name,
721
+ ...options,
722
+ }, userDelegationKey, this.accountName).stringToSign;
680
723
  }
681
724
  }
682
725
  exports.DataLakeFileSystemClient = DataLakeFileSystemClient;
@@ -1 +1 @@
1
- {"version":3,"file":"DataLakeFileSystemClient.js","sourceRoot":"","sources":["../../src/DataLakeFileSystemClient.ts"],"names":[],"mappings":";;;;AAIA,sDAAsD;AAEtD,+CAA4D;AAC5D,+FAAyF;AACzF,sDAA0D;AAC1D,qEAA+D;AAC/D,kEAA6F;AAmC7F,yDAAmD;AACnD,mDAAiG;AACjG,mDAAmD;AACnD,6DAMiC;AACjC,6CAA2E;AAC3E,uFAG6C;AAC7C,uDAA8E;AAC9E,yEAAmE;AAEnE;;;GAGG;AACH,MAAa,wBAAyB,SAAQ,gCAAa;IA4CzD,YACE,GAAW,EACX,oBAIY;IACZ,2FAA2F;IAC3F,iEAAiE;IACjE,OAAgC;QAEhC,IAAI,IAAA,4BAAc,EAAC,oBAAoB,CAAC,EAAE,CAAC;YACzC,KAAK,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,IAAI,UAAU,CAAC;YACf,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;gBACvC,UAAU,GAAG,IAAI,kCAAmB,EAAE,CAAC;YACzC,CAAC;iBAAM,CAAC;gBACN,UAAU,GAAG,oB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EZ,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,IAAA,kEAAkC,kBAE1C,cAAc,EAAE,IAAI,CAAC,IAAI,IACtB,OAAO,GAEZ,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,CAAC,QAAQ,EAAE,CAAC;YAEb,OAAO,CAAC,IAAA,kCAAgB,EAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IAEI,qCAAqC,CAC1C,OAAwC,EACxC,iBAAoC;QAEpC,OAAO,IAAA,0EAA0C,kBAE7C,cAAc,EAAE,IAAI,CAAC,IAAI,IACtB,OAAO,GAEZ,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF;AA34BD,4DA24BC","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,sDAAsD;AAEtD,+CAA4D;AAC5D,+FAAyF;AACzF,sDAA0D;AAC1D,qEAA+D;AAC/D,kEAA6F;AAmC7F,yDAAmD;AACnD,mDAAiG;AACjG,mDAAmD;AACnD,6DAMiC;AACjC,6CAA2E;AAC3E,uFAG6C;AAC7C,uDAA8E;AAC9E,yEAAmE;AAEnE;;;GAGG;AACH,MAAa,wBAAyB,SAAQ,gCAAa;IACzD;;OAEG;IACK,iBAAiB,CAAa;IAEtC;;OAEG;IACK,+BAA+B,CAAa;IAEpD;;OAEG;IACK,mBAAmB,CAAkB;IA8B7C,YACE,GAAW,EACX,oBAIY;IACZ,2FAA2F;IAC3F,iEAAiE;IACjE,OAAgC;QAEhC,IAAI,IAAA,4BAAc,EAAC,oBAAoB,CAAC,EAAE,CAAC;YACzC,KAAK,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;QACnC,CAAC;aAAM,CAAC;YACN,IAAI,UAAU,CAAC;YACf,IAAI,oBAAoB,KAAK,SAAS,EAAE,CAAC;gBACvC,UAAU,GAAG,IAAI,kCAAmB,EAAE,CAAC;YACzC,CAAC;iBAAM,CAAC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CACxF,CAAC;QACJ,CAAC;QAED,OAAO,IAAA,0EAA0C,EAC/C;YACE,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,GAAG,OAAO;SACX,EACD,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,IAAA,kEAAkC,EAC5C;gBACE,cAAc,EAAE,IAAI,CAAC,IAAI;gBACzB,GAAG,OAAO;aACX,EACD,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,CAAC,QAAQ,EAAE,CAAC;YAEb,OAAO,CAAC,IAAA,kCAAgB,EAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IAEI,qCAAqC,CAC1C,OAAwC,EACxC,iBAAoC;QAEpC,OAAO,IAAA,0EAA0C,EAC/C;YACE,cAAc,EAAE,IAAI,CAAC,IAAI;YACzB,GAAG,OAAO;SACX,EACD,iBAAiB,EACjB,IAAI,CAAC,WAAW,CACjB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF;AA34BD,4DA24BC","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"]}
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.DataLakeLeaseClient = void 0;
6
6
  const tracing_js_1 = require("./utils/tracing.js");
7
7
  class DataLakeLeaseClient {
8
+ client;
8
9
  get leaseId() {
9
10
  return this.client.leaseId;
10
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"DataLakeLeaseClient.js","sourceRoot":"","sources":["../../src/DataLakeLeaseClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAIlC,mDAAmD;AAEnD,MAAa,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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,WAAmB,EACnB,UAAiC,EAAE;QAEnC,OAAO,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,EAAE,CAAC;QAC9C,OAAO,0BAAa,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;AA1ED,kDA0EC","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,mDAAmD;AAEnD,MAAa,mBAAmB;IASD;IAR7B,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,0BAAa,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,0BAAa,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,0BAAa,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,0BAAa,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,0BAAa,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;AA1ED,kDA0EC","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"]}