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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/dist/browser/DataLakeFileSystemClient.js +123 -80
  2. package/dist/browser/DataLakeFileSystemClient.js.map +1 -1
  3. package/dist/browser/DataLakeLeaseClient.js +1 -0
  4. package/dist/browser/DataLakeLeaseClient.js.map +1 -1
  5. package/dist/browser/DataLakeServiceClient.js +22 -5
  6. package/dist/browser/DataLakeServiceClient.js.map +1 -1
  7. package/dist/browser/Pipeline.js +24 -15
  8. package/dist/browser/Pipeline.js.map +1 -1
  9. package/dist/browser/StorageClient.js +43 -3
  10. package/dist/browser/StorageClient.js.map +1 -1
  11. package/dist/browser/StorageContextClient.js +2 -3
  12. package/dist/browser/StorageContextClient.js.map +1 -1
  13. package/dist/browser/clients.js +246 -66
  14. package/dist/browser/clients.js.map +1 -1
  15. package/dist/browser/generated/src/operations/fileSystemOperations.js +1 -0
  16. package/dist/browser/generated/src/operations/fileSystemOperations.js.map +1 -1
  17. package/dist/browser/generated/src/operations/pathOperations.js +1 -0
  18. package/dist/browser/generated/src/operations/pathOperations.js.map +1 -1
  19. package/dist/browser/generated/src/operations/service.js +1 -0
  20. package/dist/browser/generated/src/operations/service.js.map +1 -1
  21. package/dist/browser/generated/src/storageClient.js +15 -4
  22. package/dist/browser/generated/src/storageClient.js.map +1 -1
  23. package/dist/browser/index-browser.d.mts.map +1 -1
  24. package/dist/browser/index-browser.mjs.map +1 -1
  25. package/dist/browser/index.d.ts +1 -1
  26. package/dist/browser/index.js +1 -1
  27. package/dist/browser/sas/AccountSASPermissions.js +32 -34
  28. package/dist/browser/sas/AccountSASPermissions.js.map +1 -1
  29. package/dist/browser/sas/AccountSASResourceTypes.js +12 -14
  30. package/dist/browser/sas/AccountSASResourceTypes.js.map +1 -1
  31. package/dist/browser/sas/AccountSASServices.js +16 -18
  32. package/dist/browser/sas/AccountSASServices.js.map +1 -1
  33. package/dist/browser/sas/DataLakeSASPermissions.js +39 -41
  34. package/dist/browser/sas/DataLakeSASPermissions.js.map +1 -1
  35. package/dist/browser/sas/DataLakeSASSignatureValues.js +3 -2
  36. package/dist/browser/sas/DataLakeSASSignatureValues.js.map +1 -1
  37. package/dist/browser/sas/DirectorySASPermissions.js +43 -45
  38. package/dist/browser/sas/DirectorySASPermissions.js.map +1 -1
  39. package/dist/browser/sas/FileSystemSASPermissions.js +43 -45
  40. package/dist/browser/sas/FileSystemSASPermissions.js.map +1 -1
  41. package/dist/browser/sas/SASQueryParameters.js +131 -2
  42. package/dist/browser/sas/SASQueryParameters.js.map +1 -1
  43. package/dist/browser/transforms.js +8 -1
  44. package/dist/browser/transforms.js.map +1 -1
  45. package/dist/browser/utils/Batch.js +29 -21
  46. package/dist/browser/utils/Batch.js.map +1 -1
  47. package/dist/browser/utils/BufferScheduler.js +70 -44
  48. package/dist/browser/utils/BufferScheduler.js.map +1 -1
  49. package/dist/browser/utils/DataLakeAclChangeFailedError.js +8 -0
  50. package/dist/browser/utils/DataLakeAclChangeFailedError.js.map +1 -1
  51. package/dist/browser/utils/PathClientInternal.js +4 -0
  52. package/dist/browser/utils/PathClientInternal.js.map +1 -1
  53. package/dist/browser/utils/constants.d.ts.map +1 -1
  54. package/dist/browser/utils/constants.js +1 -1
  55. package/dist/browser/utils/constants.js.map +1 -1
  56. package/dist/browser/utils/utils.common.js +2 -4
  57. package/dist/browser/utils/utils.common.js.map +1 -1
  58. package/dist/commonjs/DataLakeFileSystemClient.js +123 -80
  59. package/dist/commonjs/DataLakeFileSystemClient.js.map +1 -1
  60. package/dist/commonjs/DataLakeLeaseClient.js +1 -0
  61. package/dist/commonjs/DataLakeLeaseClient.js.map +1 -1
  62. package/dist/commonjs/DataLakeServiceClient.js +22 -5
  63. package/dist/commonjs/DataLakeServiceClient.js.map +1 -1
  64. package/dist/commonjs/Pipeline.js +32 -23
  65. package/dist/commonjs/Pipeline.js.map +1 -1
  66. package/dist/commonjs/StorageClient.js +43 -3
  67. package/dist/commonjs/StorageClient.js.map +1 -1
  68. package/dist/commonjs/StorageContextClient.js +2 -3
  69. package/dist/commonjs/StorageContextClient.js.map +1 -1
  70. package/dist/commonjs/clients.js +246 -66
  71. package/dist/commonjs/clients.js.map +1 -1
  72. package/dist/commonjs/credentials/UserDelegationKeyCredential.js +12 -0
  73. package/dist/commonjs/credentials/UserDelegationKeyCredential.js.map +1 -1
  74. package/dist/commonjs/generated/src/operations/fileSystemOperations.js +1 -0
  75. package/dist/commonjs/generated/src/operations/fileSystemOperations.js.map +1 -1
  76. package/dist/commonjs/generated/src/operations/pathOperations.js +1 -0
  77. package/dist/commonjs/generated/src/operations/pathOperations.js.map +1 -1
  78. package/dist/commonjs/generated/src/operations/service.js +1 -0
  79. package/dist/commonjs/generated/src/operations/service.js.map +1 -1
  80. package/dist/commonjs/generated/src/storageClient.js +15 -4
  81. package/dist/commonjs/generated/src/storageClient.js.map +1 -1
  82. package/dist/commonjs/sas/AccountSASPermissions.js +32 -34
  83. package/dist/commonjs/sas/AccountSASPermissions.js.map +1 -1
  84. package/dist/commonjs/sas/AccountSASResourceTypes.js +12 -14
  85. package/dist/commonjs/sas/AccountSASResourceTypes.js.map +1 -1
  86. package/dist/commonjs/sas/AccountSASServices.js +16 -18
  87. package/dist/commonjs/sas/AccountSASServices.js.map +1 -1
  88. package/dist/commonjs/sas/DataLakeSASPermissions.js +39 -41
  89. package/dist/commonjs/sas/DataLakeSASPermissions.js.map +1 -1
  90. package/dist/commonjs/sas/DataLakeSASSignatureValues.js +3 -2
  91. package/dist/commonjs/sas/DataLakeSASSignatureValues.js.map +1 -1
  92. package/dist/commonjs/sas/DirectorySASPermissions.js +43 -45
  93. package/dist/commonjs/sas/DirectorySASPermissions.js.map +1 -1
  94. package/dist/commonjs/sas/FileSystemSASPermissions.js +43 -45
  95. package/dist/commonjs/sas/FileSystemSASPermissions.js.map +1 -1
  96. package/dist/commonjs/sas/SASQueryParameters.js +131 -2
  97. package/dist/commonjs/sas/SASQueryParameters.js.map +1 -1
  98. package/dist/commonjs/transforms.js +8 -1
  99. package/dist/commonjs/transforms.js.map +1 -1
  100. package/dist/commonjs/tsdoc-metadata.json +11 -11
  101. package/dist/commonjs/utils/Batch.js +29 -21
  102. package/dist/commonjs/utils/Batch.js.map +1 -1
  103. package/dist/commonjs/utils/BufferScheduler.js +70 -44
  104. package/dist/commonjs/utils/BufferScheduler.js.map +1 -1
  105. package/dist/commonjs/utils/DataLakeAclChangeFailedError.js +8 -0
  106. package/dist/commonjs/utils/DataLakeAclChangeFailedError.js.map +1 -1
  107. package/dist/commonjs/utils/PathClientInternal.js +4 -0
  108. package/dist/commonjs/utils/PathClientInternal.js.map +1 -1
  109. package/dist/commonjs/utils/constants.d.ts.map +1 -1
  110. package/dist/commonjs/utils/constants.js +1 -1
  111. package/dist/commonjs/utils/constants.js.map +1 -1
  112. package/dist/commonjs/utils/utils.common.js +2 -4
  113. package/dist/commonjs/utils/utils.common.js.map +1 -1
  114. package/dist/commonjs/utils/utils.d.ts +1 -1
  115. package/dist/commonjs/utils/utils.d.ts.map +1 -1
  116. package/dist/commonjs/utils/utils.js +4 -4
  117. package/dist/commonjs/utils/utils.js.map +1 -1
  118. package/dist/esm/DataLakeFileSystemClient.js +123 -80
  119. package/dist/esm/DataLakeFileSystemClient.js.map +1 -1
  120. package/dist/esm/DataLakeLeaseClient.js +1 -0
  121. package/dist/esm/DataLakeLeaseClient.js.map +1 -1
  122. package/dist/esm/DataLakeServiceClient.js +22 -5
  123. package/dist/esm/DataLakeServiceClient.js.map +1 -1
  124. package/dist/esm/Pipeline.js +24 -15
  125. package/dist/esm/Pipeline.js.map +1 -1
  126. package/dist/esm/StorageClient.js +43 -3
  127. package/dist/esm/StorageClient.js.map +1 -1
  128. package/dist/esm/StorageContextClient.js +2 -3
  129. package/dist/esm/StorageContextClient.js.map +1 -1
  130. package/dist/esm/clients.js +246 -66
  131. package/dist/esm/clients.js.map +1 -1
  132. package/dist/esm/credentials/UserDelegationKeyCredential.js +12 -0
  133. package/dist/esm/credentials/UserDelegationKeyCredential.js.map +1 -1
  134. package/dist/esm/generated/src/operations/fileSystemOperations.js +1 -0
  135. package/dist/esm/generated/src/operations/fileSystemOperations.js.map +1 -1
  136. package/dist/esm/generated/src/operations/pathOperations.js +1 -0
  137. package/dist/esm/generated/src/operations/pathOperations.js.map +1 -1
  138. package/dist/esm/generated/src/operations/service.js +1 -0
  139. package/dist/esm/generated/src/operations/service.js.map +1 -1
  140. package/dist/esm/generated/src/storageClient.js +15 -4
  141. package/dist/esm/generated/src/storageClient.js.map +1 -1
  142. package/dist/esm/sas/AccountSASPermissions.js +32 -34
  143. package/dist/esm/sas/AccountSASPermissions.js.map +1 -1
  144. package/dist/esm/sas/AccountSASResourceTypes.js +12 -14
  145. package/dist/esm/sas/AccountSASResourceTypes.js.map +1 -1
  146. package/dist/esm/sas/AccountSASServices.js +16 -18
  147. package/dist/esm/sas/AccountSASServices.js.map +1 -1
  148. package/dist/esm/sas/DataLakeSASPermissions.js +39 -41
  149. package/dist/esm/sas/DataLakeSASPermissions.js.map +1 -1
  150. package/dist/esm/sas/DataLakeSASSignatureValues.js +3 -2
  151. package/dist/esm/sas/DataLakeSASSignatureValues.js.map +1 -1
  152. package/dist/esm/sas/DirectorySASPermissions.js +43 -45
  153. package/dist/esm/sas/DirectorySASPermissions.js.map +1 -1
  154. package/dist/esm/sas/FileSystemSASPermissions.js +43 -45
  155. package/dist/esm/sas/FileSystemSASPermissions.js.map +1 -1
  156. package/dist/esm/sas/SASQueryParameters.js +131 -2
  157. package/dist/esm/sas/SASQueryParameters.js.map +1 -1
  158. package/dist/esm/transforms.js +8 -1
  159. package/dist/esm/transforms.js.map +1 -1
  160. package/dist/esm/utils/Batch.js +29 -21
  161. package/dist/esm/utils/Batch.js.map +1 -1
  162. package/dist/esm/utils/BufferScheduler.js +70 -44
  163. package/dist/esm/utils/BufferScheduler.js.map +1 -1
  164. package/dist/esm/utils/DataLakeAclChangeFailedError.js +8 -0
  165. package/dist/esm/utils/DataLakeAclChangeFailedError.js.map +1 -1
  166. package/dist/esm/utils/PathClientInternal.js +4 -0
  167. package/dist/esm/utils/PathClientInternal.js.map +1 -1
  168. package/dist/esm/utils/constants.d.ts.map +1 -1
  169. package/dist/esm/utils/constants.js +1 -1
  170. package/dist/esm/utils/constants.js.map +1 -1
  171. package/dist/esm/utils/utils.common.js +2 -4
  172. package/dist/esm/utils/utils.common.js.map +1 -1
  173. package/dist/esm/utils/utils.d.ts +1 -1
  174. package/dist/esm/utils/utils.d.ts.map +1 -1
  175. package/dist/esm/utils/utils.js +2 -2
  176. package/dist/esm/utils/utils.js.map +1 -1
  177. package/dist/react-native/DataLakeFileSystemClient.js +123 -80
  178. package/dist/react-native/DataLakeFileSystemClient.js.map +1 -1
  179. package/dist/react-native/DataLakeLeaseClient.js +1 -0
  180. package/dist/react-native/DataLakeLeaseClient.js.map +1 -1
  181. package/dist/react-native/DataLakeServiceClient.js +22 -5
  182. package/dist/react-native/DataLakeServiceClient.js.map +1 -1
  183. package/dist/react-native/Pipeline.js +24 -15
  184. package/dist/react-native/Pipeline.js.map +1 -1
  185. package/dist/react-native/StorageClient.js +43 -3
  186. package/dist/react-native/StorageClient.js.map +1 -1
  187. package/dist/react-native/StorageContextClient.js +2 -3
  188. package/dist/react-native/StorageContextClient.js.map +1 -1
  189. package/dist/react-native/clients.js +246 -66
  190. package/dist/react-native/clients.js.map +1 -1
  191. package/dist/react-native/credentials/UserDelegationKeyCredential.js +12 -0
  192. package/dist/react-native/credentials/UserDelegationKeyCredential.js.map +1 -1
  193. package/dist/react-native/generated/src/operations/fileSystemOperations.js +1 -0
  194. package/dist/react-native/generated/src/operations/fileSystemOperations.js.map +1 -1
  195. package/dist/react-native/generated/src/operations/pathOperations.js +1 -0
  196. package/dist/react-native/generated/src/operations/pathOperations.js.map +1 -1
  197. package/dist/react-native/generated/src/operations/service.js +1 -0
  198. package/dist/react-native/generated/src/operations/service.js.map +1 -1
  199. package/dist/react-native/generated/src/storageClient.js +15 -4
  200. package/dist/react-native/generated/src/storageClient.js.map +1 -1
  201. package/dist/react-native/sas/AccountSASPermissions.js +32 -34
  202. package/dist/react-native/sas/AccountSASPermissions.js.map +1 -1
  203. package/dist/react-native/sas/AccountSASResourceTypes.js +12 -14
  204. package/dist/react-native/sas/AccountSASResourceTypes.js.map +1 -1
  205. package/dist/react-native/sas/AccountSASServices.js +16 -18
  206. package/dist/react-native/sas/AccountSASServices.js.map +1 -1
  207. package/dist/react-native/sas/DataLakeSASPermissions.js +39 -41
  208. package/dist/react-native/sas/DataLakeSASPermissions.js.map +1 -1
  209. package/dist/react-native/sas/DataLakeSASSignatureValues.js +3 -2
  210. package/dist/react-native/sas/DataLakeSASSignatureValues.js.map +1 -1
  211. package/dist/react-native/sas/DirectorySASPermissions.js +43 -45
  212. package/dist/react-native/sas/DirectorySASPermissions.js.map +1 -1
  213. package/dist/react-native/sas/FileSystemSASPermissions.js +43 -45
  214. package/dist/react-native/sas/FileSystemSASPermissions.js.map +1 -1
  215. package/dist/react-native/sas/SASQueryParameters.js +131 -2
  216. package/dist/react-native/sas/SASQueryParameters.js.map +1 -1
  217. package/dist/react-native/transforms.js +8 -1
  218. package/dist/react-native/transforms.js.map +1 -1
  219. package/dist/react-native/utils/Batch.js +29 -21
  220. package/dist/react-native/utils/Batch.js.map +1 -1
  221. package/dist/react-native/utils/BufferScheduler.js +70 -44
  222. package/dist/react-native/utils/BufferScheduler.js.map +1 -1
  223. package/dist/react-native/utils/DataLakeAclChangeFailedError.js +8 -0
  224. package/dist/react-native/utils/DataLakeAclChangeFailedError.js.map +1 -1
  225. package/dist/react-native/utils/PathClientInternal.js +4 -0
  226. package/dist/react-native/utils/PathClientInternal.js.map +1 -1
  227. package/dist/react-native/utils/constants.d.ts.map +1 -1
  228. package/dist/react-native/utils/constants.js +1 -1
  229. package/dist/react-native/utils/constants.js.map +1 -1
  230. package/dist/react-native/utils/utils.common.js +2 -4
  231. package/dist/react-native/utils/utils.common.js.map +1 -1
  232. package/dist/react-native/utils/utils.d.ts +1 -1
  233. package/dist/react-native/utils/utils.d.ts.map +1 -1
  234. package/dist/react-native/utils/utils.js +2 -2
  235. package/dist/react-native/utils/utils.js.map +1 -1
  236. package/package.json +36 -36
