@azure/storage-blob 12.8.0-beta.1 → 12.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/dist/index.js +112 -63
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/storage-blob/src/BatchResponseParser.js +3 -3
  5. package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -1
  6. package/dist-esm/storage-blob/src/BatchUtils.browser.js +1 -1
  7. package/dist-esm/storage-blob/src/BatchUtils.browser.js.map +1 -1
  8. package/dist-esm/storage-blob/src/BlobBatch.js +3 -2
  9. package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -1
  10. package/dist-esm/storage-blob/src/BlobBatchClient.js +15 -6
  11. package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
  12. package/dist-esm/storage-blob/src/BlobServiceClient.js +11 -4
  13. package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
  14. package/dist-esm/storage-blob/src/Clients.js +23 -11
  15. package/dist-esm/storage-blob/src/Clients.js.map +1 -1
  16. package/dist-esm/storage-blob/src/ContainerClient.js +8 -5
  17. package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
  18. package/dist-esm/storage-blob/src/Pipeline.js +14 -0
  19. package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
  20. package/dist-esm/storage-blob/src/Range.js.map +1 -1
  21. package/dist-esm/storage-blob/src/StorageClient.js.map +1 -1
  22. package/dist-esm/storage-blob/src/credentials/Credential.js +1 -5
  23. package/dist-esm/storage-blob/src/credentials/Credential.js.map +1 -1
  24. package/dist-esm/storage-blob/src/generated/src/storageClientContext.js +1 -1
  25. package/dist-esm/storage-blob/src/generated/src/storageClientContext.js.map +1 -1
  26. package/dist-esm/storage-blob/src/models.js +1 -1
  27. package/dist-esm/storage-blob/src/models.js.map +1 -1
  28. package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js +2 -0
  29. package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +1 -1
  30. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js +2 -0
  31. package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +1 -1
  32. package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +1 -1
  33. package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -1
  34. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +1 -1
  35. package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
  36. package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map +1 -1
  37. package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map +1 -1
  38. package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +1 -1
  39. package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -1
  40. package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js +16 -12
  41. package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -1
  42. package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +2 -3
  43. package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -1
  44. package/dist-esm/storage-blob/src/utils/constants.js +1 -1
  45. package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
  46. package/dist-esm/storage-blob/src/utils/tracing.js +1 -0
  47. package/dist-esm/storage-blob/src/utils/tracing.js.map +1 -1
  48. package/dist-esm/storage-blob/src/utils/utils.browser.js +15 -5
  49. package/dist-esm/storage-blob/src/utils/utils.browser.js.map +1 -1
  50. package/dist-esm/storage-blob/src/utils/utils.common.js +8 -10
  51. package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
  52. package/package.json +7 -8
  53. package/typings/3.1/storage-blob.d.ts +45 -19
  54. package/typings/latest/storage-blob.d.ts +47 -19
