@azure/storage-blob 12.9.0-beta.1 → 12.9.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +34 -5
  2. package/README.md +11 -10
  3. package/dist/index.js +1339 -464
  4. package/dist/index.js.map +1 -1
  5. package/dist-esm/storage-blob/src/BatchResponseParser.js +2 -2
  6. package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -1
  7. package/dist-esm/storage-blob/src/BlobBatch.js +8 -8
  8. package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -1
  9. package/dist-esm/storage-blob/src/BlobBatchClient.js +2 -2
  10. package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
  11. package/dist-esm/storage-blob/src/BlobDownloadResponse.js +1 -1
  12. package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -1
  13. package/dist-esm/storage-blob/src/BlobLeaseClient.js +5 -5
  14. package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
  15. package/dist-esm/storage-blob/src/BlobQueryResponse.browser.js.map +1 -1
  16. package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -1
  17. package/dist-esm/storage-blob/src/BlobServiceClient.js +25 -20
  18. package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
  19. package/dist-esm/storage-blob/src/Clients.js +105 -100
  20. package/dist-esm/storage-blob/src/Clients.js.map +1 -1
  21. package/dist-esm/storage-blob/src/ContainerClient.js +262 -41
  22. package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
  23. package/dist-esm/storage-blob/src/PageBlobRangeResponse.js +3 -3
  24. package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -1
  25. package/dist-esm/storage-blob/src/Pipeline.js +9 -7
  26. package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
  27. package/dist-esm/storage-blob/src/TelemetryPolicyFactory.js +1 -1
  28. package/dist-esm/storage-blob/src/TelemetryPolicyFactory.js.map +1 -1
  29. package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js +1 -3
  30. package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +1 -1
  31. package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js +1 -3
  32. package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map +1 -1
  33. package/dist-esm/storage-blob/src/generated/src/models/index.js.map +1 -1
  34. package/dist-esm/storage-blob/src/generated/src/models/mappers.js +81 -4
  35. package/dist-esm/storage-blob/src/generated/src/models/mappers.js.map +1 -1
  36. package/dist-esm/storage-blob/src/generated/src/models/parameters.js +2 -2
  37. package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +1 -1
  38. package/dist-esm/storage-blob/src/generated/src/operations/container.js +41 -0
  39. package/dist-esm/storage-blob/src/generated/src/operations/container.js.map +1 -1
  40. package/dist-esm/storage-blob/src/generated/src/storageClientContext.js +2 -2
  41. package/dist-esm/storage-blob/src/generated/src/storageClientContext.js.map +1 -1
  42. package/dist-esm/storage-blob/src/generatedModels.js.map +1 -1
  43. package/dist-esm/storage-blob/src/index.browser.js +1 -1
  44. package/dist-esm/storage-blob/src/index.browser.js.map +1 -1
  45. package/dist-esm/storage-blob/src/index.js +1 -1
  46. package/dist-esm/storage-blob/src/index.js.map +1 -1
  47. package/dist-esm/storage-blob/src/models.js +14 -0
  48. package/dist-esm/storage-blob/src/models.js.map +1 -1
  49. package/dist-esm/storage-blob/src/policies/StorageBearerTokenChallengeAuthenticationPolicy.js +245 -0
  50. package/dist-esm/storage-blob/src/policies/StorageBearerTokenChallengeAuthenticationPolicy.js.map +1 -0
  51. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js +1 -1
  52. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +1 -1
  53. package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +5 -5
  54. package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -1
  55. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +4 -2
  56. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  57. package/dist-esm/storage-blob/src/policies/TelemetryPolicy.js +1 -1
  58. package/dist-esm/storage-blob/src/policies/TelemetryPolicy.js.map +1 -1
  59. package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js +3 -3
  60. package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
  61. package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +2 -2
  62. package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -1
  63. package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +11 -6
  64. package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -1
  65. package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js +13 -0
  66. package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map +1 -1
  67. package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +2 -2
  68. package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -1
  69. package/dist-esm/storage-blob/src/utils/Batch.js.map +1 -1
  70. package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js +1 -1
  71. package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -1
  72. package/dist-esm/storage-blob/src/utils/Mutex.js.map +1 -1
  73. package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +1 -2
  74. package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -1
  75. package/dist-esm/storage-blob/src/utils/constants.js +9 -8
  76. package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
  77. package/dist-esm/storage-blob/src/utils/tracing.js +2 -2
  78. package/dist-esm/storage-blob/src/utils/tracing.js.map +1 -1
  79. package/dist-esm/storage-blob/src/utils/utils.common.js +212 -16
  80. package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
  81. package/dist-esm/storage-internal-avro/src/AvroParser.js.map +1 -1
  82. package/dist-esm/storage-internal-avro/src/AvroReader.js +8 -8
  83. package/dist-esm/storage-internal-avro/src/AvroReader.js.map +1 -1
  84. package/package.json +40 -49
  85. package/{typings → types}/3.1/storage-blob.d.ts +226 -9
  86. package/{typings → types}/latest/storage-blob.d.ts +206 -11
package/dist/index.js CHANGED
@@ -16,6 +16,29 @@ var events = require('events');
16
16
  var fs = require('fs');
17
17
  var util = require('util');
18
18
 