@@ -22,6 +22,15 @@ import { fsCreateReadStream, fsStat } from "./utils/utils.js";
22
22
  * A DataLakePathClient represents a URL to the Azure Storage path (directory or file).
23
23
  */
24
24
  export class DataLakePathClient extends StorageClient {
25
+ /**
26
+ * pathContext provided by protocol layer.
27
+ */
28
+ pathContext;
29
+ /**
30
+ * blobClient provided by `@azure/storage-blob` package.
31
+ */
32
+ blobClient;
33
+ isTokenCredential;
25
34
  /**
26
35
  * SetAccessControlRecursiveInternal operation sets the Access Control on a path and sub paths.
27
36
  *
@@ -47,14 +56,19 @@ export class DataLakePathClient extends StorageClient {
47
56
  continuationToken: undefined,
48
57
  };
49
58
  return tracingClient.withSpan("DataLakePathClient-setAccessControlRecursiveInternal", options, async (updatedOptions) => {
50
- var _a, _b, _c, _d, _e, _f;
51
59
  let continuationToken = options.continuationToken;
52
60
  let batchCounter = 0;
53
61
  let reachMaxBatches = false;
54
62
  do {
55
63
  let response;
56
64
  try {
57
- response = await this.pathContext.setAccessControlRecursive(mode, Object.assign(Object.assign({}, updatedOptions), { acl: toAclString(acl), maxRecords: options.batchSize, continuation: continuationToken, forceFlag: options.continueOnFailure }));
65
+ response = await this.pathContext.setAccessControlRecursive(mode, {
66
+ ...updatedOptions,
67
+ acl: toAclString(acl),
68
+ maxRecords: options.batchSize,
69
+ continuation: continuationToken,
70
+ forceFlag: options.continueOnFailure,
71
+ });
58
72
  }
59
73
  catch (e) {
60
74
  throw new DataLakeAclChangeFailedError(e, continuationToken);
@@ -63,17 +77,17 @@ export class DataLakePathClient extends StorageClient {
63
77
  continuationToken = response.continuation;
64
78
  // Update result
65
79
  result.continuationToken = continuationToken;
66
- result.counters.failedChangesCount += (_a = response.failureCount) !== null && _a !== void 0 ? _a : 0;
67
- result.counters.changedDirectoriesCount += (_b = response.directoriesSuccessful) !== null && _b !== void 0 ? _b : 0;
68
- result.counters.changedFilesCount += (_c = response.filesSuccessful) !== null && _c !== void 0 ? _c : 0;
80
+ result.counters.failedChangesCount += response.failureCount ?? 0;
81
+ result.counters.changedDirectoriesCount += response.directoriesSuccessful ?? 0;
82
+ result.counters.changedFilesCount += response.filesSuccessful ?? 0;
69
83
  // Progress event call back
70
84
  if (options.onProgress) {
71
85
  const progress = {
72
86
  batchFailures: toAccessControlChangeFailureArray(response.failedEntries),
73
87
  batchCounters: {
74
- failedChangesCount: (_d = response.failureCount) !== null && _d !== void 0 ? _d : 0,
75
- changedDirectoriesCount: (_e = response.directoriesSuccessful) !== null && _e !== void 0 ? _e : 0,
76
- changedFilesCount: (_f = response.filesSuccessful) !== null && _f !== void 0 ? _f : 0,
88
+ failedChangesCount: response.failureCount ?? 0,
89
+ changedDirectoriesCount: response.directoriesSuccessful ?? 0,
90
+ changedFilesCount: response.filesSuccessful ?? 0,
77
91
  },
78
92
  aggregateCounters: result.counters,
79
93
  continuationToken: continuationToken,
@@ -174,8 +188,17 @@ export class DataLakePathClient extends StorageClient {
174
188
  else if (options.expiresOn) {
175
189
  throw new Error(`Value for expiresOn is invalid: ${options.expiresOn}`);
176
190
  }
177
- return assertResponse(await this.pathContext.create(Object.assign(Object.assign({}, updatedOptions), { resource: resourceType, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, properties: toProperties(options.metadata), cpkInfo: options.customerProvidedKey, acl: options.acl ? toAclString(options.acl) : undefined, expiryOptions,
178
- expiresOn })));
191
+ return assertResponse(await this.pathContext.create({
192
+ ...updatedOptions,
193
+ resource: resourceType,
194
+ leaseAccessConditions: options.conditions,
195
+ modifiedAccessConditions: options.conditions,
196
+ properties: toProperties(options.metadata),
197
+ cpkInfo: options.customerProvidedKey,
198
+ acl: options.acl ? toAclString(options.acl) : undefined,
199
+ expiryOptions,
200
+ expiresOn,
201
+ }));
179
202
  });
180
203
  }
181
204
  /**
@@ -188,15 +211,25 @@ export class DataLakePathClient extends StorageClient {
188
211
  */
189
212
  async createIfNotExists(resourceType, options = {}) {
190
213
  return tracingClient.withSpan("DataLakePathClient-createIfNotExists", options, async (updatedOptions) => {
191
- var _a, _b;
192
214
  try {
193
215
  const conditions = { ifNoneMatch: ETagAny };
194
- const res = await this.create(resourceType, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }));
195
- return Object.assign({ succeeded: true }, res);
216
+ const res = await this.create(resourceType, {
217
+ ...options,
218
+ conditions,
219
+ tracingOptions: updatedOptions.tracingOptions,
220
+ });
221
+ return {
222
+ succeeded: true,
223
+ ...res,
224
+ };
196
225
  }
197
226
  catch (e) {
198
- if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "PathAlreadyExists") {
199
- return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
227
+ if (e.details?.errorCode === "PathAlreadyExists") {
228
+ return {
229
+ succeeded: false,
230
+ ...e.response?.parsedHeaders,
231
+ _response: e.response,
232
+ };
200
233
  }
201
234
  throw e;
202
235
  }
@@ -213,7 +246,10 @@ export class DataLakePathClient extends StorageClient {
213
246
  */
214
247
  async exists(options = {}) {
215
248
  return tracingClient.withSpan("DataLakeFileClient-exists", options, async (updatedOptions) => {
216
- return this.blobClient.exists(Object.assign(Object.assign({}, updatedOptions), { customerProvidedKey: toBlobCpkInfo(updatedOptions.customerProvidedKey) }));
249
+ return this.blobClient.exists({
250
+ ...updatedOptions,
251
+ customerProvidedKey: toBlobCpkInfo(updatedOptions.customerProvidedKey),
252
+ });
217
253
  });
218
254
  }
219
255
  /**
@@ -243,8 +279,15 @@ export class DataLakePathClient extends StorageClient {
243
279
  let response;
244
280
  // How to handle long delete loop?
245
281
  do {
246
- response = assertResponse(await this.pathContext.delete(Object.assign(Object.assign({}, updatedOptions), { continuation,
247
- recursive, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, abortSignal: options.abortSignal, paginated })));
282
+ response = assertResponse(await this.pathContext.delete({
283
+ ...updatedOptions,
284
+ continuation,
285
+ recursive,
286
+ leaseAccessConditions: options.conditions,
287
+ modifiedAccessConditions: options.conditions,
288
+ abortSignal: options.abortSignal,
289
+ paginated,
290
+ }));
248
291
  continuation = response.continuation;
249
292
  } while (continuation);
250
293
  return response;
@@ -261,14 +304,20 @@ export class DataLakePathClient extends StorageClient {
261
304
  async deleteIfExists(recursive, options = {}) {
262
305
  options.conditions = options.conditions || {};
263
306
  return tracingClient.withSpan("DataLakePathClient-deleteIfExists", options, async (updatedOptions) => {
264
- var _a, _b;
265
307
  try {
266
308
  const res = await this.delete(recursive, updatedOptions);
267
- return Object.assign({ succeeded: true }, res);
309
+ return {
310
+ succeeded: true,
311
+ ...res,
312
+ };
268
313
  }
269
314
  catch (e) {
270
- if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "PathNotFound") {
271
- return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
315
+ if (e.details?.errorCode === "PathNotFound") {
316
+ return {
317
+ succeeded: false,
318
+ ...e.response?.parsedHeaders,
319
+ _response: e.response,
320
+ };
272
321
  }
273
322
  throw e;
274
323
  }
@@ -284,8 +333,20 @@ export class DataLakePathClient extends StorageClient {
284
333
  async getAccessControl(options = {}) {
285
334
  options.conditions = options.conditions || {};
286
335
  return tracingClient.withSpan("DataLakePathClient-getAccessControl", options, async (updatedOptions) => {
287
- const response = assertResponse(await this.pathContext.getProperties(Object.assign(Object.assign({}, updatedOptions), { action: "getAccessControl", upn: options.userPrincipalName, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, abortSignal: options.abortSignal })));
288
- return Object.assign(Object.assign({}, response), { _response: response._response, permissions: toPermissions(response.permissions), acl: toAcl(response.acl) });
336
+ const response = assertResponse(await this.pathContext.getProperties({
337
+ ...updatedOptions,
338
+ action: "getAccessControl",
339
+ upn: options.userPrincipalName,
340
+ leaseAccessConditions: options.conditions,
341
+ modifiedAccessConditions: options.conditions,
342
+ abortSignal: options.abortSignal,
343
+ }));
344
+ return {
345
+ ...response,
346
+ _response: response._response,
347
+ permissions: toPermissions(response.permissions),
348
+ acl: toAcl(response.acl),
349
+ };
289
350
  });
290
351
  }
291
352
  /**
@@ -299,7 +360,12 @@ export class DataLakePathClient extends StorageClient {
299
360
  async setAccessControl(acl, options = {}) {
300
361
  options.conditions = options.conditions || {};
301
362
  return tracingClient.withSpan("DataLakePathClient-setAccessControl", options, async (updatedOptions) => {
302
- return assertResponse(await this.pathContext.setAccessControl(Object.assign(Object.assign({}, updatedOptions), { acl: toAclString(acl), leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions })));
363
+ return assertResponse(await this.pathContext.setAccessControl({
364
+ ...updatedOptions,
365
+ acl: toAclString(acl),
366
+ leaseAccessConditions: options.conditions,
367
+ modifiedAccessConditions: options.conditions,
368
+ }));
303
369
  });
304
370
  }
305
371
  /**
@@ -352,7 +418,12 @@ export class DataLakePathClient extends StorageClient {
352
418
  async setPermissions(permissions, options = {}) {
353
419
  options.conditions = options.conditions || {};
354
420
  return tracingClient.withSpan("DataLakePathClient-setPermissions", options, async (updatedOptions) => {
355
- return assertResponse(await this.pathContext.setAccessControl(Object.assign(Object.assign({}, updatedOptions), { permissions: toPermissionsString(permissions), leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions })));
421
+ return assertResponse(await this.pathContext.setAccessControl({
422
+ ...updatedOptions,
423
+ permissions: toPermissionsString(permissions),
424
+ leaseAccessConditions: options.conditions,
425
+ modifiedAccessConditions: options.conditions,
426
+ }));
356
427
  });
357
428
  }
358
429
  /**
@@ -370,7 +441,11 @@ export class DataLakePathClient extends StorageClient {
370
441
  */
371
442
  async getProperties(options = {}) {
372
443
  return tracingClient.withSpan("DataLakePathClient-getProperties", options, async (updatedOptions) => {
373
- const response = await this.blobClient.getProperties(Object.assign(Object.assign({}, options), { customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey), tracingOptions: updatedOptions.tracingOptions }));
444
+ const response = await this.blobClient.getProperties({
445
+ ...options,
446
+ customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey),
447
+ tracingOptions: updatedOptions.tracingOptions,
448
+ });
374
449
  return ParsePathGetPropertiesExtraHeaderValues(response);
375
450
  });
376
451
  }
@@ -410,7 +485,11 @@ export class DataLakePathClient extends StorageClient {
410
485
  */
411
486
  async setMetadata(metadata, options = {}) {
412
487
  return tracingClient.withSpan("DataLakePathClient-setMetadata", options, async (updatedOptions) => {
413
- return this.blobClient.setMetadata(metadata, Object.assign(Object.assign({}, options), { customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey), tracingOptions: updatedOptions.tracingOptions }));
488
+ return this.blobClient.setMetadata(metadata, {
489
+ ...options,
490
+ customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey),
491
+ tracingOptions: updatedOptions.tracingOptions,
492
+ });
414
493
  });
415
494
  }