@@ -134,7 +134,7 @@ export declare interface AccountSASPermissionsLike {
134
134
  */
135
135
  write?: boolean;
136
136
  /**
137
- * Permission to create blobs and files granted.
137
+ * Permission to delete blobs and files granted.
138
138
  */
139
139
  delete?: boolean;
140
140
  /**
@@ -555,7 +555,7 @@ export declare class AppendBlobClient extends BlobClient {
555
555
  * @param pipeline - Call newPipeline() to create a default
556
556
  * pipeline, or provide a customized pipeline.
557
557
  */
558
- constructor(url: string, pipeline: Pipeline);
558
+ constructor(url: string, pipeline: PipelineLike);
559
559
  /**
560
560
  * Creates a new AppendBlobClient object identical to the source but with the
561
561
  * specified snapshot timestamp.
@@ -1014,7 +1014,7 @@ export declare class BlobBatchClient {
1014
1014
  * @param pipeline - Call newPipeline() to create a default
1015
1015
  * pipeline, or provide a customized pipeline.
1016
1016
  */
1017
- constructor(url: string, pipeline: Pipeline);
1017
+ constructor(url: string, pipeline: PipelineLike);
1018
1018
  /**
1019
1019
  * Creates a {@link BlobBatch}.
1020
1020
  * A BlobBatch represents an aggregated set of operations on blobs.
@@ -1124,12 +1124,7 @@ export declare type BlobBatchSetBlobsAccessTierResponse = BlobBatchSubmitBatchRe
1124
1124
  /**
1125
1125
  * Options to configure the Service - Submit Batch Optional Params.
1126
1126
  */
1127
- export declare interface BlobBatchSubmitBatchOptionalParams extends ServiceSubmitBatchOptionalParamsModel, CommonOptions {
1128
- /**
1129
- * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
1130
- * For example, use the @azure/abort-controller to create an `AbortSignal`.
1131
- */
1132
- abortSignal?: AbortSignalLike;
1127
+ export declare interface BlobBatchSubmitBatchOptionalParams extends ServiceSubmitBatchOptionalParamsModel {
1133
1128
  }
1134
1129
  /**
1135
1130
  * Contains response data for blob batch operations.
@@ -1291,7 +1286,7 @@ export declare class BlobClient extends StorageClient {
1291
1286
  * @param pipeline - Call newPipeline() to create a default
1292
1287
  * pipeline, or provide a customized pipeline.
1293
1288
  */
1294
- constructor(url: string, pipeline: Pipeline);
1289
+ constructor(url: string, pipeline: PipelineLike);
1295
1290
  /**
1296
1291
  * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.
1297
1292
  * Provide "" will remove the snapshot and return a Client to the base blob.
@@ -3066,7 +3061,7 @@ export declare class BlobServiceClient extends StorageClient {
3066
3061
  * @param pipeline - Call newPipeline() to create a default
3067
3062
  * pipeline, or provide a customized pipeline.
3068
3063
  */
3069
- constructor(url: string, pipeline: Pipeline);
3064
+ constructor(url: string, pipeline: PipelineLike);
3070
3065
  /**
3071
3066
  * Creates a {@link ContainerClient} object
3072
3067
  *
@@ -3951,7 +3946,7 @@ export declare class BlockBlobClient extends BlobClient {
3951
3946
  * @param pipeline - Call newPipeline() to create a default
3952
3947
  * pipeline, or provide a customized pipeline.
3953
3948
  */
3954
- constructor(url: string, pipeline: Pipeline);
3949
+ constructor(url: string, pipeline: PipelineLike);
3955
3950
  /**
3956
3951
  * Creates a new BlockBlobClient object identical to the source but with the
3957
3952
  * specified snapshot timestamp.
@@ -5015,7 +5010,7 @@ export declare class ContainerClient extends StorageClient {
5015
5010
  * @param pipeline - Call newPipeline() to create a default
5016
5011
  * pipeline, or provide a customized pipeline.
5017
5012
  */
5018
- constructor(url: string, pipeline: Pipeline);
5013
+ constructor(url: string, pipeline: PipelineLike);
5019
5014
  /**
5020
5015
  * Creates a new container under the specified account. If the container with
5021
5016
  * the same name already exists, the operation fails.
@@ -5832,7 +5827,7 @@ export declare interface ContainerListBlobsOptions extends CommonOptions {
5832
5827
  /**
5833
5828
  * Specifies whether deleted blob with versions be returned in the response.
5834
5829
  */
5835
- includeDeletedwithVersions?: boolean;
5830
+ includeDeletedWithVersions?: boolean;
5836
5831
  /**
5837
5832
  * Specifies whether blob immutability policy be returned in the response.
5838
5833
  */
@@ -6404,12 +6399,18 @@ export declare interface HttpAuthorization {
6404
6399
  /**
6405
6400
  * the credentials containing the authentication information of the user agent for the resource being requested.
6406
6401
  */
6407
- parameter: string;
6402
+ value: string;
6408
6403
  }
6409
6404
  export { HttpHeaders };
6410
6405
  export { HttpOperationResponse };
6411
6406
  export { HttpRequestBody };
6412
6407
  export { IHttpClient };
6408
+ /**
6409
+ * A helper to decide if a given argument satisfies the Pipeline contract
6410
+ * @param pipeline - An argument that may be a Pipeline
6411
+ * @returns true when the argument satisfies the Pipeline contract
6412
+ */
6413
+ export declare function isPipelineLike(pipeline: unknown): pipeline is PipelineLike;
6413
6414
  /**
6414
6415
  * The details for a specific lease.
6415
6416
  */
@@ -6790,7 +6791,7 @@ export declare class PageBlobClient extends BlobClient {
6790
6791
  * @param pipeline - Call newPipeline() to create a default
6791
6792
  * pipeline, or provide a customized pipeline.
6792
6793
  */
6793
- constructor(url: string, pipeline: Pipeline);
6794
+ constructor(url: string, pipeline: PipelineLike);
6794
6795
  /**
6795
6796
  * Creates a new PageBlobClient object identical to the source but with the
6796
6797
  * specified snapshot timestamp.
@@ -7527,7 +7528,7 @@ export declare interface ParsedBatchResponse {
7527
7528
  * Refer to {@link newPipeline} and provided policies before implementing your
7528
7529
  * customized Pipeline.
7529
7530
  */
7530
- export declare class Pipeline {
7531
+ export declare class Pipeline implements PipelineLike {
7531
7532
  /**
7532
7533
  * A list of chained request policy factories.
7533
7534
  */
@@ -7551,6 +7552,31 @@ export declare class Pipeline {
7551
7552
  */
7552
7553
  toServiceClientOptions(): ServiceClientOptions;
7553
7554
  }
7555
+ /**
7556
+ * An interface for the {@link Pipeline} class containing HTTP request policies.
7557
+ * You can create a default Pipeline by calling {@link newPipeline}.
7558
+ * Or you can create a Pipeline with your own policies by the constructor of Pipeline.
7559
+ *
7560
+ * Refer to {@link newPipeline} and provided policies before implementing your
7561
+ * customized Pipeline.
7562
+ */
7563
+ export declare interface PipelineLike {
7564
+ /**
7565
+ * A list of chained request policy factories.
7566
+ */
7567
+ readonly factories: RequestPolicyFactory[];
7568
+ /**
7569
+ * Configures pipeline logger and HTTP client.
7570
+ */
7571
+ readonly options: PipelineOptions;
7572
+ /**
7573
+ * Transfer Pipeline object to ServiceClientOptions object which is required by
7574
+ * ServiceClient constructor.
7575
+ *
7576
+ * @returns The ServiceClientOptions object from this Pipeline.
7577
+ */
7578
+ toServiceClientOptions(): ServiceClientOptions;
7579
+ }
7554
7580
  /**
7555
7581
  * Option interface for Pipeline constructor.
7556
7582
  */
@@ -7674,7 +7700,7 @@ export declare enum SASProtocol {
7674
7700
  /**
7675
7701
  * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly
7676
7702
  * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues}
7677
- * types. Once generated, it can be encoded into a {@code String} and appended to a URL directly (though caution should
7703
+ * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should
7678
7704
  * be taken here in case there are existing query parameters, which might affect the appropriate means of appending
7679
7705
  * these query parameters).
7680
7706
  *
@@ -8414,7 +8440,7 @@ declare abstract class StorageClient {
8414
8440
  * @param url - url to resource
8415
8441
  * @param pipeline - request policy pipeline.
8416
8442
  */
8417
- protected constructor(url: string, pipeline: Pipeline);
8443
+ protected constructor(url: string, pipeline: PipelineLike);
8418
8444
  }
8419
8445
  declare class StorageClientContext extends coreHttp.ServiceClient {
8420
8446
  url: string;
@@ -139,7 +139,7 @@ export declare interface AccountSASPermissionsLike {
139
139
  */
140
140
  write?: boolean;
141
141
  /**
142
- * Permission to create blobs and files granted.
142
+ * Permission to delete blobs and files granted.
143
143
  */
144
144
  delete?: boolean;
145
145
  /**
@@ -572,7 +572,7 @@ export declare class AppendBlobClient extends BlobClient {
572
572
  * @param pipeline - Call newPipeline() to create a default
573
573
  * pipeline, or provide a customized pipeline.
574
574
  */
575
- constructor(url: string, pipeline: Pipeline);
575
+ constructor(url: string, pipeline: PipelineLike);
576
576
  /**
577
577
  * Creates a new AppendBlobClient object identical to the source but with the
578
578
  * specified snapshot timestamp.
@@ -1048,7 +1048,7 @@ export declare class BlobBatchClient {
1048
1048
  * @param pipeline - Call newPipeline() to create a default
1049
1049
  * pipeline, or provide a customized pipeline.
1050
1050
  */
1051
- constructor(url: string, pipeline: Pipeline);
1051
+ constructor(url: string, pipeline: PipelineLike);
1052
1052
  /**
1053
1053
  * Creates a {@link BlobBatch}.
1054
1054
  * A BlobBatch represents an aggregated set of operations on blobs.
@@ -1161,12 +1161,7 @@ export declare type BlobBatchSetBlobsAccessTierResponse = BlobBatchSubmitBatchRe
1161
1161
  /**
1162
1162
  * Options to configure the Service - Submit Batch Optional Params.
1163
1163
  */
1164
- export declare interface BlobBatchSubmitBatchOptionalParams extends ServiceSubmitBatchOptionalParamsModel, CommonOptions {
1165
- /**
1166
- * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
1167
- * For example, use the @azure/abort-controller to create an `AbortSignal`.
1168
- */
1169
- abortSignal?: AbortSignalLike;
1164
+ export declare interface BlobBatchSubmitBatchOptionalParams extends ServiceSubmitBatchOptionalParamsModel {
1170
1165
  }
1171
1166
 
1172
1167
  /**
@@ -1341,7 +1336,7 @@ export declare class BlobClient extends StorageClient {
1341
1336
  * @param pipeline - Call newPipeline() to create a default
1342
1337
  * pipeline, or provide a customized pipeline.
1343
1338
  */
1344
- constructor(url: string, pipeline: Pipeline);
1339
+ constructor(url: string, pipeline: PipelineLike);
1345
1340
  /**
1346
1341
  * Creates a new BlobClient object identical to the source but with the specified snapshot timestamp.
1347
1342
  * Provide "" will remove the snapshot and return a Client to the base blob.
@@ -3181,7 +3176,7 @@ export declare class BlobServiceClient extends StorageClient {
3181
3176
  * @param pipeline - Call newPipeline() to create a default
3182
3177
  * pipeline, or provide a customized pipeline.
3183
3178
  */
3184
- constructor(url: string, pipeline: Pipeline);
3179
+ constructor(url: string, pipeline: PipelineLike);
3185
3180
  /**
3186
3181
  * Creates a {@link ContainerClient} object
3187
3182
  *
@@ -4099,7 +4094,7 @@ export declare class BlockBlobClient extends BlobClient {
4099
4094
  * @param pipeline - Call newPipeline() to create a default
4100
4095
  * pipeline, or provide a customized pipeline.
4101
4096
  */
4102
- constructor(url: string, pipeline: Pipeline);
4097
+ constructor(url: string, pipeline: PipelineLike);
4103
4098
  /**
4104
4099
  * Creates a new BlockBlobClient object identical to the source but with the
4105
4100
  * specified snapshot timestamp.
@@ -5197,7 +5192,7 @@ export declare class ContainerClient extends StorageClient {
5197
5192
  * @param pipeline - Call newPipeline() to create a default
5198
5193
  * pipeline, or provide a customized pipeline.
5199
5194
  */
5200
- constructor(url: string, pipeline: Pipeline);
5195
+ constructor(url: string, pipeline: PipelineLike);
5201
5196
  /**
5202
5197
  * Creates a new container under the specified account. If the container with
5203
5198
  * the same name already exists, the operation fails.
@@ -6038,7 +6033,7 @@ export declare interface ContainerListBlobsOptions extends CommonOptions {
6038
6033
  /**
6039
6034
  * Specifies whether deleted blob with versions be returned in the response.
6040
6035
  */
6041
- includeDeletedwithVersions?: boolean;
6036
+ includeDeletedWithVersions?: boolean;
6042
6037
  /**
6043
6038
  * Specifies whether blob immutability policy be returned in the response.
6044
6039
  */
@@ -6645,13 +6640,20 @@ export declare interface HttpAuthorization {
6645
6640
  /**
6646
6641
  * the credentials containing the authentication information of the user agent for the resource being requested.
6647
6642
  */
6648
- parameter: string;
6643
+ value: string;
6649
6644
  }
6650
6645
  export { HttpHeaders }
6651
6646
  export { HttpOperationResponse }
6652
6647
  export { HttpRequestBody }
6653
6648
  export { IHttpClient }
6654
6649
 
6650
+ /**
6651
+ * A helper to decide if a given argument satisfies the Pipeline contract
6652
+ * @param pipeline - An argument that may be a Pipeline
6653
+ * @returns true when the argument satisfies the Pipeline contract
6654
+ */
6655
+ export declare function isPipelineLike(pipeline: unknown): pipeline is PipelineLike;
6656
+
6655
6657
  /**
6656
6658
  * The details for a specific lease.
6657
6659
  */
@@ -7061,7 +7063,7 @@ export declare class PageBlobClient extends BlobClient {
7061
7063
  * @param pipeline - Call newPipeline() to create a default
7062
7064
  * pipeline, or provide a customized pipeline.
7063
7065
  */
7064
- constructor(url: string, pipeline: Pipeline);
7066
+ constructor(url: string, pipeline: PipelineLike);
7065
7067
  /**
7066
7068
  * Creates a new PageBlobClient object identical to the source but with the
7067
7069
  * specified snapshot timestamp.
@@ -7828,7 +7830,7 @@ export declare interface ParsedBatchResponse {
7828
7830
  * Refer to {@link newPipeline} and provided policies before implementing your
7829
7831
  * customized Pipeline.
7830
7832
  */
7831
- export declare class Pipeline {
7833
+ export declare class Pipeline implements PipelineLike {
7832
7834
  /**
7833
7835
  * A list of chained request policy factories.
7834
7836
  */
@@ -7853,6 +7855,32 @@ export declare class Pipeline {
7853
7855
  toServiceClientOptions(): ServiceClientOptions;
7854
7856
  }
7855
7857
 
7858
+ /**
7859
+ * An interface for the {@link Pipeline} class containing HTTP request policies.
7860
+ * You can create a default Pipeline by calling {@link newPipeline}.
7861
+ * Or you can create a Pipeline with your own policies by the constructor of Pipeline.
7862
+ *
7863
+ * Refer to {@link newPipeline} and provided policies before implementing your
7864
+ * customized Pipeline.
7865
+ */
7866
+ export declare interface PipelineLike {
7867
+ /**
7868
+ * A list of chained request policy factories.
7869
+ */
7870
+ readonly factories: RequestPolicyFactory[];
7871
+ /**
7872
+ * Configures pipeline logger and HTTP client.
7873
+ */
7874
+ readonly options: PipelineOptions;
7875
+ /**
7876
+ * Transfer Pipeline object to ServiceClientOptions object which is required by
7877
+ * ServiceClient constructor.
7878
+ *
7879
+ * @returns The ServiceClientOptions object from this Pipeline.
7880
+ */
7881
+ toServiceClientOptions(): ServiceClientOptions;
7882
+ }
7883
+
7856
7884
  /**
7857
7885
  * Option interface for Pipeline constructor.
7858
7886
  */
@@ -7984,7 +8012,7 @@ export declare enum SASProtocol {
7984
8012
  /**
7985
8013
  * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly
7986
8014
  * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link BlobSASSignatureValues}
7987
- * types. Once generated, it can be encoded into a {@code String} and appended to a URL directly (though caution should
8015
+ * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should
7988
8016
  * be taken here in case there are existing query parameters, which might affect the appropriate means of appending
7989
8017
  * these query parameters).
7990
8018
  *
@@ -8766,7 +8794,7 @@ declare abstract class StorageClient {
8766
8794
  * @param url - url to resource
8767
8795
  * @param pipeline - request policy pipeline.
8768
8796
  */
8769
- protected constructor(url: string, pipeline: Pipeline);
8797
+ protected constructor(url: string, pipeline: PipelineLike);
8770
8798
  }
8771
8799
 
8772
8800
  declare class StorageClientContext extends coreHttp.ServiceClient {