19
+ function _interopNamespace(e) {
20
+ if (e && e.__esModule) return e;
21
+ var n = Object.create(null);
22
+ if (e) {
23
+ Object.keys(e).forEach(function (k) {
24
+ if (k !== 'default') {
25
+ var d = Object.getOwnPropertyDescriptor(e, k);
26
+ Object.defineProperty(n, k, d.get ? d : {
27
+ enumerable: true,
28
+ get: function () { return e[k]; }
29
+ });
30
+ }
31
+ });
32
+ }
33
+ n["default"] = e;
34
+ return Object.freeze(n);
35
+ }
36
+
37
+ var coreHttp__namespace = /*#__PURE__*/_interopNamespace(coreHttp);
38
+ var os__namespace = /*#__PURE__*/_interopNamespace(os);
39
+ var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
40
+ var util__namespace = /*#__PURE__*/_interopNamespace(util);
41
+
19
42
  /*
20
43
  * Copyright (c) Microsoft Corporation.
21
44
  * Licensed under the MIT License.
@@ -970,10 +993,10 @@ const BlobItemInternal = {
970
993
  modelProperties: {
971
994
  name: {
972
995
  serializedName: "Name",
973
- required: true,
974
996
  xmlName: "Name",
975
997
  type: {
976
- name: "String"
998
+ name: "Composite",
999
+ className: "BlobName"
977
1000
  }
978
1001
  },
979
1002
  deleted: {
@@ -1048,6 +1071,30 @@ const BlobItemInternal = {
1048
1071
  }
1049
1072
  }
1050
1073
  };
1074
+ const BlobName = {
1075
+ serializedName: "BlobName",
1076
+ type: {
1077
+ name: "Composite",
1078
+ className: "BlobName",
1079
+ modelProperties: {
1080
+ encoded: {
1081
+ serializedName: "Encoded",
1082
+ xmlName: "Encoded",
1083
+ xmlIsAttribute: true,
1084
+ type: {
1085
+ name: "Boolean"
1086
+ }
1087
+ },
1088
+ content: {
1089
+ serializedName: "content",
1090
+ xmlName: "content",
1091
+ type: {
1092
+ name: "String"
1093
+ }
1094
+ }
1095
+ }
1096
+ }
1097
+ };
1051
1098
  const BlobPropertiesInternal = {
1052
1099
  serializedName: "BlobPropertiesInternal",
1053
1100
  xmlName: "Properties",
@@ -1491,10 +1538,10 @@ const BlobPrefix = {
1491
1538
  modelProperties: {
1492
1539
  name: {
1493
1540
  serializedName: "Name",
1494
- required: true,
1495
1541
  xmlName: "Name",
1496
1542
  type: {
1497
- name: "String"
1543
+ name: "Composite",
1544
+ className: "BlobName"
1498
1545
  }
1499
1546
  }
1500
1547
  }
@@ -3117,6 +3164,59 @@ const ContainerSubmitBatchExceptionHeaders = {
3117
3164
  }
3118
3165
  }
3119
3166
  };
3167
+ const ContainerFilterBlobsHeaders = {
3168
+ serializedName: "Container_filterBlobsHeaders",
3169
+ type: {
3170
+ name: "Composite",
3171
+ className: "ContainerFilterBlobsHeaders",
3172
+ modelProperties: {
3173
+ clientRequestId: {
3174
+ serializedName: "x-ms-client-request-id",
3175
+ xmlName: "x-ms-client-request-id",
3176
+ type: {
3177
+ name: "String"
3178
+ }
3179
+ },
3180
+ requestId: {
3181
+ serializedName: "x-ms-request-id",
3182
+ xmlName: "x-ms-request-id",
3183
+ type: {
3184
+ name: "String"
3185
+ }
3186
+ },
3187
+ version: {
3188
+ serializedName: "x-ms-version",
3189
+ xmlName: "x-ms-version",
3190
+ type: {
3191
+ name: "String"
3192
+ }
3193
+ },
3194
+ date: {
3195
+ serializedName: "date",
3196
+ xmlName: "date",
3197
+ type: {
3198
+ name: "DateTimeRfc1123"
3199
+ }
3200
+ }
3201
+ }
3202
+ }
3203
+ };
3204
+ const ContainerFilterBlobsExceptionHeaders = {
3205
+ serializedName: "Container_filterBlobsExceptionHeaders",
3206
+ type: {
3207
+ name: "Composite",
3208
+ className: "ContainerFilterBlobsExceptionHeaders",
3209
+ modelProperties: {
3210
+ errorCode: {
3211
+ serializedName: "x-ms-error-code",
3212
+ xmlName: "x-ms-error-code",
3213
+ type: {
3214
+ name: "String"
3215
+ }
3216
+ }
3217
+ }
3218
+ }
3219
+ };
3120
3220
  const ContainerAcquireLeaseHeaders = {
3121
3221
  serializedName: "Container_acquireLeaseHeaders",
3122
3222
  type: {
@@ -8149,6 +8249,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
8149
8249
  ListBlobsFlatSegmentResponse: ListBlobsFlatSegmentResponse,
8150
8250
  BlobFlatListSegment: BlobFlatListSegment,
8151
8251
  BlobItemInternal: BlobItemInternal,
8252
+ BlobName: BlobName,
8152
8253
  BlobPropertiesInternal: BlobPropertiesInternal,
8153
8254
  ListBlobsHierarchySegmentResponse: ListBlobsHierarchySegmentResponse,
8154
8255
  BlobHierarchyListSegment: BlobHierarchyListSegment,
@@ -8200,6 +8301,8 @@ var Mappers = /*#__PURE__*/Object.freeze({
8200
8301
  ContainerRenameExceptionHeaders: ContainerRenameExceptionHeaders,
8201
8302
  ContainerSubmitBatchHeaders: ContainerSubmitBatchHeaders,
8202
8303
  ContainerSubmitBatchExceptionHeaders: ContainerSubmitBatchExceptionHeaders,
8304
+ ContainerFilterBlobsHeaders: ContainerFilterBlobsHeaders,
8305
+ ContainerFilterBlobsExceptionHeaders: ContainerFilterBlobsExceptionHeaders,
8203
8306
  ContainerAcquireLeaseHeaders: ContainerAcquireLeaseHeaders,
8204
8307
  ContainerAcquireLeaseExceptionHeaders: ContainerAcquireLeaseExceptionHeaders,
8205
8308
  ContainerReleaseLeaseHeaders: ContainerReleaseLeaseHeaders,
@@ -8387,7 +8490,7 @@ const timeoutInSeconds = {
8387
8490
  const version = {
8388
8491
  parameterPath: "version",
8389
8492
  mapper: {
8390
- defaultValue: "2020-12-06",
8493
+ defaultValue: "2021-04-10",
8391
8494
  isConstant: true,
8392
8495
  serializedName: "x-ms-version",
8393
8496
  type: {
@@ -8482,7 +8585,7 @@ const include = {
8482
8585
  element: {
8483
8586
  type: {
8484
8587
  name: "Enum",
8485
- allowedValues: ["metadata", "deleted"]
8588
+ allowedValues: ["metadata", "deleted", "system"]
8486
8589
  }
8487
8590
  }
8488
8591
  }
@@ -9925,7 +10028,7 @@ class Service {
9925
10028
  setProperties(blobServiceProperties, options) {
9926
10029
  const operationArguments = {
9927
10030
  blobServiceProperties,
9928
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10031
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
9929
10032
  };
9930
10033
  return this.client.sendOperationRequest(operationArguments, setPropertiesOperationSpec);
9931
10034
  }
@@ -9936,9 +10039,9 @@ class Service {
9936
10039
  */
9937
10040
  getProperties(options) {
9938
10041
  const operationArguments = {
9939
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10042
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
9940
10043
  };
9941
- return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);
10044
+ return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$2);
9942
10045
  }
9943
10046
  /**
9944
10047
  * Retrieves statistics related to replication for the Blob service. It is only available on the
@@ -9948,7 +10051,7 @@ class Service {
9948
10051
  */
9949
10052
  getStatistics(options) {
9950
10053
  const operationArguments = {
9951
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10054
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
9952
10055
  };
9953
10056
  return this.client.sendOperationRequest(operationArguments, getStatisticsOperationSpec);
9954
10057
  }
@@ -9958,7 +10061,7 @@ class Service {
9958
10061
  */
9959
10062
  listContainersSegment(options) {
9960
10063
  const operationArguments = {
9961
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10064
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
9962
10065
  };
9963
10066
  return this.client.sendOperationRequest(operationArguments, listContainersSegmentOperationSpec);
9964
10067
  }
@@ -9971,7 +10074,7 @@ class Service {
9971
10074
  getUserDelegationKey(keyInfo, options) {
9972
10075
  const operationArguments = {
9973
10076
  keyInfo,
9974
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10077
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
9975
10078
  };
9976
10079
  return this.client.sendOperationRequest(operationArguments, getUserDelegationKeyOperationSpec);
9977
10080
  }
@@ -9981,9 +10084,9 @@ class Service {
9981
10084
  */
9982
10085
  getAccountInfo(options) {
9983
10086
  const operationArguments = {
9984
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10087
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
9985
10088
  };
9986
- return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec);
10089
+ return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$2);
9987
10090
  }
9988
10091
  /**
9989
10092
  * The Batch operation allows multiple API calls to be embedded into a single HTTP request.
@@ -9998,9 +10101,9 @@ class Service {
9998
10101
  contentLength,
9999
10102
  multipartContentType,
10000
10103
  body,
10001
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10104
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10002
10105
  };
10003
- return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec);
10106
+ return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec$1);
10004
10107
  }
10005
10108
  /**
10006
10109
  * The Filter Blobs operation enables callers to list blobs across all containers whose tags match a
@@ -10010,13 +10113,13 @@ class Service {
10010
10113
  */
10011
10114
  filterBlobs(options) {
10012
10115
  const operationArguments = {
10013
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10116
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10014
10117
  };
10015
- return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec);
10118
+ return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec$1);
10016
10119
  }
10017
10120
  }
10018
10121
  // Operation Specifications
10019
- const xmlSerializer = new coreHttp.Serializer(Mappers, /* isXml */ true);
10122
+ const xmlSerializer$5 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
10020
10123
  const setPropertiesOperationSpec = {
10021
10124
  path: "/",
10022
10125
  httpMethod: "PUT",
@@ -10045,9 +10148,9 @@ const setPropertiesOperationSpec = {
10045
10148
  isXML: true,
10046
10149
  contentType: "application/xml; charset=utf-8",
10047
10150
  mediaType: "xml",
10048
- serializer: xmlSerializer
10151
+ serializer: xmlSerializer$5
10049
10152
  };
10050
- const getPropertiesOperationSpec = {
10153
+ const getPropertiesOperationSpec$2 = {
10051
10154
  path: "/",
10052
10155
  httpMethod: "GET",
10053
10156
  responses: {
@@ -10072,7 +10175,7 @@ const getPropertiesOperationSpec = {
10072
10175
  accept1
10073
10176
  ],
10074
10177
  isXML: true,
10075
- serializer: xmlSerializer
10178
+ serializer: xmlSerializer$5
10076
10179
  };
10077
10180
  const getStatisticsOperationSpec = {
10078
10181
  path: "/",
@@ -10099,7 +10202,7 @@ const getStatisticsOperationSpec = {
10099
10202
  accept1
10100
10203
  ],
10101
10204
  isXML: true,
10102
- serializer: xmlSerializer
10205
+ serializer: xmlSerializer$5
10103
10206
  };
10104
10207
  const listContainersSegmentOperationSpec = {
10105
10208
  path: "/",
@@ -10129,7 +10232,7 @@ const listContainersSegmentOperationSpec = {
10129
10232
  accept1
10130
10233
  ],
10131
10234
  isXML: true,
10132
- serializer: xmlSerializer
10235
+ serializer: xmlSerializer$5
10133
10236
  };
10134
10237
  const getUserDelegationKeyOperationSpec = {
10135
10238
  path: "/",
@@ -10160,9 +10263,9 @@ const getUserDelegationKeyOperationSpec = {
10160
10263
  isXML: true,
10161
10264
  contentType: "application/xml; charset=utf-8",
10162
10265
  mediaType: "xml",
10163
- serializer: xmlSerializer
10266
+ serializer: xmlSerializer$5
10164
10267
  };
10165
- const getAccountInfoOperationSpec = {
10268
+ const getAccountInfoOperationSpec$2 = {
10166
10269
  path: "/",
10167
10270
  httpMethod: "GET",
10168
10271
  responses: {
@@ -10178,9 +10281,9 @@ const getAccountInfoOperationSpec = {
10178
10281
  urlParameters: [url],
10179
10282
  headerParameters: [version, accept1],
10180
10283
  isXML: true,
10181
- serializer: xmlSerializer
10284
+ serializer: xmlSerializer$5
10182
10285
  };
10183
- const submitBatchOperationSpec = {
10286
+ const submitBatchOperationSpec$1 = {
10184
10287
  path: "/",
10185
10288
  httpMethod: "POST",
10186
10289
  responses: {
@@ -10210,9 +10313,9 @@ const submitBatchOperationSpec = {
10210
10313
  isXML: true,
10211
10314
  contentType: "application/xml; charset=utf-8",
10212
10315
  mediaType: "xml",
10213
- serializer: xmlSerializer
10316
+ serializer: xmlSerializer$5
10214
10317
  };
10215
- const filterBlobsOperationSpec = {
10318
+ const filterBlobsOperationSpec$1 = {
10216
10319
  path: "/",
10217
10320
  httpMethod: "GET",
10218
10321
  responses: {
@@ -10239,7 +10342,7 @@ const filterBlobsOperationSpec = {
10239
10342
  accept1
10240
10343
  ],
10241
10344
  isXML: true,
10242
- serializer: xmlSerializer
10345
+ serializer: xmlSerializer$5
10243
10346
  };
10244
10347
 
10245
10348
  /*
@@ -10265,9 +10368,9 @@ class Container {
10265
10368
  */
10266
10369
  create(options) {
10267
10370
  const operationArguments = {
10268
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10371
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10269
10372
  };
10270
- return this.client.sendOperationRequest(operationArguments, createOperationSpec);
10373
+ return this.client.sendOperationRequest(operationArguments, createOperationSpec$2);
10271
10374
  }
10272
10375
  /**
10273
10376
  * returns all user-defined metadata and system properties for the specified container. The data
@@ -10276,7 +10379,7 @@ class Container {
10276
10379
  */
10277
10380
  getProperties(options) {
10278
10381
  const operationArguments = {
10279
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10382
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10280
10383
  };
10281
10384
  return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$1);
10282
10385
  }
@@ -10287,9 +10390,9 @@ class Container {
10287
10390
  */
10288
10391
  delete(options) {
10289
10392
  const operationArguments = {
10290
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10393
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10291
10394
  };
10292
- return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
10395
+ return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1);
10293
10396
  }
10294
10397
  /**
10295
10398
  * operation sets one or more user-defined name-value pairs for the specified container.
@@ -10297,9 +10400,9 @@ class Container {
10297
10400
  */
10298
10401
  setMetadata(options) {
10299
10402
  const operationArguments = {
10300
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10403
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10301
10404
  };
10302
- return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec);
10405
+ return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec$1);
10303
10406
  }
10304
10407
  /**
10305
10408
  * gets the permissions for the specified container. The permissions indicate whether container data
@@ -10308,7 +10411,7 @@ class Container {
10308
10411
  */
10309
10412
  getAccessPolicy(options) {
10310
10413
  const operationArguments = {
10311
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10414
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10312
10415
  };
10313
10416
  return this.client.sendOperationRequest(operationArguments, getAccessPolicyOperationSpec);
10314
10417
  }
@@ -10319,7 +10422,7 @@ class Container {
10319
10422
  */
10320
10423
  setAccessPolicy(options) {
10321
10424
  const operationArguments = {
10322
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10425
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10323
10426
  };
10324
10427
  return this.client.sendOperationRequest(operationArguments, setAccessPolicyOperationSpec);
10325
10428
  }
@@ -10329,7 +10432,7 @@ class Container {
10329
10432
  */
10330
10433
  restore(options) {
10331
10434
  const operationArguments = {
10332
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10435
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10333
10436
  };
10334
10437
  return this.client.sendOperationRequest(operationArguments, restoreOperationSpec);
10335
10438
  }
@@ -10341,7 +10444,7 @@ class Container {
10341
10444
  rename(sourceContainerName, options) {
10342
10445
  const operationArguments = {
10343
10446
  sourceContainerName,
10344
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10447
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10345
10448
  };
10346
10449
  return this.client.sendOperationRequest(operationArguments, renameOperationSpec);
10347
10450
  }
@@ -10358,9 +10461,20 @@ class Container {
10358
10461
  contentLength,
10359
10462
  multipartContentType,
10360
10463
  body,
10361
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10464
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10362
10465
  };
10363
- return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec$1);
10466
+ return this.client.sendOperationRequest(operationArguments, submitBatchOperationSpec);
10467
+ }
10468
+ /**
10469
+ * The Filter Blobs operation enables callers to list blobs in a container whose tags match a given
10470
+ * search expression. Filter blobs searches within the given container.
10471
+ * @param options The options parameters.
10472
+ */
10473
+ filterBlobs(options) {
10474
+ const operationArguments = {
10475
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10476
+ };
10477
+ return this.client.sendOperationRequest(operationArguments, filterBlobsOperationSpec);
10364
10478
  }
10365
10479
  /**
10366
10480
  * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@@ -10369,9 +10483,9 @@ class Container {
10369
10483
  */
10370
10484
  acquireLease(options) {
10371
10485
  const operationArguments = {
10372
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10486
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10373
10487
  };
10374
- return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec);
10488
+ return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec$1);
10375
10489
  }
10376
10490
  /**
10377
10491
  * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@@ -10382,9 +10496,9 @@ class Container {
10382
10496
  releaseLease(leaseId, options) {
10383
10497
  const operationArguments = {
10384
10498
  leaseId,
10385
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10499
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10386
10500
  };
10387
- return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec);
10501
+ return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec$1);
10388
10502
  }
10389
10503
  /**
10390
10504
  * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@@ -10395,9 +10509,9 @@ class Container {
10395
10509
  renewLease(leaseId, options) {
10396
10510
  const operationArguments = {
10397
10511
  leaseId,
10398
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10512
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10399
10513
  };
10400
- return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec);
10514
+ return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec$1);
10401
10515
  }
10402
10516
  /**
10403
10517
  * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@@ -10406,9 +10520,9 @@ class Container {
10406
10520
  */
10407
10521
  breakLease(options) {
10408
10522
  const operationArguments = {
10409
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10523
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10410
10524
  };
10411
- return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec);
10525
+ return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec$1);
10412
10526
  }
10413
10527
  /**
10414
10528
  * [Update] establishes and manages a lock on a container for delete operations. The lock duration can
@@ -10423,9 +10537,9 @@ class Container {
10423
10537
  const operationArguments = {
10424
10538
  leaseId,
10425
10539
  proposedLeaseId,
10426
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10540
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10427
10541
  };
10428
- return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec);
10542
+ return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec$1);
10429
10543
  }
10430
10544
  /**
10431
10545
  * [Update] The List Blobs operation returns a list of the blobs under the specified container
@@ -10433,7 +10547,7 @@ class Container {
10433
10547
  */
10434
10548
  listBlobFlatSegment(options) {
10435
10549
  const operationArguments = {
10436
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10550
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10437
10551
  };
10438
10552
  return this.client.sendOperationRequest(operationArguments, listBlobFlatSegmentOperationSpec);
10439
10553
  }
@@ -10448,7 +10562,7 @@ class Container {
10448
10562
  listBlobHierarchySegment(delimiter, options) {
10449
10563
  const operationArguments = {
10450
10564
  delimiter,
10451
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10565
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10452
10566
  };
10453
10567
  return this.client.sendOperationRequest(operationArguments, listBlobHierarchySegmentOperationSpec);
10454
10568
  }
@@ -10458,14 +10572,14 @@ class Container {
10458
10572
  */
10459
10573
  getAccountInfo(options) {
10460
10574
  const operationArguments = {
10461
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
10575
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10462
10576
  };
10463
10577
  return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$1);
10464
10578
  }
10465
10579
  }
10466
10580
  // Operation Specifications
10467
- const xmlSerializer$1 = new coreHttp.Serializer(Mappers, /* isXml */ true);
10468
- const createOperationSpec = {
10581
+ const xmlSerializer$4 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
10582
+ const createOperationSpec$2 = {
10469
10583
  path: "/{containerName}",
10470
10584
  httpMethod: "PUT",
10471
10585
  responses: {
@@ -10489,7 +10603,7 @@ const createOperationSpec = {
10489
10603
  preventEncryptionScopeOverride
10490
10604
  ],
10491
10605
  isXML: true,
10492
- serializer: xmlSerializer$1
10606
+ serializer: xmlSerializer$4
10493
10607
  };
10494
10608
  const getPropertiesOperationSpec$1 = {
10495
10609
  path: "/{containerName}",
@@ -10512,9 +10626,9 @@ const getPropertiesOperationSpec$1 = {
10512
10626
  leaseId
10513
10627
  ],
10514
10628
  isXML: true,
10515
- serializer: xmlSerializer$1
10629
+ serializer: xmlSerializer$4
10516
10630
  };
10517
- const deleteOperationSpec = {
10631
+ const deleteOperationSpec$1 = {
10518
10632
  path: "/{containerName}",
10519
10633
  httpMethod: "DELETE",
10520
10634
  responses: {
@@ -10537,9 +10651,9 @@ const deleteOperationSpec = {
10537
10651
  ifUnmodifiedSince
10538
10652
  ],
10539
10653
  isXML: true,
10540
- serializer: xmlSerializer$1
10654
+ serializer: xmlSerializer$4
10541
10655
  };
10542
- const setMetadataOperationSpec = {
10656
+ const setMetadataOperationSpec$1 = {
10543
10657
  path: "/{containerName}",
10544
10658
  httpMethod: "PUT",
10545
10659
  responses: {
@@ -10566,7 +10680,7 @@ const setMetadataOperationSpec = {
10566
10680
  ifModifiedSince
10567
10681
  ],
10568
10682
  isXML: true,
10569
- serializer: xmlSerializer$1
10683
+ serializer: xmlSerializer$4
10570
10684
  };
10571
10685
  const getAccessPolicyOperationSpec = {
10572
10686
  path: "/{containerName}",
@@ -10605,7 +10719,7 @@ const getAccessPolicyOperationSpec = {
10605
10719
  leaseId
10606
10720
  ],
10607
10721
  isXML: true,
10608
- serializer: xmlSerializer$1
10722
+ serializer: xmlSerializer$4
10609
10723
  };
10610
10724
  const setAccessPolicyOperationSpec = {
10611
10725
  path: "/{containerName}",
@@ -10639,7 +10753,7 @@ const setAccessPolicyOperationSpec = {
10639
10753
  isXML: true,
10640
10754
  contentType: "application/xml; charset=utf-8",
10641
10755
  mediaType: "xml",
10642
- serializer: xmlSerializer$1
10756
+ serializer: xmlSerializer$4
10643
10757
  };
10644
10758
  const restoreOperationSpec = {
10645
10759
  path: "/{containerName}",
@@ -10667,7 +10781,7 @@ const restoreOperationSpec = {
10667
10781
  deletedContainerVersion
10668
10782
  ],
10669
10783
  isXML: true,
10670
- serializer: xmlSerializer$1
10784
+ serializer: xmlSerializer$4
10671
10785
  };
10672
10786
  const renameOperationSpec = {
10673
10787
  path: "/{containerName}",
@@ -10695,9 +10809,9 @@ const renameOperationSpec = {
10695
10809
  sourceLeaseId
10696
10810
  ],
10697
10811
  isXML: true,
10698
- serializer: xmlSerializer$1
10812
+ serializer: xmlSerializer$4
10699
10813
  };
10700
- const submitBatchOperationSpec$1 = {
10814
+ const submitBatchOperationSpec = {
10701
10815
  path: "/{containerName}",
10702
10816
  httpMethod: "POST",
10703
10817
  responses: {
@@ -10731,9 +10845,39 @@ const submitBatchOperationSpec$1 = {
10731
10845
  isXML: true,
10732
10846
  contentType: "application/xml; charset=utf-8",
10733
10847
  mediaType: "xml",
10734
- serializer: xmlSerializer$1
10848
+ serializer: xmlSerializer$4
10735
10849
  };
10736
- const acquireLeaseOperationSpec = {
10850
+ const filterBlobsOperationSpec = {
10851
+ path: "/{containerName}",
10852
+ httpMethod: "GET",
10853
+ responses: {
10854
+ 200: {
10855
+ bodyMapper: FilterBlobSegment,
10856
+ headersMapper: ContainerFilterBlobsHeaders
10857
+ },
10858
+ default: {
10859
+ bodyMapper: StorageError,
10860
+ headersMapper: ContainerFilterBlobsExceptionHeaders
10861
+ }
10862
+ },
10863
+ queryParameters: [
10864
+ timeoutInSeconds,
10865
+ marker,
10866
+ maxPageSize,
10867
+ comp5,
10868
+ where,
10869
+ restype2
10870
+ ],
10871
+ urlParameters: [url],
10872
+ headerParameters: [
10873
+ version,
10874
+ requestId,
10875
+ accept1
10876
+ ],
10877
+ isXML: true,
10878
+ serializer: xmlSerializer$4
10879
+ };
10880
+ const acquireLeaseOperationSpec$1 = {
10737
10881
  path: "/{containerName}",
10738
10882
  httpMethod: "PUT",
10739
10883
  responses: {
@@ -10762,9 +10906,9 @@ const acquireLeaseOperationSpec = {
10762
10906
  proposedLeaseId
10763
10907
  ],
10764
10908
  isXML: true,
10765
- serializer: xmlSerializer$1
10909
+ serializer: xmlSerializer$4
10766
10910
  };
10767
- const releaseLeaseOperationSpec = {
10911
+ const releaseLeaseOperationSpec$1 = {
10768
10912
  path: "/{containerName}",
10769
10913
  httpMethod: "PUT",
10770
10914
  responses: {
@@ -10792,9 +10936,9 @@ const releaseLeaseOperationSpec = {
10792
10936
  leaseId1
10793
10937
  ],
10794
10938
  isXML: true,
10795
- serializer: xmlSerializer$1
10939
+ serializer: xmlSerializer$4
10796
10940
  };
10797
- const renewLeaseOperationSpec = {
10941
+ const renewLeaseOperationSpec$1 = {
10798
10942
  path: "/{containerName}",
10799
10943
  httpMethod: "PUT",
10800
10944
  responses: {
@@ -10822,9 +10966,9 @@ const renewLeaseOperationSpec = {
10822
10966
  action2
10823
10967
  ],
10824
10968
  isXML: true,
10825
- serializer: xmlSerializer$1
10969
+ serializer: xmlSerializer$4
10826
10970
  };
10827
- const breakLeaseOperationSpec = {
10971
+ const breakLeaseOperationSpec$1 = {
10828
10972
  path: "/{containerName}",
10829
10973
  httpMethod: "PUT",
10830
10974
  responses: {
@@ -10852,9 +10996,9 @@ const breakLeaseOperationSpec = {
10852
10996
  breakPeriod
10853
10997
  ],
10854
10998
  isXML: true,
10855
- serializer: xmlSerializer$1
10999
+ serializer: xmlSerializer$4
10856
11000
  };
10857
- const changeLeaseOperationSpec = {
11001
+ const changeLeaseOperationSpec$1 = {
10858
11002
  path: "/{containerName}",
10859
11003
  httpMethod: "PUT",
10860
11004
  responses: {
@@ -10883,7 +11027,7 @@ const changeLeaseOperationSpec = {
10883
11027
  proposedLeaseId1
10884
11028
  ],
10885
11029
  isXML: true,
10886
- serializer: xmlSerializer$1
11030
+ serializer: xmlSerializer$4
10887
11031
  };
10888
11032
  const listBlobFlatSegmentOperationSpec = {
10889
11033
  path: "/{containerName}",
@@ -10914,7 +11058,7 @@ const listBlobFlatSegmentOperationSpec = {
10914
11058
  accept1
10915
11059
  ],
10916
11060
  isXML: true,
10917
- serializer: xmlSerializer$1
11061
+ serializer: xmlSerializer$4
10918
11062
  };
10919
11063
  const listBlobHierarchySegmentOperationSpec = {
10920
11064
  path: "/{containerName}",
@@ -10946,7 +11090,7 @@ const listBlobHierarchySegmentOperationSpec = {
10946
11090
  accept1
10947
11091
  ],
10948
11092
  isXML: true,
10949
- serializer: xmlSerializer$1
11093
+ serializer: xmlSerializer$4
10950
11094
  };
10951
11095
  const getAccountInfoOperationSpec$1 = {
10952
11096
  path: "/{containerName}",
@@ -10964,7 +11108,7 @@ const getAccountInfoOperationSpec$1 = {
10964
11108
  urlParameters: [url],
10965
11109
  headerParameters: [version, accept1],
10966
11110
  isXML: true,
10967
- serializer: xmlSerializer$1
11111
+ serializer: xmlSerializer$4
10968
11112
  };
10969
11113
 
10970
11114
  /*
@@ -10990,7 +11134,7 @@ class Blob$1 {
10990
11134
  */
10991
11135
  download(options) {
10992
11136
  const operationArguments = {
10993
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11137
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
10994
11138
  };
10995
11139
  return this.client.sendOperationRequest(operationArguments, downloadOperationSpec);
10996
11140
  }
@@ -11001,9 +11145,9 @@ class Blob$1 {
11001
11145
  */
11002
11146
  getProperties(options) {
11003
11147
  const operationArguments = {
11004
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11148
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11005
11149
  };
11006
- return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec$2);
11150
+ return this.client.sendOperationRequest(operationArguments, getPropertiesOperationSpec);
11007
11151
  }
11008
11152
  /**
11009
11153
  * If the storage account's soft delete feature is disabled then, when a blob is deleted, it is
@@ -11022,9 +11166,9 @@ class Blob$1 {
11022
11166
  */
11023
11167
  delete(options) {
11024
11168
  const operationArguments = {
11025
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11169
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11026
11170
  };
11027
- return this.client.sendOperationRequest(operationArguments, deleteOperationSpec$1);
11171
+ return this.client.sendOperationRequest(operationArguments, deleteOperationSpec);
11028
11172
  }
11029
11173
  /**
11030
11174
  * Undelete a blob that was previously soft deleted
@@ -11032,7 +11176,7 @@ class Blob$1 {
11032
11176
  */
11033
11177
  undelete(options) {
11034
11178
  const operationArguments = {
11035
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11179
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11036
11180
  };
11037
11181
  return this.client.sendOperationRequest(operationArguments, undeleteOperationSpec);
11038
11182
  }
@@ -11044,7 +11188,7 @@ class Blob$1 {
11044
11188
  setExpiry(expiryOptions, options) {
11045
11189
  const operationArguments = {
11046
11190
  expiryOptions,
11047
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11191
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11048
11192
  };
11049
11193
  return this.client.sendOperationRequest(operationArguments, setExpiryOperationSpec);
11050
11194
  }
@@ -11054,7 +11198,7 @@ class Blob$1 {
11054
11198
  */
11055
11199
  setHttpHeaders(options) {
11056
11200
  const operationArguments = {
11057
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11201
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11058
11202
  };
11059
11203
  return this.client.sendOperationRequest(operationArguments, setHttpHeadersOperationSpec);
11060
11204
  }
@@ -11064,7 +11208,7 @@ class Blob$1 {
11064
11208
  */
11065
11209
  setImmutabilityPolicy(options) {
11066
11210
  const operationArguments = {
11067
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11211
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11068
11212
  };
11069
11213
  return this.client.sendOperationRequest(operationArguments, setImmutabilityPolicyOperationSpec);
11070
11214
  }
@@ -11074,7 +11218,7 @@ class Blob$1 {
11074
11218
  */
11075
11219
  deleteImmutabilityPolicy(options) {
11076
11220
  const operationArguments = {
11077
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11221
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11078
11222
  };
11079
11223
  return this.client.sendOperationRequest(operationArguments, deleteImmutabilityPolicyOperationSpec);
11080
11224
  }
@@ -11086,7 +11230,7 @@ class Blob$1 {
11086
11230
  setLegalHold(legalHold, options) {
11087
11231
  const operationArguments = {
11088
11232
  legalHold,
11089
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11233
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11090
11234
  };
11091
11235
  return this.client.sendOperationRequest(operationArguments, setLegalHoldOperationSpec);
11092
11236
  }
@@ -11097,9 +11241,9 @@ class Blob$1 {
11097
11241
  */
11098
11242
  setMetadata(options) {
11099
11243
  const operationArguments = {
11100
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11244
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11101
11245
  };
11102
- return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec$1);
11246
+ return this.client.sendOperationRequest(operationArguments, setMetadataOperationSpec);
11103
11247
  }
11104
11248
  /**
11105
11249
  * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@@ -11108,9 +11252,9 @@ class Blob$1 {
11108
11252
  */
11109
11253
  acquireLease(options) {
11110
11254
  const operationArguments = {
11111
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11255
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11112
11256
  };
11113
- return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec$1);
11257
+ return this.client.sendOperationRequest(operationArguments, acquireLeaseOperationSpec);
11114
11258
  }
11115
11259
  /**
11116
11260
  * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@@ -11121,9 +11265,9 @@ class Blob$1 {
11121
11265
  releaseLease(leaseId, options) {
11122
11266
  const operationArguments = {
11123
11267
  leaseId,
11124
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11268
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11125
11269
  };
11126
- return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec$1);
11270
+ return this.client.sendOperationRequest(operationArguments, releaseLeaseOperationSpec);
11127
11271
  }
11128
11272
  /**
11129
11273
  * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@@ -11134,9 +11278,9 @@ class Blob$1 {
11134
11278
  renewLease(leaseId, options) {
11135
11279
  const operationArguments = {
11136
11280
  leaseId,
11137
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11281
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11138
11282
  };
11139
- return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec$1);
11283
+ return this.client.sendOperationRequest(operationArguments, renewLeaseOperationSpec);
11140
11284
  }
11141
11285
  /**
11142
11286
  * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@@ -11151,9 +11295,9 @@ class Blob$1 {
11151
11295
  const operationArguments = {
11152
11296
  leaseId,
11153
11297
  proposedLeaseId,
11154
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11298
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11155
11299
  };
11156
- return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec$1);
11300
+ return this.client.sendOperationRequest(operationArguments, changeLeaseOperationSpec);
11157
11301
  }
11158
11302
  /**
11159
11303
  * [Update] The Lease Blob operation establishes and manages a lock on a blob for write and delete
@@ -11162,9 +11306,9 @@ class Blob$1 {
11162
11306
  */
11163
11307
  breakLease(options) {
11164
11308
  const operationArguments = {
11165
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11309
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11166
11310
  };
11167
- return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec$1);
11311
+ return this.client.sendOperationRequest(operationArguments, breakLeaseOperationSpec);
11168
11312
  }
11169
11313
  /**
11170
11314
  * The Create Snapshot operation creates a read-only snapshot of a blob
@@ -11172,7 +11316,7 @@ class Blob$1 {
11172
11316
  */
11173
11317
  createSnapshot(options) {
11174
11318
  const operationArguments = {
11175
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11319
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11176
11320
  };
11177
11321
  return this.client.sendOperationRequest(operationArguments, createSnapshotOperationSpec);
11178
11322
  }
@@ -11187,7 +11331,7 @@ class Blob$1 {
11187
11331
  startCopyFromURL(copySource, options) {
11188
11332
  const operationArguments = {
11189
11333
  copySource,
11190
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11334
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11191
11335
  };
11192
11336
  return this.client.sendOperationRequest(operationArguments, startCopyFromURLOperationSpec);
11193
11337
  }
@@ -11203,7 +11347,7 @@ class Blob$1 {
11203
11347
  copyFromURL(copySource, options) {
11204
11348
  const operationArguments = {
11205
11349
  copySource,
11206
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11350
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11207
11351
  };
11208
11352
  return this.client.sendOperationRequest(operationArguments, copyFromURLOperationSpec);
11209
11353
  }
@@ -11217,7 +11361,7 @@ class Blob$1 {
11217
11361
  abortCopyFromURL(copyId, options) {
11218
11362
  const operationArguments = {
11219
11363
  copyId,
11220
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11364
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11221
11365
  };
11222
11366
  return this.client.sendOperationRequest(operationArguments, abortCopyFromURLOperationSpec);
11223
11367
  }
@@ -11233,7 +11377,7 @@ class Blob$1 {
11233
11377
  setTier(tier, options) {
11234
11378
  const operationArguments = {
11235
11379
  tier,
11236
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11380
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11237
11381
  };
11238
11382
  return this.client.sendOperationRequest(operationArguments, setTierOperationSpec);
11239
11383
  }
@@ -11243,9 +11387,9 @@ class Blob$1 {
11243
11387
  */
11244
11388
  getAccountInfo(options) {
11245
11389
  const operationArguments = {
11246
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11390
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11247
11391
  };
11248
- return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec$2);
11392
+ return this.client.sendOperationRequest(operationArguments, getAccountInfoOperationSpec);
11249
11393
  }
11250
11394
  /**
11251
11395
  * The Query operation enables users to select/project on blob data by providing simple query
@@ -11254,7 +11398,7 @@ class Blob$1 {
11254
11398
  */
11255
11399
  query(options) {
11256
11400
  const operationArguments = {
11257
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11401
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11258
11402
  };
11259
11403
  return this.client.sendOperationRequest(operationArguments, queryOperationSpec);
11260
11404
  }
@@ -11264,7 +11408,7 @@ class Blob$1 {
11264
11408
  */
11265
11409
  getTags(options) {
11266
11410
  const operationArguments = {
11267
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11411
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11268
11412
  };
11269
11413
  return this.client.sendOperationRequest(operationArguments, getTagsOperationSpec);
11270
11414
  }
@@ -11274,13 +11418,13 @@ class Blob$1 {
11274
11418
  */
11275
11419
  setTags(options) {
11276
11420
  const operationArguments = {
11277
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
11421
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
11278
11422
  };
11279
11423
  return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec);
11280
11424
  }
11281
11425
  }
11282
11426
  // Operation Specifications
11283
- const xmlSerializer$2 = new coreHttp.Serializer(Mappers, /* isXml */ true);
11427
+ const xmlSerializer$3 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
11284
11428
  const downloadOperationSpec = {
11285
11429
  path: "/{containerName}/{blob}",
11286
11430
  httpMethod: "GET",
@@ -11328,9 +11472,9 @@ const downloadOperationSpec = {
11328
11472
  ifTags
11329
11473
  ],
11330
11474
  isXML: true,
11331
- serializer: xmlSerializer$2
11475
+ serializer: xmlSerializer$3
11332
11476
  };
11333
- const getPropertiesOperationSpec$2 = {
11477
+ const getPropertiesOperationSpec = {
11334
11478
  path: "/{containerName}/{blob}",
11335
11479
  httpMethod: "HEAD",
11336
11480
  responses: {
@@ -11363,9 +11507,9 @@ const getPropertiesOperationSpec$2 = {
11363
11507
  ifTags
11364
11508
  ],
11365
11509
  isXML: true,
11366
- serializer: xmlSerializer$2
11510
+ serializer: xmlSerializer$3
11367
11511
  };
11368
- const deleteOperationSpec$1 = {
11512
+ const deleteOperationSpec = {
11369
11513
  path: "/{containerName}/{blob}",
11370
11514
  httpMethod: "DELETE",
11371
11515
  responses: {
@@ -11397,7 +11541,7 @@ const deleteOperationSpec$1 = {
11397
11541
  deleteSnapshots
11398
11542
  ],
11399
11543
  isXML: true,
11400
- serializer: xmlSerializer$2
11544
+ serializer: xmlSerializer$3
11401
11545
  };
11402
11546
  const undeleteOperationSpec = {
11403
11547
  path: "/{containerName}/{blob}",
@@ -11419,7 +11563,7 @@ const undeleteOperationSpec = {
11419
11563
  accept1
11420
11564
  ],
11421
11565
  isXML: true,
11422
- serializer: xmlSerializer$2
11566
+ serializer: xmlSerializer$3
11423
11567
  };
11424
11568
  const setExpiryOperationSpec = {
11425
11569
  path: "/{containerName}/{blob}",
@@ -11443,7 +11587,7 @@ const setExpiryOperationSpec = {
11443
11587
  expiresOn
11444
11588
  ],
11445
11589
  isXML: true,
11446
- serializer: xmlSerializer$2
11590
+ serializer: xmlSerializer$3
11447
11591
  };
11448
11592
  const setHttpHeadersOperationSpec = {
11449
11593
  path: "/{containerName}/{blob}",
@@ -11477,7 +11621,7 @@ const setHttpHeadersOperationSpec = {
11477
11621
  blobContentDisposition
11478
11622
  ],
11479
11623
  isXML: true,
11480
- serializer: xmlSerializer$2
11624
+ serializer: xmlSerializer$3
11481
11625
  };
11482
11626
  const setImmutabilityPolicyOperationSpec = {
11483
11627
  path: "/{containerName}/{blob}",
@@ -11502,7 +11646,7 @@ const setImmutabilityPolicyOperationSpec = {
11502
11646
  immutabilityPolicyMode
11503
11647
  ],
11504
11648
  isXML: true,
11505
- serializer: xmlSerializer$2
11649
+ serializer: xmlSerializer$3
11506
11650
  };
11507
11651
  const deleteImmutabilityPolicyOperationSpec = {
11508
11652
  path: "/{containerName}/{blob}",
@@ -11524,7 +11668,7 @@ const deleteImmutabilityPolicyOperationSpec = {
11524
11668
  accept1
11525
11669
  ],
11526
11670
  isXML: true,
11527
- serializer: xmlSerializer$2
11671
+ serializer: xmlSerializer$3
11528
11672
  };
11529
11673
  const setLegalHoldOperationSpec = {
11530
11674
  path: "/{containerName}/{blob}",
@@ -11547,9 +11691,9 @@ const setLegalHoldOperationSpec = {
11547
11691
  legalHold
11548
11692
  ],
11549
11693
  isXML: true,
11550
- serializer: xmlSerializer$2
11694
+ serializer: xmlSerializer$3
11551
11695
  };
11552
- const setMetadataOperationSpec$1 = {
11696
+ const setMetadataOperationSpec = {
11553
11697
  path: "/{containerName}/{blob}",
11554
11698
  httpMethod: "PUT",
11555
11699
  responses: {
@@ -11580,9 +11724,9 @@ const setMetadataOperationSpec$1 = {
11580
11724
  encryptionScope
11581
11725
  ],
11582
11726
  isXML: true,
11583
- serializer: xmlSerializer$2
11727
+ serializer: xmlSerializer$3
11584
11728
  };
11585
- const acquireLeaseOperationSpec$1 = {
11729
+ const acquireLeaseOperationSpec = {
11586
11730
  path: "/{containerName}/{blob}",
11587
11731
  httpMethod: "PUT",
11588
11732
  responses: {
@@ -11610,9 +11754,9 @@ const acquireLeaseOperationSpec$1 = {
11610
11754
  ifTags
11611
11755
  ],
11612
11756
  isXML: true,
11613
- serializer: xmlSerializer$2
11757
+ serializer: xmlSerializer$3
11614
11758
  };
11615
- const releaseLeaseOperationSpec$1 = {
11759
+ const releaseLeaseOperationSpec = {
11616
11760
  path: "/{containerName}/{blob}",
11617
11761
  httpMethod: "PUT",
11618
11762
  responses: {
@@ -11639,9 +11783,9 @@ const releaseLeaseOperationSpec$1 = {
11639
11783
  ifTags
11640
11784
  ],
11641
11785
  isXML: true,
11642
- serializer: xmlSerializer$2
11786
+ serializer: xmlSerializer$3
11643
11787
  };
11644
- const renewLeaseOperationSpec$1 = {
11788
+ const renewLeaseOperationSpec = {
11645
11789
  path: "/{containerName}/{blob}",
11646
11790
  httpMethod: "PUT",
11647
11791
  responses: {
@@ -11668,9 +11812,9 @@ const renewLeaseOperationSpec$1 = {
11668
11812
  ifTags
11669
11813
  ],
11670
11814
  isXML: true,
11671
- serializer: xmlSerializer$2
11815
+ serializer: xmlSerializer$3
11672
11816
  };
11673
- const changeLeaseOperationSpec$1 = {
11817
+ const changeLeaseOperationSpec = {
11674
11818
  path: "/{containerName}/{blob}",
11675
11819
  httpMethod: "PUT",
11676
11820
  responses: {
@@ -11698,9 +11842,9 @@ const changeLeaseOperationSpec$1 = {
11698
11842
  ifTags
11699
11843
  ],
11700
11844
  isXML: true,
11701
- serializer: xmlSerializer$2
11845
+ serializer: xmlSerializer$3
11702
11846
  };
11703
- const breakLeaseOperationSpec$1 = {
11847
+ const breakLeaseOperationSpec = {
11704
11848
  path: "/{containerName}/{blob}",
11705
11849
  httpMethod: "PUT",
11706
11850
  responses: {
@@ -11727,7 +11871,7 @@ const breakLeaseOperationSpec$1 = {
11727
11871
  ifTags
11728
11872
  ],
11729
11873
  isXML: true,
11730
- serializer: xmlSerializer$2
11874
+ serializer: xmlSerializer$3
11731
11875
  };
11732
11876
  const createSnapshotOperationSpec = {
11733
11877
  path: "/{containerName}/{blob}",
@@ -11760,7 +11904,7 @@ const createSnapshotOperationSpec = {
11760
11904
  encryptionScope
11761
11905
  ],
11762
11906
  isXML: true,
11763
- serializer: xmlSerializer$2
11907
+ serializer: xmlSerializer$3
11764
11908
  };
11765
11909
  const startCopyFromURLOperationSpec = {
11766
11910
  path: "/{containerName}/{blob}",
@@ -11802,7 +11946,7 @@ const startCopyFromURLOperationSpec = {
11802
11946
  legalHold1
11803
11947
  ],
11804
11948
  isXML: true,
11805
- serializer: xmlSerializer$2
11949
+ serializer: xmlSerializer$3
11806
11950
  };
11807
11951
  const copyFromURLOperationSpec = {
11808
11952
  path: "/{containerName}/{blob}",
@@ -11845,7 +11989,7 @@ const copyFromURLOperationSpec = {
11845
11989
  copySourceAuthorization
11846
11990
  ],
11847
11991
  isXML: true,
11848
- serializer: xmlSerializer$2
11992
+ serializer: xmlSerializer$3
11849
11993
  };
11850
11994
  const abortCopyFromURLOperationSpec = {
11851
11995
  path: "/{containerName}/{blob}",
@@ -11873,7 +12017,7 @@ const abortCopyFromURLOperationSpec = {
11873
12017
  copyActionAbortConstant
11874
12018
  ],
11875
12019
  isXML: true,
11876
- serializer: xmlSerializer$2
12020
+ serializer: xmlSerializer$3
11877
12021
  };
11878
12022
  const setTierOperationSpec = {
11879
12023
  path: "/{containerName}/{blob}",
@@ -11907,9 +12051,9 @@ const setTierOperationSpec = {
11907
12051
  tier1
11908
12052
  ],
11909
12053
  isXML: true,
11910
- serializer: xmlSerializer$2
12054
+ serializer: xmlSerializer$3
11911
12055
  };
11912
- const getAccountInfoOperationSpec$2 = {
12056
+ const getAccountInfoOperationSpec = {
11913
12057
  path: "/{containerName}/{blob}",
11914
12058
  httpMethod: "GET",
11915
12059
  responses: {
@@ -11925,7 +12069,7 @@ const getAccountInfoOperationSpec$2 = {
11925
12069
  urlParameters: [url],
11926
12070
  headerParameters: [version, accept1],
11927
12071
  isXML: true,
11928
- serializer: xmlSerializer$2
12072
+ serializer: xmlSerializer$3
11929
12073
  };
11930
12074
  const queryOperationSpec = {
11931
12075
  path: "/{containerName}/{blob}",
@@ -11975,7 +12119,7 @@ const queryOperationSpec = {
11975
12119
  isXML: true,
11976
12120
  contentType: "application/xml; charset=utf-8",
11977
12121
  mediaType: "xml",
11978
- serializer: xmlSerializer$2
12122
+ serializer: xmlSerializer$3
11979
12123
  };
11980
12124
  const getTagsOperationSpec = {
11981
12125
  path: "/{containerName}/{blob}",
@@ -12005,7 +12149,7 @@ const getTagsOperationSpec = {
12005
12149
  ifTags
12006
12150
  ],
12007
12151
  isXML: true,
12008
- serializer: xmlSerializer$2
12152
+ serializer: xmlSerializer$3
12009
12153
  };
12010
12154
  const setTagsOperationSpec = {
12011
12155
  path: "/{containerName}/{blob}",
@@ -12039,7 +12183,7 @@ const setTagsOperationSpec = {
12039
12183
  isXML: true,
12040
12184
  contentType: "application/xml; charset=utf-8",
12041
12185
  mediaType: "xml",
12042
- serializer: xmlSerializer$2
12186
+ serializer: xmlSerializer$3
12043
12187
  };
12044
12188
 
12045
12189
  /*
@@ -12069,7 +12213,7 @@ class PageBlob {
12069
12213
  const operationArguments = {
12070
12214
  contentLength,
12071
12215
  blobContentLength,
12072
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12216
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12073
12217
  };
12074
12218
  return this.client.sendOperationRequest(operationArguments, createOperationSpec$1);
12075
12219
  }
@@ -12083,7 +12227,7 @@ class PageBlob {
12083
12227
  const operationArguments = {
12084
12228
  contentLength,
12085
12229
  body,
12086
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12230
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12087
12231
  };
12088
12232
  return this.client.sendOperationRequest(operationArguments, uploadPagesOperationSpec);
12089
12233
  }
@@ -12095,7 +12239,7 @@ class PageBlob {
12095
12239
  clearPages(contentLength, options) {
12096
12240
  const operationArguments = {
12097
12241
  contentLength,
12098
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12242
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12099
12243
  };
12100
12244
  return this.client.sendOperationRequest(operationArguments, clearPagesOperationSpec);
12101
12245
  }
@@ -12116,7 +12260,7 @@ class PageBlob {
12116
12260
  sourceRange,
12117
12261
  contentLength,
12118
12262
  range,
12119
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12263
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12120
12264
  };
12121
12265
  return this.client.sendOperationRequest(operationArguments, uploadPagesFromURLOperationSpec);
12122
12266
  }
@@ -12127,7 +12271,7 @@ class PageBlob {
12127
12271
  */
12128
12272
  getPageRanges(options) {
12129
12273
  const operationArguments = {
12130
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12274
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12131
12275
  };
12132
12276
  return this.client.sendOperationRequest(operationArguments, getPageRangesOperationSpec);
12133
12277
  }
@@ -12138,7 +12282,7 @@ class PageBlob {
12138
12282
  */
12139
12283
  getPageRangesDiff(options) {
12140
12284
  const operationArguments = {
12141
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12285
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12142
12286
  };
12143
12287
  return this.client.sendOperationRequest(operationArguments, getPageRangesDiffOperationSpec);
12144
12288
  }
@@ -12151,7 +12295,7 @@ class PageBlob {
12151
12295
  resize(blobContentLength, options) {
12152
12296
  const operationArguments = {
12153
12297
  blobContentLength,
12154
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12298
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12155
12299
  };
12156
12300
  return this.client.sendOperationRequest(operationArguments, resizeOperationSpec);
12157
12301
  }
@@ -12165,7 +12309,7 @@ class PageBlob {
12165
12309
  updateSequenceNumber(sequenceNumberAction, options) {
12166
12310
  const operationArguments = {
12167
12311
  sequenceNumberAction,
12168
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12312
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12169
12313
  };
12170
12314
  return this.client.sendOperationRequest(operationArguments, updateSequenceNumberOperationSpec);
12171
12315
  }
@@ -12184,14 +12328,14 @@ class PageBlob {
12184
12328
  copyIncremental(copySource, options) {
12185
12329
  const operationArguments = {
12186
12330
  copySource,
12187
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12331
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12188
12332
  };
12189
12333
  return this.client.sendOperationRequest(operationArguments, copyIncrementalOperationSpec);
12190
12334
  }
12191
12335
  }
12192
12336
  // Operation Specifications
12193
- const xmlSerializer$3 = new coreHttp.Serializer(Mappers, /* isXml */ true);
12194
- const serializer = new coreHttp.Serializer(Mappers, /* isXml */ false);
12337
+ const xmlSerializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
12338
+ const serializer$2 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
12195
12339
  const createOperationSpec$1 = {
12196
12340
  path: "/{containerName}/{blob}",
12197
12341
  httpMethod: "PUT",
@@ -12238,7 +12382,7 @@ const createOperationSpec$1 = {
12238
12382
  blobSequenceNumber
12239
12383
  ],
12240
12384
  isXML: true,
12241
- serializer: xmlSerializer$3
12385
+ serializer: xmlSerializer$2
12242
12386
  };
12243
12387
  const uploadPagesOperationSpec = {
12244
12388
  path: "/{containerName}/{blob}",
@@ -12280,7 +12424,7 @@ const uploadPagesOperationSpec = {
12280
12424
  ifSequenceNumberEqualTo
12281
12425
  ],
12282
12426
  mediaType: "binary",
12283
- serializer
12427
+ serializer: serializer$2
12284
12428
  };
12285
12429
  const clearPagesOperationSpec = {
12286
12430
  path: "/{containerName}/{blob}",
@@ -12318,7 +12462,7 @@ const clearPagesOperationSpec = {
12318
12462
  pageWrite1
12319
12463
  ],
12320
12464
  isXML: true,
12321
- serializer: xmlSerializer$3
12465
+ serializer: xmlSerializer$2
12322
12466
  };
12323
12467
  const uploadPagesFromURLOperationSpec = {
12324
12468
  path: "/{containerName}/{blob}",
@@ -12365,7 +12509,7 @@ const uploadPagesFromURLOperationSpec = {
12365
12509
  range1
12366
12510
  ],
12367
12511
  isXML: true,
12368
- serializer: xmlSerializer$3
12512
+ serializer: xmlSerializer$2
12369
12513
  };
12370
12514
  const getPageRangesOperationSpec = {
12371
12515
  path: "/{containerName}/{blob}",
@@ -12399,7 +12543,7 @@ const getPageRangesOperationSpec = {
12399
12543
  ifTags
12400
12544
  ],
12401
12545
  isXML: true,
12402
- serializer: xmlSerializer$3
12546
+ serializer: xmlSerializer$2
12403
12547
  };
12404
12548
  const getPageRangesDiffOperationSpec = {
12405
12549
  path: "/{containerName}/{blob}",
@@ -12435,7 +12579,7 @@ const getPageRangesDiffOperationSpec = {
12435
12579
  prevSnapshotUrl
12436
12580
  ],
12437
12581
  isXML: true,
12438
- serializer: xmlSerializer$3
12582
+ serializer: xmlSerializer$2
12439
12583
  };
12440
12584
  const resizeOperationSpec = {
12441
12585
  path: "/{containerName}/{blob}",
@@ -12468,7 +12612,7 @@ const resizeOperationSpec = {
12468
12612
  blobContentLength
12469
12613
  ],
12470
12614
  isXML: true,
12471
- serializer: xmlSerializer$3
12615
+ serializer: xmlSerializer$2
12472
12616
  };
12473
12617
  const updateSequenceNumberOperationSpec = {
12474
12618
  path: "/{containerName}/{blob}",
@@ -12498,7 +12642,7 @@ const updateSequenceNumberOperationSpec = {
12498
12642
  sequenceNumberAction
12499
12643
  ],
12500
12644
  isXML: true,
12501
- serializer: xmlSerializer$3
12645
+ serializer: xmlSerializer$2
12502
12646
  };
12503
12647
  const copyIncrementalOperationSpec = {
12504
12648
  path: "/{containerName}/{blob}",
@@ -12526,7 +12670,7 @@ const copyIncrementalOperationSpec = {
12526
12670
  copySource
12527
12671
  ],
12528
12672
  isXML: true,
12529
- serializer: xmlSerializer$3
12673
+ serializer: xmlSerializer$2
12530
12674
  };
12531
12675
 
12532
12676
  /*
@@ -12553,9 +12697,9 @@ class AppendBlob {
12553
12697
  create(contentLength, options) {
12554
12698
  const operationArguments = {
12555
12699
  contentLength,
12556
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12700
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12557
12701
  };
12558
- return this.client.sendOperationRequest(operationArguments, createOperationSpec$2);
12702
+ return this.client.sendOperationRequest(operationArguments, createOperationSpec);
12559
12703
  }
12560
12704
  /**
12561
12705
  * The Append Block operation commits a new block of data to the end of an existing append blob. The
@@ -12569,7 +12713,7 @@ class AppendBlob {
12569
12713
  const operationArguments = {
12570
12714
  contentLength,
12571
12715
  body,
12572
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12716
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12573
12717
  };
12574
12718
  return this.client.sendOperationRequest(operationArguments, appendBlockOperationSpec);
12575
12719
  }
@@ -12586,7 +12730,7 @@ class AppendBlob {
12586
12730
  const operationArguments = {
12587
12731
  sourceUrl,
12588
12732
  contentLength,
12589
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12733
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12590
12734
  };
12591
12735
  return this.client.sendOperationRequest(operationArguments, appendBlockFromUrlOperationSpec);
12592
12736
  }
@@ -12597,15 +12741,15 @@ class AppendBlob {
12597
12741
  */
12598
12742
  seal(options) {
12599
12743
  const operationArguments = {
12600
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12744
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12601
12745
  };
12602
12746
  return this.client.sendOperationRequest(operationArguments, sealOperationSpec);
12603
12747
  }
12604
12748
  }
12605
12749
  // Operation Specifications
12606
- const xmlSerializer$4 = new coreHttp.Serializer(Mappers, /* isXml */ true);
12607
- const serializer$1 = new coreHttp.Serializer(Mappers, /* isXml */ false);
12608
- const createOperationSpec$2 = {
12750
+ const xmlSerializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
12751
+ const serializer$1 = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
12752
+ const createOperationSpec = {
12609
12753
  path: "/{containerName}/{blob}",
12610
12754
  httpMethod: "PUT",
12611
12755
  responses: {
@@ -12648,7 +12792,7 @@ const createOperationSpec$2 = {
12648
12792
  blobType1
12649
12793
  ],
12650
12794
  isXML: true,
12651
- serializer: xmlSerializer$4
12795
+ serializer: xmlSerializer$1
12652
12796
  };
12653
12797
  const appendBlockOperationSpec = {
12654
12798
  path: "/{containerName}/{blob}",
@@ -12732,7 +12876,7 @@ const appendBlockFromUrlOperationSpec = {
12732
12876
  sourceRange1
12733
12877
  ],
12734
12878
  isXML: true,
12735
- serializer: xmlSerializer$4
12879
+ serializer: xmlSerializer$1
12736
12880
  };
12737
12881
  const sealOperationSpec = {
12738
12882
  path: "/{containerName}/{blob}",
@@ -12760,7 +12904,7 @@ const sealOperationSpec = {
12760
12904
  appendPosition
12761
12905
  ],
12762
12906
  isXML: true,
12763
- serializer: xmlSerializer$4
12907
+ serializer: xmlSerializer$1
12764
12908
  };
12765
12909
 
12766
12910
  /*
@@ -12792,7 +12936,7 @@ class BlockBlob {
12792
12936
  const operationArguments = {
12793
12937
  contentLength,
12794
12938
  body,
12795
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12939
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12796
12940
  };
12797
12941
  return this.client.sendOperationRequest(operationArguments, uploadOperationSpec);
12798
12942
  }
@@ -12813,7 +12957,7 @@ class BlockBlob {
12813
12957
  const operationArguments = {
12814
12958
  contentLength,
12815
12959
  copySource,
12816
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12960
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12817
12961
  };
12818
12962
  return this.client.sendOperationRequest(operationArguments, putBlobFromUrlOperationSpec);
12819
12963
  }
@@ -12831,7 +12975,7 @@ class BlockBlob {
12831
12975
  blockId,
12832
12976
  contentLength,
12833
12977
  body,
12834
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12978
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12835
12979
  };
12836
12980
  return this.client.sendOperationRequest(operationArguments, stageBlockOperationSpec);
12837
12981
  }
@@ -12850,7 +12994,7 @@ class BlockBlob {
12850
12994
  blockId,
12851
12995
  contentLength,
12852
12996
  sourceUrl,
12853
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
12997
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12854
12998
  };
12855
12999
  return this.client.sendOperationRequest(operationArguments, stageBlockFromURLOperationSpec);
12856
13000
  }
@@ -12868,7 +13012,7 @@ class BlockBlob {
12868
13012
  commitBlockList(blocks, options) {
12869
13013
  const operationArguments = {
12870
13014
  blocks,
12871
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
13015
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12872
13016
  };
12873
13017
  return this.client.sendOperationRequest(operationArguments, commitBlockListOperationSpec);
12874
13018
  }
@@ -12882,14 +13026,14 @@ class BlockBlob {
12882
13026
  getBlockList(listType, options) {
12883
13027
  const operationArguments = {
12884
13028
  listType,
12885
- options: coreHttp.operationOptionsToRequestOptionsBase(options || {})
13029
+ options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})
12886
13030
  };
12887
13031
  return this.client.sendOperationRequest(operationArguments, getBlockListOperationSpec);
12888
13032
  }
12889
13033
  }
12890
13034
  // Operation Specifications
12891
- const xmlSerializer$5 = new coreHttp.Serializer(Mappers, /* isXml */ true);
12892
- const serializer$2 = new coreHttp.Serializer(Mappers, /* isXml */ false);
13035
+ const xmlSerializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ true);
13036
+ const serializer = new coreHttp__namespace.Serializer(Mappers, /* isXml */ false);
12893
13037
  const uploadOperationSpec = {
12894
13038
  path: "/{containerName}/{blob}",
12895
13039
  httpMethod: "PUT",
@@ -12937,7 +13081,7 @@ const uploadOperationSpec = {
12937
13081
  blobType2
12938
13082
  ],
12939
13083
  mediaType: "binary",
12940
- serializer: serializer$2
13084
+ serializer
12941
13085
  };
12942
13086
  const putBlobFromUrlOperationSpec = {
12943
13087
  path: "/{containerName}/{blob}",
@@ -12990,7 +13134,7 @@ const putBlobFromUrlOperationSpec = {
12990
13134
  copySourceBlobProperties
12991
13135
  ],
12992
13136
  isXML: true,
12993
- serializer: xmlSerializer$5
13137
+ serializer: xmlSerializer
12994
13138
  };
12995
13139
  const stageBlockOperationSpec = {
12996
13140
  path: "/{containerName}/{blob}",
@@ -13026,7 +13170,7 @@ const stageBlockOperationSpec = {
13026
13170
  accept2
13027
13171
  ],
13028
13172
  mediaType: "binary",
13029
- serializer: serializer$2
13173
+ serializer
13030
13174
  };
13031
13175
  const stageBlockFromURLOperationSpec = {
13032
13176
  path: "/{containerName}/{blob}",
@@ -13067,7 +13211,7 @@ const stageBlockFromURLOperationSpec = {
13067
13211
  sourceRange1
13068
13212
  ],
13069
13213
  isXML: true,
13070
- serializer: xmlSerializer$5
13214
+ serializer: xmlSerializer
13071
13215
  };
13072
13216
  const commitBlockListOperationSpec = {
13073
13217
  path: "/{containerName}/{blob}",
@@ -13117,7 +13261,7 @@ const commitBlockListOperationSpec = {
13117
13261
  isXML: true,
13118
13262
  contentType: "application/xml; charset=utf-8",
13119
13263
  mediaType: "xml",
13120
- serializer: xmlSerializer$5
13264
+ serializer: xmlSerializer
13121
13265
  };
13122
13266
  const getBlockListOperationSpec = {
13123
13267
  path: "/{containerName}/{blob}",
@@ -13147,7 +13291,7 @@ const getBlockListOperationSpec = {
13147
13291
  ifTags
13148
13292
  ],
13149
13293
  isXML: true,
13150
- serializer: xmlSerializer$5
13294
+ serializer: xmlSerializer
13151
13295
  };
13152
13296
 
13153
13297
  // Copyright (c) Microsoft Corporation.
@@ -13158,8 +13302,8 @@ const logger = logger$1.createClientLogger("storage-blob");
13158
13302
 
13159
13303
  // Copyright (c) Microsoft Corporation.
13160
13304
  // Licensed under the MIT license.
13161
- const SDK_VERSION = "12.9.0-beta.1";
13162
- const SERVICE_VERSION = "2020-12-06";
13305
+ const SDK_VERSION = "12.9.0-beta.4";
13306
+ const SERVICE_VERSION = "2021-04-10";
13163
13307
  const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
13164
13308
  const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB
13165
13309
  const BLOCK_BLOB_MAX_BLOCKS = 50000;
@@ -13176,15 +13320,15 @@ const URLConstants = {
13176
13320
  SIGNATURE: "sig",
13177
13321
  SNAPSHOT: "snapshot",
13178
13322
  VERSIONID: "versionid",
13179
- TIMEOUT: "timeout"
13180
- }
13323
+ TIMEOUT: "timeout",
13324
+ },
13181
13325
  };
13182
13326
  const HTTPURLConnection = {
13183
13327
  HTTP_ACCEPTED: 202,
13184
13328
  HTTP_CONFLICT: 409,
13185
13329
  HTTP_NOT_FOUND: 404,
13186
13330
  HTTP_PRECON_FAILED: 412,
13187
- HTTP_RANGE_NOT_SATISFIABLE: 416
13331
+ HTTP_RANGE_NOT_SATISFIABLE: 416,
13188
13332
  };
13189
13333
  const HeaderConstants = {
13190
13334
  AUTHORIZATION: "Authorization",
@@ -13209,7 +13353,7 @@ const HeaderConstants = {
13209
13353
  X_MS_COPY_SOURCE: "x-ms-copy-source",
13210
13354
  X_MS_DATE: "x-ms-date",
13211
13355
  X_MS_ERROR_CODE: "x-ms-error-code",
13212
- X_MS_VERSION: "x-ms-version"
13356
+ X_MS_VERSION: "x-ms-version",
13213
13357
  };
13214
13358
  const ETagNone = "";
13215
13359
  const ETagAny = "*";
@@ -13314,7 +13458,7 @@ const StorageBlobLoggingAllowedHeaderNames = [
13314
13458
  "x-ms-tag-count",
13315
13459
  "x-ms-encryption-key-sha256",
13316
13460
  "x-ms-if-tags",
13317
- "x-ms-source-if-tags"
13461
+ "x-ms-source-if-tags",
13318
13462
  ];
13319
13463
  const StorageBlobLoggingAllowedQueryParameters = [
13320
13464
  "comp",
@@ -13349,8 +13493,9 @@ const StorageBlobLoggingAllowedQueryParameters = [
13349
13493
  "skt",
13350
13494
  "sktid",
13351
13495
  "skv",
13352
- "snapshot"
13496
+ "snapshot",
13353
13497
  ];
13498
+ const BlobUsesCustomerSpecifiedEncryptionMsg = "BlobUsesCustomerSpecifiedEncryption";
13354
13499
 
13355
13500
  // Copyright (c) Microsoft Corporation.
13356
13501
  /**
@@ -13490,7 +13635,7 @@ function extractConnectionStringParts(connectionString) {
13490
13635
  url: blobEndpoint,
13491
13636
  accountName,
13492
13637
  accountKey,
13493
- proxyUri
13638
+ proxyUri,
13494
13639
  };
13495
13640
  }
13496
13641
  else {
@@ -13822,14 +13967,14 @@ function toBlobTags(tags) {
13822
13967
  return undefined;
13823
13968
  }
13824
13969
  const res = {
13825
- blobTagSet: []
13970
+ blobTagSet: [],
13826
13971
  };
13827
13972
  for (const key in tags) {
13828
13973
  if (Object.prototype.hasOwnProperty.call(tags, key)) {
13829
13974
  const value = tags[key];
13830
13975
  res.blobTagSet.push({
13831
13976
  key,
13832
- value
13977
+ value,
13833
13978
  });
13834
13979
  }
13835
13980
  }
@@ -13869,33 +14014,33 @@ function toQuerySerialization(textConfiguration) {
13869
14014
  fieldQuote: textConfiguration.fieldQuote || "",
13870
14015
  recordSeparator: textConfiguration.recordSeparator,
13871
14016
  escapeChar: textConfiguration.escapeCharacter || "",
13872
- headersPresent: textConfiguration.hasHeaders || false
13873
- }
13874
- }
14017
+ headersPresent: textConfiguration.hasHeaders || false,
14018
+ },
14019
+ },
13875
14020
  };
13876
14021
  case "json":
13877
14022
  return {
13878
14023
  format: {
13879
14024
  type: "json",
13880
14025
  jsonTextConfiguration: {
13881
- recordSeparator: textConfiguration.recordSeparator
13882
- }
13883
- }
14026
+ recordSeparator: textConfiguration.recordSeparator,
14027
+ },
14028
+ },
13884
14029
  };
13885
14030
  case "arrow":
13886
14031
  return {
13887
14032
  format: {
13888
14033
  type: "arrow",
13889
14034
  arrowConfiguration: {
13890
- schema: textConfiguration.schema
13891
- }
13892
- }
14035
+ schema: textConfiguration.schema,
14036
+ },
14037
+ },
13893
14038
  };
13894
14039
  case "parquet":
13895
14040
  return {
13896
14041
  format: {
13897
- type: "parquet"
13898
- }
14042
+ type: "parquet",
14043
+ },
13899
14044
  };
13900
14045
  default:
13901
14046
  throw Error("Invalid BlobQueryTextConfiguration.");
@@ -13919,7 +14064,7 @@ function parseObjectReplicationRecord(objectReplicationRecord) {
13919
14064
  }
13920
14065
  const rule = {
13921
14066
  ruleId: ids[1],
13922
- replicationStatus: objectReplicationRecord[key]
14067
+ replicationStatus: objectReplicationRecord[key],
13923
14068
  };
13924
14069
  const policyIndex = orProperties.findIndex((policy) => policy.policyId === ids[0]);
13925
14070
  if (policyIndex > -1) {
@@ -13928,7 +14073,7 @@ function parseObjectReplicationRecord(objectReplicationRecord) {
13928
14073
  else {
13929
14074
  orProperties.push({
13930
14075
  policyId: ids[0],
13931
- rules: [rule]
14076
+ rules: [rule],
13932
14077
  });
13933
14078
  }
13934
14079
  }
@@ -13947,6 +14092,202 @@ function attachCredential(thing, credential) {
13947
14092
  function httpAuthorizationToString(httpAuthorization) {
13948
14093
  return httpAuthorization ? httpAuthorization.scheme + " " + httpAuthorization.value : undefined;
13949
14094
  }
14095
+ function BlobNameToString(name) {
14096
+ if (name.encoded) {
14097
+ return decodeURIComponent(name.content);
14098
+ }
14099
+ else {
14100
+ return name.content;
14101
+ }
14102
+ }
14103
+ function ConvertInternalResponseOfListBlobFlat(internalResponse) {
14104
+ return Object.assign(Object.assign({}, internalResponse), { segment: {
14105
+ blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
14106
+ const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
14107
+ return blobItem;
14108
+ }),
14109
+ } });
14110
+ }
14111
+ function ConvertInternalResponseOfListBlobHierarchy(internalResponse) {
14112
+ var _a;
14113
+ return Object.assign(Object.assign({}, internalResponse), { segment: {
14114
+ blobPrefixes: (_a = internalResponse.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
14115
+ const blobPrefix = {
14116
+ name: BlobNameToString(blobPrefixInternal.name),
14117
+ };
14118
+ return blobPrefix;
14119
+ }),
14120
+ blobItems: internalResponse.segment.blobItems.map((blobItemInteral) => {
14121
+ const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name) });
14122
+ return blobItem;
14123
+ }),
14124
+ } });
14125
+ }
14126
+ function decodeBase64String(value) {
14127
+ if (coreHttp.isNode) {
14128
+ return Buffer.from(value, "base64");
14129
+ }
14130
+ else {
14131
+ const byteString = atob(value);
14132
+ const arr = new Uint8Array(byteString.length);
14133
+ for (let i = 0; i < byteString.length; i++) {
14134
+ arr[i] = byteString.charCodeAt(i);
14135
+ }
14136
+ return arr;
14137
+ }
14138
+ }
14139
+ function ParseBoolean(content) {
14140
+ if (content === undefined)
14141
+ return undefined;
14142
+ if (content === "true")
14143
+ return true;
14144
+ if (content === "false")
14145
+ return false;
14146
+ return undefined;
14147
+ }
14148
+ function ParseBlobName(blobNameInXML) {
14149
+ if (blobNameInXML["$"] !== undefined && blobNameInXML["#"] !== undefined) {
14150
+ return {
14151
+ encoded: ParseBoolean(blobNameInXML["$"]["Encoded"]),
14152
+ content: blobNameInXML["#"],
14153
+ };
14154
+ }
14155
+ else {
14156
+ return {
14157
+ encoded: false,
14158
+ content: blobNameInXML,
14159
+ };
14160
+ }
14161
+ }
14162
+ function ParseBlobItem(blobInXML) {
14163
+ const blobPropertiesInXML = blobInXML["Properties"];
14164
+ const blobProperties = {
14165
+ createdOn: new Date(blobPropertiesInXML["Creation-Time"]),
14166
+ lastModified: new Date(blobPropertiesInXML["Last-Modified"]),
14167
+ etag: blobPropertiesInXML["Etag"],
14168
+ contentLength: blobPropertiesInXML["Content-Length"] === undefined
14169
+ ? undefined
14170
+ : parseFloat(blobPropertiesInXML["Content-Length"]),
14171
+ contentType: blobPropertiesInXML["Content-Type"],
14172
+ contentEncoding: blobPropertiesInXML["Content-Encoding"],
14173
+ contentLanguage: blobPropertiesInXML["Content-Language"],
14174
+ contentMD5: decodeBase64String(blobPropertiesInXML["Content-MD5"]),
14175
+ contentDisposition: blobPropertiesInXML["Content-Disposition"],
14176
+ cacheControl: blobPropertiesInXML["Cache-Control"],
14177
+ blobSequenceNumber: blobPropertiesInXML["x-ms-blob-sequence-number"] === undefined
14178
+ ? undefined
14179
+ : parseFloat(blobPropertiesInXML["x-ms-blob-sequence-number"]),
14180
+ blobType: blobPropertiesInXML["BlobType"],
14181
+ leaseStatus: blobPropertiesInXML["LeaseStatus"],
14182
+ leaseState: blobPropertiesInXML["LeaseState"],
14183
+ leaseDuration: blobPropertiesInXML["LeaseDuration"],
14184
+ copyId: blobPropertiesInXML["CopyId"],
14185
+ copyStatus: blobPropertiesInXML["CopyStatus"],
14186
+ copySource: blobPropertiesInXML["CopySource"],
14187
+ copyProgress: blobPropertiesInXML["CopyProgress"],
14188
+ copyCompletedOn: blobPropertiesInXML["CopyCompletionTime"] === undefined
14189
+ ? undefined
14190
+ : new Date(blobPropertiesInXML["CopyCompletionTime"]),
14191
+ copyStatusDescription: blobPropertiesInXML["CopyStatusDescription"],
14192
+ serverEncrypted: ParseBoolean(blobPropertiesInXML["ServerEncrypted"]),
14193
+ incrementalCopy: ParseBoolean(blobPropertiesInXML["IncrementalCopy"]),
14194
+ destinationSnapshot: blobPropertiesInXML["DestinationSnapshot"],
14195
+ deletedOn: blobPropertiesInXML["DeletedTime"] === undefined
14196
+ ? undefined
14197
+ : new Date(blobPropertiesInXML["DeletedTime"]),
14198
+ remainingRetentionDays: blobPropertiesInXML["RemainingRetentionDays"] === undefined
14199
+ ? undefined
14200
+ : parseFloat(blobPropertiesInXML["RemainingRetentionDays"]),
14201
+ accessTier: blobPropertiesInXML["AccessTier"],
14202
+ accessTierInferred: ParseBoolean(blobPropertiesInXML["AccessTierInferred"]),
14203
+ archiveStatus: blobPropertiesInXML["ArchiveStatus"],
14204
+ customerProvidedKeySha256: blobPropertiesInXML["CustomerProvidedKeySha256"],
14205
+ encryptionScope: blobPropertiesInXML["EncryptionScope"],
14206
+ accessTierChangedOn: blobPropertiesInXML["AccessTierChangeTime"] === undefined
14207
+ ? undefined
14208
+ : new Date(blobPropertiesInXML["AccessTierChangeTime"]),
14209
+ tagCount: blobPropertiesInXML["TagCount"] === undefined
14210
+ ? undefined
14211
+ : parseFloat(blobPropertiesInXML["TagCount"]),
14212
+ expiresOn: blobPropertiesInXML["Expiry-Time"] === undefined
14213
+ ? undefined
14214
+ : new Date(blobPropertiesInXML["Expiry-Time"]),
14215
+ isSealed: ParseBoolean(blobPropertiesInXML["Sealed"]),
14216
+ rehydratePriority: blobPropertiesInXML["RehydratePriority"],
14217
+ lastAccessedOn: blobPropertiesInXML["LastAccessTime"] === undefined
14218
+ ? undefined
14219
+ : new Date(blobPropertiesInXML["LastAccessTime"]),
14220
+ immutabilityPolicyExpiresOn: blobPropertiesInXML["ImmutabilityPolicyUntilDate"] === undefined
14221
+ ? undefined
14222
+ : new Date(blobPropertiesInXML["ImmutabilityPolicyUntilDate"]),
14223
+ immutabilityPolicyMode: blobPropertiesInXML["ImmutabilityPolicyMode"],
14224
+ legalHold: ParseBoolean(blobPropertiesInXML["LegalHold"]),
14225
+ };
14226
+ return {
14227
+ name: ParseBlobName(blobInXML["Name"]),
14228
+ deleted: ParseBoolean(blobInXML["Deleted"]),
14229
+ snapshot: blobInXML["Snapshot"],
14230
+ versionId: blobInXML["VersionId"],
14231
+ isCurrentVersion: ParseBoolean(blobInXML["IsCurrentVersion"]),
14232
+ properties: blobProperties,
14233
+ metadata: blobInXML["Metadata"],
14234
+ blobTags: ParseBlobTags(blobInXML["Tags"]),
14235
+ objectReplicationMetadata: blobInXML["OrMetadata"],
14236
+ hasVersionsOnly: ParseBoolean(blobInXML["HasVersionsOnly"]),
14237
+ };
14238
+ }
14239
+ function ParseBlobPrefix(blobPrefixInXML) {
14240
+ return {
14241
+ name: ParseBlobName(blobPrefixInXML["Name"]),
14242
+ };
14243
+ }
14244
+ function ParseBlobTag(blobTagInXML) {
14245
+ return {
14246
+ key: blobTagInXML["Key"],
14247
+ value: blobTagInXML["Value"],
14248
+ };
14249
+ }
14250
+ function ParseBlobTags(blobTagsInXML) {
14251
+ if (blobTagsInXML === undefined ||
14252
+ blobTagsInXML["TagSet"] === undefined ||
14253
+ blobTagsInXML["TagSet"]["Tag"] === undefined) {
14254
+ return undefined;
14255
+ }
14256
+ const blobTagSet = [];
14257
+ if (blobTagsInXML["TagSet"]["Tag"] instanceof Array) {
14258
+ blobTagsInXML["TagSet"]["Tag"].forEach((blobTagInXML) => {
14259
+ blobTagSet.push(ParseBlobTag(blobTagInXML));
14260
+ });
14261
+ }
14262
+ else {
14263
+ blobTagSet.push(ParseBlobTag(blobTagsInXML["TagSet"]["Tag"]));
14264
+ }
14265
+ return { blobTagSet: blobTagSet };
14266
+ }
14267
+ function ProcessBlobItems(blobArrayInXML) {
14268
+ const blobItems = [];
14269
+ if (blobArrayInXML instanceof Array) {
14270
+ blobArrayInXML.forEach((blobInXML) => {
14271
+ blobItems.push(ParseBlobItem(blobInXML));
14272
+ });
14273
+ }
14274
+ else {
14275
+ blobItems.push(ParseBlobItem(blobArrayInXML));
14276
+ }
14277
+ return blobItems;
14278
+ }
14279
+ function ProcessBlobPrefixes(blobPrefixesInXML) {
14280
+ const blobPrefixes = [];
14281
+ if (blobPrefixesInXML instanceof Array) {
14282
+ blobPrefixesInXML.forEach((blobPrefixInXML) => {
14283
+ blobPrefixes.push(ParseBlobPrefix(blobPrefixInXML));
14284
+ });
14285
+ }
14286
+ else {
14287
+ blobPrefixes.push(ParseBlobPrefix(blobPrefixesInXML));
14288
+ }
14289
+ return blobPrefixes;
14290
+ }
13950
14291
 
13951
14292
  // Copyright (c) Microsoft Corporation.
13952
14293
  /**
@@ -13977,9 +14318,16 @@ class StorageBrowserPolicy extends coreHttp.BaseRequestPolicy {
13977
14318
  * @param request -
13978
14319
  */
13979
14320
  async sendRequest(request) {
13980
- {
14321
+ if (coreHttp.isNode) {
13981
14322
  return this._nextPolicy.sendRequest(request);
13982
14323
  }
14324
+ if (request.method.toUpperCase() === "GET" || request.method.toUpperCase() === "HEAD") {
14325
+ request.url = setURLParameter(request.url, URLConstants.Parameters.FORCE_BROWSER_NO_CACHE, new Date().getTime().toString());
14326
+ }
14327
+ request.headers.remove(HeaderConstants.COOKIE);
14328
+ // According to XHR standards, content-length should be fully controlled by browsers
14329
+ request.headers.remove(HeaderConstants.CONTENT_LENGTH);
14330
+ return this._nextPolicy.sendRequest(request);
13983
14331
  }
13984
14332
  }
13985
14333
 
@@ -14000,6 +14348,10 @@ class StorageBrowserPolicyFactory {
14000
14348
  }
14001
14349
 
14002
14350
  // Copyright (c) Microsoft Corporation.
14351
+ /**
14352
+ * RetryPolicy types.
14353
+ */
14354
+ exports.StorageRetryPolicyType = void 0;
14003
14355
  (function (StorageRetryPolicyType) {
14004
14356
  /**
14005
14357
  * Exponential retry. Retry time delay grows exponentially.
@@ -14017,7 +14369,7 @@ const DEFAULT_RETRY_OPTIONS = {
14017
14369
  retryDelayInMs: 4 * 1000,
14018
14370
  retryPolicyType: exports.StorageRetryPolicyType.EXPONENTIAL,
14019
14371
  secondaryHost: "",
14020
- tryTimeoutInMs: undefined // Use server side default timeout strategy
14372
+ tryTimeoutInMs: undefined, // Use server side default timeout strategy
14021
14373
  };
14022
14374
  const RETRY_ABORT_ERROR = new abortController.AbortError("The operation was aborted.");
14023
14375
  /**
@@ -14054,7 +14406,7 @@ class StorageRetryPolicy extends coreHttp.BaseRequestPolicy {
14054
14406
  : DEFAULT_RETRY_OPTIONS.maxRetryDelayInMs,
14055
14407
  secondaryHost: retryOptions.secondaryHost
14056
14408
  ? retryOptions.secondaryHost
14057
- : DEFAULT_RETRY_OPTIONS.secondaryHost
14409
+ : DEFAULT_RETRY_OPTIONS.secondaryHost,
14058
14410
  };
14059
14411
  }
14060
14412
  /**
@@ -14131,7 +14483,7 @@ class StorageRetryPolicy extends coreHttp.BaseRequestPolicy {
14131
14483
  "ENOTFOUND",
14132
14484
  "TIMEOUT",
14133
14485
  "EPIPE",
14134
- "REQUEST_SEND_ERROR" // For default xhr based http client provided in ms-rest-js
14486
+ "REQUEST_SEND_ERROR", // For default xhr based http client provided in ms-rest-js
14135
14487
  ];
14136
14488
  if (err) {
14137
14489
  for (const retriableError of retriableErrors) {
@@ -14317,7 +14669,7 @@ class TelemetryPolicy extends coreHttp.BaseRequestPolicy {
14317
14669
  * @param request -
14318
14670
  */
14319
14671
  async sendRequest(request) {
14320
- {
14672
+ if (coreHttp.isNode) {
14321
14673
  if (!request.headers) {
14322
14674
  request.headers = new coreHttp.HttpHeaders();
14323
14675
  }
@@ -14340,7 +14692,7 @@ class TelemetryPolicyFactory {
14340
14692
  */
14341
14693
  constructor(telemetry) {
14342
14694
  const userAgentInfo = [];
14343
- {
14695
+ if (coreHttp.isNode) {
14344
14696
  if (telemetry) {
14345
14697
  const telemetryString = telemetry.userAgentPrefix || "";
14346
14698
  if (telemetryString.length > 0 && userAgentInfo.indexOf(telemetryString) === -1) {
@@ -14353,7 +14705,7 @@ class TelemetryPolicyFactory {
14353
14705
  userAgentInfo.push(libInfo);
14354
14706
  }
14355
14707
  // e.g. (NODE-VERSION 4.9.1; Windows_NT 10.0.16299)
14356
- const runtimeInfo = `(NODE-VERSION ${process.version}; ${os.type()} ${os.release()})`;
14708
+ const runtimeInfo = `(NODE-VERSION ${process.version}; ${os__namespace.type()} ${os__namespace.release()})`;
14357
14709
  if (userAgentInfo.indexOf(runtimeInfo) === -1) {
14358
14710
  userAgentInfo.push(runtimeInfo);
14359
14711
  }
@@ -14377,6 +14729,247 @@ function getCachedDefaultHttpClient() {
14377
14729
  return _defaultHttpClient;
14378
14730
  }
14379
14731
 
14732
+ // Copyright (c) Microsoft Corporation.
14733
+ /**
14734
+ * A set of constants used internally when processing requests.
14735
+ */
14736
+ const Constants = {
14737
+ DefaultScope: "/.default",
14738
+ /**
14739
+ * Defines constants for use with HTTP headers.
14740
+ */
14741
+ HeaderConstants: {
14742
+ /**
14743
+ * The Authorization header.
14744
+ */
14745
+ AUTHORIZATION: "authorization",
14746
+ },
14747
+ };
14748
+ // Default options for the cycler if none are provided
14749
+ const DEFAULT_CYCLER_OPTIONS = {
14750
+ forcedRefreshWindowInMs: 1000,
14751
+ retryIntervalInMs: 3000,
14752
+ refreshWindowInMs: 1000 * 60 * 2, // Start refreshing 2m before expiry
14753
+ };
14754
+ /**
14755
+ * Converts an an unreliable access token getter (which may resolve with null)
14756
+ * into an AccessTokenGetter by retrying the unreliable getter in a regular
14757
+ * interval.
14758
+ *
14759
+ * @param getAccessToken - a function that produces a promise of an access
14760
+ * token that may fail by returning null
14761
+ * @param retryIntervalInMs - the time (in milliseconds) to wait between retry
14762
+ * attempts
14763
+ * @param timeoutInMs - the timestamp after which the refresh attempt will fail,
14764
+ * throwing an exception
14765
+ * @returns - a promise that, if it resolves, will resolve with an access token
14766
+ */
14767
+ async function beginRefresh(getAccessToken, retryIntervalInMs, timeoutInMs) {
14768
+ // This wrapper handles exceptions gracefully as long as we haven't exceeded
14769
+ // the timeout.
14770
+ async function tryGetAccessToken() {
14771
+ if (Date.now() < timeoutInMs) {
14772
+ try {
14773
+ return await getAccessToken();
14774
+ }
14775
+ catch (_a) {
14776
+ return null;
14777
+ }
14778
+ }
14779
+ else {
14780
+ const finalToken = await getAccessToken();
14781
+ // Timeout is up, so throw if it's still null
14782
+ if (finalToken === null) {
14783
+ throw new Error("Failed to refresh access token.");
14784
+ }
14785
+ return finalToken;
14786
+ }
14787
+ }
14788
+ let token = await tryGetAccessToken();
14789
+ while (token === null) {
14790
+ await coreHttp.delay(retryIntervalInMs);
14791
+ token = await tryGetAccessToken();
14792
+ }
14793
+ return token;
14794
+ }
14795
+ /**
14796
+ * Creates a token cycler from a credential, scopes, and optional settings.
14797
+ *
14798
+ * A token cycler represents a way to reliably retrieve a valid access token
14799
+ * from a TokenCredential. It will handle initializing the token, refreshing it
14800
+ * when it nears expiration, and synchronizes refresh attempts to avoid
14801
+ * concurrency hazards.
14802
+ *
14803
+ * @param credential - the underlying TokenCredential that provides the access
14804
+ * token
14805
+ * @param scopes - the scopes to request authorization for
14806
+ * @param tokenCyclerOptions - optionally override default settings for the cycler
14807
+ *
14808
+ * @returns - a function that reliably produces a valid access token
14809
+ */
14810
+ function createTokenCycler(credential, scopes, tokenCyclerOptions) {
14811
+ let refreshWorker = null;
14812
+ let token = null;
14813
+ const options = Object.assign(Object.assign({}, DEFAULT_CYCLER_OPTIONS), tokenCyclerOptions);
14814
+ /**
14815
+ * This little holder defines several predicates that we use to construct
14816
+ * the rules of refreshing the token.
14817
+ */
14818
+ const cycler = {
14819
+ /**
14820
+ * Produces true if a refresh job is currently in progress.
14821
+ */
14822
+ get isRefreshing() {
14823
+ return refreshWorker !== null;
14824
+ },
14825
+ /**
14826
+ * Produces true if the cycler SHOULD refresh (we are within the refresh
14827
+ * window and not already refreshing)
14828
+ */
14829
+ get shouldRefresh() {
14830
+ var _a;
14831
+ return (!cycler.isRefreshing &&
14832
+ ((_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : 0) - options.refreshWindowInMs < Date.now());
14833
+ },
14834
+ /**
14835
+ * Produces true if the cycler MUST refresh (null or nearly-expired
14836
+ * token).
14837
+ */
14838
+ get mustRefresh() {
14839
+ return (token === null || token.expiresOnTimestamp - options.forcedRefreshWindowInMs < Date.now());
14840
+ },
14841
+ };
14842
+ /**
14843
+ * Starts a refresh job or returns the existing job if one is already
14844
+ * running.
14845
+ */
14846
+ function refresh(getTokenOptions) {
14847
+ var _a;
14848
+ if (!cycler.isRefreshing) {
14849
+ // We bind `scopes` here to avoid passing it around a lot
14850
+ const tryGetAccessToken = () => credential.getToken(scopes, getTokenOptions);
14851
+ // Take advantage of promise chaining to insert an assignment to `token`
14852
+ // before the refresh can be considered done.
14853
+ refreshWorker = beginRefresh(tryGetAccessToken, options.retryIntervalInMs,
14854
+ // If we don't have a token, then we should timeout immediately
14855
+ (_a = token === null || token === void 0 ? void 0 : token.expiresOnTimestamp) !== null && _a !== void 0 ? _a : Date.now())
14856
+ .then((_token) => {
14857
+ refreshWorker = null;
14858
+ token = _token;
14859
+ return token;
14860
+ })
14861
+ .catch((reason) => {
14862
+ // We also should reset the refresher if we enter a failed state. All
14863
+ // existing awaiters will throw, but subsequent requests will start a
14864
+ // new retry chain.
14865
+ refreshWorker = null;
14866
+ token = null;
14867
+ throw reason;
14868
+ });
14869
+ }
14870
+ return refreshWorker;
14871
+ }
14872
+ return async (tokenOptions) => {
14873
+ //
14874
+ // Simple rules:
14875
+ // - If we MUST refresh, then return the refresh task, blocking
14876
+ // the pipeline until a token is available.
14877
+ // - If we SHOULD refresh, then run refresh but don't return it
14878
+ // (we can still use the cached token).
14879
+ // - Return the token, since it's fine if we didn't return in
14880
+ // step 1.
14881
+ //
14882
+ if (cycler.mustRefresh)
14883
+ return refresh(tokenOptions);
14884
+ if (cycler.shouldRefresh) {
14885
+ refresh(tokenOptions);
14886
+ }
14887
+ return token;
14888
+ };
14889
+ }
14890
+ /**
14891
+ * We will retrieve the challenge only if the response status code was 401,
14892
+ * and if the response contained the header "WWW-Authenticate" with a non-empty value.
14893
+ */
14894
+ function getChallenge(response) {
14895
+ const challenge = response.headers.get("WWW-Authenticate");
14896
+ if (response.status === 401 && challenge) {
14897
+ return challenge;
14898
+ }
14899
+ return;
14900
+ }
14901
+ /**
14902
+ * Converts: `Bearer a="b" c="d"`.
14903
+ * Into: `[ { a: 'b', c: 'd' }]`.
14904
+ *
14905
+ * @internal
14906
+ */
14907
+ function parseChallenge(challenge) {
14908
+ const bearerChallenge = challenge.slice("Bearer ".length);
14909
+ const challengeParts = `${bearerChallenge.trim()} `.split(" ").filter((x) => x);
14910
+ const keyValuePairs = challengeParts.map((keyValue) => (([key, value]) => ({ [key]: value }))(keyValue.trim().split("=")));
14911
+ // Key-value pairs to plain object:
14912
+ return keyValuePairs.reduce((a, b) => (Object.assign(Object.assign({}, a), b)), {});
14913
+ }
14914
+ // #endregion
14915
+ /**
14916
+ * Creates a new factory for a RequestPolicy that applies a bearer token to
14917
+ * the requests' `Authorization` headers.
14918
+ *
14919
+ * @param credential - The TokenCredential implementation that can supply the bearer token.
14920
+ * @param scopes - The scopes for which the bearer token applies.
14921
+ */
14922
+ function storageBearerTokenChallengeAuthenticationPolicy(credential, scopes) {
14923
+ // This simple function encapsulates the entire process of reliably retrieving the token
14924
+ let getToken = createTokenCycler(credential, scopes);
14925
+ class StorageBearerTokenChallengeAuthenticationPolicy extends coreHttp.BaseRequestPolicy {
14926
+ constructor(nextPolicy, options) {
14927
+ super(nextPolicy, options);
14928
+ }
14929
+ async sendRequest(webResource) {
14930
+ if (!webResource.url.toLowerCase().startsWith("https://")) {
14931
+ throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");
14932
+ }
14933
+ const getTokenInternal = getToken;
14934
+ const token = (await getTokenInternal({
14935
+ abortSignal: webResource.abortSignal,
14936
+ tracingOptions: {
14937
+ tracingContext: webResource.tracingContext,
14938
+ },
14939
+ })).token;
14940
+ webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${token}`);
14941
+ const response = await this._nextPolicy.sendRequest(webResource);
14942
+ if ((response === null || response === void 0 ? void 0 : response.status) === 401) {
14943
+ const challenge = getChallenge(response);
14944
+ if (challenge) {
14945
+ const challengeInfo = parseChallenge(challenge);
14946
+ const challengeScopes = challengeInfo.resource_id + Constants.DefaultScope;
14947
+ const parsedAuthUri = coreHttp.URLBuilder.parse(challengeInfo.authorization_uri);
14948
+ const pathSegments = parsedAuthUri.getPath().split("/");
14949
+ const tenantId = pathSegments[1];
14950
+ const getTokenForChallenge = createTokenCycler(credential, challengeScopes);
14951
+ const tokenForChallenge = (await getTokenForChallenge({
14952
+ abortSignal: webResource.abortSignal,
14953
+ tracingOptions: {
14954
+ tracingContext: webResource.tracingContext,
14955
+ },
14956
+ tenantId: tenantId,
14957
+ })).token;
14958
+ getToken = getTokenForChallenge;
14959
+ webResource.headers.set(Constants.HeaderConstants.AUTHORIZATION, `Bearer ${tokenForChallenge}`);
14960
+ return this._nextPolicy.sendRequest(webResource);
14961
+ }
14962
+ }
14963
+ return response;
14964
+ }
14965
+ }
14966
+ return {
14967
+ create: (nextPolicy, options) => {
14968
+ return new StorageBearerTokenChallengeAuthenticationPolicy(nextPolicy, options);
14969
+ },
14970
+ };
14971
+ }
14972
+
14380
14973
  // Copyright (c) Microsoft Corporation.
14381
14974
  /**
14382
14975
  * A helper to decide if a given argument satisfies the Pipeline contract
@@ -14422,7 +15015,7 @@ class Pipeline {
14422
15015
  toServiceClientOptions() {
14423
15016
  return {
14424
15017
  httpClient: this.options.httpClient,
14425
- requestPolicyFactories: this.factories
15018
+ requestPolicyFactories: this.factories,
14426
15019
  };
14427
15020
  }
14428
15021
  }
@@ -14434,6 +15027,7 @@ class Pipeline {
14434
15027
  * @returns A new Pipeline object.
14435
15028
  */
14436
15029
  function newPipeline(credential, pipelineOptions = {}) {
15030
+ var _a;
14437
15031
  if (credential === undefined) {
14438
15032
  credential = new AnonymousCredential();
14439
15033
  }
@@ -14455,16 +15049,16 @@ function newPipeline(credential, pipelineOptions = {}) {
14455
15049
  coreHttp.logPolicy({
14456
15050
  logger: logger.info,
14457
15051
  allowedHeaderNames: StorageBlobLoggingAllowedHeaderNames,
14458
- allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters
14459
- })
15052
+ allowedQueryParameters: StorageBlobLoggingAllowedQueryParameters,
15053
+ }),
14460
15054
  ];
14461
- {
15055
+ if (coreHttp.isNode) {
14462
15056
  // policies only available in Node.js runtime, not in browsers
14463
15057
  factories.push(coreHttp.proxyPolicy(pipelineOptions.proxyOptions));
14464
15058
  factories.push(coreHttp.disableResponseDecompressionPolicy());
14465
15059
  }
14466
15060
  factories.push(coreHttp.isTokenCredential(credential)
14467
- ? attachCredential(coreHttp.bearerTokenAuthenticationPolicy(credential, StorageOAuthScopes), credential)
15061
+ ? attachCredential(storageBearerTokenChallengeAuthenticationPolicy(credential, (_a = pipelineOptions.audience) !== null && _a !== void 0 ? _a : StorageOAuthScopes), credential)
14468
15062
  : credential);
14469
15063
  return new Pipeline(factories, pipelineOptions);
14470
15064
  }
@@ -14491,7 +15085,9 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
14491
15085
  */
14492
15086
  signRequest(request) {
14493
15087
  request.headers.set(HeaderConstants.X_MS_DATE, new Date().toUTCString());
14494
- if (request.body && typeof request.body === "string" && request.body.length > 0) {
15088
+ if (request.body &&
15089
+ (typeof request.body === "string" || request.body !== undefined) &&
15090
+ request.body.length > 0) {
14495
15091
  request.headers.set(HeaderConstants.CONTENT_LENGTH, Buffer.byteLength(request.body));
14496
15092
  }
14497
15093
  const stringToSign = [
@@ -14506,7 +15102,7 @@ class StorageSharedKeyCredentialPolicy extends CredentialPolicy {
14506
15102
  this.getHeaderValueToSign(request, HeaderConstants.IF_MATCH),
14507
15103
  this.getHeaderValueToSign(request, HeaderConstants.IF_NONE_MATCH),
14508
15104
  this.getHeaderValueToSign(request, HeaderConstants.IF_UNMODIFIED_SINCE),
14509
- this.getHeaderValueToSign(request, HeaderConstants.RANGE)
15105
+ this.getHeaderValueToSign(request, HeaderConstants.RANGE),
14510
15106
  ].join("\n") +
14511
15107
  "\n" +
14512
15108
  this.getCanonicalizedHeadersString(request) +
@@ -14635,9 +15231,7 @@ class StorageSharedKeyCredential extends Credential {
14635
15231
  * @param stringToSign -
14636
15232
  */
14637
15233
  computeHMACSHA256(stringToSign) {
14638
- return crypto.createHmac("sha256", this.accountKey)
14639
- .update(stringToSign, "utf8")
14640
- .digest("base64");
15234
+ return crypto.createHmac("sha256", this.accountKey).update(stringToSign, "utf8").digest("base64");
14641
15235
  }
14642
15236
  }
14643
15237
 
@@ -14649,8 +15243,8 @@ class StorageSharedKeyCredential extends Credential {
14649
15243
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
14650
15244
  */
14651
15245
  const packageName = "azure-storage-blob";
14652
- const packageVersion = "12.9.0-beta.1";
14653
- class StorageClientContext extends coreHttp.ServiceClient {
15246
+ const packageVersion = "12.9.0-beta.4";
15247
+ class StorageClientContext extends coreHttp__namespace.ServiceClient {
14654
15248
  /**
14655
15249
  * Initializes a new instance of the StorageClientContext class.
14656
15250
  * @param url The URL of the service account, container, or blob that is the target of the desired
@@ -14666,7 +15260,7 @@ class StorageClientContext extends coreHttp.ServiceClient {
14666
15260
  options = {};
14667
15261
  }
14668
15262
  if (!options.userAgent) {
14669
- const defaultUserAgent = coreHttp.getDefaultUserAgentValue();
15263
+ const defaultUserAgent = coreHttp__namespace.getDefaultUserAgentValue();
14670
15264
  options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
14671
15265
  }
14672
15266
  super(undefined, options);
@@ -14675,7 +15269,7 @@ class StorageClientContext extends coreHttp.ServiceClient {
14675
15269
  // Parameter assignments
14676
15270
  this.url = url;
14677
15271
  // Assigning values to Constant parameters
14678
- this.version = options.version || "2020-12-06";
15272
+ this.version = options.version || "2021-04-10";
14679
15273
  }
14680
15274
  }
14681
15275
 
@@ -14722,7 +15316,7 @@ class StorageClient {
14722
15316
  */
14723
15317
  const createSpan = coreTracing.createSpanFunction({
14724
15318
  packagePrefix: "Azure.Storage.Blob",
14725
- namespace: "Microsoft.Storage"
15319
+ namespace: "Microsoft.Storage",
14726
15320
  });
14727
15321
  /**
14728
15322
  * @internal
@@ -14736,7 +15330,7 @@ function convertTracingToRequestOptionsBase(options) {
14736
15330
  return {
14737
15331
  // By passing spanOptions if they exist at runtime, we're backwards compatible with @azure/core-tracing@preview.13 and earlier.
14738
15332
  spanOptions: (_a = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _a === void 0 ? void 0 : _a.spanOptions,
14739
- tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext
15333
+ tracingContext: (_b = options === null || options === void 0 ? void 0 : options.tracingOptions) === null || _b === void 0 ? void 0 : _b.tracingContext,
14740
15334
  };
14741
15335
  }
14742
15336
 
@@ -14994,6 +15588,10 @@ class ContainerSASPermissions {
14994
15588
  * Specifies that Permanent Delete is permitted.
14995
15589
  */
14996
15590
  this.permanentDelete = false;
15591
+ /**
15592
+ * Specifies that Filter Blobs by Tags is permitted.
15593
+ */
15594
+ this.filterByTags = false;
14997
15595
  }
14998
15596
  /**
14999
15597
  * Creates an {@link ContainerSASPermissions} from the specified permissions string. This method will throw an
@@ -15041,6 +15639,9 @@ class ContainerSASPermissions {
15041
15639
  case "y":
15042
15640
  containerSASPermissions.permanentDelete = true;
15043
15641
  break;
15642
+ case "f":
15643
+ containerSASPermissions.filterByTags = true;
15644
+ break;
15044
15645
  default:
15045
15646
  throw new RangeError(`Invalid permission ${char}`);
15046
15647
  }
@@ -15091,6 +15692,9 @@ class ContainerSASPermissions {
15091
15692
  if (permissionLike.permanentDelete) {
15092
15693
  containerSASPermissions.permanentDelete = true;
15093
15694
  }
15695
+ if (permissionLike.filterByTags) {
15696
+ containerSASPermissions.filterByTags = true;
15697
+ }
15094
15698
  return containerSASPermissions;
15095
15699
  }
15096
15700
  /**
@@ -15139,6 +15743,9 @@ class ContainerSASPermissions {
15139
15743
  if (this.permanentDelete) {
15140
15744
  permissions.push("y");
15141
15745
  }
15746
+ if (this.filterByTags) {
15747
+ permissions.push("f");
15748
+ }
15142
15749
  return permissions.join("");
15143
15750
  }
15144
15751
  }
@@ -15168,9 +15775,7 @@ class UserDelegationKeyCredential {
15168
15775
  */
15169
15776
  computeHMACSHA256(stringToSign) {
15170
15777
  // console.log(`stringToSign: ${JSON.stringify(stringToSign)}`);
15171
- return crypto.createHmac("sha256", this.key)
15172
- .update(stringToSign, "utf8")
15173
- .digest("base64");
15778
+ return crypto.createHmac("sha256", this.key).update(stringToSign, "utf8").digest("base64");
15174
15779
  }
15175
15780
  }
15176
15781
 
@@ -15188,6 +15793,10 @@ function ipRangeToString(ipRange) {
15188
15793
  }
15189
15794
 
15190
15795
  // Copyright (c) Microsoft Corporation.
15796
+ /**
15797
+ * Protocols for generated SAS.
15798
+ */
15799
+ exports.SASProtocol = void 0;
15191
15800
  (function (SASProtocol) {
15192
15801
  /**
15193
15802
  * Protocol that allows HTTPS only
@@ -15276,7 +15885,7 @@ class SASQueryParameters {
15276
15885
  if (this.ipRangeInner) {
15277
15886
  return {
15278
15887
  end: this.ipRangeInner.end,
15279
- start: this.ipRangeInner.start
15888
+ start: this.ipRangeInner.start,
15280
15889
  };
15281
15890
  }
15282
15891
  return undefined;
@@ -15311,7 +15920,7 @@ class SASQueryParameters {
15311
15920
  "rscl",
15312
15921
  "rsct",
15313
15922
  "saoid",
15314
- "scid"
15923
+ "scid",
15315
15924
  ];
15316
15925
  const queries = [];
15317
15926
  for (const param of params) {
@@ -15517,7 +16126,7 @@ function generateBlobSASQueryParameters20150405(blobSASSignatureValues, sharedKe
15517
16126
  blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
15518
16127
  blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
15519
16128
  blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
15520
- blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : ""
16129
+ blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
15521
16130
  ].join("\n");
15522
16131
  const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
15523
16132
  return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
@@ -15586,7 +16195,7 @@ function generateBlobSASQueryParameters20181109(blobSASSignatureValues, sharedKe
15586
16195
  blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
15587
16196
  blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
15588
16197
  blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
15589
- blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : ""
16198
+ blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
15590
16199
  ].join("\n");
15591
16200
  const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
15592
16201
  return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType);
@@ -15656,7 +16265,7 @@ function generateBlobSASQueryParameters20201206(blobSASSignatureValues, sharedKe
15656
16265
  blobSASSignatureValues.contentDisposition ? blobSASSignatureValues.contentDisposition : "",
15657
16266
  blobSASSignatureValues.contentEncoding ? blobSASSignatureValues.contentEncoding : "",
15658
16267
  blobSASSignatureValues.contentLanguage ? blobSASSignatureValues.contentLanguage : "",
15659
- blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : ""
16268
+ blobSASSignatureValues.contentType ? blobSASSignatureValues.contentType : "",
15660
16269
  ].join("\n");
15661
16270
  const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
15662
16271
  return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, undefined, undefined, undefined, blobSASSignatureValues.encryptionScope);
@@ -15732,7 +16341,7 @@ function generateBlobSASQueryParametersUDK20181109(blobSASSignatureValues, userD
15732
16341
  blobSASSignatureValues.contentDisposition,
15733
16342
  blobSASSignatureValues.contentEncoding,
15734
16343
  blobSASSignatureValues.contentLanguage,
15735
- blobSASSignatureValues.contentType
16344
+ blobSASSignatureValues.contentType,
15736
16345
  ].join("\n");
15737
16346
  const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
15738
16347
  return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey);
@@ -15811,7 +16420,7 @@ function generateBlobSASQueryParametersUDK20200210(blobSASSignatureValues, userD
15811
16420
  blobSASSignatureValues.contentDisposition,
15812
16421
  blobSASSignatureValues.contentEncoding,
15813
16422
  blobSASSignatureValues.contentLanguage,
15814
- blobSASSignatureValues.contentType
16423
+ blobSASSignatureValues.contentType,
15815
16424
  ].join("\n");
15816
16425
  const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
15817
16426
  return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId);
@@ -15891,7 +16500,7 @@ function generateBlobSASQueryParametersUDK20201206(blobSASSignatureValues, userD
15891
16500
  blobSASSignatureValues.contentDisposition,
15892
16501
  blobSASSignatureValues.contentEncoding,
15893
16502
  blobSASSignatureValues.contentLanguage,
15894
- blobSASSignatureValues.contentType
16503
+ blobSASSignatureValues.contentType,
15895
16504
  ].join("\n");
15896
16505
  const signature = userDelegationKeyCredential.computeHMACSHA256(stringToSign);
15897
16506
  return new SASQueryParameters(blobSASSignatureValues.version, signature, verifiedPermissions, undefined, undefined, blobSASSignatureValues.protocol, blobSASSignatureValues.startsOn, blobSASSignatureValues.expiresOn, blobSASSignatureValues.ipRange, blobSASSignatureValues.identifier, resource, blobSASSignatureValues.cacheControl, blobSASSignatureValues.contentDisposition, blobSASSignatureValues.contentEncoding, blobSASSignatureValues.contentLanguage, blobSASSignatureValues.contentType, userDelegationKeyCredential.userDelegationKey, blobSASSignatureValues.preauthorizedAgentObjectId, blobSASSignatureValues.correlationId, blobSASSignatureValues.encryptionScope);
@@ -15944,6 +16553,11 @@ function SASSignatureValuesSanityCheckAndAutofill(blobSASSignatureValues) {
15944
16553
  (blobSASSignatureValues.permissions.move || blobSASSignatureValues.permissions.execute)) {
15945
16554
  throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");
15946
16555
  }
16556
+ if (version < "2021-04-10" &&
16557
+ blobSASSignatureValues.permissions &&
16558
+ blobSASSignatureValues.permissions.filterByTags) {
16559
+ throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");
16560
+ }
15947
16561
  if (version < "2020-02-10" &&
15948
16562
  (blobSASSignatureValues.preauthorizedAgentObjectId || blobSASSignatureValues.correlationId)) {
15949
16563
  throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");
@@ -16024,7 +16638,7 @@ class BlobLeaseClient {
16024
16638
  catch (e) {
16025
16639
  span.setStatus({
16026
16640
  code: coreTracing.SpanStatusCode.ERROR,
16027
- message: e.message
16641
+ message: e.message,
16028
16642
  });
16029
16643
  throw e;
16030
16644
  }
@@ -16059,7 +16673,7 @@ class BlobLeaseClient {
16059
16673
  catch (e) {
16060
16674
  span.setStatus({
16061
16675
  code: coreTracing.SpanStatusCode.ERROR,
16062
- message: e.message
16676
+ message: e.message,
16063
16677
  });
16064
16678
  throw e;
16065
16679
  }
@@ -16092,7 +16706,7 @@ class BlobLeaseClient {
16092
16706
  catch (e) {
16093
16707
  span.setStatus({
16094
16708
  code: coreTracing.SpanStatusCode.ERROR,
16095
- message: e.message
16709
+ message: e.message,
16096
16710
  });
16097
16711
  throw e;
16098
16712
  }
@@ -16124,7 +16738,7 @@ class BlobLeaseClient {
16124
16738
  catch (e) {
16125
16739
  span.setStatus({
16126
16740
  code: coreTracing.SpanStatusCode.ERROR,
16127
- message: e.message
16741
+ message: e.message,
16128
16742
  });
16129
16743
  throw e;
16130
16744
  }
@@ -16159,7 +16773,7 @@ class BlobLeaseClient {
16159
16773
  catch (e) {
16160
16774
  span.setStatus({
16161
16775
  code: coreTracing.SpanStatusCode.ERROR,
16162
- message: e.message
16776
+ message: e.message,
16163
16777
  });
16164
16778
  throw e;
16165
16779
  }
@@ -16239,8 +16853,7 @@ class RetriableReadableStream extends stream.Readable {
16239
16853
  });
16240
16854
  }
16241
16855
  else {
16242
- this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this
16243
- .offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
16856
+ this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`));
16244
16857
  }
16245
16858
  }
16246
16859
  else {
@@ -17085,7 +17698,7 @@ class AvroReader {
17085
17698
  }
17086
17699
  async initialize(options = {}) {
17087
17700
  const header = await AvroParser.readFixedBytes(this._headerStream, AVRO_INIT_BYTES.length, {
17088
- abortSignal: options.abortSignal
17701
+ abortSignal: options.abortSignal,
17089
17702
  });
17090
17703
  if (!arraysEqual(header, AVRO_INIT_BYTES)) {
17091
17704
  throw new Error("Stream is not an Avro file.");
@@ -17093,7 +17706,7 @@ class AvroReader {
17093
17706
  // File metadata is written as if defined by the following map schema:
17094
17707
  // { "type": "map", "values": "bytes"}
17095
17708
  this._metadata = await AvroParser.readMap(this._headerStream, AvroParser.readString, {
17096
- abortSignal: options.abortSignal
17709
+ abortSignal: options.abortSignal,
17097
17710
  });
17098
17711
  // Validate codec
17099
17712
  const codec = this._metadata[AVRO_CODEC_KEY];
@@ -17102,7 +17715,7 @@ class AvroReader {
17102
17715
  }
17103
17716
  // The 16-byte, randomly-generated sync marker for this file.
17104
17717
  this._syncMarker = await AvroParser.readFixedBytes(this._headerStream, AVRO_SYNC_MARKER_SIZE, {
17105
- abortSignal: options.abortSignal
17718
+ abortSignal: options.abortSignal,
17106
17719
  });
17107
17720
  // Parse the schema
17108
17721
  const schema = JSON.parse(this._metadata[AVRO_SCHEMA_KEY]);
@@ -17111,7 +17724,7 @@ class AvroReader {
17111
17724
  this._blockOffset = this._initialBlockOffset + this._dataStream.position;
17112
17725
  }
17113
17726
  this._itemsRemainingInBlock = await AvroParser.readLong(this._dataStream, {
17114
- abortSignal: options.abortSignal
17727
+ abortSignal: options.abortSignal,
17115
17728
  });
17116
17729
  // skip block length
17117
17730
  await AvroParser.readLong(this._dataStream, { abortSignal: options.abortSignal });
@@ -17133,13 +17746,13 @@ class AvroReader {
17133
17746
  }
17134
17747
  while (this.hasNext()) {
17135
17748
  const result = yield tslib.__await(this._itemType.read(this._dataStream, {
17136
- abortSignal: options.abortSignal
17749
+ abortSignal: options.abortSignal,
17137
17750
  }));
17138
17751
  this._itemsRemainingInBlock--;
17139
17752
  this._objectIndex++;
17140
17753
  if (this._itemsRemainingInBlock == 0) {
17141
17754
  const marker = yield tslib.__await(AvroParser.readFixedBytes(this._dataStream, AVRO_SYNC_MARKER_SIZE, {
17142
- abortSignal: options.abortSignal
17755
+ abortSignal: options.abortSignal,
17143
17756
  }));
17144
17757
  this._blockOffset = this._initialBlockOffset + this._dataStream.position;
17145
17758
  this._objectIndex = 0;
@@ -17148,7 +17761,7 @@ class AvroReader {
17148
17761
  }
17149
17762
  try {
17150
17763
  this._itemsRemainingInBlock = yield tslib.__await(AvroParser.readLong(this._dataStream, {
17151
- abortSignal: options.abortSignal
17764
+ abortSignal: options.abortSignal,
17152
17765
  }));
17153
17766
  }
17154
17767
  catch (err) {
@@ -17347,7 +17960,7 @@ class BlobQuickQueryStream extends stream.Readable {
17347
17960
  position,
17348
17961
  name,
17349
17962
  isFatal: fatal,
17350
- description
17963
+ description,
17351
17964
  });
17352
17965
  }
17353
17966
  break;
@@ -17723,6 +18336,11 @@ class BlobQueryResponse {
17723
18336
  }
17724
18337
 
17725
18338
  // Copyright (c) Microsoft Corporation.
18339
+ /**
18340
+ * Represents the access tier on a blob.
18341
+ * For detailed information about block blob level tiering see {@link https://docs.microsoft.com/azure/storage/blobs/storage-blob-storage-tiers|Hot, cool and archive storage tiers.}
18342
+ */
18343
+ exports.BlockBlobTier = void 0;
17726
18344
  (function (BlockBlobTier) {
17727
18345
  /**
17728
18346
  * Optimized for storing data that is accessed frequently.
@@ -17738,6 +18356,12 @@ class BlobQueryResponse {
17738
18356
  */
17739
18357
  BlockBlobTier["Archive"] = "Archive";
17740
18358
  })(exports.BlockBlobTier || (exports.BlockBlobTier = {}));
18359
+ /**
18360
+ * Specifies the page blob tier to set the blob to. This is only applicable to page blobs on premium storage accounts.
18361
+ * Please see {@link https://docs.microsoft.com/azure/storage/storage-premium-storage#scalability-and-performance-targets|here}
18362
+ * for detailed information on the corresponding IOPS and throughput per PageBlobTier.
18363
+ */
18364
+ exports.PremiumPageBlobTier = void 0;
17741
18365
  (function (PremiumPageBlobTier) {
17742
18366
  /**
17743
18367
  * P4 Tier.
@@ -17798,6 +18422,20 @@ function ensureCpkIfSpecified(cpk, isHttps) {
17798
18422
  cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;
17799
18423
  }
17800
18424
  }
18425
+ /**
18426
+ * Defines the known cloud audiences for Storage.
18427
+ */
18428
+ exports.StorageBlobAudience = void 0;
18429
+ (function (StorageBlobAudience) {
18430
+ /**
18431
+ * The OAuth scope to use to retrieve an AAD token for Azure Storage.
18432
+ */
18433
+ StorageBlobAudience["StorageOAuthScopes"] = "https://storage.azure.com/.default";
18434
+ /**
18435
+ * The OAuth scope to use to retrieve an AAD token for Azure Disk.
18436
+ */
18437
+ StorageBlobAudience["DiskComputeOAuthScopes"] = "https://disk.compute.azure.com/.default";
18438
+ })(exports.StorageBlobAudience || (exports.StorageBlobAudience = {}));
17801
18439
 
17802
18440
  // Copyright (c) Microsoft Corporation.
17803
18441
  // Licensed under the MIT license.
@@ -17810,16 +18448,16 @@ function ensureCpkIfSpecified(cpk, isHttps) {
17810
18448
  function rangeResponseFromModel(response) {
17811
18449
  const pageRange = (response._response.parsedBody.pageRange || []).map((x) => ({
17812
18450
  offset: x.start,
17813
- count: x.end - x.start
18451
+ count: x.end - x.start,
17814
18452
  }));
17815
18453
  const clearRange = (response._response.parsedBody.clearRange || []).map((x) => ({
17816
18454
  offset: x.start,
17817
- count: x.end - x.start
18455
+ count: x.end - x.start,
17818
18456
  }));
17819
18457
  return Object.assign(Object.assign({}, response), { pageRange,
17820
18458
  clearRange, _response: Object.assign(Object.assign({}, response._response), { parsedBody: {
17821
18459
  pageRange,
17822
- clearRange
18460
+ clearRange,
17823
18461
  } }) });
17824
18462
  }
17825
18463
 
@@ -17832,7 +18470,7 @@ function rangeResponseFromModel(response) {
17832
18470
  */
17833
18471
  class BlobBeginCopyFromUrlPoller extends coreLro.Poller {
17834
18472
  constructor(options) {
17835
- const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions } = options;
18473
+ const { blobClient, copySource, intervalInMs = 15000, onProgress, resumeFrom, startCopyFromURLOptions, } = options;
17836
18474
  let state;
17837
18475
  if (resumeFrom) {
17838
18476
  state = JSON.parse(resumeFrom).state;
@@ -17868,7 +18506,7 @@ const cancel = async function cancel(options = {}) {
17868
18506
  }
17869
18507
  // if abortCopyFromURL throws, it will bubble up to user's poller.cancelOperation call
17870
18508
  await state.blobClient.abortCopyFromURL(copyId, {
17871
- abortSignal: options.abortSignal
18509
+ abortSignal: options.abortSignal,
17872
18510
  });
17873
18511
  state.isCancelled = true;
17874
18512
  return makeBlobBeginCopyFromURLPollOperation(state);
@@ -17946,7 +18584,7 @@ function makeBlobBeginCopyFromURLPollOperation(state) {
17946
18584
  state: Object.assign({}, state),
17947
18585
  cancel,
17948
18586
  toString,
17949
- update
18587
+ update,
17950
18588
  };
17951
18589
  }
17952
18590
 
@@ -18588,7 +19226,7 @@ async function streamToBuffer2(stream, buffer, encoding) {
18588
19226
  */
18589
19227
  async function readStreamToLocalFile(rs, file) {
18590
19228
  return new Promise((resolve, reject) => {
18591
- const ws = fs.createWriteStream(file);
19229
+ const ws = fs__namespace.createWriteStream(file);
18592
19230
  rs.on("error", (err) => {
18593
19231
  reject(err);
18594
19232
  });
@@ -18604,8 +19242,8 @@ async function readStreamToLocalFile(rs, file) {
18604
19242
  *
18605
19243
  * Promisified version of fs.stat().
18606
19244
  */
18607
- const fsStat = util.promisify(fs.stat);
18608
- const fsCreateReadStream = fs.createReadStream;
19245
+ const fsStat = util__namespace.promisify(fs__namespace.stat);
19246
+ const fsCreateReadStream = fs__namespace.createReadStream;
18609
19247
 
18610
19248
  /**
18611
19249
  * A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob,
@@ -18648,12 +19286,17 @@ class BlobClient extends StorageClient {
18648
19286
  const blobName = blobNameOrOptions;
18649
19287
  const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
18650
19288
  if (extractedCreds.kind === "AccountConnString") {
18651
- {
19289
+ if (coreHttp.isNode) {
18652
19290
  const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
18653
19291
  url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
18654
- options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
19292
+ if (!options.proxyOptions) {
19293
+ options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
19294
+ }
18655
19295
  pipeline = newPipeline(sharedKeyCredential, options);
18656
19296
  }
19297
+ else {
19298
+ throw new Error("Account connection string is only supported in Node.js environment");
19299
+ }
18657
19300
  }
18658
19301
  else if (extractedCreds.kind === "SASConnString") {
18659
19302
  url =
@@ -18670,10 +19313,8 @@ class BlobClient extends StorageClient {
18670
19313
  throw new Error("Expecting non-empty strings for containerName and blobName parameters");
18671
19314
  }
18672
19315
  super(url, pipeline);
18673
- ({
18674
- blobName: this._name,
18675
- containerName: this._containerName
18676
- } = this.getBlobAndContainerNamesFromUrl());
19316
+ ({ blobName: this._name, containerName: this._containerName } =
19317
+ this.getBlobAndContainerNamesFromUrl());
18677
19318
  this.blobContext = new Blob$1(this.storageClientContext);
18678
19319
  this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT);
18679
19320
  this._versionId = getURLParameter(this.url, URLConstants.Parameters.VERSIONID);
@@ -18798,11 +19439,11 @@ class BlobClient extends StorageClient {
18798
19439
  const { span, updatedOptions } = createSpan("BlobClient-download", options);
18799
19440
  try {
18800
19441
  const res = await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
18801
- onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress // for Node.js, progress is reported by RetriableReadableStream
19442
+ onDownloadProgress: coreHttp.isNode ? undefined : options.onProgress, // for Node.js, progress is reported by RetriableReadableStream
18802
19443
  }, range: offset === 0 && !count ? undefined : rangeToString({ offset, count }), rangeGetContentMD5: options.rangeGetContentMD5, rangeGetContentCRC64: options.rangeGetContentCrc64, snapshot: options.snapshot, cpkInfo: options.customerProvidedKey }, convertTracingToRequestOptionsBase(updatedOptions)));
18803
19444
  const wrappedRes = Object.assign(Object.assign({}, res), { _response: res._response, objectReplicationDestinationPolicyId: res.objectReplicationPolicyId, objectReplicationSourceProperties: parseObjectReplicationRecord(res.objectReplicationRules) });
18804
19445
  // Return browser response immediately
18805
- if (false) {
19446
+ if (!coreHttp.isNode) {
18806
19447
  return wrappedRes;
18807
19448
  }
18808
19449
  // We support retrying when download stream unexpected ends in Node.js runtime
@@ -18829,16 +19470,16 @@ class BlobClient extends StorageClient {
18829
19470
  ifModifiedSince: options.conditions.ifModifiedSince,
18830
19471
  ifNoneMatch: options.conditions.ifNoneMatch,
18831
19472
  ifUnmodifiedSince: options.conditions.ifUnmodifiedSince,
18832
- ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions
19473
+ ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions,
18833
19474
  },
18834
19475
  range: rangeToString({
18835
19476
  count: offset + res.contentLength - start,
18836
- offset: start
19477
+ offset: start,
18837
19478
  }),
18838
19479
  rangeGetContentMD5: options.rangeGetContentMD5,
18839
19480
  rangeGetContentCRC64: options.rangeGetContentCrc64,
18840
19481
  snapshot: options.snapshot,
18841
- cpkInfo: options.customerProvidedKey
19482
+ cpkInfo: options.customerProvidedKey,
18842
19483
  };
18843
19484
  // Debug purpose only
18844
19485
  // console.log(
@@ -18849,13 +19490,13 @@ class BlobClient extends StorageClient {
18849
19490
  return (await this.blobContext.download(Object.assign({ abortSignal: options.abortSignal }, updatedDownloadOptions))).readableStreamBody;
18850
19491
  }, offset, res.contentLength, {
18851
19492
  maxRetryRequests: options.maxRetryRequests,
18852
- onProgress: options.onProgress
19493
+ onProgress: options.onProgress,
18853
19494
  });
18854
19495
  }
18855
19496
  catch (e) {
18856
19497
  span.setStatus({
18857
19498
  code: coreTracing.SpanStatusCode.ERROR,
18858
- message: e.message
19499
+ message: e.message,
18859
19500
  });
18860
19501
  throw e;
18861
19502
  }
@@ -18880,21 +19521,23 @@ class BlobClient extends StorageClient {
18880
19521
  abortSignal: options.abortSignal,
18881
19522
  customerProvidedKey: options.customerProvidedKey,
18882
19523
  conditions: options.conditions,
18883
- tracingOptions: updatedOptions.tracingOptions
19524
+ tracingOptions: updatedOptions.tracingOptions,
18884
19525
  });
18885
19526
  return true;
18886
19527
  }
18887
19528
  catch (e) {
18888
19529
  if (e.statusCode === 404) {
18889
- span.setStatus({
18890
- code: coreTracing.SpanStatusCode.ERROR,
18891
- message: "Expected exception when checking blob existence"
18892
- });
19530
+ // Expected exception when checking blob existence
18893
19531
  return false;
18894
19532
  }
19533
+ else if (e.statusCode === 409 &&
19534
+ e.details.errorCode === BlobUsesCustomerSpecifiedEncryptionMsg) {
19535
+ // Expected exception when checking blob existence
19536
+ return true;
19537
+ }
18895
19538
  span.setStatus({
18896
19539
  code: coreTracing.SpanStatusCode.ERROR,
18897
- message: e.message
19540
+ message: e.message,
18898
19541
  });
18899
19542
  throw e;
18900
19543
  }
@@ -18926,7 +19569,7 @@ class BlobClient extends StorageClient {
18926
19569
  catch (e) {
18927
19570
  span.setStatus({
18928
19571
  code: coreTracing.SpanStatusCode.ERROR,
18929
- message: e.message
19572
+ message: e.message,
18930
19573
  });
18931
19574
  throw e;
18932
19575
  }
@@ -18953,7 +19596,7 @@ class BlobClient extends StorageClient {
18953
19596
  catch (e) {
18954
19597
  span.setStatus({
18955
19598
  code: coreTracing.SpanStatusCode.ERROR,
18956
- message: e.message
19599
+ message: e.message,
18957
19600
  });
18958
19601
  throw e;
18959
19602
  }
@@ -18975,20 +19618,19 @@ class BlobClient extends StorageClient {
18975
19618
  const { span, updatedOptions } = createSpan("BlobClient-deleteIfExists", options);
18976
19619
  try {
18977
19620
  const res = await this.delete(updatedOptions);
18978
- return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
18979
- });
19621
+ return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
18980
19622
  }
18981
19623
  catch (e) {
18982
19624
  if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobNotFound") {
18983
19625
  span.setStatus({
18984
19626
  code: coreTracing.SpanStatusCode.ERROR,
18985
- message: "Expected exception when deleting a blob or snapshot only if it exists."
19627
+ message: "Expected exception when deleting a blob or snapshot only if it exists.",
18986
19628
  });
18987
19629
  return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
18988
19630
  }
18989
19631
  span.setStatus({
18990
19632
  code: coreTracing.SpanStatusCode.ERROR,
18991
- message: e.message
19633
+ message: e.message,
18992
19634
  });
18993
19635
  throw e;
18994
19636
  }
@@ -19012,7 +19654,7 @@ class BlobClient extends StorageClient {
19012
19654
  catch (e) {
19013
19655
  span.setStatus({
19014
19656
  code: coreTracing.SpanStatusCode.ERROR,
19015
- message: e.message
19657
+ message: e.message,
19016
19658
  });
19017
19659
  throw e;
19018
19660
  }
@@ -19046,7 +19688,7 @@ class BlobClient extends StorageClient {
19046
19688
  catch (e) {
19047
19689
  span.setStatus({
19048
19690
  code: coreTracing.SpanStatusCode.ERROR,
19049
- message: e.message
19691
+ message: e.message,
19050
19692
  });
19051
19693
  throw e;
19052
19694
  }
@@ -19076,7 +19718,7 @@ class BlobClient extends StorageClient {
19076
19718
  catch (e) {
19077
19719
  span.setStatus({
19078
19720
  code: coreTracing.SpanStatusCode.ERROR,
19079
- message: e.message
19721
+ message: e.message,
19080
19722
  });
19081
19723
  throw e;
19082
19724
  }
@@ -19102,7 +19744,7 @@ class BlobClient extends StorageClient {
19102
19744
  catch (e) {
19103
19745
  span.setStatus({
19104
19746
  code: coreTracing.SpanStatusCode.ERROR,
19105
- message: e.message
19747
+ message: e.message,
19106
19748
  });
19107
19749
  throw e;
19108
19750
  }
@@ -19126,7 +19768,7 @@ class BlobClient extends StorageClient {
19126
19768
  catch (e) {
19127
19769
  span.setStatus({
19128
19770
  code: coreTracing.SpanStatusCode.ERROR,
19129
- message: e.message
19771
+ message: e.message,
19130
19772
  });
19131
19773
  throw e;
19132
19774
  }
@@ -19160,7 +19802,7 @@ class BlobClient extends StorageClient {
19160
19802
  catch (e) {
19161
19803
  span.setStatus({
19162
19804
  code: coreTracing.SpanStatusCode.ERROR,
19163
- message: e.message
19805
+ message: e.message,
19164
19806
  });
19165
19807
  throw e;
19166
19808
  }
@@ -19244,7 +19886,7 @@ class BlobClient extends StorageClient {
19244
19886
  const client = {
19245
19887
  abortCopyFromURL: (...args) => this.abortCopyFromURL(...args),
19246
19888
  getProperties: (...args) => this.getProperties(...args),
19247
- startCopyFromURL: (...args) => this.startCopyFromURL(...args)
19889
+ startCopyFromURL: (...args) => this.startCopyFromURL(...args),
19248
19890
  };
19249
19891
  const poller = new BlobBeginCopyFromUrlPoller({
19250
19892
  blobClient: client,
@@ -19252,7 +19894,7 @@ class BlobClient extends StorageClient {
19252
19894
  intervalInMs: options.intervalInMs,
19253
19895
  onProgress: options.onProgress,
19254
19896
  resumeFrom: options.resumeFrom,
19255
- startCopyFromURLOptions: options
19897
+ startCopyFromURLOptions: options,
19256
19898
  });
19257
19899
  // Trigger the startCopyFromURL call by calling poll.
19258
19900
  // Any errors from this method should be surfaced to the user.
@@ -19275,7 +19917,7 @@ class BlobClient extends StorageClient {
19275
19917
  catch (e) {
19276
19918
  span.setStatus({
19277
19919
  code: coreTracing.SpanStatusCode.ERROR,
19278
- message: e.message
19920
+ message: e.message,
19279
19921
  });
19280
19922
  throw e;
19281
19923
  }
@@ -19301,13 +19943,13 @@ class BlobClient extends StorageClient {
19301
19943
  sourceIfMatch: options.sourceConditions.ifMatch,
19302
19944
  sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
19303
19945
  sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
19304
- sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince
19946
+ sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
19305
19947
  }, sourceContentMD5: options.sourceContentMD5, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), blobTagsString: toBlobTagsString(options.tags), immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
19306
19948
  }
19307
19949
  catch (e) {
19308
19950
  span.setStatus({
19309
19951
  code: coreTracing.SpanStatusCode.ERROR,
19310
- message: e.message
19952
+ message: e.message,
19311
19953
  });
19312
19954
  throw e;
19313
19955
  }
@@ -19335,7 +19977,7 @@ class BlobClient extends StorageClient {
19335
19977
  catch (e) {
19336
19978
  span.setStatus({
19337
19979
  code: coreTracing.SpanStatusCode.ERROR,
19338
- message: e.message
19980
+ message: e.message,
19339
19981
  });
19340
19982
  throw e;
19341
19983
  }
@@ -19412,7 +20054,7 @@ class BlobClient extends StorageClient {
19412
20054
  conditions: options.conditions,
19413
20055
  maxRetryRequests: options.maxRetryRequestsPerBlock,
19414
20056
  customerProvidedKey: options.customerProvidedKey,
19415
- tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions))
20057
+ tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)),
19416
20058
  });
19417
20059
  const stream = response.readableStreamBody;
19418
20060
  await streamToBuffer(stream, buffer, off - offset, chunkEnd - offset);
@@ -19431,7 +20073,7 @@ class BlobClient extends StorageClient {
19431
20073
  catch (e) {
19432
20074
  span.setStatus({
19433
20075
  code: coreTracing.SpanStatusCode.ERROR,
19434
- message: e.message
20076
+ message: e.message,
19435
20077
  });
19436
20078
  throw e;
19437
20079
  }
@@ -19469,7 +20111,7 @@ class BlobClient extends StorageClient {
19469
20111
  catch (e) {
19470
20112
  span.setStatus({
19471
20113
  code: coreTracing.SpanStatusCode.ERROR,
19472
- message: e.message
20114
+ message: e.message,
19473
20115
  });
19474
20116
  throw e;
19475
20117
  }
@@ -19550,13 +20192,13 @@ class BlobClient extends StorageClient {
19550
20192
  sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
19551
20193
  sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
19552
20194
  sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
19553
- sourceIfTags: options.sourceConditions.tagConditions
20195
+ sourceIfTags: options.sourceConditions.tagConditions,
19554
20196
  }, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, rehydratePriority: options.rehydratePriority, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags), sealBlob: options.sealBlob }, convertTracingToRequestOptionsBase(updatedOptions)));
19555
20197
  }
19556
20198
  catch (e) {
19557
20199
  span.setStatus({
19558
20200
  code: coreTracing.SpanStatusCode.ERROR,
19559
- message: e.message
20201
+ message: e.message,
19560
20202
  });
19561
20203
  throw e;
19562
20204
  }
@@ -19597,7 +20239,7 @@ class BlobClient extends StorageClient {
19597
20239
  catch (e) {
19598
20240
  span.setStatus({
19599
20241
  code: coreTracing.SpanStatusCode.ERROR,
19600
- message: e.message
20242
+ message: e.message,
19601
20243
  });
19602
20244
  throw e;
19603
20245
  }
@@ -19618,7 +20260,7 @@ class BlobClient extends StorageClient {
19618
20260
  catch (e) {
19619
20261
  span.setStatus({
19620
20262
  code: coreTracing.SpanStatusCode.ERROR,
19621
- message: e.message
20263
+ message: e.message,
19622
20264
  });
19623
20265
  throw e;
19624
20266
  }
@@ -19639,7 +20281,7 @@ class BlobClient extends StorageClient {
19639
20281
  catch (e) {
19640
20282
  span.setStatus({
19641
20283
  code: coreTracing.SpanStatusCode.ERROR,
19642
- message: e.message
20284
+ message: e.message,
19643
20285
  });
19644
20286
  throw e;
19645
20287
  }
@@ -19690,12 +20332,17 @@ class AppendBlobClient extends BlobClient {
19690
20332
  const blobName = blobNameOrOptions;
19691
20333
  const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
19692
20334
  if (extractedCreds.kind === "AccountConnString") {
19693
- {
20335
+ if (coreHttp.isNode) {
19694
20336
  const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
19695
20337
  url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
19696
- options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
20338
+ if (!options.proxyOptions) {
20339
+ options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
20340
+ }
19697
20341
  pipeline = newPipeline(sharedKeyCredential, options);
19698
20342
  }
20343
+ else {
20344
+ throw new Error("Account connection string is only supported in Node.js environment");
20345
+ }
19699
20346
  }
19700
20347
  else if (extractedCreds.kind === "SASConnString") {
19701
20348
  url =
@@ -19750,7 +20397,7 @@ class AppendBlobClient extends BlobClient {
19750
20397
  catch (e) {
19751
20398
  span.setStatus({
19752
20399
  code: coreTracing.SpanStatusCode.ERROR,
19753
- message: e.message
20400
+ message: e.message,
19754
20401
  });
19755
20402
  throw e;
19756
20403
  }
@@ -19771,20 +20418,19 @@ class AppendBlobClient extends BlobClient {
19771
20418
  const conditions = { ifNoneMatch: ETagAny };
19772
20419
  try {
19773
20420
  const res = await this.create(Object.assign(Object.assign({}, updatedOptions), { conditions }));
19774
- return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
19775
- });
20421
+ return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
19776
20422
  }
19777
20423
  catch (e) {
19778
20424
  if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
19779
20425
  span.setStatus({
19780
20426
  code: coreTracing.SpanStatusCode.ERROR,
19781
- message: "Expected exception when creating a blob only if it does not already exist."
20427
+ message: "Expected exception when creating a blob only if it does not already exist.",
19782
20428
  });
19783
20429
  return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
19784
20430
  }
19785
20431
  span.setStatus({
19786
20432
  code: coreTracing.SpanStatusCode.ERROR,
19787
- message: e.message
20433
+ message: e.message,
19788
20434
  });
19789
20435
  throw e;
19790
20436
  }
@@ -19807,7 +20453,7 @@ class AppendBlobClient extends BlobClient {
19807
20453
  catch (e) {
19808
20454
  span.setStatus({
19809
20455
  code: coreTracing.SpanStatusCode.ERROR,
19810
- message: e.message
20456
+ message: e.message,
19811
20457
  });
19812
20458
  throw e;
19813
20459
  }
@@ -19846,13 +20492,13 @@ class AppendBlobClient extends BlobClient {
19846
20492
  try {
19847
20493
  ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
19848
20494
  return await this.appendBlobContext.appendBlock(contentLength, body, Object.assign({ abortSignal: options.abortSignal, appendPositionAccessConditions: options.conditions, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
19849
- onUploadProgress: options.onProgress
20495
+ onUploadProgress: options.onProgress,
19850
20496
  }, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
19851
20497
  }
19852
20498
  catch (e) {
19853
20499
  span.setStatus({
19854
20500
  code: coreTracing.SpanStatusCode.ERROR,
19855
- message: e.message
20501
+ message: e.message,
19856
20502
  });
19857
20503
  throw e;
19858
20504
  }
@@ -19885,13 +20531,13 @@ class AppendBlobClient extends BlobClient {
19885
20531
  sourceIfMatch: options.sourceConditions.ifMatch,
19886
20532
  sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
19887
20533
  sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
19888
- sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince
20534
+ sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
19889
20535
  }, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
19890
20536
  }
19891
20537
  catch (e) {
19892
20538
  span.setStatus({
19893
20539
  code: coreTracing.SpanStatusCode.ERROR,
19894
- message: e.message
20540
+ message: e.message,
19895
20541
  });
19896
20542
  throw e;
19897
20543
  }
@@ -19942,12 +20588,17 @@ class BlockBlobClient extends BlobClient {
19942
20588
  const blobName = blobNameOrOptions;
19943
20589
  const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
19944
20590
  if (extractedCreds.kind === "AccountConnString") {
19945
- {
20591
+ if (coreHttp.isNode) {
19946
20592
  const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
19947
20593
  url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
19948
- options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
20594
+ if (!options.proxyOptions) {
20595
+ options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
20596
+ }
19949
20597
  pipeline = newPipeline(sharedKeyCredential, options);
19950
20598
  }
20599
+ else {
20600
+ throw new Error("Account connection string is only supported in Node.js environment");
20601
+ }
19951
20602
  }
19952
20603
  else if (extractedCreds.kind === "SASConnString") {
19953
20604
  url =
@@ -20013,25 +20664,25 @@ class BlockBlobClient extends BlobClient {
20013
20664
  ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
20014
20665
  const { span, updatedOptions } = createSpan("BlockBlobClient-query", options);
20015
20666
  try {
20016
- if (false) {
20667
+ if (!coreHttp.isNode) {
20017
20668
  throw new Error("This operation currently is only supported in Node.js.");
20018
20669
  }
20019
20670
  const response = await this._blobContext.query(Object.assign({ abortSignal: options.abortSignal, queryRequest: {
20020
20671
  queryType: "SQL",
20021
20672
  expression: query,
20022
20673
  inputSerialization: toQuerySerialization(options.inputTextConfiguration),
20023
- outputSerialization: toQuerySerialization(options.outputTextConfiguration)
20674
+ outputSerialization: toQuerySerialization(options.outputTextConfiguration),
20024
20675
  }, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }) }, convertTracingToRequestOptionsBase(updatedOptions)));
20025
20676
  return new BlobQueryResponse(response, {
20026
20677
  abortSignal: options.abortSignal,
20027
20678
  onProgress: options.onProgress,
20028
- onError: options.onError
20679
+ onError: options.onError,
20029
20680
  });
20030
20681
  }
20031
20682
  catch (e) {
20032
20683
  span.setStatus({
20033
20684
  code: coreTracing.SpanStatusCode.ERROR,
20034
- message: e.message
20685
+ message: e.message,
20035
20686
  });
20036
20687
  throw e;
20037
20688
  }
@@ -20073,13 +20724,13 @@ class BlockBlobClient extends BlobClient {
20073
20724
  try {
20074
20725
  ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
20075
20726
  return await this.blockBlobContext.upload(contentLength, body, Object.assign({ abortSignal: options.abortSignal, blobHttpHeaders: options.blobHTTPHeaders, leaseAccessConditions: options.conditions, metadata: options.metadata, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
20076
- onUploadProgress: options.onProgress
20727
+ onUploadProgress: options.onProgress,
20077
20728
  }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, immutabilityPolicyExpiry: (_b = options.immutabilityPolicy) === null || _b === void 0 ? void 0 : _b.expiriesOn, immutabilityPolicyMode: (_c = options.immutabilityPolicy) === null || _c === void 0 ? void 0 : _c.policyMode, legalHold: options.legalHold, tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }, convertTracingToRequestOptionsBase(updatedOptions)));
20078
20729
  }
20079
20730
  catch (e) {
20080
20731
  span.setStatus({
20081
20732
  code: coreTracing.SpanStatusCode.ERROR,
20082
- message: e.message
20733
+ message: e.message,
20083
20734
  });
20084
20735
  throw e;
20085
20736
  }
@@ -20116,13 +20767,13 @@ class BlockBlobClient extends BlobClient {
20116
20767
  sourceIfModifiedSince: (_b = options.sourceConditions) === null || _b === void 0 ? void 0 : _b.ifModifiedSince,
20117
20768
  sourceIfNoneMatch: (_c = options.sourceConditions) === null || _c === void 0 ? void 0 : _c.ifNoneMatch,
20118
20769
  sourceIfUnmodifiedSince: (_d = options.sourceConditions) === null || _d === void 0 ? void 0 : _d.ifUnmodifiedSince,
20119
- sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions
20770
+ sourceIfTags: (_e = options.sourceConditions) === null || _e === void 0 ? void 0 : _e.tagConditions,
20120
20771
  }, cpkInfo: options.customerProvidedKey, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization), tier: toAccessTier(options.tier), blobTagsString: toBlobTagsString(options.tags) }), convertTracingToRequestOptionsBase(updatedOptions)));
20121
20772
  }
20122
20773
  catch (e) {
20123
20774
  span.setStatus({
20124
20775
  code: coreTracing.SpanStatusCode.ERROR,
20125
- message: e.message
20776
+ message: e.message,
20126
20777
  });
20127
20778
  throw e;
20128
20779
  }
@@ -20146,13 +20797,13 @@ class BlockBlobClient extends BlobClient {
20146
20797
  try {
20147
20798
  ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
20148
20799
  return await this.blockBlobContext.stageBlock(blockId, contentLength, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, requestOptions: {
20149
- onUploadProgress: options.onProgress
20800
+ onUploadProgress: options.onProgress,
20150
20801
  }, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
20151
20802
  }
20152
20803
  catch (e) {
20153
20804
  span.setStatus({
20154
20805
  code: coreTracing.SpanStatusCode.ERROR,
20155
- message: e.message
20806
+ message: e.message,
20156
20807
  });
20157
20808
  throw e;
20158
20809
  }
@@ -20190,7 +20841,7 @@ class BlockBlobClient extends BlobClient {
20190
20841
  catch (e) {
20191
20842
  span.setStatus({
20192
20843
  code: coreTracing.SpanStatusCode.ERROR,
20193
- message: e.message
20844
+ message: e.message,
20194
20845
  });
20195
20846
  throw e;
20196
20847
  }
@@ -20221,7 +20872,7 @@ class BlockBlobClient extends BlobClient {
20221
20872
  catch (e) {
20222
20873
  span.setStatus({
20223
20874
  code: coreTracing.SpanStatusCode.ERROR,
20224
- message: e.message
20875
+ message: e.message,
20225
20876
  });
20226
20877
  throw e;
20227
20878
  }
@@ -20255,7 +20906,7 @@ class BlockBlobClient extends BlobClient {
20255
20906
  catch (e) {
20256
20907
  span.setStatus({
20257
20908
  code: coreTracing.SpanStatusCode.ERROR,
20258
- message: e.message
20909
+ message: e.message,
20259
20910
  });
20260
20911
  throw e;
20261
20912
  }
@@ -20282,7 +20933,7 @@ class BlockBlobClient extends BlobClient {
20282
20933
  async uploadData(data, options = {}) {
20283
20934
  const { span, updatedOptions } = createSpan("BlockBlobClient-uploadData", options);
20284
20935
  try {
20285
- if (true) {
20936
+ if (coreHttp.isNode) {
20286
20937
  let buffer;
20287
20938
  if (data instanceof Buffer) {
20288
20939
  buffer = data;
@@ -20304,7 +20955,7 @@ class BlockBlobClient extends BlobClient {
20304
20955
  catch (e) {
20305
20956
  span.setStatus({
20306
20957
  code: coreTracing.SpanStatusCode.ERROR,
20307
- message: e.message
20958
+ message: e.message,
20308
20959
  });
20309
20960
  throw e;
20310
20961
  }
@@ -20340,7 +20991,7 @@ class BlockBlobClient extends BlobClient {
20340
20991
  catch (e) {
20341
20992
  span.setStatus({
20342
20993
  code: coreTracing.SpanStatusCode.ERROR,
20343
- message: e.message
20994
+ message: e.message,
20344
20995
  });
20345
20996
  throw e;
20346
20997
  }
@@ -20419,14 +21070,14 @@ class BlockBlobClient extends BlobClient {
20419
21070
  abortSignal: options.abortSignal,
20420
21071
  conditions: options.conditions,
20421
21072
  encryptionScope: options.encryptionScope,
20422
- tracingOptions: updatedOptions.tracingOptions
21073
+ tracingOptions: updatedOptions.tracingOptions,
20423
21074
  });
20424
21075
  // Update progress after block is successfully uploaded to server, in case of block trying
20425
21076
  // TODO: Hook with convenience layer progress event in finer level
20426
21077
  transferProgress += contentLength;
20427
21078
  if (options.onProgress) {
20428
21079
  options.onProgress({
20429
- loadedBytes: transferProgress
21080
+ loadedBytes: transferProgress,
20430
21081
  });
20431
21082
  }
20432
21083
  });
@@ -20437,7 +21088,7 @@ class BlockBlobClient extends BlobClient {
20437
21088
  catch (e) {
20438
21089
  span.setStatus({
20439
21090
  code: coreTracing.SpanStatusCode.ERROR,
20440
- message: e.message
21091
+ message: e.message,
20441
21092
  });
20442
21093
  throw e;
20443
21094
  }
@@ -20466,14 +21117,14 @@ class BlockBlobClient extends BlobClient {
20466
21117
  return () => fsCreateReadStream(filePath, {
20467
21118
  autoClose: true,
20468
21119
  end: count ? offset + count - 1 : Infinity,
20469
- start: offset
21120
+ start: offset,
20470
21121
  });
20471
21122
  }, size, Object.assign(Object.assign({}, options), { tracingOptions: Object.assign(Object.assign({}, options.tracingOptions), convertTracingToRequestOptionsBase(updatedOptions)) }));
20472
21123
  }
20473
21124
  catch (e) {
20474
21125
  span.setStatus({
20475
21126
  code: coreTracing.SpanStatusCode.ERROR,
20476
- message: e.message
21127
+ message: e.message,
20477
21128
  });
20478
21129
  throw e;
20479
21130
  }
@@ -20517,7 +21168,7 @@ class BlockBlobClient extends BlobClient {
20517
21168
  await this.stageBlock(blockID, body, length, {
20518
21169
  conditions: options.conditions,
20519
21170
  encryptionScope: options.encryptionScope,
20520
- tracingOptions: updatedOptions.tracingOptions
21171
+ tracingOptions: updatedOptions.tracingOptions,
20521
21172
  });
20522
21173
  // Update progress after block is successfully uploaded to server, in case of block trying
20523
21174
  transferProgress += length;
@@ -20536,7 +21187,7 @@ class BlockBlobClient extends BlobClient {
20536
21187
  catch (e) {
20537
21188
  span.setStatus({
20538
21189
  code: coreTracing.SpanStatusCode.ERROR,
20539
- message: e.message
21190
+ message: e.message,
20540
21191
  });
20541
21192
  throw e;
20542
21193
  }
@@ -20587,12 +21238,17 @@ class PageBlobClient extends BlobClient {
20587
21238
  const blobName = blobNameOrOptions;
20588
21239
  const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
20589
21240
  if (extractedCreds.kind === "AccountConnString") {
20590
- {
21241
+ if (coreHttp.isNode) {
20591
21242
  const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
20592
21243
  url = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName));
20593
- options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
21244
+ if (!options.proxyOptions) {
21245
+ options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
21246
+ }
20594
21247
  pipeline = newPipeline(sharedKeyCredential, options);
20595
21248
  }
21249
+ else {
21250
+ throw new Error("Account connection string is only supported in Node.js environment");
21251
+ }
20596
21252
  }
20597
21253
  else if (extractedCreds.kind === "SASConnString") {
20598
21254
  url =
@@ -20642,7 +21298,7 @@ class PageBlobClient extends BlobClient {
20642
21298
  catch (e) {
20643
21299
  span.setStatus({
20644
21300
  code: coreTracing.SpanStatusCode.ERROR,
20645
- message: e.message
21301
+ message: e.message,
20646
21302
  });
20647
21303
  throw e;
20648
21304
  }
@@ -20665,20 +21321,19 @@ class PageBlobClient extends BlobClient {
20665
21321
  try {
20666
21322
  const conditions = { ifNoneMatch: ETagAny };
20667
21323
  const res = await this.create(size, Object.assign(Object.assign({}, options), { conditions, tracingOptions: updatedOptions.tracingOptions }));
20668
- return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
20669
- });
21324
+ return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
20670
21325
  }
20671
21326
  catch (e) {
20672
21327
  if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "BlobAlreadyExists") {
20673
21328
  span.setStatus({
20674
21329
  code: coreTracing.SpanStatusCode.ERROR,
20675
- message: "Expected exception when creating a blob only if it does not already exist."
21330
+ message: "Expected exception when creating a blob only if it does not already exist.",
20676
21331
  });
20677
21332
  return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
20678
21333
  }
20679
21334
  span.setStatus({
20680
21335
  code: coreTracing.SpanStatusCode.ERROR,
20681
- message: e.message
21336
+ message: e.message,
20682
21337
  });
20683
21338
  throw e;
20684
21339
  }
@@ -20703,13 +21358,13 @@ class PageBlobClient extends BlobClient {
20703
21358
  try {
20704
21359
  ensureCpkIfSpecified(options.customerProvidedKey, this.isHttps);
20705
21360
  return await this.pageBlobContext.uploadPages(count, body, Object.assign({ abortSignal: options.abortSignal, leaseAccessConditions: options.conditions, modifiedAccessConditions: Object.assign(Object.assign({}, options.conditions), { ifTags: (_a = options.conditions) === null || _a === void 0 ? void 0 : _a.tagConditions }), requestOptions: {
20706
- onUploadProgress: options.onProgress
21361
+ onUploadProgress: options.onProgress,
20707
21362
  }, range: rangeToString({ offset, count }), sequenceNumberAccessConditions: options.conditions, transactionalContentMD5: options.transactionalContentMD5, transactionalContentCrc64: options.transactionalContentCrc64, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope }, convertTracingToRequestOptionsBase(updatedOptions)));
20708
21363
  }
20709
21364
  catch (e) {
20710
21365
  span.setStatus({
20711
21366
  code: coreTracing.SpanStatusCode.ERROR,
20712
- message: e.message
21367
+ message: e.message,
20713
21368
  });
20714
21369
  throw e;
20715
21370
  }
@@ -20739,13 +21394,13 @@ class PageBlobClient extends BlobClient {
20739
21394
  sourceIfMatch: options.sourceConditions.ifMatch,
20740
21395
  sourceIfModifiedSince: options.sourceConditions.ifModifiedSince,
20741
21396
  sourceIfNoneMatch: options.sourceConditions.ifNoneMatch,
20742
- sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince
21397
+ sourceIfUnmodifiedSince: options.sourceConditions.ifUnmodifiedSince,
20743
21398
  }, cpkInfo: options.customerProvidedKey, encryptionScope: options.encryptionScope, copySourceAuthorization: httpAuthorizationToString(options.sourceAuthorization) }, convertTracingToRequestOptionsBase(updatedOptions)));
20744
21399
  }
20745
21400
  catch (e) {
20746
21401
  span.setStatus({
20747
21402
  code: coreTracing.SpanStatusCode.ERROR,
20748
- message: e.message
21403
+ message: e.message,
20749
21404
  });
20750
21405
  throw e;
20751
21406
  }
@@ -20772,7 +21427,7 @@ class PageBlobClient extends BlobClient {
20772
21427
  catch (e) {
20773
21428
  span.setStatus({
20774
21429
  code: coreTracing.SpanStatusCode.ERROR,
20775
- message: e.message
21430
+ message: e.message,
20776
21431
  });
20777
21432
  throw e;
20778
21433
  }
@@ -20801,7 +21456,7 @@ class PageBlobClient extends BlobClient {
20801
21456
  catch (e) {
20802
21457
  span.setStatus({
20803
21458
  code: coreTracing.SpanStatusCode.ERROR,
20804
- message: e.message
21459
+ message: e.message,
20805
21460
  });
20806
21461
  throw e;
20807
21462
  }
@@ -20831,7 +21486,7 @@ class PageBlobClient extends BlobClient {
20831
21486
  catch (e) {
20832
21487
  span.setStatus({
20833
21488
  code: coreTracing.SpanStatusCode.ERROR,
20834
- message: e.message
21489
+ message: e.message,
20835
21490
  });
20836
21491
  throw e;
20837
21492
  }
@@ -20861,7 +21516,7 @@ class PageBlobClient extends BlobClient {
20861
21516
  catch (e) {
20862
21517
  span.setStatus({
20863
21518
  code: coreTracing.SpanStatusCode.ERROR,
20864
- message: e.message
21519
+ message: e.message,
20865
21520
  });
20866
21521
  throw e;
20867
21522
  }
@@ -20887,7 +21542,7 @@ class PageBlobClient extends BlobClient {
20887
21542
  catch (e) {
20888
21543
  span.setStatus({
20889
21544
  code: coreTracing.SpanStatusCode.ERROR,
20890
- message: e.message
21545
+ message: e.message,
20891
21546
  });
20892
21547
  throw e;
20893
21548
  }
@@ -20914,7 +21569,7 @@ class PageBlobClient extends BlobClient {
20914
21569
  catch (e) {
20915
21570
  span.setStatus({
20916
21571
  code: coreTracing.SpanStatusCode.ERROR,
20917
- message: e.message
21572
+ message: e.message,
20918
21573
  });
20919
21574
  throw e;
20920
21575
  }
@@ -20944,7 +21599,7 @@ class PageBlobClient extends BlobClient {
20944
21599
  catch (e) {
20945
21600
  span.setStatus({
20946
21601
  code: coreTracing.SpanStatusCode.ERROR,
20947
- message: e.message
21602
+ message: e.message,
20948
21603
  });
20949
21604
  throw e;
20950
21605
  }
@@ -21092,7 +21747,7 @@ class BatchResponseParser {
21092
21747
  return {
21093
21748
  subResponses: deserializedSubResponses,
21094
21749
  subResponsesSucceededCount: subResponsesSucceededCount,
21095
- subResponsesFailedCount: subResponsesFailedCount
21750
+ subResponsesFailedCount: subResponsesFailedCount,
21096
21751
  };
21097
21752
  }
21098
21753
  }
@@ -21239,7 +21894,7 @@ class BlobBatch {
21239
21894
  this.setBatchType("delete");
21240
21895
  await this.addSubRequestInternal({
21241
21896
  url: url,
21242
- credential: credential
21897
+ credential: credential,
21243
21898
  }, async () => {
21244
21899
  await new BlobClient(url, this.batchRequest.createPipeline(credential)).delete(updatedOptions);
21245
21900
  });
@@ -21247,7 +21902,7 @@ class BlobBatch {
21247
21902
  catch (e) {
21248
21903
  span.setStatus({
21249
21904
  code: coreTracing.SpanStatusCode.ERROR,
21250
- message: e.message
21905
+ message: e.message,
21251
21906
  });
21252
21907
  throw e;
21253
21908
  }
@@ -21286,7 +21941,7 @@ class BlobBatch {
21286
21941
  this.setBatchType("setAccessTier");
21287
21942
  await this.addSubRequestInternal({
21288
21943
  url: url,
21289
- credential: credential
21944
+ credential: credential,
21290
21945
  }, async () => {
21291
21946
  await new BlobClient(url, this.batchRequest.createPipeline(credential)).setAccessTier(tier, updatedOptions);
21292
21947
  });
@@ -21294,7 +21949,7 @@ class BlobBatch {
21294
21949
  catch (e) {
21295
21950
  span.setStatus({
21296
21951
  code: coreTracing.SpanStatusCode.ERROR,
21297
- message: e.message
21952
+ message: e.message,
21298
21953
  });
21299
21954
  throw e;
21300
21955
  }
@@ -21351,7 +22006,7 @@ class InnerBatchRequest {
21351
22006
  this.subRequestPrefix,
21352
22007
  `${HeaderConstants.CONTENT_ID}: ${this.operationCount}`,
21353
22008
  "",
21354
- `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}` // sub request start line with method
22009
+ `${request.method.toString()} ${getURLPathAndQuery(request.url)} ${HTTP_VERSION_1_1}${HTTP_LINE_ENDING}`, // sub request start line with method
21355
22010
  ].join(HTTP_LINE_ENDING);
21356
22011
  for (const header of request.headers.headersArray()) {
21357
22012
  this.body += `${header.name}: ${header.value}${HTTP_LINE_ENDING}`;
@@ -21391,7 +22046,7 @@ class BatchRequestAssemblePolicy extends coreHttp.BaseRequestPolicy {
21391
22046
  this.dummyResponse = {
21392
22047
  request: new coreHttp.WebResource(),
21393
22048
  status: 200,
21394
- headers: new coreHttp.HttpHeaders()
22049
+ headers: new coreHttp.HttpHeaders(),
21395
22050
  };
21396
22051
  this.batchRequest = batchRequest;
21397
22052
  }
@@ -21558,14 +22213,14 @@ class BlobBatchClient {
21558
22213
  version: rawBatchResponse.version,
21559
22214
  subResponses: responseSummary.subResponses,
21560
22215
  subResponsesSucceededCount: responseSummary.subResponsesSucceededCount,
21561
- subResponsesFailedCount: responseSummary.subResponsesFailedCount
22216
+ subResponsesFailedCount: responseSummary.subResponsesFailedCount,
21562
22217
  };
21563
22218
  return res;
21564
22219
  }
21565
22220
  catch (e) {
21566
22221
  span.setStatus({
21567
22222
  code: coreTracing.SpanStatusCode.ERROR,
21568
- message: e.message
22223
+ message: e.message,
21569
22224
  });
21570
22225
  throw e;
21571
22226
  }
@@ -21611,12 +22266,17 @@ class ContainerClient extends StorageClient {
21611
22266
  const containerName = credentialOrPipelineOrContainerName;
21612
22267
  const extractedCreds = extractConnectionStringParts(urlOrConnectionString);
21613
22268
  if (extractedCreds.kind === "AccountConnString") {
21614
- {
22269
+ if (coreHttp.isNode) {
21615
22270
  const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
21616
22271
  url = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName));
21617
- options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
22272
+ if (!options.proxyOptions) {
22273
+ options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
22274
+ }
21618
22275
  pipeline = newPipeline(sharedKeyCredential, options);
21619
22276
  }
22277
+ else {
22278
+ throw new Error("Account connection string is only supported in Node.js environment");
22279
+ }
21620
22280
  }
21621
22281
  else if (extractedCreds.kind === "SASConnString") {
21622
22282
  url =
@@ -21668,7 +22328,7 @@ class ContainerClient extends StorageClient {
21668
22328
  catch (e) {
21669
22329
  span.setStatus({
21670
22330
  code: coreTracing.SpanStatusCode.ERROR,
21671
- message: e.message
22331
+ message: e.message,
21672
22332
  });
21673
22333
  throw e;
21674
22334
  }
@@ -21688,20 +22348,19 @@ class ContainerClient extends StorageClient {
21688
22348
  const { span, updatedOptions } = createSpan("ContainerClient-createIfNotExists", options);
21689
22349
  try {
21690
22350
  const res = await this.create(updatedOptions);
21691
- return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
21692
- });
22351
+ return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
21693
22352
  }
21694
22353
  catch (e) {
21695
22354
  if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerAlreadyExists") {
21696
22355
  span.setStatus({
21697
22356
  code: coreTracing.SpanStatusCode.ERROR,
21698
- message: "Expected exception when creating a container only if it does not already exist."
22357
+ message: "Expected exception when creating a container only if it does not already exist.",
21699
22358
  });
21700
22359
  return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
21701
22360
  }
21702
22361
  span.setStatus({
21703
22362
  code: coreTracing.SpanStatusCode.ERROR,
21704
- message: e.message
22363
+ message: e.message,
21705
22364
  });
21706
22365
  throw e;
21707
22366
  }
@@ -21723,7 +22382,7 @@ class ContainerClient extends StorageClient {
21723
22382
  try {
21724
22383
  await this.getProperties({
21725
22384
  abortSignal: options.abortSignal,
21726
- tracingOptions: updatedOptions.tracingOptions
22385
+ tracingOptions: updatedOptions.tracingOptions,
21727
22386
  });
21728
22387
  return true;
21729
22388
  }
@@ -21731,13 +22390,13 @@ class ContainerClient extends StorageClient {
21731
22390
  if (e.statusCode === 404) {
21732
22391
  span.setStatus({
21733
22392
  code: coreTracing.SpanStatusCode.ERROR,
21734
- message: "Expected exception when checking container existence"
22393
+ message: "Expected exception when checking container existence",
21735
22394
  });
21736
22395
  return false;
21737
22396
  }
21738
22397
  span.setStatus({
21739
22398
  code: coreTracing.SpanStatusCode.ERROR,
21740
- message: e.message
22399
+ message: e.message,
21741
22400
  });
21742
22401
  throw e;
21743
22402
  }
@@ -21811,7 +22470,7 @@ class ContainerClient extends StorageClient {
21811
22470
  catch (e) {
21812
22471
  span.setStatus({
21813
22472
  code: coreTracing.SpanStatusCode.ERROR,
21814
- message: e.message
22473
+ message: e.message,
21815
22474
  });
21816
22475
  throw e;
21817
22476
  }
@@ -21837,7 +22496,7 @@ class ContainerClient extends StorageClient {
21837
22496
  catch (e) {
21838
22497
  span.setStatus({
21839
22498
  code: coreTracing.SpanStatusCode.ERROR,
21840
- message: e.message
22499
+ message: e.message,
21841
22500
  });
21842
22501
  throw e;
21843
22502
  }
@@ -21857,20 +22516,19 @@ class ContainerClient extends StorageClient {
21857
22516
  const { span, updatedOptions } = createSpan("ContainerClient-deleteIfExists", options);
21858
22517
  try {
21859
22518
  const res = await this.delete(updatedOptions);
21860
- return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response // _response is made non-enumerable
21861
- });
22519
+ return Object.assign(Object.assign({ succeeded: true }, res), { _response: res._response });
21862
22520
  }
21863
22521
  catch (e) {
21864
22522
  if (((_a = e.details) === null || _a === void 0 ? void 0 : _a.errorCode) === "ContainerNotFound") {
21865
22523
  span.setStatus({
21866
22524
  code: coreTracing.SpanStatusCode.ERROR,
21867
- message: "Expected exception when deleting a container only if it exists."
22525
+ message: "Expected exception when deleting a container only if it exists.",
21868
22526
  });
21869
22527
  return Object.assign(Object.assign({ succeeded: false }, (_b = e.response) === null || _b === void 0 ? void 0 : _b.parsedHeaders), { _response: e.response });
21870
22528
  }
21871
22529
  span.setStatus({
21872
22530
  code: coreTracing.SpanStatusCode.ERROR,
21873
- message: e.message
22531
+ message: e.message,
21874
22532
  });
21875
22533
  throw e;
21876
22534
  }
@@ -21904,7 +22562,7 @@ class ContainerClient extends StorageClient {
21904
22562
  catch (e) {
21905
22563
  span.setStatus({
21906
22564
  code: coreTracing.SpanStatusCode.ERROR,
21907
- message: e.message
22565
+ message: e.message,
21908
22566
  });
21909
22567
  throw e;
21910
22568
  }
@@ -21940,13 +22598,13 @@ class ContainerClient extends StorageClient {
21940
22598
  requestId: response.requestId,
21941
22599
  clientRequestId: response.clientRequestId,
21942
22600
  signedIdentifiers: [],
21943
- version: response.version
22601
+ version: response.version,
21944
22602
  };
21945
22603
  for (const identifier of response) {
21946
22604
  let accessPolicy = undefined;
21947
22605
  if (identifier.accessPolicy) {
21948
22606
  accessPolicy = {
21949
- permissions: identifier.accessPolicy.permissions
22607
+ permissions: identifier.accessPolicy.permissions,
21950
22608
  };
21951
22609
  if (identifier.accessPolicy.expiresOn) {
21952
22610
  accessPolicy.expiresOn = new Date(identifier.accessPolicy.expiresOn);
@@ -21957,7 +22615,7 @@ class ContainerClient extends StorageClient {
21957
22615
  }
21958
22616
  res.signedIdentifiers.push({
21959
22617
  accessPolicy,
21960
- id: identifier.id
22618
+ id: identifier.id,
21961
22619
  });
21962
22620
  }
21963
22621
  return res;
@@ -21965,7 +22623,7 @@ class ContainerClient extends StorageClient {
21965
22623
  catch (e) {
21966
22624
  span.setStatus({
21967
22625
  code: coreTracing.SpanStatusCode.ERROR,
21968
- message: e.message
22626
+ message: e.message,
21969
22627
  });
21970
22628
  throw e;
21971
22629
  }
@@ -22004,9 +22662,9 @@ class ContainerClient extends StorageClient {
22004
22662
  permissions: identifier.accessPolicy.permissions,
22005
22663
  startsOn: identifier.accessPolicy.startsOn
22006
22664
  ? truncatedISO8061Date(identifier.accessPolicy.startsOn)
22007
- : ""
22665
+ : "",
22008
22666
  },
22009
- id: identifier.id
22667
+ id: identifier.id,
22010
22668
  });
22011
22669
  }
22012
22670
  return await this.containerContext.setAccessPolicy(Object.assign({ abortSignal: options.abortSignal, access, containerAcl: acl, leaseAccessConditions: options.conditions, modifiedAccessConditions: options.conditions }, convertTracingToRequestOptionsBase(updatedOptions)));
@@ -22014,7 +22672,7 @@ class ContainerClient extends StorageClient {
22014
22672
  catch (e) {
22015
22673
  span.setStatus({
22016
22674
  code: coreTracing.SpanStatusCode.ERROR,
22017
- message: e.message
22675
+ message: e.message,
22018
22676
  });
22019
22677
  throw e;
22020
22678
  }
@@ -22060,13 +22718,13 @@ class ContainerClient extends StorageClient {
22060
22718
  const response = await blockBlobClient.upload(body, contentLength, updatedOptions);
22061
22719
  return {
22062
22720
  blockBlobClient,
22063
- response
22721
+ response,
22064
22722
  };
22065
22723
  }
22066
22724
  catch (e) {
22067
22725
  span.setStatus({
22068
22726
  code: coreTracing.SpanStatusCode.ERROR,
22069
- message: e.message
22727
+ message: e.message,
22070
22728
  });
22071
22729
  throw e;
22072
22730
  }
@@ -22097,7 +22755,7 @@ class ContainerClient extends StorageClient {
22097
22755
  catch (e) {
22098
22756
  span.setStatus({
22099
22757
  code: coreTracing.SpanStatusCode.ERROR,
22100
- message: e.message
22758
+ message: e.message,
22101
22759
  });
22102
22760
  throw e;
22103
22761
  }
@@ -22119,8 +22777,12 @@ class ContainerClient extends StorageClient {
22119
22777
  const { span, updatedOptions } = createSpan("ContainerClient-listBlobFlatSegment", options);
22120
22778
  try {
22121
22779
  const response = await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
22122
- const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
22123
- const blobItem = Object.assign(Object.assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
22780
+ response.segment.blobItems = [];
22781
+ if (response.segment["Blob"] !== undefined) {
22782
+ response.segment.blobItems = ProcessBlobItems(response.segment["Blob"]);
22783
+ }
22784
+ const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobFlat(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
22785
+ const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
22124
22786
  return blobItem;
22125
22787
  }) }) });
22126
22788
  return wrappedResponse;
@@ -22128,7 +22790,7 @@ class ContainerClient extends StorageClient {
22128
22790
  catch (e) {
22129
22791
  span.setStatus({
22130
22792
  code: coreTracing.SpanStatusCode.ERROR,
22131
- message: e.message
22793
+ message: e.message,
22132
22794
  });
22133
22795
  throw e;
22134
22796
  }
@@ -22148,19 +22810,33 @@ class ContainerClient extends StorageClient {
22148
22810
  * @param options - Options to Container List Blob Hierarchy Segment operation.
22149
22811
  */
22150
22812
  async listBlobHierarchySegment(delimiter, marker, options = {}) {
22813
+ var _a;
22151
22814
  const { span, updatedOptions } = createSpan("ContainerClient-listBlobHierarchySegment", options);
22152
22815
  try {
22153
22816
  const response = await this.containerContext.listBlobHierarchySegment(delimiter, Object.assign(Object.assign({ marker }, options), convertTracingToRequestOptionsBase(updatedOptions)));
22154
- const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
22155
- const blobItem = Object.assign(Object.assign({}, blobItemInteral), { tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
22817
+ response.segment.blobItems = [];
22818
+ if (response.segment["Blob"] !== undefined) {
22819
+ response.segment.blobItems = ProcessBlobItems(response.segment["Blob"]);
22820
+ }
22821
+ response.segment.blobPrefixes = [];
22822
+ if (response.segment["BlobPrefix"] !== undefined) {
22823
+ response.segment.blobPrefixes = ProcessBlobPrefixes(response.segment["BlobPrefix"]);
22824
+ }
22825
+ const wrappedResponse = Object.assign(Object.assign({}, response), { _response: Object.assign(Object.assign({}, response._response), { parsedBody: ConvertInternalResponseOfListBlobHierarchy(response._response.parsedBody) }), segment: Object.assign(Object.assign({}, response.segment), { blobItems: response.segment.blobItems.map((blobItemInteral) => {
22826
+ const blobItem = Object.assign(Object.assign({}, blobItemInteral), { name: BlobNameToString(blobItemInteral.name), tags: toTags(blobItemInteral.blobTags), objectReplicationSourceProperties: parseObjectReplicationRecord(blobItemInteral.objectReplicationMetadata) });
22156
22827
  return blobItem;
22828
+ }), blobPrefixes: (_a = response.segment.blobPrefixes) === null || _a === void 0 ? void 0 : _a.map((blobPrefixInternal) => {
22829
+ const blobPrefix = {
22830
+ name: BlobNameToString(blobPrefixInternal.name),
22831
+ };
22832
+ return blobPrefix;
22157
22833
  }) }) });
22158
22834
  return wrappedResponse;
22159
22835
  }
22160
22836
  catch (e) {
22161
22837
  span.setStatus({
22162
22838
  code: coreTracing.SpanStatusCode.ERROR,
22163
- message: e.message
22839
+ message: e.message,
22164
22840
  });
22165
22841
  throw e;
22166
22842
  }
@@ -22342,7 +23018,7 @@ class ContainerClient extends StorageClient {
22342
23018
  */
22343
23019
  byPage: (settings = {}) => {
22344
23020
  return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
22345
- }
23021
+ },
22346
23022
  };
22347
23023
  }
22348
23024
  /**
@@ -22416,7 +23092,7 @@ class ContainerClient extends StorageClient {
22416
23092
  * if (item.kind === "prefix") {
22417
23093
  * console.log(`\tBlobPrefix: ${item.name}`);
22418
23094
  * } else {
22419
- * console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`);
23095
+ * console.log(`\tBlobItem: name - ${item.name}`);
22420
23096
  * }
22421
23097
  * }
22422
23098
  * ```
@@ -22431,7 +23107,7 @@ class ContainerClient extends StorageClient {
22431
23107
  * if (item.kind === "prefix") {
22432
23108
  * console.log(`\tBlobPrefix: ${item.name}`);
22433
23109
  * } else {
22434
- * console.log(`\tBlobItem: name - ${item.name}, last modified - ${item.properties.lastModified}`);
23110
+ * console.log(`\tBlobItem: name - ${item.name}`);
22435
23111
  * }
22436
23112
  * entity = await iter.next();
22437
23113
  * }
@@ -22449,7 +23125,7 @@ class ContainerClient extends StorageClient {
22449
23125
  * }
22450
23126
  * }
22451
23127
  * for (const blob of response.segment.blobItems) {
22452
- * console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`);
23128
+ * console.log(`\tBlobItem: name - ${blob.name}`);
22453
23129
  * }
22454
23130
  * }
22455
23131
  * ```
@@ -22460,7 +23136,9 @@ class ContainerClient extends StorageClient {
22460
23136
  * console.log("Listing blobs by hierarchy by page, specifying a prefix and a max page size");
22461
23137
  *
22462
23138
  * let i = 1;
22463
- * for await (const response of containerClient.listBlobsByHierarchy("/", { prefix: "prefix2/sub1/"}).byPage({ maxPageSize: 2 })) {
23139
+ * for await (const response of containerClient
23140
+ * .listBlobsByHierarchy("/", { prefix: "prefix2/sub1/" })
23141
+ * .byPage({ maxPageSize: 2 })) {
22464
23142
  * console.log(`Page ${i++}`);
22465
23143
  * const segment = response.segment;
22466
23144
  *
@@ -22471,7 +23149,7 @@ class ContainerClient extends StorageClient {
22471
23149
  * }
22472
23150
  *
22473
23151
  * for (const blob of response.segment.blobItems) {
22474
- * console.log(`\tBlobItem: name - ${blob.name}, last modified - ${blob.properties.lastModified}`);
23152
+ * console.log(`\tBlobItem: name - ${blob.name}`);
22475
23153
  * }
22476
23154
  * }
22477
23155
  * ```
@@ -22538,7 +23216,208 @@ class ContainerClient extends StorageClient {
22538
23216
  */
22539
23217
  byPage: (settings = {}) => {
22540
23218
  return this.listHierarchySegments(delimiter, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, updatedOptions));
23219
+ },
23220
+ };
23221
+ }
23222
+ /**
23223
+ * The Filter Blobs operation enables callers to list blobs in the container whose tags
23224
+ * match a given search expression.
23225
+ *
23226
+ * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
23227
+ * The given expression must evaluate to true for a blob to be returned in the results.
23228
+ * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
23229
+ * however, only a subset of the OData filter syntax is supported in the Blob service.
23230
+ * @param marker - A string value that identifies the portion of
23231
+ * the list of blobs to be returned with the next listing operation. The
23232
+ * operation returns the continuationToken value within the response body if the
23233
+ * listing operation did not return all blobs remaining to be listed
23234
+ * with the current page. The continuationToken value can be used as the value for
23235
+ * the marker parameter in a subsequent call to request the next page of list
23236
+ * items. The marker value is opaque to the client.
23237
+ * @param options - Options to find blobs by tags.
23238
+ */
23239
+ async findBlobsByTagsSegment(tagFilterSqlExpression, marker, options = {}) {
23240
+ const { span, updatedOptions } = createSpan("ContainerClient-findBlobsByTagsSegment", options);
23241
+ try {
23242
+ const response = await this.containerContext.filterBlobs(Object.assign({ abortSignal: options.abortSignal, where: tagFilterSqlExpression, marker, maxPageSize: options.maxPageSize }, convertTracingToRequestOptionsBase(updatedOptions)));
23243
+ const wrappedResponse = Object.assign(Object.assign({}, response), { _response: response._response, blobs: response.blobs.map((blob) => {
23244
+ var _a;
23245
+ let tagValue = "";
23246
+ if (((_a = blob.tags) === null || _a === void 0 ? void 0 : _a.blobTagSet.length) === 1) {
23247
+ tagValue = blob.tags.blobTagSet[0].value;
23248
+ }
23249
+ return Object.assign(Object.assign({}, blob), { tags: toTags(blob.tags), tagValue });
23250
+ }) });
23251
+ return wrappedResponse;
23252
+ }
23253
+ catch (e) {
23254
+ span.setStatus({
23255
+ code: coreTracing.SpanStatusCode.ERROR,
23256
+ message: e.message,
23257
+ });
23258
+ throw e;
23259
+ }
23260
+ finally {
23261
+ span.end();
23262
+ }
23263
+ }
23264
+ /**
23265
+ * Returns an AsyncIterableIterator for ContainerFindBlobsByTagsSegmentResponse.
23266
+ *
23267
+ * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
23268
+ * The given expression must evaluate to true for a blob to be returned in the results.
23269
+ * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
23270
+ * however, only a subset of the OData filter syntax is supported in the Blob service.
23271
+ * @param marker - A string value that identifies the portion of
23272
+ * the list of blobs to be returned with the next listing operation. The
23273
+ * operation returns the continuationToken value within the response body if the
23274
+ * listing operation did not return all blobs remaining to be listed
23275
+ * with the current page. The continuationToken value can be used as the value for
23276
+ * the marker parameter in a subsequent call to request the next page of list
23277
+ * items. The marker value is opaque to the client.
23278
+ * @param options - Options to find blobs by tags.
23279
+ */
23280
+ findBlobsByTagsSegments(tagFilterSqlExpression, marker, options = {}) {
23281
+ return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsSegments_1() {
23282
+ let response;
23283
+ if (!!marker || marker === undefined) {
23284
+ do {
23285
+ response = yield tslib.__await(this.findBlobsByTagsSegment(tagFilterSqlExpression, marker, options));
23286
+ response.blobs = response.blobs || [];
23287
+ marker = response.continuationToken;
23288
+ yield yield tslib.__await(response);
23289
+ } while (marker);
23290
+ }
23291
+ });
23292
+ }
23293
+ /**
23294
+ * Returns an AsyncIterableIterator for blobs.
23295
+ *
23296
+ * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
23297
+ * The given expression must evaluate to true for a blob to be returned in the results.
23298
+ * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
23299
+ * however, only a subset of the OData filter syntax is supported in the Blob service.
23300
+ * @param options - Options to findBlobsByTagsItems.
23301
+ */
23302
+ findBlobsByTagsItems(tagFilterSqlExpression, options = {}) {
23303
+ return tslib.__asyncGenerator(this, arguments, function* findBlobsByTagsItems_1() {
23304
+ var e_3, _a;
23305
+ let marker;
23306
+ try {
23307
+ for (var _b = tslib.__asyncValues(this.findBlobsByTagsSegments(tagFilterSqlExpression, marker, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
23308
+ const segment = _c.value;
23309
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(segment.blobs)));
23310
+ }
22541
23311
  }
23312
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
23313
+ finally {
23314
+ try {
23315
+ if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
23316
+ }
23317
+ finally { if (e_3) throw e_3.error; }
23318
+ }
23319
+ });
23320
+ }
23321
+ /**
23322
+ * Returns an async iterable iterator to find all blobs with specified tag
23323
+ * under the specified container.
23324
+ *
23325
+ * .byPage() returns an async iterable iterator to list the blobs in pages.
23326
+ *
23327
+ * Example using `for await` syntax:
23328
+ *
23329
+ * ```js
23330
+ * let i = 1;
23331
+ * for await (const blob of containerClient.findBlobsByTags("tagkey='tagvalue'")) {
23332
+ * console.log(`Blob ${i++}: ${blob.name}`);
23333
+ * }
23334
+ * ```
23335
+ *
23336
+ * Example using `iter.next()`:
23337
+ *
23338
+ * ```js
23339
+ * let i = 1;
23340
+ * const iter = containerClient.findBlobsByTags("tagkey='tagvalue'");
23341
+ * let blobItem = await iter.next();
23342
+ * while (!blobItem.done) {
23343
+ * console.log(`Blob ${i++}: ${blobItem.value.name}`);
23344
+ * blobItem = await iter.next();
23345
+ * }
23346
+ * ```
23347
+ *
23348
+ * Example using `byPage()`:
23349
+ *
23350
+ * ```js
23351
+ * // passing optional maxPageSize in the page settings
23352
+ * let i = 1;
23353
+ * for await (const response of containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 20 })) {
23354
+ * if (response.blobs) {
23355
+ * for (const blob of response.blobs) {
23356
+ * console.log(`Blob ${i++}: ${blob.name}`);
23357
+ * }
23358
+ * }
23359
+ * }
23360
+ * ```
23361
+ *
23362
+ * Example using paging with a marker:
23363
+ *
23364
+ * ```js
23365
+ * let i = 1;
23366
+ * let iterator = containerClient.findBlobsByTags("tagkey='tagvalue'").byPage({ maxPageSize: 2 });
23367
+ * let response = (await iterator.next()).value;
23368
+ *
23369
+ * // Prints 2 blob names
23370
+ * if (response.blobs) {
23371
+ * for (const blob of response.blobs) {
23372
+ * console.log(`Blob ${i++}: ${blob.name}`);
23373
+ * }
23374
+ * }
23375
+ *
23376
+ * // Gets next marker
23377
+ * let marker = response.continuationToken;
23378
+ * // Passing next marker as continuationToken
23379
+ * iterator = containerClient
23380
+ * .findBlobsByTags("tagkey='tagvalue'")
23381
+ * .byPage({ continuationToken: marker, maxPageSize: 10 });
23382
+ * response = (await iterator.next()).value;
23383
+ *
23384
+ * // Prints blob names
23385
+ * if (response.blobs) {
23386
+ * for (const blob of response.blobs) {
23387
+ * console.log(`Blob ${i++}: ${blob.name}`);
23388
+ * }
23389
+ * }
23390
+ * ```
23391
+ *
23392
+ * @param tagFilterSqlExpression - The where parameter enables the caller to query blobs whose tags match a given expression.
23393
+ * The given expression must evaluate to true for a blob to be returned in the results.
23394
+ * The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter;
23395
+ * however, only a subset of the OData filter syntax is supported in the Blob service.
23396
+ * @param options - Options to find blobs by tags.
23397
+ */
23398
+ findBlobsByTags(tagFilterSqlExpression, options = {}) {
23399
+ // AsyncIterableIterator to iterate over blobs
23400
+ const listSegmentOptions = Object.assign({}, options);
23401
+ const iter = this.findBlobsByTagsItems(tagFilterSqlExpression, listSegmentOptions);
23402
+ return {
23403
+ /**
23404
+ * The next method, part of the iteration protocol
23405
+ */
23406
+ next() {
23407
+ return iter.next();
23408
+ },
23409
+ /**
23410
+ * The connection to the async iterator, part of the iteration protocol
23411
+ */
23412
+ [Symbol.asyncIterator]() {
23413
+ return this;
23414
+ },
23415
+ /**
23416
+ * Return an AsyncIterableIterator that works a page at a time
23417
+ */
23418
+ byPage: (settings = {}) => {
23419
+ return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
23420
+ },
22542
23421
  };
22543
23422
  }
22544
23423
  getContainerNameFromUrl() {
@@ -23051,7 +23930,7 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
23051
23930
  accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
23052
23931
  version,
23053
23932
  accountSASSignatureValues.encryptionScope ? accountSASSignatureValues.encryptionScope : "",
23054
- "" // Account SAS requires an additional newline character
23933
+ "", // Account SAS requires an additional newline character
23055
23934
  ].join("\n");
23056
23935
  }
23057
23936
  else {
@@ -23067,7 +23946,7 @@ function generateAccountSASQueryParameters(accountSASSignatureValues, sharedKeyC
23067
23946
  accountSASSignatureValues.ipRange ? ipRangeToString(accountSASSignatureValues.ipRange) : "",
23068
23947
  accountSASSignatureValues.protocol ? accountSASSignatureValues.protocol : "",
23069
23948
  version,
23070
- "" // Account SAS requires an additional newline character
23949
+ "", // Account SAS requires an additional newline character
23071
23950
  ].join("\n");
23072
23951
  }
23073
23952
  const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);
@@ -23118,12 +23997,17 @@ class BlobServiceClient extends StorageClient {
23118
23997
  options = options || {};
23119
23998
  const extractedCreds = extractConnectionStringParts(connectionString);
23120
23999
  if (extractedCreds.kind === "AccountConnString") {
23121
- {
24000
+ if (coreHttp.isNode) {
23122
24001
  const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey);
23123
- options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
24002
+ if (!options.proxyOptions) {
24003
+ options.proxyOptions = coreHttp.getDefaultProxySettings(extractedCreds.proxyUri);
24004
+ }
23124
24005
  const pipeline = newPipeline(sharedKeyCredential, options);
23125
24006
  return new BlobServiceClient(extractedCreds.url, pipeline);
23126
24007
  }
24008
+ else {
24009
+ throw new Error("Account connection string is only supported in Node.js environment");
24010
+ }
23127
24011
  }
23128
24012
  else if (extractedCreds.kind === "SASConnString") {
23129
24013
  const pipeline = newPipeline(new AnonymousCredential(), options);
@@ -23162,13 +24046,13 @@ class BlobServiceClient extends StorageClient {
23162
24046
  const containerCreateResponse = await containerClient.create(updatedOptions);
23163
24047
  return {
23164
24048
  containerClient,
23165
- containerCreateResponse
24049
+ containerCreateResponse,
23166
24050
  };
23167
24051
  }
23168
24052
  catch (e) {
23169
24053
  span.setStatus({
23170
24054
  code: coreTracing.SpanStatusCode.ERROR,
23171
- message: e.message
24055
+ message: e.message,
23172
24056
  });
23173
24057
  throw e;
23174
24058
  }
@@ -23192,7 +24076,7 @@ class BlobServiceClient extends StorageClient {
23192
24076
  catch (e) {
23193
24077
  span.setStatus({
23194
24078
  code: coreTracing.SpanStatusCode.ERROR,
23195
- message: e.message
24079
+ message: e.message,
23196
24080
  });
23197
24081
  throw e;
23198
24082
  }
@@ -23222,7 +24106,7 @@ class BlobServiceClient extends StorageClient {
23222
24106
  catch (e) {
23223
24107
  span.setStatus({
23224
24108
  code: coreTracing.SpanStatusCode.ERROR,
23225
- message: e.message
24109
+ message: e.message,
23226
24110
  });
23227
24111
  throw e;
23228
24112
  }
@@ -23252,7 +24136,7 @@ class BlobServiceClient extends StorageClient {
23252
24136
  catch (e) {
23253
24137
  span.setStatus({
23254
24138
  code: coreTracing.SpanStatusCode.ERROR,
23255
- message: e.message
24139
+ message: e.message,
23256
24140
  });
23257
24141
  throw e;
23258
24142
  }
@@ -23276,7 +24160,7 @@ class BlobServiceClient extends StorageClient {
23276
24160
  catch (e) {
23277
24161
  span.setStatus({
23278
24162
  code: coreTracing.SpanStatusCode.ERROR,
23279
- message: e.message
24163
+ message: e.message,
23280
24164
  });
23281
24165
  throw e;
23282
24166
  }
@@ -23301,7 +24185,7 @@ class BlobServiceClient extends StorageClient {
23301
24185
  catch (e) {
23302
24186
  span.setStatus({
23303
24187
  code: coreTracing.SpanStatusCode.ERROR,
23304
- message: e.message
24188
+ message: e.message,
23305
24189
  });
23306
24190
  throw e;
23307
24191
  }
@@ -23326,7 +24210,7 @@ class BlobServiceClient extends StorageClient {
23326
24210
  catch (e) {
23327
24211
  span.setStatus({
23328
24212
  code: coreTracing.SpanStatusCode.ERROR,
23329
- message: e.message
24213
+ message: e.message,
23330
24214
  });
23331
24215
  throw e;
23332
24216
  }
@@ -23352,7 +24236,7 @@ class BlobServiceClient extends StorageClient {
23352
24236
  catch (e) {
23353
24237
  span.setStatus({
23354
24238
  code: coreTracing.SpanStatusCode.ERROR,
23355
- message: e.message
24239
+ message: e.message,
23356
24240
  });
23357
24241
  throw e;
23358
24242
  }
@@ -23382,7 +24266,7 @@ class BlobServiceClient extends StorageClient {
23382
24266
  catch (e) {
23383
24267
  span.setStatus({
23384
24268
  code: coreTracing.SpanStatusCode.ERROR,
23385
- message: e.message
24269
+ message: e.message,
23386
24270
  });
23387
24271
  throw e;
23388
24272
  }
@@ -23425,7 +24309,7 @@ class BlobServiceClient extends StorageClient {
23425
24309
  catch (e) {
23426
24310
  span.setStatus({
23427
24311
  code: coreTracing.SpanStatusCode.ERROR,
23428
- message: e.message
24312
+ message: e.message,
23429
24313
  });
23430
24314
  throw e;
23431
24315
  }
@@ -23591,7 +24475,7 @@ class BlobServiceClient extends StorageClient {
23591
24475
  */
23592
24476
  byPage: (settings = {}) => {
23593
24477
  return this.findBlobsByTagsSegments(tagFilterSqlExpression, settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
23594
- }
24478
+ },
23595
24479
  };
23596
24480
  }
23597
24481
  /**
@@ -23729,6 +24613,9 @@ class BlobServiceClient extends StorageClient {
23729
24613
  if (options.includeMetadata) {
23730
24614
  include.push("metadata");
23731
24615
  }
24616
+ if (options.includeSystem) {
24617
+ include.push("system");
24618
+ }
23732
24619
  // AsyncIterableIterator to iterate over containers
23733
24620
  const listSegmentOptions = Object.assign(Object.assign({}, options), (include.length > 0 ? { include } : {}));
23734
24621
  const iter = this.listItems(listSegmentOptions);
@@ -23750,7 +24637,7 @@ class BlobServiceClient extends StorageClient {
23750
24637
  */
23751
24638
  byPage: (settings = {}) => {
23752
24639
  return this.listSegments(settings.continuationToken, Object.assign({ maxPageSize: settings.maxPageSize }, listSegmentOptions));
23753
- }
24640
+ },
23754
24641
  };
23755
24642
  }
23756
24643
  /**
@@ -23769,7 +24656,7 @@ class BlobServiceClient extends StorageClient {
23769
24656
  try {
23770
24657
  const response = await this.serviceContext.getUserDelegationKey({
23771
24658
  startsOn: truncatedISO8061Date(startsOn, false),
23772
- expiresOn: truncatedISO8061Date(expiresOn, false)
24659
+ expiresOn: truncatedISO8061Date(expiresOn, false),
23773
24660
  }, Object.assign({ abortSignal: options.abortSignal }, convertTracingToRequestOptionsBase(updatedOptions)));
23774
24661
  const userDelegationKey = {
23775
24662
  signedObjectId: response.signedObjectId,
@@ -23778,7 +24665,7 @@ class BlobServiceClient extends StorageClient {
23778
24665
  signedExpiresOn: new Date(response.signedExpiresOn),
23779
24666
  signedService: response.signedService,
23780
24667
  signedVersion: response.signedVersion,
23781
- value: response.value
24668
+ value: response.value,
23782
24669
  };
23783
24670
  const res = Object.assign({ _response: response._response, requestId: response.requestId, clientRequestId: response.clientRequestId, version: response.version, date: response.date, errorCode: response.errorCode }, userDelegationKey);
23784
24671
  return res;
@@ -23786,7 +24673,7 @@ class BlobServiceClient extends StorageClient {
23786
24673
  catch (e) {
23787
24674
  span.setStatus({
23788
24675
  code: coreTracing.SpanStatusCode.ERROR,
23789
- message: e.message
24676
+ message: e.message,
23790
24677
  });
23791
24678
  throw e;
23792
24679
  }
@@ -23835,39 +24722,27 @@ class BlobServiceClient extends StorageClient {
23835
24722
 
23836
24723
  Object.defineProperty(exports, 'BaseRequestPolicy', {
23837
24724
  enumerable: true,
23838
- get: function () {
23839
- return coreHttp.BaseRequestPolicy;
23840
- }
24725
+ get: function () { return coreHttp.BaseRequestPolicy; }
23841
24726
  });
23842
24727
  Object.defineProperty(exports, 'HttpHeaders', {
23843
24728
  enumerable: true,
23844
- get: function () {
23845
- return coreHttp.HttpHeaders;
23846
- }
24729
+ get: function () { return coreHttp.HttpHeaders; }
23847
24730
  });
23848
24731
  Object.defineProperty(exports, 'RequestPolicyOptions', {
23849
24732
  enumerable: true,
23850
- get: function () {
23851
- return coreHttp.RequestPolicyOptions;
23852
- }
24733
+ get: function () { return coreHttp.RequestPolicyOptions; }
23853
24734
  });
23854
24735
  Object.defineProperty(exports, 'RestError', {
23855
24736
  enumerable: true,
23856
- get: function () {
23857
- return coreHttp.RestError;
23858
- }
24737
+ get: function () { return coreHttp.RestError; }
23859
24738
  });
23860
24739
  Object.defineProperty(exports, 'WebResource', {
23861
24740
  enumerable: true,
23862
- get: function () {
23863
- return coreHttp.WebResource;
23864
- }
24741
+ get: function () { return coreHttp.WebResource; }
23865
24742
  });
23866
24743
  Object.defineProperty(exports, 'deserializationPolicy', {
23867
24744
  enumerable: true,
23868
- get: function () {
23869
- return coreHttp.deserializationPolicy;
23870
- }
24745
+ get: function () { return coreHttp.deserializationPolicy; }
23871
24746
  });
23872
24747
  exports.AccountSASPermissions = AccountSASPermissions;
23873
24748
  exports.AccountSASResourceTypes = AccountSASResourceTypes;