416
495
  async move(destinationPathOrFileSystem, destinationPathOrOptions, options) {
@@ -420,10 +499,10 @@ export class DataLakePathClient extends StorageClient {
420
499
  if (typeof destinationPathOrOptions === "string") {
421
500
  destinationFileSystem = destinationPathOrFileSystem;
422
501
  destinationPath = destinationPathOrOptions;
423
- pathMoveOptions = options !== null && options !== void 0 ? options : {};
502
+ pathMoveOptions = options ?? {};
424
503
  }
425
504
  else {
426
- pathMoveOptions = destinationPathOrOptions !== null && destinationPathOrOptions !== void 0 ? destinationPathOrOptions : {};
505
+ pathMoveOptions = destinationPathOrOptions ?? {};
427
506
  }
428
507
  const renameSource = getURLPathAndQuery(this.dfsEndpointUrl);
429
508
  const split = destinationPath.split("?");
@@ -442,14 +521,21 @@ export class DataLakePathClient extends StorageClient {
442
521
  }
443
522
  const destPathClient = new DataLakePathClient(destinationUrl, this.pipeline);
444
523
  return tracingClient.withSpan("DataLakePathClient-move", pathMoveOptions, async (updatedOptions) => {
445
- var _a, _b, _c, _d, _e;
446
- return assertResponse(await destPathClient.pathContext.create(Object.assign(Object.assign({}, updatedOptions), { mode: "legacy", // By default
447
- renameSource, sourceLeaseId: (_a = pathMoveOptions.conditions) === null || _a === void 0 ? void 0 : _a.leaseId, leaseAccessConditions: pathMoveOptions.destinationConditions, sourceModifiedAccessConditions: {
448
- sourceIfMatch: (_b = pathMoveOptions.conditions) === null || _b === void 0 ? void 0 : _b.ifMatch,
449
- sourceIfNoneMatch: (_c = pathMoveOptions.conditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch,
450
- sourceIfModifiedSince: (_d = pathMoveOptions.conditions) === null || _d === void 0 ? void 0 : _d.ifModifiedSince,
451
- sourceIfUnmodifiedSince: (_e = pathMoveOptions.conditions) === null || _e === void 0 ? void 0 : _e.ifUnmodifiedSince,
452
- }, modifiedAccessConditions: pathMoveOptions.destinationConditions, abortSignal: pathMoveOptions.abortSignal })));
524
+ return assertResponse(await destPathClient.pathContext.create({
525
+ ...updatedOptions,
526
+ mode: "legacy", // By default
527
+ renameSource,
528
+ sourceLeaseId: pathMoveOptions.conditions?.leaseId,
529
+ leaseAccessConditions: pathMoveOptions.destinationConditions,
530
+ sourceModifiedAccessConditions: {
531
+ sourceIfMatch: pathMoveOptions.conditions?.ifMatch,
532
+ sourceIfNoneMatch: pathMoveOptions.conditions?.ifNoneMatch,
533
+ sourceIfModifiedSince: pathMoveOptions.conditions?.ifModifiedSince,
534
+ sourceIfUnmodifiedSince: pathMoveOptions.conditions?.ifUnmodifiedSince,
535
+ },
536
+ modifiedAccessConditions: pathMoveOptions.destinationConditions,
537
+ abortSignal: pathMoveOptions.abortSignal,
538
+ }));
453
539
  });
454
540
  }
455
541
  }
@@ -466,7 +552,7 @@ export class DataLakeDirectoryClient extends DataLakePathClient {
466
552
  pathCreateOptions = options;
467
553
  }
468
554
  else {
469
- pathCreateOptions = resourceTypeOrOptions !== null && resourceTypeOrOptions !== void 0 ? resourceTypeOrOptions : {};
555
+ pathCreateOptions = resourceTypeOrOptions ?? {};
470
556
  }
471
557
  return tracingClient.withSpan("DataLakeDirectoryClient-create", pathCreateOptions, async (updatedOptions) => {
472
558
  return super.create("directory", updatedOptions);
@@ -480,7 +566,9 @@ export class DataLakeDirectoryClient extends DataLakePathClient {
480
566
  options = resourceTypeOrOptions || {};
481
567
  }
482
568
  return tracingClient.withSpan("DataLakeDirectoryClient-createIfNotExists", options, async (updatedOptions) => {
483
- return super.createIfNotExists("directory", Object.assign({}, updatedOptions));
569
+ return super.createIfNotExists("directory", {
570
+ ...updatedOptions,
571
+ });
484
572
  });
485
573
  }
486
574
  /**
@@ -517,7 +605,12 @@ export class DataLakeDirectoryClient extends DataLakePathClient {
517
605
  if (!(this.credential instanceof StorageSharedKeyCredential)) {
518
606
  throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
519
607
  }
520
- const sas = generateDataLakeSASQueryParameters(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name, isDirectory: true }, options), this.credential).toString();
608
+ const sas = generateDataLakeSASQueryParameters({
609
+ fileSystemName: this.fileSystemName,
610
+ pathName: this.name,
611
+ isDirectory: true,
612
+ ...options,
613
+ }, this.credential).toString();
521
614
  resolve(appendToURLQuery(this.url, sas));
522
615
  });
523
616
  }
@@ -535,7 +628,12 @@ export class DataLakeDirectoryClient extends DataLakePathClient {
535
628
  if (!(this.credential instanceof StorageSharedKeyCredential)) {
536
629
  throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
537
630
  }
538
- return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name, isDirectory: true }, options), this.credential).stringToSign;
631
+ return generateDataLakeSASQueryParametersInternal({
632
+ fileSystemName: this.fileSystemName,
633
+ pathName: this.name,
634
+ isDirectory: true,
635
+ ...options,
636
+ }, this.credential).stringToSign;
539
637
  }
540
638
  /**
541
639
  * Generates a Service Shared Access Signature (SAS) URI based on the client properties
@@ -549,7 +647,12 @@ export class DataLakeDirectoryClient extends DataLakePathClient {
549
647
  */
550
648
  generateUserDelegationSasUrl(options, userDelegationKey) {
551
649
  return new Promise((resolve) => {
552
- const sas = generateDataLakeSASQueryParameters(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name, isDirectory: true }, options), userDelegationKey, this.accountName).toString();
650
+ const sas = generateDataLakeSASQueryParameters({
651
+ fileSystemName: this.fileSystemName,
652
+ pathName: this.name,
653
+ isDirectory: true,
654
+ ...options,
655
+ }, userDelegationKey, this.accountName).toString();
553
656
  resolve(appendToURLQuery(this.url, sas));
554
657
  });
555
658
  }
