@azure/storage-blob 12.25.1-alpha.20241014.1 → 12.26.0-alpha.20241015.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +86 -8
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +33 -0
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/ContainerClient.js +30 -0
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/index.js +2 -0
- package/dist-esm/storage-blob/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js +1 -1
- package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/operations/blob.js +18 -3
- package/dist-esm/storage-blob/src/generated/src/operations/blob.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/storageClient.js +2 -2
- package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/constants.js +2 -2
- package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
- package/package.json +1 -1
- package/types/latest/storage-blob.d.ts +59 -0
package/dist/index.js
CHANGED
@@ -91,8 +91,8 @@ class BaseRequestPolicy {
|
|
91
91
|
|
92
92
|
// Copyright (c) Microsoft Corporation.
|
93
93
|
// Licensed under the MIT License.
|
94
|
-
const SDK_VERSION = "12.
|
95
|
-
const SERVICE_VERSION = "
|
94
|
+
const SDK_VERSION = "12.26.0-beta.1";
|
95
|
+
const SERVICE_VERSION = "2025-01-05";
|
96
96
|
const BLOCK_BLOB_MAX_UPLOAD_BLOB_BYTES = 256 * 1024 * 1024; // 256MB
|
97
97
|
const BLOCK_BLOB_MAX_STAGE_BLOCK_BYTES = 4000 * 1024 * 1024; // 4000MB
|
98
98
|
const BLOCK_BLOB_MAX_BLOCKS = 50000;
|
@@ -10754,7 +10754,7 @@ const timeoutInSeconds = {
|
|
10754
10754
|
const version = {
|
10755
10755
|
parameterPath: "version",
|
10756
10756
|
mapper: {
|
10757
|
-
defaultValue: "
|
10757
|
+
defaultValue: "2025-01-05",
|
10758
10758
|
isConstant: true,
|
10759
10759
|
serializedName: "x-ms-version",
|
10760
10760
|
type: {
|
@@ -13752,7 +13752,12 @@ const setImmutabilityPolicyOperationSpec = {
|
|
13752
13752
|
headersMapper: BlobSetImmutabilityPolicyExceptionHeaders,
|
13753
13753
|
},
|
13754
13754
|
},
|
13755
|
-
queryParameters: [
|
13755
|
+
queryParameters: [
|
13756
|
+
timeoutInSeconds,
|
13757
|
+
snapshot,
|
13758
|
+
versionId,
|
13759
|
+
comp12,
|
13760
|
+
],
|
13756
13761
|
urlParameters: [url],
|
13757
13762
|
headerParameters: [
|
13758
13763
|
version,
|
@@ -13777,7 +13782,12 @@ const deleteImmutabilityPolicyOperationSpec = {
|
|
13777
13782
|
headersMapper: BlobDeleteImmutabilityPolicyExceptionHeaders,
|
13778
13783
|
},
|
13779
13784
|
},
|
13780
|
-
queryParameters: [
|
13785
|
+
queryParameters: [
|
13786
|
+
timeoutInSeconds,
|
13787
|
+
snapshot,
|
13788
|
+
versionId,
|
13789
|
+
comp12,
|
13790
|
+
],
|
13781
13791
|
urlParameters: [url],
|
13782
13792
|
headerParameters: [
|
13783
13793
|
version,
|
@@ -13799,7 +13809,12 @@ const setLegalHoldOperationSpec = {
|
|
13799
13809
|
headersMapper: BlobSetLegalHoldExceptionHeaders,
|
13800
13810
|
},
|
13801
13811
|
},
|
13802
|
-
queryParameters: [
|
13812
|
+
queryParameters: [
|
13813
|
+
timeoutInSeconds,
|
13814
|
+
snapshot,
|
13815
|
+
versionId,
|
13816
|
+
comp13,
|
13817
|
+
],
|
13803
13818
|
urlParameters: [url],
|
13804
13819
|
headerParameters: [
|
13805
13820
|
version,
|
@@ -15371,7 +15386,7 @@ let StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.Exte
|
|
15371
15386
|
const defaults = {
|
15372
15387
|
requestContentType: "application/json; charset=utf-8",
|
15373
15388
|
};
|
15374
|
-
const packageDetails = `azsdk-js-azure-storage-blob/12.
|
15389
|
+
const packageDetails = `azsdk-js-azure-storage-blob/12.26.0-beta.1`;
|
15375
15390
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
15376
15391
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
15377
15392
|
: `${packageDetails}`;
|
@@ -15382,7 +15397,7 @@ let StorageClient$1 = class StorageClient extends coreHttpCompat__namespace.Exte
|
|
15382
15397
|
// Parameter assignments
|
15383
15398
|
this.url = url;
|
15384
15399
|
// Assigning values to Constant parameters
|
15385
|
-
this.version = options.version || "
|
15400
|
+
this.version = options.version || "2025-01-05";
|
15386
15401
|
this.service = new ServiceImpl(this);
|
15387
15402
|
this.container = new ContainerImpl(this);
|
15388
15403
|
this.blob = new BlobImpl(this);
|
@@ -20328,6 +20343,39 @@ class BlobClient extends StorageClient {
|
|
20328
20343
|
}
|
20329
20344
|
return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign;
|
20330
20345
|
}
|
20346
|
+
/**
|
20347
|
+
*
|
20348
|
+
* Generates a Blob Service Shared Access Signature (SAS) URI based on
|
20349
|
+
* the client properties and parameters passed in. The SAS is signed by the input user delegation key.
|
20350
|
+
*
|
20351
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
20352
|
+
*
|
20353
|
+
* @param options - Optional parameters.
|
20354
|
+
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
20355
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
20356
|
+
*/
|
20357
|
+
generateUserDelegationSasUrl(options, userDelegationKey) {
|
20358
|
+
return new Promise((resolve) => {
|
20359
|
+
const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).toString();
|
20360
|
+
resolve(appendToURLQuery(this.url, sas));
|
20361
|
+
});
|
20362
|
+
}
|
20363
|
+
/**
|
20364
|
+
* Only available for BlobClient constructed with a shared key credential.
|
20365
|
+
*
|
20366
|
+
* Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on
|
20367
|
+
* the client properties and parameters passed in. The SAS is signed by the input user delegation key.
|
20368
|
+
*
|
20369
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
20370
|
+
*
|
20371
|
+
* @param options - Optional parameters.
|
20372
|
+
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
20373
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
20374
|
+
*/
|
20375
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
20376
|
+
generateUserDelegationSasStringToSign(options, userDelegationKey) {
|
20377
|
+
return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).stringToSign;
|
20378
|
+
}
|
20331
20379
|
/**
|
20332
20380
|
* Delete the immutablility policy on the blob.
|
20333
20381
|
*
|
@@ -23692,6 +23740,36 @@ class ContainerClient extends StorageClient {
|
|
23692
23740
|
}
|
23693
23741
|
return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), this.credential).stringToSign;
|
23694
23742
|
}
|
23743
|
+
/**
|
23744
|
+
* Generates a Blob Container Service Shared Access Signature (SAS) URI based on the client properties
|
23745
|
+
* and parameters passed in. The SAS is signed by the input user delegation key.
|
23746
|
+
*
|
23747
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
23748
|
+
*
|
23749
|
+
* @param options - Optional parameters.
|
23750
|
+
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
23751
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
23752
|
+
*/
|
23753
|
+
generateUserDelegationSasUrl(options, userDelegationKey) {
|
23754
|
+
return new Promise((resolve) => {
|
23755
|
+
const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName }, options), userDelegationKey, this.accountName).toString();
|
23756
|
+
resolve(appendToURLQuery(this.url, sas));
|
23757
|
+
});
|
23758
|
+
}
|
23759
|
+
/**
|
23760
|
+
* Generates string to sign for a Blob Container Service Shared Access Signature (SAS) URI
|
23761
|
+
* based on the client properties and parameters passed in. The SAS is signed by the input user delegation key.
|
23762
|
+
*
|
23763
|
+
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
|
23764
|
+
*
|
23765
|
+
* @param options - Optional parameters.
|
23766
|
+
* @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
|
23767
|
+
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
23768
|
+
*/
|
23769
|
+
/* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
|
23770
|
+
generateUserDelegationSasStringToSign(options, userDelegationKey) {
|
23771
|
+
return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName }, options), userDelegationKey, this.accountName).stringToSign;
|
23772
|
+
}
|
23695
23773
|
/**
|
23696
23774
|
* Creates a BlobBatchClient object to conduct batch operations.
|
23697
23775
|
*
|