@azure/storage-file-share 12.25.1-alpha.20241008.1 → 12.26.0-alpha.20241015.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. package/dist/index.js +228 -7
  2. package/dist/index.js.map +1 -1
  3. package/dist-esm/storage-blob/src/Clients.js +33 -0
  4. package/dist-esm/storage-blob/src/Clients.js.map +1 -1
  5. package/dist-esm/storage-blob/src/ContainerClient.js +30 -0
  6. package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
  7. package/dist-esm/storage-blob/src/generated/src/models/index.js +2 -0
  8. package/dist-esm/storage-blob/src/generated/src/models/index.js.map +1 -1
  9. package/dist-esm/storage-blob/src/generated/src/models/parameters.js +1 -1
  10. package/dist-esm/storage-blob/src/generated/src/models/parameters.js.map +1 -1
  11. package/dist-esm/storage-blob/src/generated/src/operations/blob.js +18 -3
  12. package/dist-esm/storage-blob/src/generated/src/operations/blob.js.map +1 -1
  13. package/dist-esm/storage-blob/src/generated/src/storageClient.js +2 -2
  14. package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -1
  15. package/dist-esm/storage-blob/src/utils/constants.js +2 -2
  16. package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
  17. package/dist-esm/storage-file-share/src/Clients.js.map +1 -1
  18. package/dist-esm/storage-file-share/src/generated/src/models/index.js +4 -0
  19. package/dist-esm/storage-file-share/src/generated/src/models/index.js.map +1 -1
  20. package/dist-esm/storage-file-share/src/generated/src/models/mappers.js +196 -0
  21. package/dist-esm/storage-file-share/src/generated/src/models/mappers.js.map +1 -1
  22. package/dist-esm/storage-file-share/src/generated/src/models/parameters.js +22 -2
  23. package/dist-esm/storage-file-share/src/generated/src/models/parameters.js.map +1 -1
  24. package/dist-esm/storage-file-share/src/generated/src/operations/file.js +1 -0
  25. package/dist-esm/storage-file-share/src/generated/src/operations/file.js.map +1 -1
  26. package/dist-esm/storage-file-share/src/generated/src/operations/share.js +5 -1
  27. package/dist-esm/storage-file-share/src/generated/src/operations/share.js.map +1 -1
  28. package/dist-esm/storage-file-share/src/generated/src/storageClient.js +2 -2
  29. package/dist-esm/storage-file-share/src/generated/src/storageClient.js.map +1 -1
  30. package/dist-esm/storage-file-share/src/utils/constants.js +2 -2
  31. package/dist-esm/storage-file-share/src/utils/constants.js.map +1 -1
  32. package/package.json +1 -1
  33. package/types/latest/storage-file-share.d.ts +84 -2
@@ -944,6 +944,39 @@ export class BlobClient extends StorageClient {
944
944
  }
945
945
  return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), this.credential).stringToSign;
946
946
  }
947
+ /**
948
+ *
949
+ * Generates a Blob Service Shared Access Signature (SAS) URI based on
950
+ * the client properties and parameters passed in. The SAS is signed by the input user delegation key.
951
+ *
952
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
953
+ *
954
+ * @param options - Optional parameters.
955
+ * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
956
+ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
957
+ */
958
+ generateUserDelegationSasUrl(options, userDelegationKey) {
959
+ return new Promise((resolve) => {
960
+ const sas = generateBlobSASQueryParameters(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).toString();
961
+ resolve(appendToURLQuery(this.url, sas));
962
+ });
963
+ }
964
+ /**
965
+ * Only available for BlobClient constructed with a shared key credential.
966
+ *
967
+ * Generates string to sign for a Blob Service Shared Access Signature (SAS) URI based on
968
+ * the client properties and parameters passed in. The SAS is signed by the input user delegation key.
969
+ *
970
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/constructing-a-service-sas
971
+ *
972
+ * @param options - Optional parameters.
973
+ * @param userDelegationKey - Return value of `blobServiceClient.getUserDelegationKey()`
974
+ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
975
+ */
976
+ /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options*/
977
+ generateUserDelegationSasStringToSign(options, userDelegationKey) {
978
+ return generateBlobSASQueryParametersInternal(Object.assign({ containerName: this._containerName, blobName: this._name, snapshotTime: this._snapshot, versionId: this._versionId }, options), userDelegationKey, this.accountName).stringToSign;
979
+ }
947
980
  /**
948
981
  * Delete the immutablility policy on the blob.
949
982
  *