@@ -564,13 +667,30 @@ export class DataLakeDirectoryClient extends DataLakePathClient {
564
667
  * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
565
668
  */
566
669
  generateUserDelegationSasStringToSign(options, userDelegationKey) {
567
- return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name, isDirectory: true }, options), userDelegationKey, this.accountName).stringToSign;
670
+ return generateDataLakeSASQueryParametersInternal({
671
+ fileSystemName: this.fileSystemName,
672
+ pathName: this.name,
673
+ isDirectory: true,
674
+ ...options,
675
+ }, userDelegationKey, this.accountName).stringToSign;
568
676
  }
569
677
  }
570
678
  /**
571
679
  * A DataLakeFileClient represents a URL to the Azure Storage file.
572
680
  */
573
681
  export class DataLakeFileClient extends DataLakePathClient {
682
+ /**
683
+ * pathContextInternal provided by protocol layer.
684
+ */
685
+ pathContextInternal;
686
+ /**
687
+ * pathContextInternal provided by protocol layer, with its url pointing to the Blob endpoint.
688
+ */
689
+ pathContextInternalToBlobEndpoint;
690
+ /**
691
+ * blockBlobClientInternal provided by `@azure/storage-blob` package.
692
+ */
693
+ blockBlobClientInternal;
574
694
  constructor(url, credentialOrPipeline,
575
695
  // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.
576
696
  /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */
@@ -602,7 +722,7 @@ export class DataLakeFileClient extends DataLakePathClient {
602
722
  pathCreateOptions = options;
603
723
  }
604
724
  else {
605
- pathCreateOptions = resourceTypeOrOptions !== null && resourceTypeOrOptions !== void 0 ? resourceTypeOrOptions : {};
725
+ pathCreateOptions = resourceTypeOrOptions ?? {};
606
726
  }
607
727
  return tracingClient.withSpan("DataLakeFileClient-create", pathCreateOptions, async (updatedOptions) => {
608
728
  return super.create("file", updatedOptions);
@@ -699,7 +819,10 @@ export class DataLakeFileClient extends DataLakePathClient {
699
819
  */
700
820
  async read(offset = 0, count, options = {}) {
701
821
  return tracingClient.withSpan("DataLakeFileClient-read", options, async (updatedOptions) => {
702
- const rawResponse = await this.blockBlobClientInternal.download(offset, count, Object.assign(Object.assign({}, updatedOptions), { customerProvidedKey: toBlobCpkInfo(updatedOptions.customerProvidedKey) }));
822
+ const rawResponse = await this.blockBlobClientInternal.download(offset, count, {
823
+ ...updatedOptions,
824
+ customerProvidedKey: toBlobCpkInfo(updatedOptions.customerProvidedKey),
825
+ });
703
826
  const response = ParsePathGetPropertiesExtraHeaderValues(rawResponse);
704
827
  if (!isNodeLike && !response.contentAsBlob) {
705
828
  response.contentAsBlob = rawResponse.blobBody;
@@ -727,11 +850,24 @@ export class DataLakeFileClient extends DataLakePathClient {
727
850
  options.conditions = options.conditions || {};
728
851
  return tracingClient.withSpan("DataLakeFileClient-append", options, async (updatedOptions) => {
729
852
  ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
730
- return assertResponse(await this.pathContextInternal.appendData(body, Object.assign(Object.assign({}, updatedOptions), { pathHttpHeaders: {
853
+ return assertResponse(await this.pathContextInternal.appendData(body, {
854
+ ...updatedOptions,
855
+ pathHttpHeaders: {
731
856
  contentMD5: options.transactionalContentMD5,
732
- }, abortSignal: options.abortSignal, position: offset, contentLength: length, leaseAccessConditions: options.conditions, requestOptions: {
857
+ },
858
+ abortSignal: options.abortSignal,
859
+ position: offset,
860
+ contentLength: length,
861
+ leaseAccessConditions: options.conditions,
862
+ requestOptions: {
733
863
  onUploadProgress: options.onProgress,
734
- }, cpkInfo: options.customerProvidedKey, flush: options.flush, proposedLeaseId: options.proposedLeaseId, leaseDuration: options.leaseDurationInSeconds, leaseAction: options.leaseAction })));
864
+ },
865
+ cpkInfo: options.customerProvidedKey,
866
+ flush: options.flush,
867
+ proposedLeaseId: options.proposedLeaseId,
868
+ leaseDuration: options.leaseDurationInSeconds,
869
+ leaseAction: options.leaseAction,
870
+ }));
735
871
  });
736
872
  }
737
873
  /**
@@ -750,7 +886,17 @@ export class DataLakeFileClient extends DataLakePathClient {
750
886
  options.conditions = options.conditions || {};
751
887
  return tracingClient.withSpan("DataLakeFileClient-flush", options, async (updatedOptions) => {
752
888
  ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
753
- return assertResponse(await this.pathContextInternal.flushData(Object.assign(Object.assign({}, updatedOptions), { position, contentLength: 0, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions, cpkInfo: options.customerProvidedKey, proposedLeaseId: options.proposedLeaseId, leaseDuration: options.leaseDurationInSeconds, leaseAction: options.leaseAction })));
889
+ return assertResponse(await this.pathContextInternal.flushData({
890
+ ...updatedOptions,
891
+ position,
892
+ contentLength: 0,
893
+ leaseAccessConditions: options.conditions,
894
+ modifiedAccessConditions: options.conditions,
895
+ cpkInfo: options.customerProvidedKey,
896
+ proposedLeaseId: options.proposedLeaseId,
897
+ leaseDuration: options.leaseDurationInSeconds,
898
+ leaseAction: options.leaseAction,
899
+ }));
754
900
  });
755
901
  }
756
902
  // high level functions
@@ -807,7 +953,6 @@ export class DataLakeFileClient extends DataLakePathClient {
807
953
  }
808
954
  async uploadSeekableInternal(bodyFactory, size, options = {}) {
809
955
  return tracingClient.withSpan("DataLakeFileClient-uploadData", options, async (updatedOptions) => {
810
- var _a;
811
956
  if (size > FILE_MAX_SIZE_BYTES) {
812
957
  throw new RangeError(`size must be <= ${FILE_MAX_SIZE_BYTES}.`);
813
958
  }
@@ -831,7 +976,7 @@ export class DataLakeFileClient extends DataLakePathClient {
831
976
  await createRes;
832
977
  }
833
978
  // After the File is Create, Lease ID is the only valid request parameter.
834
- options.conditions = { leaseId: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.leaseId };
979
+ options.conditions = { leaseId: options.conditions?.leaseId };
835
980
  if (!options.chunkSize) {
836
981
  options.chunkSize = Math.ceil(size / BLOCK_BLOB_MAX_BLOCKS);
837
982
  if (options.chunkSize < FILE_UPLOAD_DEFAULT_CHUNK_SIZE) {
@@ -924,7 +1069,6 @@ export class DataLakeFileClient extends DataLakePathClient {
924
1069
  */
925
1070
  async uploadStream(stream, options = {}) {
926
1071
  return tracingClient.withSpan("DataLakeFileClient-uploadStream", options, async (updatedOptions) => {
927
- var _a;
928
1072
  // Create the file
929
1073
  await this.create({
930
1074
  abortSignal: options.abortSignal,
@@ -938,7 +1082,7 @@ export class DataLakeFileClient extends DataLakePathClient {
938
1082
  encryptionContext: updatedOptions.encryptionContext,
939
1083
  });
940
1084
  // After the File is Create, Lease ID is the only valid request parameter.
941
- options.conditions = { leaseId: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.leaseId };
1085
+ options.conditions = { leaseId: options.conditions?.leaseId };
942
1086
  if (!options.chunkSize) {
943
1087
  options.chunkSize = FILE_UPLOAD_DEFAULT_CHUNK_SIZE;
944
1088
  }
@@ -998,10 +1142,22 @@ export class DataLakeFileClient extends DataLakePathClient {
998
1142
  }
999
1143
  return tracingClient.withSpan("DataLakeFileClient-readToBuffer", options, async (updatedOptions) => {
1000
1144
  if (buffer) {
1001
- return this.blockBlobClientInternal.downloadToBuffer(buffer, offset, count, Object.assign(Object.assign({}, options), { maxRetryRequestsPerBlock: options.maxRetryRequestsPerChunk, blockSize: options.chunkSize, customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey), tracingOptions: updatedOptions.tracingOptions }));
1145
+ return this.blockBlobClientInternal.downloadToBuffer(buffer, offset, count, {
1146
+ ...options,
1147
+ maxRetryRequestsPerBlock: options.maxRetryRequestsPerChunk,
1148
+ blockSize: options.chunkSize,
1149
+ customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey),
1150
+ tracingOptions: updatedOptions.tracingOptions,
1151
+ });
1002
1152
  }
1003
1153
  else {
1004
- return this.blockBlobClientInternal.downloadToBuffer(offset, count, Object.assign(Object.assign({}, options), { maxRetryRequestsPerBlock: options.maxRetryRequestsPerChunk, blockSize: options.chunkSize, customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey), tracingOptions: updatedOptions.tracingOptions }));
1154
+ return this.blockBlobClientInternal.downloadToBuffer(offset, count, {
1155
+ ...options,
1156
+ maxRetryRequestsPerBlock: options.maxRetryRequestsPerChunk,
1157
+ blockSize: options.chunkSize,
1158
+ customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey),
1159
+ tracingOptions: updatedOptions.tracingOptions,
1160
+ });
1005
1161
  }
1006
1162
  });
1007
1163
  }
@@ -1023,7 +1179,10 @@ export class DataLakeFileClient extends DataLakePathClient {
1023
1179
  */
1024
1180
  async readToFile(filePath, offset = 0, count, options = {}) {
1025
1181
  return tracingClient.withSpan("DataLakeFileClient-readToFile", options, async (updatedOptions) => {
1026
- const rawResposne = await this.blockBlobClientInternal.downloadToFile(filePath, offset, count, Object.assign(Object.assign({}, updatedOptions), { customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey) }));
1182
+ const rawResposne = await this.blockBlobClientInternal.downloadToFile(filePath, offset, count, {
1183
+ ...updatedOptions,
1184
+ customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey),
1185
+ });
1027
1186
  const response = ParsePathGetPropertiesExtraHeaderValues(rawResposne);
1028
1187
  return response;
1029
1188
  });
@@ -1074,7 +1233,10 @@ export class DataLakeFileClient extends DataLakePathClient {
1074
1233
  */
1075
1234
  async query(query, options = {}) {
1076
1235
  return tracingClient.withSpan("DataLakeFileClient-query", options, async (updatedOptions) => {
1077
- const rawResponse = await this.blockBlobClientInternal.query(query, Object.assign(Object.assign({}, updatedOptions), { customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey) }));
1236
+ const rawResponse = await this.blockBlobClientInternal.query(query, {
1237
+ ...updatedOptions,
1238
+ customerProvidedKey: toBlobCpkInfo(options.customerProvidedKey),
1239
+ });
1078
1240
  const response = rawResponse;
1079
1241
  if (!isNodeLike && !response.contentAsBlob) {
1080
1242
  response.contentAsBlob = rawResponse.blobBody;
@@ -1095,7 +1257,6 @@ export class DataLakeFileClient extends DataLakePathClient {
1095
1257
  */
1096
1258
  async setExpiry(mode, options = {}) {
1097
1259
  return tracingClient.withSpan("DataLakeFileClient-setExpiry", options, async (updatedOptions) => {
1098
- var _a;
1099
1260
  let expiresOn = undefined;
1100
1261
  if (mode === "RelativeToNow" || mode === "RelativeToCreation") {
1101
1262
  if (!options.timeToExpireInMs) {
@@ -1110,12 +1271,15 @@ export class DataLakeFileClient extends DataLakePathClient {
1110
1271
  }
1111
1272
  const now = new Date();
1112
1273
  if (!(options.expiresOn.getTime() > now.getTime())) {
1113
- throw new Error(`options.expiresOn should be later than now: ${now.toUTCString()} when using mode ${mode}, but is ${(_a = options.expiresOn) === null || _a === void 0 ? void 0 : _a.toUTCString()}`);
1274
+ throw new Error(`options.expiresOn should be later than now: ${now.toUTCString()} when using mode ${mode}, but is ${options.expiresOn?.toUTCString()}`);
1114
1275
  }
1115
1276
  expiresOn = options.expiresOn.toUTCString();
1116
1277
  }
1117
- const adaptedOptions = Object.assign(Object.assign({}, options), { expiresOn });
1118
- return assertResponse(await this.pathContextInternalToBlobEndpoint.setExpiry(mode, Object.assign(Object.assign({}, adaptedOptions), { tracingOptions: updatedOptions.tracingOptions })));
1278
+ const adaptedOptions = { ...options, expiresOn };
1279
+ return assertResponse(await this.pathContextInternalToBlobEndpoint.setExpiry(mode, {
1280
+ ...adaptedOptions,
1281
+ tracingOptions: updatedOptions.tracingOptions,
1282
+ }));
1119
1283
  });
1120
1284
  }
1121
1285
  /**
@@ -1134,7 +1298,11 @@ export class DataLakeFileClient extends DataLakePathClient {
1134
1298
  if (!(this.credential instanceof StorageSharedKeyCredential)) {
1135
1299
  throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
1136
1300
  }
1137
- const sas = generateDataLakeSASQueryParameters(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name }, options), this.credential).toString();
1301
+ const sas = generateDataLakeSASQueryParameters({
1302
+ fileSystemName: this.fileSystemName,
1303
+ pathName: this.name,
1304
+ ...options,
1305
+ }, this.credential).toString();
1138
1306
  resolve(appendToURLQuery(this.url, sas));
1139
1307
  });
1140
1308
  }
@@ -1154,7 +1322,11 @@ export class DataLakeFileClient extends DataLakePathClient {
1154
1322
  if (!(this.credential instanceof StorageSharedKeyCredential)) {
1155
1323
  throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");
1156
1324
  }
1157
- return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name }, options), this.credential).stringToSign;
1325
+ return generateDataLakeSASQueryParametersInternal({
1326
+ fileSystemName: this.fileSystemName,
1327
+ pathName: this.name,
1328
+ ...options,
1329
+ }, this.credential).stringToSign;
1158
1330
  }
1159
1331
  /**
1160
1332
  * Generates a Service Shared Access Signature (SAS) URI based on the client properties
@@ -1168,7 +1340,11 @@ export class DataLakeFileClient extends DataLakePathClient {
1168
1340
  */
1169
1341
  generateUserDelegationSasUrl(options, userDelegationKey) {
1170
1342
  return new Promise((resolve) => {
1171
- const sas = generateDataLakeSASQueryParameters(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name }, options), userDelegationKey, this.accountName).toString();
1343
+ const sas = generateDataLakeSASQueryParameters({
1344
+ fileSystemName: this.fileSystemName,
1345
+ pathName: this.name,
1346
+ ...options,
1347
+ }, userDelegationKey, this.accountName).toString();
1172
1348
  resolve(appendToURLQuery(this.url, sas));
1173
1349
  });
1174
1350
  }
@@ -1183,7 +1359,11 @@ export class DataLakeFileClient extends DataLakePathClient {
1183
1359
  * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
1184
1360
  */
1185
1361
  generateUserDelegationSasStringToSign(options, userDelegationKey) {
1186
- return generateDataLakeSASQueryParametersInternal(Object.assign({ fileSystemName: this.fileSystemName, pathName: this.name }, options), userDelegationKey, this.accountName).stringToSign;
1362
+ return generateDataLakeSASQueryParametersInternal({
1363
+ fileSystemName: this.fileSystemName,
1364
+ pathName: this.name,
1365
+ ...options,
1366
+ }, userDelegationKey, this.accountName).stringToSign;
1187
1367
  }
1188
1368
  }
1189
1369
  //# sourceMappingURL=clients.js.map