@azure/storage-file-share 12.28.0-beta.1 → 12.29.0-beta.1
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.
- package/dist/browser/AccountSASPermissions.d.ts +1 -1
- package/dist/browser/AccountSASPermissions.js +2 -2
- package/dist/browser/AccountSASPermissions.js.map +1 -1
- package/dist/browser/AccountSASResourceTypes.d.ts +1 -1
- package/dist/browser/AccountSASResourceTypes.js +1 -1
- package/dist/browser/AccountSASResourceTypes.js.map +1 -1
- package/dist/browser/AccountSASSignatureValues.d.ts +3 -3
- package/dist/browser/AccountSASSignatureValues.js +1 -1
- package/dist/browser/AccountSASSignatureValues.js.map +1 -1
- package/dist/browser/Clients.d.ts +53 -53
- package/dist/browser/Clients.d.ts.map +1 -1
- package/dist/browser/Clients.js +52 -51
- package/dist/browser/Clients.js.map +1 -1
- package/dist/browser/FileSASSignatureValues.d.ts +1 -1
- package/dist/browser/FileSASSignatureValues.js.map +1 -1
- package/dist/browser/FileSystemAttributes.d.ts +1 -1
- package/dist/browser/FileSystemAttributes.js +1 -1
- package/dist/browser/FileSystemAttributes.js.map +1 -1
- package/dist/browser/Pipeline.d.ts.map +1 -1
- package/dist/browser/Pipeline.js +2 -1
- package/dist/browser/Pipeline.js.map +1 -1
- package/dist/browser/Range.d.ts +1 -1
- package/dist/browser/Range.js.map +1 -1
- package/dist/browser/SASQueryParameters.d.ts +1 -1
- package/dist/browser/SASQueryParameters.js.map +1 -1
- package/dist/browser/ShareSASPermissions.d.ts +1 -1
- package/dist/browser/ShareSASPermissions.js +1 -1
- package/dist/browser/ShareSASPermissions.js.map +1 -1
- package/dist/browser/ShareServiceClient.d.ts +4 -4
- package/dist/browser/ShareServiceClient.js +4 -4
- package/dist/browser/ShareServiceClient.js.map +1 -1
- package/dist/browser/StorageRetryPolicyFactory.d.ts +1 -1
- package/dist/browser/StorageRetryPolicyFactory.js.map +1 -1
- package/dist/browser/generated/src/models/index.d.ts +62 -52
- package/dist/browser/generated/src/models/index.d.ts.map +1 -1
- package/dist/browser/generated/src/models/index.js +2 -0
- package/dist/browser/generated/src/models/index.js.map +1 -1
- package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/browser/generated/src/models/mappers.js +1779 -1730
- package/dist/browser/generated/src/models/mappers.js.map +1 -1
- package/dist/browser/generated/src/models/parameters.js +388 -388
- package/dist/browser/generated/src/models/parameters.js.map +1 -1
- package/dist/browser/generated/src/operations/directory.js +52 -52
- package/dist/browser/generated/src/operations/directory.js.map +1 -1
- package/dist/browser/generated/src/operations/file.js +113 -113
- package/dist/browser/generated/src/operations/file.js.map +1 -1
- package/dist/browser/generated/src/operations/service.js +18 -18
- package/dist/browser/generated/src/operations/service.js.map +1 -1
- package/dist/browser/generated/src/operations/share.js +104 -104
- package/dist/browser/generated/src/operations/share.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/directory.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/file.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/service.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/share.js.map +1 -1
- package/dist/browser/generated/src/storageClient.d.ts.map +1 -1
- package/dist/browser/generated/src/storageClient.js +5 -5
- package/dist/browser/generated/src/storageClient.js.map +1 -1
- package/dist/browser/policies/StorageRetryPolicy.d.ts.map +1 -1
- package/dist/browser/policies/StorageRetryPolicy.js +15 -17
- package/dist/browser/policies/StorageRetryPolicy.js.map +1 -1
- package/dist/browser/policies/StorageRetryPolicyV2.d.ts.map +1 -1
- package/dist/browser/policies/StorageRetryPolicyV2.js +15 -17
- package/dist/browser/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist/browser/utils/constants.js +2 -2
- package/dist/browser/utils/constants.js.map +1 -1
- package/dist/browser/utils/utils.common.d.ts +2 -2
- package/dist/browser/utils/utils.common.js +2 -2
- package/dist/browser/utils/utils.common.js.map +1 -1
- package/dist/commonjs/AccountSASPermissions.d.ts +1 -1
- package/dist/commonjs/AccountSASPermissions.js +2 -2
- package/dist/commonjs/AccountSASPermissions.js.map +1 -1
- package/dist/commonjs/AccountSASResourceTypes.d.ts +1 -1
- package/dist/commonjs/AccountSASResourceTypes.js +1 -1
- package/dist/commonjs/AccountSASResourceTypes.js.map +1 -1
- package/dist/commonjs/AccountSASSignatureValues.d.ts +3 -3
- package/dist/commonjs/AccountSASSignatureValues.js +1 -1
- package/dist/commonjs/AccountSASSignatureValues.js.map +1 -1
- package/dist/commonjs/Clients.d.ts +53 -53
- package/dist/commonjs/Clients.d.ts.map +1 -1
- package/dist/commonjs/Clients.js +52 -51
- package/dist/commonjs/Clients.js.map +1 -1
- package/dist/commonjs/FileSASSignatureValues.d.ts +1 -1
- package/dist/commonjs/FileSASSignatureValues.js.map +1 -1
- package/dist/commonjs/FileSystemAttributes.d.ts +1 -1
- package/dist/commonjs/FileSystemAttributes.js +1 -1
- package/dist/commonjs/FileSystemAttributes.js.map +1 -1
- package/dist/commonjs/Pipeline.d.ts.map +1 -1
- package/dist/commonjs/Pipeline.js +1 -0
- package/dist/commonjs/Pipeline.js.map +1 -1
- package/dist/commonjs/Range.d.ts +1 -1
- package/dist/commonjs/Range.js.map +1 -1
- package/dist/commonjs/SASQueryParameters.d.ts +1 -1
- package/dist/commonjs/SASQueryParameters.js.map +1 -1
- package/dist/commonjs/ShareSASPermissions.d.ts +1 -1
- package/dist/commonjs/ShareSASPermissions.js +1 -1
- package/dist/commonjs/ShareSASPermissions.js.map +1 -1
- package/dist/commonjs/ShareServiceClient.d.ts +4 -4
- package/dist/commonjs/ShareServiceClient.js +4 -4
- package/dist/commonjs/ShareServiceClient.js.map +1 -1
- package/dist/commonjs/StorageRetryPolicyFactory.d.ts +1 -1
- package/dist/commonjs/StorageRetryPolicyFactory.js.map +1 -1
- package/dist/commonjs/generated/src/models/index.d.ts +62 -52
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/index.js +2 -0
- package/dist/commonjs/generated/src/models/index.js.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.js +1779 -1730
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.js +387 -387
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
- package/dist/commonjs/generated/src/operations/directory.js +52 -52
- package/dist/commonjs/generated/src/operations/directory.js.map +1 -1
- package/dist/commonjs/generated/src/operations/file.js +113 -113
- package/dist/commonjs/generated/src/operations/file.js.map +1 -1
- package/dist/commonjs/generated/src/operations/service.js +18 -18
- package/dist/commonjs/generated/src/operations/service.js.map +1 -1
- package/dist/commonjs/generated/src/operations/share.js +104 -104
- package/dist/commonjs/generated/src/operations/share.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/directory.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/file.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/service.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/share.js.map +1 -1
- package/dist/commonjs/generated/src/storageClient.d.ts.map +1 -1
- package/dist/commonjs/generated/src/storageClient.js +4 -4
- package/dist/commonjs/generated/src/storageClient.js.map +1 -1
- package/dist/commonjs/policies/StorageRetryPolicy.d.ts.map +1 -1
- package/dist/commonjs/policies/StorageRetryPolicy.js +14 -16
- package/dist/commonjs/policies/StorageRetryPolicy.js.map +1 -1
- package/dist/commonjs/policies/StorageRetryPolicyV2.d.ts.map +1 -1
- package/dist/commonjs/policies/StorageRetryPolicyV2.js +14 -16
- package/dist/commonjs/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist/commonjs/utils/constants.js +2 -2
- package/dist/commonjs/utils/constants.js.map +1 -1
- package/dist/commonjs/utils/utils.common.d.ts +2 -2
- package/dist/commonjs/utils/utils.common.js +2 -2
- package/dist/commonjs/utils/utils.common.js.map +1 -1
- package/dist/esm/AccountSASPermissions.d.ts +1 -1
- package/dist/esm/AccountSASPermissions.js +2 -2
- package/dist/esm/AccountSASPermissions.js.map +1 -1
- package/dist/esm/AccountSASResourceTypes.d.ts +1 -1
- package/dist/esm/AccountSASResourceTypes.js +1 -1
- package/dist/esm/AccountSASResourceTypes.js.map +1 -1
- package/dist/esm/AccountSASSignatureValues.d.ts +3 -3
- package/dist/esm/AccountSASSignatureValues.js +1 -1
- package/dist/esm/AccountSASSignatureValues.js.map +1 -1
- package/dist/esm/Clients.d.ts +53 -53
- package/dist/esm/Clients.d.ts.map +1 -1
- package/dist/esm/Clients.js +52 -51
- package/dist/esm/Clients.js.map +1 -1
- package/dist/esm/FileSASSignatureValues.d.ts +1 -1
- package/dist/esm/FileSASSignatureValues.js.map +1 -1
- package/dist/esm/FileSystemAttributes.d.ts +1 -1
- package/dist/esm/FileSystemAttributes.js +1 -1
- package/dist/esm/FileSystemAttributes.js.map +1 -1
- package/dist/esm/Pipeline.d.ts.map +1 -1
- package/dist/esm/Pipeline.js +2 -1
- package/dist/esm/Pipeline.js.map +1 -1
- package/dist/esm/Range.d.ts +1 -1
- package/dist/esm/Range.js.map +1 -1
- package/dist/esm/SASQueryParameters.d.ts +1 -1
- package/dist/esm/SASQueryParameters.js.map +1 -1
- package/dist/esm/ShareSASPermissions.d.ts +1 -1
- package/dist/esm/ShareSASPermissions.js +1 -1
- package/dist/esm/ShareSASPermissions.js.map +1 -1
- package/dist/esm/ShareServiceClient.d.ts +4 -4
- package/dist/esm/ShareServiceClient.js +4 -4
- package/dist/esm/ShareServiceClient.js.map +1 -1
- package/dist/esm/StorageRetryPolicyFactory.d.ts +1 -1
- package/dist/esm/StorageRetryPolicyFactory.js.map +1 -1
- package/dist/esm/generated/src/models/index.d.ts +62 -52
- package/dist/esm/generated/src/models/index.d.ts.map +1 -1
- package/dist/esm/generated/src/models/index.js +2 -0
- package/dist/esm/generated/src/models/index.js.map +1 -1
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/esm/generated/src/models/mappers.js +1779 -1730
- package/dist/esm/generated/src/models/mappers.js.map +1 -1
- package/dist/esm/generated/src/models/parameters.js +388 -388
- package/dist/esm/generated/src/models/parameters.js.map +1 -1
- package/dist/esm/generated/src/operations/directory.js +52 -52
- package/dist/esm/generated/src/operations/directory.js.map +1 -1
- package/dist/esm/generated/src/operations/file.js +113 -113
- package/dist/esm/generated/src/operations/file.js.map +1 -1
- package/dist/esm/generated/src/operations/service.js +18 -18
- package/dist/esm/generated/src/operations/service.js.map +1 -1
- package/dist/esm/generated/src/operations/share.js +104 -104
- package/dist/esm/generated/src/operations/share.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/directory.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/file.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/service.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/share.js.map +1 -1
- package/dist/esm/generated/src/storageClient.d.ts.map +1 -1
- package/dist/esm/generated/src/storageClient.js +5 -5
- package/dist/esm/generated/src/storageClient.js.map +1 -1
- package/dist/esm/policies/StorageRetryPolicy.d.ts.map +1 -1
- package/dist/esm/policies/StorageRetryPolicy.js +15 -17
- package/dist/esm/policies/StorageRetryPolicy.js.map +1 -1
- package/dist/esm/policies/StorageRetryPolicyV2.d.ts.map +1 -1
- package/dist/esm/policies/StorageRetryPolicyV2.js +15 -17
- package/dist/esm/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist/esm/utils/constants.js +2 -2
- package/dist/esm/utils/constants.js.map +1 -1
- package/dist/esm/utils/utils.common.d.ts +2 -2
- package/dist/esm/utils/utils.common.js +2 -2
- package/dist/esm/utils/utils.common.js.map +1 -1
- package/dist/react-native/AccountSASPermissions.d.ts +1 -1
- package/dist/react-native/AccountSASPermissions.js +2 -2
- package/dist/react-native/AccountSASPermissions.js.map +1 -1
- package/dist/react-native/AccountSASResourceTypes.d.ts +1 -1
- package/dist/react-native/AccountSASResourceTypes.js +1 -1
- package/dist/react-native/AccountSASResourceTypes.js.map +1 -1
- package/dist/react-native/AccountSASSignatureValues.d.ts +3 -3
- package/dist/react-native/AccountSASSignatureValues.js +1 -1
- package/dist/react-native/AccountSASSignatureValues.js.map +1 -1
- package/dist/react-native/Clients.d.ts +53 -53
- package/dist/react-native/Clients.d.ts.map +1 -1
- package/dist/react-native/Clients.js +52 -51
- package/dist/react-native/Clients.js.map +1 -1
- package/dist/react-native/FileSASSignatureValues.d.ts +1 -1
- package/dist/react-native/FileSASSignatureValues.js.map +1 -1
- package/dist/react-native/FileSystemAttributes.d.ts +1 -1
- package/dist/react-native/FileSystemAttributes.js +1 -1
- package/dist/react-native/FileSystemAttributes.js.map +1 -1
- package/dist/react-native/Pipeline.d.ts.map +1 -1
- package/dist/react-native/Pipeline.js +2 -1
- package/dist/react-native/Pipeline.js.map +1 -1
- package/dist/react-native/Range.d.ts +1 -1
- package/dist/react-native/Range.js.map +1 -1
- package/dist/react-native/SASQueryParameters.d.ts +1 -1
- package/dist/react-native/SASQueryParameters.js.map +1 -1
- package/dist/react-native/ShareSASPermissions.d.ts +1 -1
- package/dist/react-native/ShareSASPermissions.js +1 -1
- package/dist/react-native/ShareSASPermissions.js.map +1 -1
- package/dist/react-native/ShareServiceClient.d.ts +4 -4
- package/dist/react-native/ShareServiceClient.js +4 -4
- package/dist/react-native/ShareServiceClient.js.map +1 -1
- package/dist/react-native/StorageRetryPolicyFactory.d.ts +1 -1
- package/dist/react-native/StorageRetryPolicyFactory.js.map +1 -1
- package/dist/react-native/generated/src/models/index.d.ts +62 -52
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/index.js +2 -0
- package/dist/react-native/generated/src/models/index.js.map +1 -1
- package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/mappers.js +1779 -1730
- package/dist/react-native/generated/src/models/mappers.js.map +1 -1
- package/dist/react-native/generated/src/models/parameters.js +388 -388
- package/dist/react-native/generated/src/models/parameters.js.map +1 -1
- package/dist/react-native/generated/src/operations/directory.js +52 -52
- package/dist/react-native/generated/src/operations/directory.js.map +1 -1
- package/dist/react-native/generated/src/operations/file.js +113 -113
- package/dist/react-native/generated/src/operations/file.js.map +1 -1
- package/dist/react-native/generated/src/operations/service.js +18 -18
- package/dist/react-native/generated/src/operations/service.js.map +1 -1
- package/dist/react-native/generated/src/operations/share.js +104 -104
- package/dist/react-native/generated/src/operations/share.js.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/directory.js.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/file.js.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/service.js.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/share.js.map +1 -1
- package/dist/react-native/generated/src/storageClient.d.ts.map +1 -1
- package/dist/react-native/generated/src/storageClient.js +5 -5
- package/dist/react-native/generated/src/storageClient.js.map +1 -1
- package/dist/react-native/policies/StorageRetryPolicy.d.ts.map +1 -1
- package/dist/react-native/policies/StorageRetryPolicy.js +15 -17
- package/dist/react-native/policies/StorageRetryPolicy.js.map +1 -1
- package/dist/react-native/policies/StorageRetryPolicyV2.d.ts.map +1 -1
- package/dist/react-native/policies/StorageRetryPolicyV2.js +15 -17
- package/dist/react-native/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist/react-native/utils/constants.js +2 -2
- package/dist/react-native/utils/constants.js.map +1 -1
- package/dist/react-native/utils/utils.common.d.ts +2 -2
- package/dist/react-native/utils/utils.common.js +2 -2
- package/dist/react-native/utils/utils.common.js.map +1 -1
- package/package.json +5 -5
@@ -48,7 +48,7 @@ export interface FileSASSignatureValues {
|
|
48
48
|
/**
|
49
49
|
* Optional. The name of the access policy on the share this SAS references if any.
|
50
50
|
*
|
51
|
-
* @see https://learn.microsoft.com/
|
51
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy
|
52
52
|
*/
|
53
53
|
identifier?: string;
|
54
54
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":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,EAC/B,sBAAsB,CAAC,SAAS,EAChC,sBAAsB,CAAC,OAAO,EAC9B,sBAAsB,CAAC,UAAU,EACjC,QAAQ,EACR,sBAAsB,CAAC,YAAY,EACnC,sBAAsB,CAAC,kBAAkB,EACzC,sBAAsB,CAAC,eAAe,EACtC,sBAAsB,CAAC,eAAe,EACtC,sBAAsB,CAAC,WAAW,CACnC;QACD,YAAY,EAAE,YAAY;KAC3B,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,WAAmB,EAAE,SAAiB,EAAE,QAAiB;IACjF,mCAAmC;IACnC,4CAA4C;IAC5C,0DAA0D;IAC1D,MAAM,QAAQ,GAAa,CAAC,SAAS,WAAW,IAAI,SAAS,EAAE,CAAC,CAAC;IACjE,IAAI,QAAQ,EAAE,CAAC;QACb,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport { FileSASPermissions } from \"./FileSASPermissions.js\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport { SASQueryParameters } from \"./SASQueryParameters.js\";\nimport { ShareSASPermissions } from \"./ShareSASPermissions.js\";\nimport { SERVICE_VERSION } from \"./utils/constants.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * FileSASSignatureValues is used to help generating File service SAS tokens for shares or files.\n */\n\nexport interface FileSASSignatureValues {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n */\n expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to either {@link ShareSASPermissions} or {@link FileSASPermissions} depending on the resource\n * being accessed for help constructing the permissions string.\n */\n permissions?: FileSASPermissions | ShareSASPermissions;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n\n /**\n * The name of the share the SAS user may access.\n */\n shareName: string;\n\n /**\n * Optional. The path of the file like, \"directory/FileName\" or \"FileName\".\n */\n filePath?: string;\n\n /**\n * Optional. The name of the access policy on the share this SAS references if any.\n *\n * @see https://learn.microsoft.com/
|
1
|
+
{"version":3,"file":"FileSASSignatureValues.js","sourceRoot":"","sources":["../../src/FileSASSignatureValues.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAqF/D;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,8BAA8B,CAC5C,sBAA8C,EAC9C,mBAA+C;IAE/C,OAAO,sCAAsC,CAAC,sBAAsB,EAAE,mBAAmB,CAAC;SACvF,kBAAkB,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,sCAAsC,CACpD,sBAA8C,EAC9C,mBAA+C;IAE/C,IACE,CAAC,sBAAsB,CAAC,UAAU;QAClC,CAAC,CAAC,sBAAsB,CAAC,WAAW,IAAI,sBAAsB,CAAC,SA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AC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;QACrF,sBAAsB,CAAC,QAAQ;QAC/B,OAAO;QACP,sBAAsB,CAAC,YAAY;QACnC,sBAAsB,CAAC,kBAAkB;QACzC,sBAAsB,CAAC,eAAe;QACtC,sBAAsB,CAAC,eAAe;QACtC,sBAAsB,CAAC,WAAW;KACnC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEb,MAAM,SAAS,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAEtE,OAAO;QACL,kBAAkB,EAAE,IAAI,kBAAkB,CACxC,OAAO,EACP,SAAS,EACT,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,sBAAsB,CAAC,QAAQ,EAC/B,sBAAsB,CAAC,QAAQ,EAC/B,sBAAsB,CAAC,SAAS,EAChC,sBAAsB,CAAC,OAAO,EAC9B,sBAAsB,CAAC,UAAU,EACjC,QAAQ,EACR,sBAAsB,CAAC,YAAY,EACnC,sBAAsB,CAAC,kBAAkB,EACzC,sBAAsB,CAAC,eAAe,EACtC,sBAAsB,CAAC,eAAe,EACtC,sBAAsB,CAAC,WAAW,CACnC;QACD,YAAY,EAAE,YAAY;KAC3B,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,WAAmB,EAAE,SAAiB,EAAE,QAAiB;IACjF,mCAAmC;IACnC,4CAA4C;IAC5C,0DAA0D;IAC1D,MAAM,QAAQ,GAAa,CAAC,SAAS,WAAW,IAAI,SAAS,EAAE,CAAC,CAAC;IACjE,IAAI,QAAQ,EAAE,CAAC;QACb,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC3B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport { FileSASPermissions } from \"./FileSASPermissions.js\";\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport type { SASProtocol } from \"./SASQueryParameters.js\";\nimport { SASQueryParameters } from \"./SASQueryParameters.js\";\nimport { ShareSASPermissions } from \"./ShareSASPermissions.js\";\nimport { SERVICE_VERSION } from \"./utils/constants.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * FileSASSignatureValues is used to help generating File service SAS tokens for shares or files.\n */\n\nexport interface FileSASSignatureValues {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n */\n expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to either {@link ShareSASPermissions} or {@link FileSASPermissions} depending on the resource\n * being accessed for help constructing the permissions string.\n */\n permissions?: FileSASPermissions | ShareSASPermissions;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n\n /**\n * The name of the share the SAS user may access.\n */\n shareName: string;\n\n /**\n * Optional. The path of the file like, \"directory/FileName\" or \"FileName\".\n */\n filePath?: string;\n\n /**\n * Optional. The name of the access policy on the share this SAS references if any.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n\n /**\n * Optional. The cache-control header for the SAS.\n */\n cacheControl?: string;\n\n /**\n * Optional. The content-disposition header for the SAS.\n */\n contentDisposition?: string;\n\n /**\n * Optional. The content-encoding header for the SAS.\n */\n contentEncoding?: string;\n\n /**\n * Optional. The content-language header for the SAS.\n */\n contentLanguage?: string;\n\n /**\n * Optional. The content-type header for the SAS.\n */\n contentType?: string;\n}\n\n/**\n * ONLY AVAILABLE IN NODE.JS RUNTIME.\n *\n * Creates an instance of SASQueryParameters.\n *\n * Only accepts required settings needed to create a SAS. For optional settings please\n * set corresponding properties directly, such as permissions, startsOn and identifier.\n *\n * WARNING: When identifier is not provided, permissions and expiresOn are required.\n * You MUST assign value to identifier or expiresOn & permissions manually if you initial with\n * this constructor.\n *\n * @param fileSASSignatureValues -\n * @param sharedKeyCredential -\n */\nexport function generateFileSASQueryParameters(\n fileSASSignatureValues: FileSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): SASQueryParameters {\n return generateFileSASQueryParametersInternal(fileSASSignatureValues, sharedKeyCredential)\n .sasQueryParameters;\n}\n\nexport function generateFileSASQueryParametersInternal(\n fileSASSignatureValues: FileSASSignatureValues,\n sharedKeyCredential: StorageSharedKeyCredential,\n): { sasQueryParameters: SASQueryParameters; stringToSign: string } {\n if (\n !fileSASSignatureValues.identifier &&\n !(fileSASSignatureValues.permissions && fileSASSignatureValues.expiresOn)\n ) {\n throw new RangeError(\n \"Must provide 'permissions' and 'expiresOn' for File SAS generation when 'identifier' is not provided.\",\n );\n }\n\n const version = fileSASSignatureValues.version ? fileSASSignatureValues.version : SERVICE_VERSION;\n let resource: string = \"s\";\n if (fileSASSignatureValues.filePath) {\n resource = \"f\";\n }\n\n let verifiedPermissions: string | undefined;\n // Calling parse and toString guarantees the proper ordering and throws on invalid characters.\n if (fileSASSignatureValues.permissions) {\n if (fileSASSignatureValues.filePath) {\n verifiedPermissions = FileSASPermissions.parse(\n fileSASSignatureValues.permissions.toString(),\n ).toString();\n } else {\n verifiedPermissions = ShareSASPermissions.parse(\n fileSASSignatureValues.permissions.toString(),\n ).toString();\n }\n }\n\n // Signature is generated on the un-url-encoded values.\n const stringToSign = [\n verifiedPermissions,\n fileSASSignatureValues.startsOn\n ? truncatedISO8061Date(fileSASSignatureValues.startsOn, false)\n : \"\",\n fileSASSignatureValues.expiresOn\n ? truncatedISO8061Date(fileSASSignatureValues.expiresOn, false)\n : \"\",\n getCanonicalName(\n sharedKeyCredential.accountName,\n fileSASSignatureValues.shareName,\n fileSASSignatureValues.filePath,\n ),\n fileSASSignatureValues.identifier,\n fileSASSignatureValues.ipRange ? ipRangeToString(fileSASSignatureValues.ipRange) : \"\",\n fileSASSignatureValues.protocol,\n version,\n fileSASSignatureValues.cacheControl,\n fileSASSignatureValues.contentDisposition,\n fileSASSignatureValues.contentEncoding,\n fileSASSignatureValues.contentLanguage,\n fileSASSignatureValues.contentType,\n ].join(\"\\n\");\n\n const signature = sharedKeyCredential.computeHMACSHA256(stringToSign);\n\n return {\n sasQueryParameters: new SASQueryParameters(\n version,\n signature,\n verifiedPermissions,\n undefined,\n undefined,\n fileSASSignatureValues.protocol,\n fileSASSignatureValues.startsOn,\n fileSASSignatureValues.expiresOn,\n fileSASSignatureValues.ipRange,\n fileSASSignatureValues.identifier,\n resource,\n fileSASSignatureValues.cacheControl,\n fileSASSignatureValues.contentDisposition,\n fileSASSignatureValues.contentEncoding,\n fileSASSignatureValues.contentLanguage,\n fileSASSignatureValues.contentType,\n ),\n stringToSign: stringToSign,\n };\n}\n\nfunction getCanonicalName(accountName: string, shareName: string, filePath?: string): string {\n // Share: \"/file/account/sharename\"\n // File: \"/file/account/sharename/filename\"\n // File: \"/file/account/sharename/directoryname/filename\"\n const elements: string[] = [`/file/${accountName}/${shareName}`];\n if (filePath) {\n elements.push(`/${filePath}`);\n }\n return elements.join(\"\");\n}\n"]}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* This is a helper class to construct a string representing the NTFS attributes to a file or directory.
|
3
|
-
* @see https://learn.microsoft.com/
|
3
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-file#file-system-attributes
|
4
4
|
*/
|
5
5
|
export declare class FileSystemAttributes {
|
6
6
|
/**
|
@@ -2,7 +2,7 @@
|
|
2
2
|
// Licensed under the MIT License.
|
3
3
|
/**
|
4
4
|
* This is a helper class to construct a string representing the NTFS attributes to a file or directory.
|
5
|
-
* @see https://learn.microsoft.com/
|
5
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-file#file-system-attributes
|
6
6
|
*/
|
7
7
|
export class FileSystemAttributes {
|
8
8
|
constructor() {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FileSystemAttributes.js","sourceRoot":"","sources":["../../src/FileSystemAttributes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAAjC;QAyDE;;WAEG;QACI,aAAQ,GAAY,KAAK,CAAC;QAEjC;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,cAAS,GAAY,KAAK,CAAC;QAElC;;WAEG;QACI,YAAO,GAAY,KAAK,CAAC;QAEhC;;WAEG;QACI,cAAS,GAAY,KAAK,CAAC;QAElC;;;WAGG;QACI,YAAO,GAAY,KAAK,CAAC;QAEhC;;WAEG;QACI,sBAAiB,GAAY,KAAK,CAAC;QAE1C;;;;WAIG;QACI,gBAAW,GAAY,KAAK,CAAC;IAyCtC,CAAC;IApJC;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,cAAsB;QACxC,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,IAAI,UAAU,CAAC,4BAA4B,cAAc,IAAI,CAAC,CAAC;QACvE,CAAC;QAED,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAExD,MAAM,UAAU,GAAG,cAAc,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAEpD,KAAK,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;YAC3B,GAAG,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;YACjB,QAAQ,GAAG,EAAE,CAAC;gBACZ,KAAK,UAAU;oBAC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AAC,CAAC;QAC5B,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1B,CAAC;QACD,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC/B,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QACD,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QACD,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3B,UAAU,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QACvC,CAAC;QACD,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACjC,CAAC;QACD,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * This is a helper class to construct a string representing the NTFS attributes to a file or directory.\n * @see https://learn.microsoft.com/
|
1
|
+
{"version":3,"file":"FileSystemAttributes.js","sourceRoot":"","sources":["../../src/FileSystemAttributes.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAAjC;QAyDE;;WAEG;QACI,aAAQ,GAAY,KAAK,CAAC;QAEjC;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WA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AAC;YACjB,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QACD,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3B,UAAU,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QACvC,CAAC;QACD,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACjC,CAAC;QACD,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * This is a helper class to construct a string representing the NTFS attributes to a file or directory.\n * @see https://learn.microsoft.com/rest/api/storageservices/create-file#file-system-attributes\n */\nexport class FileSystemAttributes {\n /**\n * Creates a FileSystemAttributes from the specified attributes string. This method will throw an\n * Error if it encounters a string that does not correspond to a valid attributes.\n *\n * @param fileAttributes - The value of header x-ms-file-attributes.\n */\n public static parse(fileAttributes: string): FileSystemAttributes {\n if (!fileAttributes) {\n throw new RangeError(`Invalid fileAttributes: '${fileAttributes}'.`);\n }\n\n const fileSystemAttributes = new FileSystemAttributes();\n\n const attributes = fileAttributes.trim().split(\"|\");\n\n for (let str of attributes) {\n str = str.trim();\n switch (str) {\n case \"ReadOnly\":\n fileSystemAttributes.readonly = true;\n break;\n case \"Hidden\":\n fileSystemAttributes.hidden = true;\n break;\n case \"System\":\n fileSystemAttributes.system = true;\n break;\n case \"None\":\n fileSystemAttributes.none = true;\n break;\n case \"Temporary\":\n fileSystemAttributes.temporary = true;\n break;\n case \"Offline\":\n fileSystemAttributes.offline = true;\n break;\n case \"Directory\":\n fileSystemAttributes.directory = true;\n break;\n case \"Archive\":\n fileSystemAttributes.archive = true;\n break;\n case \"NotContentIndexed\":\n fileSystemAttributes.notContentIndexed = true;\n break;\n case \"NoScrubData\":\n fileSystemAttributes.noScrubData = true;\n break;\n default:\n throw new RangeError(`Invalid attribute: ${str}`);\n }\n }\n\n return fileSystemAttributes;\n }\n\n /**\n * Specifies a directory or file that is read-only.\n */\n public readonly: boolean = false;\n\n /**\n * Specifies a directory or file is hidden.\n */\n public hidden: boolean = false;\n\n /**\n * Specifies a directory or file that the operating system uses a part of, or uses exclusively.\n */\n public system: boolean = false;\n\n /**\n * Specifies a directory or file that does not have other attributes set. This attribute is valid only when used alone.\n */\n public none: boolean = false;\n\n /**\n * Specifies the handle identifies a directory.\n */\n public directory: boolean = false;\n\n /**\n * Specifies a directory or file is an archive. Applications typically use this attribute to mark files for backup or removal.\n */\n public archive: boolean = false;\n\n /**\n * Specifies if a file is temporary.\n */\n public temporary: boolean = false;\n\n /**\n * Specifies the data of a directory or file is not available immediately.\n * This file system attribute is presented primarily to provide compatibility with Windows - Azure Files does not support with offline storage options.\n */\n public offline: boolean = false;\n\n /**\n * Specifies the directory or file is not to be indexed by the content indexing service.\n */\n public notContentIndexed: boolean = false;\n\n /**\n * Specifies the user data stream not to be read by the background data integrity scanner.\n * This file system attribute is presented primarily to provide compatibility with Windows.\n * Applicable to directory or file.\n */\n public noScrubData: boolean = false;\n\n /**\n * Converts the given attributes to a string.\n *\n * @returns A string which represents the FileSystemAttributes\n */\n public toString(): string {\n const attributes: string[] = [];\n if (this.readonly) {\n attributes.push(\"ReadOnly\");\n }\n if (this.hidden) {\n attributes.push(\"Hidden\");\n }\n if (this.system) {\n attributes.push(\"System\");\n }\n if (this.none) {\n attributes.push(\"None\");\n }\n if (this.temporary) {\n attributes.push(\"Temporary\");\n }\n if (this.directory) {\n attributes.push(\"Directory\");\n }\n if (this.archive) {\n attributes.push(\"Archive\");\n }\n if (this.offline) {\n attributes.push(\"Offline\");\n }\n if (this.notContentIndexed) {\n attributes.push(\"NotContentIndexed\");\n }\n if (this.noScrubData) {\n attributes.push(\"NoScrubData\");\n }\n return attributes.join(\"|\");\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Pipeline.d.ts","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gBAAgB,EAChB,4BAA4B,EAE7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,IAAI,qBAAqB,EACvC,aAAa,IAAI,WAAW,EAC5B,eAAe,IAAI,WAAW,EAC9B,aAAa,EACb,oBAAoB,EACpB,wBAAwB,IAAI,oBAAoB,EAChD,eAAe,IAAI,WAAW,EAG/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,aAAa,IAAI,YAAY,EAC7B,sBAAsB,IAAI,gBAAgB,EAI3C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,eAAe,IAAI,eAAe,EAGnC,MAAM,2BAA2B,CAAC;AAGnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAE1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,kBAAkB,EAInB,MAAM,sBAAsB,CAAC;
|
1
|
+
{"version":3,"file":"Pipeline.d.ts","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,gBAAgB,EAChB,4BAA4B,EAE7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,IAAI,qBAAqB,EACvC,aAAa,IAAI,WAAW,EAC5B,eAAe,IAAI,WAAW,EAC9B,aAAa,EACb,oBAAoB,EACpB,wBAAwB,IAAI,oBAAoB,EAChD,eAAe,IAAI,WAAW,EAG/B,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,aAAa,IAAI,YAAY,EAC7B,sBAAsB,IAAI,gBAAgB,EAI3C,MAA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AgB,cAAc,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,YAAY,CAY1E;AAED;;;;;;;GAOG;AACH,qBAAa,QAAS,YAAW,YAAY;IAC3C;;OAEG;IACH,SAAgB,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAClD;;OAEG;IACH,SAAgB,OAAO,EAAE,eAAe,CAAC;IAEzC;;;;;OAKG;gBACS,SAAS,EAAE,oBAAoB,EAAE,EAAE,OAAO,GAAE,eAAoB;IAK5E;;;;;OAKG;IACI,sBAAsB,IAAI,oBAAoB;CAMtD;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC;;OAEG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC;;OAEG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC;;OAEG;IACH,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,UAAU,CAAC,EAAE,UAAU,GAAG,eAAe,EACzC,eAAe,GAAE,sBAA2B,GAC3C,QAAQ,CAOV;AA8BD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,YAAY,GAAG,4BAA4B,CAuFzF;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,YAAY,GACrB,0BAA0B,GAAG,mBAAmB,GAAG,eAAe,CAiBpE"}
|
package/dist/browser/Pipeline.js
CHANGED
@@ -11,7 +11,7 @@ import { StorageRetryPolicyFactory } from "./StorageRetryPolicyFactory.js";
|
|
11
11
|
import { StorageSharedKeyCredential } from "@azure/storage-blob";
|
12
12
|
import { AnonymousCredential } from "@azure/storage-blob";
|
13
13
|
import { StorageOAuthScopes, StorageFileLoggingAllowedHeaderNames, StorageFileLoggingAllowedQueryParameters, SDK_VERSION, } from "./utils/constants.js";
|
14
|
-
import { getCachedDefaultHttpClient } from "@azure/storage-common";
|
14
|
+
import { getCachedDefaultHttpClient, storageRequestFailureDetailsParserPolicy, } from "@azure/storage-common";
|
15
15
|
import { storageBrowserPolicy } from "@azure/storage-blob";
|
16
16
|
import { storageRetryPolicy } from "./policies/StorageRetryPolicyV2.js";
|
17
17
|
import { storageSharedKeyCredentialPolicy } from "@azure/storage-blob";
|
@@ -149,6 +149,7 @@ export function getCoreClientOptions(pipeline) {
|
|
149
149
|
corePipeline.removePolicy({ name: decompressResponsePolicyName });
|
150
150
|
corePipeline.addPolicy(storageCorrectContentLengthPolicy());
|
151
151
|
corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: "Retry" });
|
152
|
+
corePipeline.addPolicy(storageRequestFailureDetailsParserPolicy());
|
152
153
|
corePipeline.addPolicy(storageBrowserPolicy());
|
153
154
|
const downlevelResults = processDownlevelPipeline(pipeline);
|
154
155
|
if (downlevelResults) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Pipeline.js","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAOlC,OAAO,EAQL,iBAAiB,EACjB,gCAAgC,GACjC,MAAM,yBAAyB,CAAC;AAQjC,OAAO,EAEL,+BAA+B,EAC/B,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,q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E;QAC5C,OAAO,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n KeepAliveOptions,\n ExtendedServiceClientOptions,\n HttpPipelineLogLevel,\n} from \"@azure/core-http-compat\";\nimport {\n CompatResponse as HttpOperationResponse,\n RequestPolicy as IHttpClient,\n HttpHeadersLike as HttpHeaders,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n WebResourceLike as WebResource,\n convertHttpClient,\n createRequestPolicyFactoryPolicy,\n} from \"@azure/core-http-compat\";\nimport type {\n ProxySettings as ProxyOptions,\n UserAgentPolicyOptions as UserAgentOptions,\n Pipeline as CorePipeline,\n PipelinePolicy,\n HttpClient,\n} from \"@azure/core-rest-pipeline\";\nimport {\n RequestBodyType as HttpRequestBody,\n bearerTokenAuthenticationPolicy,\n decompressResponsePolicyName,\n} from \"@azure/core-rest-pipeline\";\nimport { authorizeRequestOnTenantChallenge, createClientPipeline } from \"@azure/core-client\";\nimport { parseXML, stringifyXML } from \"@azure/core-xml\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\n\nimport { logger } from \"./log.js\";\nimport type { StorageRetryOptions } from \"./StorageRetryPolicyFactory.js\";\nimport { StorageRetryPolicyFactory } from \"./StorageRetryPolicyFactory.js\";\nimport { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nimport type { Credential } from \"@azure/storage-blob\";\nimport {\n StorageOAuthScopes,\n StorageFileLoggingAllowedHeaderNames,\n StorageFileLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants.js\";\nimport { getCachedDefaultHttpClient } from \"@azure/storage-common\";\nimport { storageBrowserPolicy } from \"@azure/storage-blob\";\nimport { storageRetryPolicy } from \"./policies/StorageRetryPolicyV2.js\";\nimport { storageSharedKeyCredentialPolicy } from \"@azure/storage-blob\";\nimport { StorageBrowserPolicyFactory } from \"@azure/storage-blob\";\nimport type { ShareTokenIntent } from \"./generatedModels.js\";\nimport { storageCorrectContentLengthPolicy } from \"@azure/storage-blob\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n StorageOAuthScopes,\n IHttpClient,\n HttpHeaders,\n HttpRequestBody,\n HttpOperationResponse,\n WebResource,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions,\n};\n\n/**\n * A subset of `@azure/core-http` ServiceClientOptions\n */\nexport interface ServiceClientOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * Optional. Overrides the default policy factories.\n */\n requestPolicyFactories?:\n | RequestPolicyFactory[]\n | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]);\n}\n\n/**\n * Option interface for Pipeline constructor.\n */\nexport interface PipelineOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * Intent of using TokenCredential in file requests.\n */\n shareTokenIntent?: ShareTokenIntent;\n}\n\n/**\n * An interface for the {@link Pipeline} class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport interface PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n readonly options: PipelineOptions;\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n toServiceClientOptions(): ServiceClientOptions;\n}\n\n/**\n * A helper to decide if a given argument satisfies the Pipeline contract\n * @param pipeline - An argument that may be a Pipeline\n * @returns true when the argument satisfies the Pipeline contract\n */\nexport function isPipelineLike(pipeline: unknown): pipeline is PipelineLike {\n if (!pipeline || typeof pipeline !== \"object\") {\n return false;\n }\n\n const castPipeline = pipeline as PipelineLike;\n\n return (\n Array.isArray(castPipeline.factories) &&\n typeof castPipeline.options === \"object\" &&\n typeof castPipeline.toServiceClientOptions === \"function\"\n );\n}\n\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport class Pipeline implements PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n public readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n public readonly options: PipelineOptions;\n\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param factories -\n * @param options -\n */\n constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) {\n this.factories = factories;\n this.options = options;\n }\n\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n public toServiceClientOptions(): ServiceClientOptions {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories,\n };\n }\n}\n\n/**\n * Options interface for the {@link newPipeline} function.\n */\nexport interface StoragePipelineOptions {\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxyOptions;\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentOptions;\n /**\n * Configures the built-in retry policy behavior.\n */\n retryOptions?: StorageRetryOptions;\n /**\n * Keep alive configurations. Default keep-alive is enabled.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * The audience used to retrieve an AAD token.\n * By default, audience 'https://storage.azure.com/.default' will be used.\n */\n audience?: string;\n}\n\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param pipelineOptions - Optional. Options.\n * @returns A new Pipeline object.\n */\nexport function newPipeline(\n credential?: Credential | TokenCredential,\n pipelineOptions: StoragePipelineOptions = {},\n): Pipeline {\n if (!credential) {\n credential = new AnonymousCredential();\n }\n const pipeline = new Pipeline([], pipelineOptions);\n (pipeline as any)._credential = credential;\n return pipeline;\n}\n\nfunction processDownlevelPipeline(\n pipeline: PipelineLike,\n): { wrappedPolicies: PipelinePolicy; afterRetry: boolean } | undefined {\n const knownFactoryFunctions = [\n isAnonymousCredential,\n isStorageSharedKeyCredential,\n isCoreHttpBearerTokenFactory,\n isStorageBrowserPolicyFactory,\n isStorageRetryPolicyFactory,\n isStorageTelemetryPolicyFactory,\n isCoreHttpPolicyFactory,\n ];\n if (pipeline.factories.length) {\n const novelFactories = pipeline.factories.filter((factory) => {\n return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory));\n });\n if (novelFactories.length) {\n const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory));\n // if there are any left over, wrap in a requestPolicyFactoryPolicy\n return {\n wrappedPolicies: createRequestPolicyFactoryPolicy(novelFactories),\n afterRetry: hasInjector,\n };\n }\n }\n return undefined;\n}\n\nexport function getCoreClientOptions(pipeline: PipelineLike): ExtendedServiceClientOptions {\n const { httpClient: v1Client, ...restOptions } = pipeline.options as StoragePipelineOptions;\n\n let httpClient: HttpClient = (pipeline as any)._coreHttpClient;\n if (!httpClient) {\n httpClient = v1Client ? convertHttpClient(v1Client) : getCachedDefaultHttpClient();\n (pipeline as any)._coreHttpClient = httpClient;\n }\n\n let corePipeline: CorePipeline = (pipeline as any)._corePipeline;\n if (!corePipeline) {\n const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`;\n const userAgentPrefix =\n restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix\n ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n corePipeline = createClientPipeline({\n ...restOptions,\n loggingOptions: {\n additionalAllowedHeaderNames: StorageFileLoggingAllowedHeaderNames,\n additionalAllowedQueryParameters: StorageFileLoggingAllowedQueryParameters,\n logger: logger.info,\n },\n userAgentOptions: {\n userAgentPrefix,\n },\n serializationOptions: {\n stringifyXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n deserializationOptions: {\n parseXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n });\n corePipeline.removePolicy({ phase: \"Retry\" });\n corePipeline.removePolicy({ name: decompressResponsePolicyName });\n corePipeline.addPolicy(storageCorrectContentLengthPolicy());\n corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: \"Retry\" });\n corePipeline.addPolicy(storageBrowserPolicy());\n const downlevelResults = processDownlevelPipeline(pipeline);\n if (downlevelResults) {\n corePipeline.addPolicy(\n downlevelResults.wrappedPolicies,\n downlevelResults.afterRetry ? { afterPhase: \"Retry\" } : undefined,\n );\n }\n const credential = getCredentialFromPipeline(pipeline);\n if (isTokenCredential(credential)) {\n corePipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential,\n scopes: restOptions.audience ?? StorageOAuthScopes,\n challengeCallbacks: { authorizeRequestOnChallenge: authorizeRequestOnTenantChallenge },\n }),\n { phase: \"Sign\" },\n );\n } else if (credential instanceof StorageSharedKeyCredential) {\n corePipeline.addPolicy(\n storageSharedKeyCredentialPolicy({\n accountName: credential.accountName,\n accountKey: (credential as any).accountKey,\n }),\n { phase: \"Sign\" },\n );\n }\n (pipeline as any)._corePipeline = corePipeline;\n }\n return {\n ...restOptions,\n allowInsecureConnection: true,\n httpClient,\n pipeline: corePipeline,\n };\n}\n\nexport function getCredentialFromPipeline(\n pipeline: PipelineLike,\n): StorageSharedKeyCredential | AnonymousCredential | TokenCredential {\n // see if we squirreled one away on the type itself\n if ((pipeline as any)._credential) {\n return (pipeline as any)._credential;\n }\n // if it came from another package, loop over the factories and look for one like before\n let credential = new AnonymousCredential();\n for (const factory of pipeline.factories) {\n if (isTokenCredential((factory as any).credential)) {\n // Only works if the factory has been attached a \"credential\" property.\n // We do that in newPipeline() when using TokenCredential.\n credential = (factory as any).credential;\n } else if (isStorageSharedKeyCredential(factory)) {\n return factory;\n }\n }\n return credential;\n}\n\nfunction isStorageSharedKeyCredential(\n factory: RequestPolicyFactory,\n): factory is StorageSharedKeyCredential {\n if (factory instanceof StorageSharedKeyCredential) {\n return true;\n }\n return factory.constructor.name === \"StorageSharedKeyCredential\";\n}\n\nfunction isAnonymousCredential(factory: RequestPolicyFactory): factory is AnonymousCredential {\n if (factory instanceof AnonymousCredential) {\n return true;\n }\n return factory.constructor.name === \"AnonymousCredential\";\n}\n\nfunction isCoreHttpBearerTokenFactory(factory: RequestPolicyFactory): boolean {\n return isTokenCredential((factory as any).credential);\n}\n\nfunction isStorageBrowserPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageBrowserPolicyFactory {\n if (factory instanceof StorageBrowserPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageBrowserPolicyFactory\";\n}\n\nfunction isStorageRetryPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageRetryPolicyFactory {\n if (factory instanceof StorageRetryPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageRetryPolicyFactory\";\n}\n\nfunction isStorageTelemetryPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"TelemetryPolicyFactory\";\n}\n\nfunction isInjectorPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"InjectorPolicyFactory\";\n}\n\nfunction isCoreHttpPolicyFactory(factory: RequestPolicyFactory): boolean {\n const knownPolicies = [\n \"GenerateClientRequestIdPolicy\",\n \"TracingPolicy\",\n \"LogPolicy\",\n \"ProxyPolicy\",\n \"DisableResponseDecompressionPolicy\",\n \"KeepAlivePolicy\",\n \"DeserializationPolicy\",\n ];\n\n const mockHttpClient: IHttpClient = {\n sendRequest: async (request: WebResource) => {\n return {\n request,\n headers: request.headers.clone(),\n status: 500,\n };\n },\n };\n const mockRequestPolicyOptions: RequestPolicyOptions = {\n log(_logLevel: HttpPipelineLogLevel, _message: string): void {\n /* do nothing */\n },\n shouldLog(_logLevel: HttpPipelineLogLevel): boolean {\n return false;\n },\n };\n const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions);\n const policyName = policyInstance.constructor.name;\n // bundlers sometimes add a custom suffix to the class name to make it unique\n return knownPolicies.some((knownPolicyName) => {\n return policyName.startsWith(knownPolicyName);\n });\n}\n"]}
|
1
|
+
{"version":3,"file":"Pipeline.js","sourceRoot":"","sources":["../../src/Pipeline.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAOlC,OAAO,EAQL,iBAAiB,EACjB,gCAAgC,GACjC,MAAM,yBAAyB,CAAC;AAQjC,OAAO,EAEL,+BAA+B,EAC/B,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,iCAAiC,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAA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eAAe,EAAE,EAAE;QAC5C,OAAO,UAAU,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n KeepAliveOptions,\n ExtendedServiceClientOptions,\n HttpPipelineLogLevel,\n} from \"@azure/core-http-compat\";\nimport {\n CompatResponse as HttpOperationResponse,\n RequestPolicy as IHttpClient,\n HttpHeadersLike as HttpHeaders,\n RequestPolicy,\n RequestPolicyFactory,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n WebResourceLike as WebResource,\n convertHttpClient,\n createRequestPolicyFactoryPolicy,\n} from \"@azure/core-http-compat\";\nimport type {\n ProxySettings as ProxyOptions,\n UserAgentPolicyOptions as UserAgentOptions,\n Pipeline as CorePipeline,\n PipelinePolicy,\n HttpClient,\n} from \"@azure/core-rest-pipeline\";\nimport {\n RequestBodyType as HttpRequestBody,\n bearerTokenAuthenticationPolicy,\n decompressResponsePolicyName,\n} from \"@azure/core-rest-pipeline\";\nimport { authorizeRequestOnTenantChallenge, createClientPipeline } from \"@azure/core-client\";\nimport { parseXML, stringifyXML } from \"@azure/core-xml\";\nimport type { TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\n\nimport { logger } from \"./log.js\";\nimport type { StorageRetryOptions } from \"./StorageRetryPolicyFactory.js\";\nimport { StorageRetryPolicyFactory } from \"./StorageRetryPolicyFactory.js\";\nimport { StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport { AnonymousCredential } from \"@azure/storage-blob\";\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nimport type { Credential } from \"@azure/storage-blob\";\nimport {\n StorageOAuthScopes,\n StorageFileLoggingAllowedHeaderNames,\n StorageFileLoggingAllowedQueryParameters,\n SDK_VERSION,\n} from \"./utils/constants.js\";\nimport {\n getCachedDefaultHttpClient,\n storageRequestFailureDetailsParserPolicy,\n} from \"@azure/storage-common\";\nimport { storageBrowserPolicy } from \"@azure/storage-blob\";\nimport { storageRetryPolicy } from \"./policies/StorageRetryPolicyV2.js\";\nimport { storageSharedKeyCredentialPolicy } from \"@azure/storage-blob\";\nimport { StorageBrowserPolicyFactory } from \"@azure/storage-blob\";\nimport type { ShareTokenIntent } from \"./generatedModels.js\";\nimport { storageCorrectContentLengthPolicy } from \"@azure/storage-blob\";\n\n// Export following interfaces and types for customers who want to implement their\n// own RequestPolicy or HTTPClient\nexport {\n StorageOAuthScopes,\n IHttpClient,\n HttpHeaders,\n HttpRequestBody,\n HttpOperationResponse,\n WebResource,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions,\n};\n\n/**\n * A subset of `@azure/core-http` ServiceClientOptions\n */\nexport interface ServiceClientOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * Optional. Overrides the default policy factories.\n */\n requestPolicyFactories?:\n | RequestPolicyFactory[]\n | ((defaultRequestPolicyFactories: RequestPolicyFactory[]) => void | RequestPolicyFactory[]);\n}\n\n/**\n * Option interface for Pipeline constructor.\n */\nexport interface PipelineOptions {\n /**\n * Optional. Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * Intent of using TokenCredential in file requests.\n */\n shareTokenIntent?: ShareTokenIntent;\n}\n\n/**\n * An interface for the {@link Pipeline} class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport interface PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n readonly options: PipelineOptions;\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n toServiceClientOptions(): ServiceClientOptions;\n}\n\n/**\n * A helper to decide if a given argument satisfies the Pipeline contract\n * @param pipeline - An argument that may be a Pipeline\n * @returns true when the argument satisfies the Pipeline contract\n */\nexport function isPipelineLike(pipeline: unknown): pipeline is PipelineLike {\n if (!pipeline || typeof pipeline !== \"object\") {\n return false;\n }\n\n const castPipeline = pipeline as PipelineLike;\n\n return (\n Array.isArray(castPipeline.factories) &&\n typeof castPipeline.options === \"object\" &&\n typeof castPipeline.toServiceClientOptions === \"function\"\n );\n}\n\n/**\n * A Pipeline class containing HTTP request policies.\n * You can create a default Pipeline by calling {@link newPipeline}.\n * Or you can create a Pipeline with your own policies by the constructor of Pipeline.\n *\n * Refer to {@link newPipeline} and provided policies before implementing your\n * customized Pipeline.\n */\nexport class Pipeline implements PipelineLike {\n /**\n * A list of chained request policy factories.\n */\n public readonly factories: RequestPolicyFactory[];\n /**\n * Configures pipeline logger and HTTP client.\n */\n public readonly options: PipelineOptions;\n\n /**\n * Creates an instance of Pipeline. Customize HTTPClient by implementing IHttpClient interface.\n *\n * @param factories -\n * @param options -\n */\n constructor(factories: RequestPolicyFactory[], options: PipelineOptions = {}) {\n this.factories = factories;\n this.options = options;\n }\n\n /**\n * Transfer Pipeline object to ServiceClientOptions object which is required by\n * ServiceClient constructor.\n *\n * @returns The ServiceClientOptions object from this Pipeline.\n */\n public toServiceClientOptions(): ServiceClientOptions {\n return {\n httpClient: this.options.httpClient,\n requestPolicyFactories: this.factories,\n };\n }\n}\n\n/**\n * Options interface for the {@link newPipeline} function.\n */\nexport interface StoragePipelineOptions {\n /**\n * Options to configure a proxy for outgoing requests.\n */\n proxyOptions?: ProxyOptions;\n /**\n * Options for adding user agent details to outgoing requests.\n */\n userAgentOptions?: UserAgentOptions;\n /**\n * Configures the built-in retry policy behavior.\n */\n retryOptions?: StorageRetryOptions;\n /**\n * Keep alive configurations. Default keep-alive is enabled.\n */\n keepAliveOptions?: KeepAliveOptions;\n /**\n * Configures the HTTP client to send requests and receive responses.\n */\n httpClient?: IHttpClient;\n /**\n * The audience used to retrieve an AAD token.\n * By default, audience 'https://storage.azure.com/.default' will be used.\n */\n audience?: string;\n}\n\n/**\n * Creates a new Pipeline object with Credential provided.\n *\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the `@azure/identity` package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.\n * @param pipelineOptions - Optional. Options.\n * @returns A new Pipeline object.\n */\nexport function newPipeline(\n credential?: Credential | TokenCredential,\n pipelineOptions: StoragePipelineOptions = {},\n): Pipeline {\n if (!credential) {\n credential = new AnonymousCredential();\n }\n const pipeline = new Pipeline([], pipelineOptions);\n (pipeline as any)._credential = credential;\n return pipeline;\n}\n\nfunction processDownlevelPipeline(\n pipeline: PipelineLike,\n): { wrappedPolicies: PipelinePolicy; afterRetry: boolean } | undefined {\n const knownFactoryFunctions = [\n isAnonymousCredential,\n isStorageSharedKeyCredential,\n isCoreHttpBearerTokenFactory,\n isStorageBrowserPolicyFactory,\n isStorageRetryPolicyFactory,\n isStorageTelemetryPolicyFactory,\n isCoreHttpPolicyFactory,\n ];\n if (pipeline.factories.length) {\n const novelFactories = pipeline.factories.filter((factory) => {\n return !knownFactoryFunctions.some((knownFactory) => knownFactory(factory));\n });\n if (novelFactories.length) {\n const hasInjector = novelFactories.some((factory) => isInjectorPolicyFactory(factory));\n // if there are any left over, wrap in a requestPolicyFactoryPolicy\n return {\n wrappedPolicies: createRequestPolicyFactoryPolicy(novelFactories),\n afterRetry: hasInjector,\n };\n }\n }\n return undefined;\n}\n\nexport function getCoreClientOptions(pipeline: PipelineLike): ExtendedServiceClientOptions {\n const { httpClient: v1Client, ...restOptions } = pipeline.options as StoragePipelineOptions;\n\n let httpClient: HttpClient = (pipeline as any)._coreHttpClient;\n if (!httpClient) {\n httpClient = v1Client ? convertHttpClient(v1Client) : getCachedDefaultHttpClient();\n (pipeline as any)._coreHttpClient = httpClient;\n }\n\n let corePipeline: CorePipeline = (pipeline as any)._corePipeline;\n if (!corePipeline) {\n const packageDetails = `azsdk-js-azure-storage-blob/${SDK_VERSION}`;\n const userAgentPrefix =\n restOptions.userAgentOptions && restOptions.userAgentOptions.userAgentPrefix\n ? `${restOptions.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n corePipeline = createClientPipeline({\n ...restOptions,\n loggingOptions: {\n additionalAllowedHeaderNames: StorageFileLoggingAllowedHeaderNames,\n additionalAllowedQueryParameters: StorageFileLoggingAllowedQueryParameters,\n logger: logger.info,\n },\n userAgentOptions: {\n userAgentPrefix,\n },\n serializationOptions: {\n stringifyXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n deserializationOptions: {\n parseXML,\n serializerOptions: {\n xml: {\n // Use customized XML char key of \"#\" so we can deserialize metadata\n // with \"_\" key\n xmlCharKey: \"#\",\n },\n },\n },\n });\n corePipeline.removePolicy({ phase: \"Retry\" });\n corePipeline.removePolicy({ name: decompressResponsePolicyName });\n corePipeline.addPolicy(storageCorrectContentLengthPolicy());\n corePipeline.addPolicy(storageRetryPolicy(restOptions.retryOptions), { phase: \"Retry\" });\n corePipeline.addPolicy(storageRequestFailureDetailsParserPolicy());\n corePipeline.addPolicy(storageBrowserPolicy());\n const downlevelResults = processDownlevelPipeline(pipeline);\n if (downlevelResults) {\n corePipeline.addPolicy(\n downlevelResults.wrappedPolicies,\n downlevelResults.afterRetry ? { afterPhase: \"Retry\" } : undefined,\n );\n }\n const credential = getCredentialFromPipeline(pipeline);\n if (isTokenCredential(credential)) {\n corePipeline.addPolicy(\n bearerTokenAuthenticationPolicy({\n credential,\n scopes: restOptions.audience ?? StorageOAuthScopes,\n challengeCallbacks: { authorizeRequestOnChallenge: authorizeRequestOnTenantChallenge },\n }),\n { phase: \"Sign\" },\n );\n } else if (credential instanceof StorageSharedKeyCredential) {\n corePipeline.addPolicy(\n storageSharedKeyCredentialPolicy({\n accountName: credential.accountName,\n accountKey: (credential as any).accountKey,\n }),\n { phase: \"Sign\" },\n );\n }\n (pipeline as any)._corePipeline = corePipeline;\n }\n return {\n ...restOptions,\n allowInsecureConnection: true,\n httpClient,\n pipeline: corePipeline,\n };\n}\n\nexport function getCredentialFromPipeline(\n pipeline: PipelineLike,\n): StorageSharedKeyCredential | AnonymousCredential | TokenCredential {\n // see if we squirreled one away on the type itself\n if ((pipeline as any)._credential) {\n return (pipeline as any)._credential;\n }\n // if it came from another package, loop over the factories and look for one like before\n let credential = new AnonymousCredential();\n for (const factory of pipeline.factories) {\n if (isTokenCredential((factory as any).credential)) {\n // Only works if the factory has been attached a \"credential\" property.\n // We do that in newPipeline() when using TokenCredential.\n credential = (factory as any).credential;\n } else if (isStorageSharedKeyCredential(factory)) {\n return factory;\n }\n }\n return credential;\n}\n\nfunction isStorageSharedKeyCredential(\n factory: RequestPolicyFactory,\n): factory is StorageSharedKeyCredential {\n if (factory instanceof StorageSharedKeyCredential) {\n return true;\n }\n return factory.constructor.name === \"StorageSharedKeyCredential\";\n}\n\nfunction isAnonymousCredential(factory: RequestPolicyFactory): factory is AnonymousCredential {\n if (factory instanceof AnonymousCredential) {\n return true;\n }\n return factory.constructor.name === \"AnonymousCredential\";\n}\n\nfunction isCoreHttpBearerTokenFactory(factory: RequestPolicyFactory): boolean {\n return isTokenCredential((factory as any).credential);\n}\n\nfunction isStorageBrowserPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageBrowserPolicyFactory {\n if (factory instanceof StorageBrowserPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageBrowserPolicyFactory\";\n}\n\nfunction isStorageRetryPolicyFactory(\n factory: RequestPolicyFactory,\n): factory is StorageRetryPolicyFactory {\n if (factory instanceof StorageRetryPolicyFactory) {\n return true;\n }\n return factory.constructor.name === \"StorageRetryPolicyFactory\";\n}\n\nfunction isStorageTelemetryPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"TelemetryPolicyFactory\";\n}\n\nfunction isInjectorPolicyFactory(factory: RequestPolicyFactory): boolean {\n return factory.constructor.name === \"InjectorPolicyFactory\";\n}\n\nfunction isCoreHttpPolicyFactory(factory: RequestPolicyFactory): boolean {\n const knownPolicies = [\n \"GenerateClientRequestIdPolicy\",\n \"TracingPolicy\",\n \"LogPolicy\",\n \"ProxyPolicy\",\n \"DisableResponseDecompressionPolicy\",\n \"KeepAlivePolicy\",\n \"DeserializationPolicy\",\n ];\n\n const mockHttpClient: IHttpClient = {\n sendRequest: async (request: WebResource) => {\n return {\n request,\n headers: request.headers.clone(),\n status: 500,\n };\n },\n };\n const mockRequestPolicyOptions: RequestPolicyOptions = {\n log(_logLevel: HttpPipelineLogLevel, _message: string): void {\n /* do nothing */\n },\n shouldLog(_logLevel: HttpPipelineLogLevel): boolean {\n return false;\n },\n };\n const policyInstance = factory.create(mockHttpClient, mockRequestPolicyOptions);\n const policyName = policyInstance.constructor.name;\n // bundlers sometimes add a custom suffix to the class name to make it unique\n return knownPolicies.some((knownPolicyName) => {\n return policyName.startsWith(knownPolicyName);\n });\n}\n"]}
|
package/dist/browser/Range.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/**
|
2
2
|
* Range for Service Operations.
|
3
|
-
* @see https://learn.microsoft.com/
|
3
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/specifying-the-range-header-for-file-service-operations
|
4
4
|
*/
|
5
5
|
export interface Range {
|
6
6
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Range.js","sourceRoot":"","sources":["../../src/Range.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAmBlC;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,KAAY;IACxC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,UAAU,CAAC,wCAAwC,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,UAAU,CAClB,mGAAmG,CACpG,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,KAAK;QAChB,CAAC,CAAC,SAAS,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE;QAC3D,CAAC,CAAC,SAAS,KAAK,CAAC,MAAM,GAAG,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Range for Service Operations.\n * @see https://learn.microsoft.com/
|
1
|
+
{"version":3,"file":"Range.js","sourceRoot":"","sources":["../../src/Range.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAmBlC;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,KAAY;IACxC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,UAAU,CAAC,wCAAwC,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,UAAU,CAClB,mGAAmG,CACpG,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,KAAK;QAChB,CAAC,CAAC,SAAS,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,GAAG,CAAC,EAAE;QAC3D,CAAC,CAAC,SAAS,KAAK,CAAC,MAAM,GAAG,CAAC;AAC/B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Range for Service Operations.\n * @see https://learn.microsoft.com/rest/api/storageservices/specifying-the-range-header-for-file-service-operations\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport interface Range {\n /**\n * StartByte, larger than or equal 0.\n */\n offset: number;\n /**\n * Optional. Count of bytes, larger than 0.\n * If not provided, will return bytes from offset to the end.\n */\n count?: number;\n}\n\n/**\n * Generate a range string. For example:\n *\n * \"bytes=255-\" or \"bytes=0-511\"\n *\n * @param range - A range of byte positions.\n * @returns The string representation for the byte range.\n */\nexport function rangeToString(range: Range): string {\n if (range.offset < 0) {\n throw new RangeError(`Range.offset cannot be smaller than 0.`);\n }\n if (range.count && range.count <= 0) {\n throw new RangeError(\n `Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.`,\n );\n }\n return range.count\n ? `bytes=${range.offset}-${range.offset + range.count - 1}`\n : `bytes=${range.offset}-`;\n}\n"]}
|
@@ -57,7 +57,7 @@ export declare class SASQueryParameters {
|
|
57
57
|
/**
|
58
58
|
* Optional. The signed identifier (only for {@link FileSASSignatureValues}).
|
59
59
|
*
|
60
|
-
* @see https://learn.microsoft.com/
|
60
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy
|
61
61
|
*/
|
62
62
|
readonly identifier?: string;
|
63
63
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SASQueryParameters.js","sourceRoot":"","sources":["../../src/SASQueryParameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;GAEG;AACH,MAAM,CAAN,IAAY,WAUX;AAVD,WAAY,WAAW;IACrB;;OAEG;IACH,8BAAe,CAAA;IAEf;;OAEG;IACH,0CAA2B,CAAA;AAC7B,CAAC,EAVW,WAAW,KAAX,WAAW,QAUtB;AAED;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;IAuF7B;;;;OAIG;IACH,IAAW,OAAO;QAChB,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,OAAO;gBACL,GAAG,EAAE,IAAI,CAAC,YAAY,CAAC,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IACK,uBAAuB,CAAC,OAAiB,EAAE,GAAW,EAAE,KAAc;QAC5E,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO;QACT,CAAC;QAED,GAAG,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC9B,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\n\n/**\n * Protocols for generated SAS.\n */\nexport enum SASProtocol {\n /**\n * Protocol that allows HTTPS only\n */\n Https = \"https\",\n\n /**\n * Protocol that allows both HTTPS and HTTP\n */\n HttpsAndHttp = \"https,http\",\n}\n\n/**\n * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly\n * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link FileSASSignatureValues}\n * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should\n * be taken here in case there are existing query parameters, which might affect the appropriate means of appending\n * these query parameters).\n *\n * NOTE: Instances of this class are immutable.\n */\nexport class SASQueryParameters {\n /**\n * The storage API version.\n */\n public readonly version: string;\n\n /**\n * Optional. The allowed HTTP protocol(s).\n */\n public readonly protocol?: SASProtocol;\n\n /**\n * Optional. The start time for this SAS token.\n */\n public readonly startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n */\n public readonly expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link FileSASPermissions}, or {@link ShareSASPermissions} for\n * more details.\n */\n public readonly permissions?: string;\n\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n */\n public readonly services?: string;\n\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n */\n public readonly resourceTypes?: string;\n\n /**\n * Optional. The signed identifier (only for {@link FileSASSignatureValues}).\n *\n * @see https://learn.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n public readonly identifier?: string;\n\n /**\n * Optional. The storage share or file path (only for {@link FileSASSignatureValues}).\n */\n public readonly resource?: string;\n\n /**\n * The signature for the SAS token.\n */\n public readonly signature: string;\n\n /**\n * Value for cache-control header in Blob/File Service SAS.\n */\n public readonly cacheControl?: string;\n\n /**\n * Value for content-disposition header in Blob/File Service SAS.\n */\n public readonly contentDisposition?: string;\n\n /**\n * Value for content-encoding header in Blob/File Service SAS.\n */\n public readonly contentEncoding?: string;\n\n /**\n * Value for content-length header in Blob/File Service SAS.\n */\n public readonly contentLanguage?: string;\n\n /**\n * Value for content-type header in Blob/File Service SAS.\n */\n public readonly contentType?: string;\n\n /**\n * Inner value of getter ipRange.\n */\n private readonly ipRangeInner?: SasIPRange;\n\n /**\n * Optional. IP range allowed for this SAS.\n *\n * @readonly\n */\n public get ipRange(): SasIPRange | undefined {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start,\n };\n }\n return undefined;\n }\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param version - Representing the storage version\n * @param signature - Representing the signature for the SAS token\n * @param permissions - Representing the storage permissions\n * @param services - Representing the storage services being accessed (only for Account SAS)\n * @param resourceTypes - Representing the storage resource types being accessed (only for Account SAS)\n * @param protocol - Representing the allowed HTTP protocol(s)\n * @param startsOn - Representing the start time for this SAS token\n * @param expiresOn - Representing the expiry time for this SAS token\n * @param ipRange - Representing the range of valid IP addresses for this SAS token\n * @param identifier - Representing the signed identifier (only for Service SAS)\n * @param resource - Representing the storage container or blob (only for Service SAS)\n * @param cacheControl - Representing the cache-control header (only for Blob/File Service SAS)\n * @param contentDisposition - Representing the content-disposition header (only for Blob/File Service SAS)\n * @param contentEncoding - Representing the content-encoding header (only for Blob/File Service SAS)\n * @param contentLanguage - Representing the content-language header (only for Blob/File Service SAS)\n * @param contentType - Representing the content-type header (only for Blob/File Service SAS)\n */\n constructor(\n version: string,\n signature: string,\n permissions?: string,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n cacheControl?: string,\n contentDisposition?: string,\n contentEncoding?: string,\n contentLanguage?: string,\n contentType?: string,\n ) {\n this.version = version;\n this.services = services;\n this.resourceTypes = resourceTypes;\n this.expiresOn = expiresOn;\n this.permissions = permissions;\n this.protocol = protocol;\n this.startsOn = startsOn;\n this.ipRangeInner = ipRange;\n this.identifier = identifier;\n this.resource = resource;\n this.signature = signature;\n this.cacheControl = cacheControl;\n this.contentDisposition = contentDisposition;\n this.contentEncoding = contentEncoding;\n this.contentLanguage = contentLanguage;\n this.contentType = contentType;\n }\n\n /**\n * Encodes all SAS query parameters into a string that can be appended to a URL.\n *\n */\n public toString(): string {\n const params: string[] = [\n \"sv\",\n \"ss\",\n \"srt\",\n \"spr\",\n \"st\",\n \"se\",\n \"sip\",\n \"si\",\n \"sr\",\n \"sp\",\n \"sig\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n ];\n const queries: string[] = [];\n\n for (const param of params) {\n switch (param) {\n case \"sv\":\n this.tryAppendQueryParameter(queries, param, this.version);\n break;\n case \"ss\":\n this.tryAppendQueryParameter(queries, param, this.services);\n break;\n case \"srt\":\n this.tryAppendQueryParameter(queries, param, this.resourceTypes);\n break;\n case \"spr\":\n this.tryAppendQueryParameter(queries, param, this.protocol);\n break;\n case \"st\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined,\n );\n break;\n case \"se\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined,\n );\n break;\n case \"sip\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.ipRange ? ipRangeToString(this.ipRange) : undefined,\n );\n break;\n case \"si\":\n this.tryAppendQueryParameter(queries, param, this.identifier);\n break;\n case \"sr\":\n this.tryAppendQueryParameter(queries, param, this.resource);\n break;\n case \"sp\":\n this.tryAppendQueryParameter(queries, param, this.permissions);\n break;\n case \"sig\":\n this.tryAppendQueryParameter(queries, param, this.signature);\n break;\n case \"rscc\":\n this.tryAppendQueryParameter(queries, param, this.cacheControl);\n break;\n case \"rscd\":\n this.tryAppendQueryParameter(queries, param, this.contentDisposition);\n break;\n case \"rsce\":\n this.tryAppendQueryParameter(queries, param, this.contentEncoding);\n break;\n case \"rscl\":\n this.tryAppendQueryParameter(queries, param, this.contentLanguage);\n break;\n case \"rsct\":\n this.tryAppendQueryParameter(queries, param, this.contentType);\n break;\n }\n }\n return queries.join(\"&\");\n }\n\n /**\n * A private helper method used to filter and append query key/value pairs into an array.\n *\n * @param queries -\n * @param key -\n * @param value -\n */\n private tryAppendQueryParameter(queries: string[], key: string, value?: string): void {\n if (!value) {\n return;\n }\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n if (key.length > 0 && value.length > 0) {\n queries.push(`${key}=${value}`);\n }\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"SASQueryParameters.js","sourceRoot":"","sources":["../../src/SASQueryParameters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;GAEG;AACH,MAAM,CAAN,IAAY,WAUX;AAVD,WAAY,WAAW;IACrB;;OAEG;IACH,8BAAe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AAC,eAAe,CAAC,CAAC;oBACnE,MAAM;gBACR,KAAK,MAAM;oBACT,IAAI,CAAC,uBAAuB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;oBAC/D,MAAM;YACV,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAED;;;;;;OAMG;IACK,uBAAuB,CAAC,OAAiB,EAAE,GAAW,EAAE,KAAc;QAC5E,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO;QACT,CAAC;QAED,GAAG,GAAG,kBAAkB,CAAC,GAAG,CAAC,CAAC;QAC9B,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvC,OAAO,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { SasIPRange } from \"./SasIPRange.js\";\nimport { ipRangeToString } from \"./SasIPRange.js\";\nimport { truncatedISO8061Date } from \"./utils/utils.common.js\";\n\n/**\n * Protocols for generated SAS.\n */\nexport enum SASProtocol {\n /**\n * Protocol that allows HTTPS only\n */\n Https = \"https\",\n\n /**\n * Protocol that allows both HTTPS and HTTP\n */\n HttpsAndHttp = \"https,http\",\n}\n\n/**\n * Represents the components that make up an Azure Storage SAS' query parameters. This type is not constructed directly\n * by the user; it is only generated by the {@link AccountSASSignatureValues} and {@link FileSASSignatureValues}\n * types. Once generated, it can be encoded into a {@link String} and appended to a URL directly (though caution should\n * be taken here in case there are existing query parameters, which might affect the appropriate means of appending\n * these query parameters).\n *\n * NOTE: Instances of this class are immutable.\n */\nexport class SASQueryParameters {\n /**\n * The storage API version.\n */\n public readonly version: string;\n\n /**\n * Optional. The allowed HTTP protocol(s).\n */\n public readonly protocol?: SASProtocol;\n\n /**\n * Optional. The start time for this SAS token.\n */\n public readonly startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The expiry time for this SAS token.\n */\n public readonly expiresOn?: Date;\n\n /**\n * Optional only when identifier is provided.\n * Please refer to {@link AccountSASPermissions}, {@link FileSASPermissions}, or {@link ShareSASPermissions} for\n * more details.\n */\n public readonly permissions?: string;\n\n /**\n * Optional. The storage services being accessed (only for Account SAS). Please refer to {@link AccountSASServices}\n * for more details.\n */\n public readonly services?: string;\n\n /**\n * Optional. The storage resource types being accessed (only for Account SAS). Please refer to\n * {@link AccountSASResourceTypes} for more details.\n */\n public readonly resourceTypes?: string;\n\n /**\n * Optional. The signed identifier (only for {@link FileSASSignatureValues}).\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/establishing-a-stored-access-policy\n */\n public readonly identifier?: string;\n\n /**\n * Optional. The storage share or file path (only for {@link FileSASSignatureValues}).\n */\n public readonly resource?: string;\n\n /**\n * The signature for the SAS token.\n */\n public readonly signature: string;\n\n /**\n * Value for cache-control header in Blob/File Service SAS.\n */\n public readonly cacheControl?: string;\n\n /**\n * Value for content-disposition header in Blob/File Service SAS.\n */\n public readonly contentDisposition?: string;\n\n /**\n * Value for content-encoding header in Blob/File Service SAS.\n */\n public readonly contentEncoding?: string;\n\n /**\n * Value for content-length header in Blob/File Service SAS.\n */\n public readonly contentLanguage?: string;\n\n /**\n * Value for content-type header in Blob/File Service SAS.\n */\n public readonly contentType?: string;\n\n /**\n * Inner value of getter ipRange.\n */\n private readonly ipRangeInner?: SasIPRange;\n\n /**\n * Optional. IP range allowed for this SAS.\n *\n * @readonly\n */\n public get ipRange(): SasIPRange | undefined {\n if (this.ipRangeInner) {\n return {\n end: this.ipRangeInner.end,\n start: this.ipRangeInner.start,\n };\n }\n return undefined;\n }\n\n /**\n * Creates an instance of SASQueryParameters.\n *\n * @param version - Representing the storage version\n * @param signature - Representing the signature for the SAS token\n * @param permissions - Representing the storage permissions\n * @param services - Representing the storage services being accessed (only for Account SAS)\n * @param resourceTypes - Representing the storage resource types being accessed (only for Account SAS)\n * @param protocol - Representing the allowed HTTP protocol(s)\n * @param startsOn - Representing the start time for this SAS token\n * @param expiresOn - Representing the expiry time for this SAS token\n * @param ipRange - Representing the range of valid IP addresses for this SAS token\n * @param identifier - Representing the signed identifier (only for Service SAS)\n * @param resource - Representing the storage container or blob (only for Service SAS)\n * @param cacheControl - Representing the cache-control header (only for Blob/File Service SAS)\n * @param contentDisposition - Representing the content-disposition header (only for Blob/File Service SAS)\n * @param contentEncoding - Representing the content-encoding header (only for Blob/File Service SAS)\n * @param contentLanguage - Representing the content-language header (only for Blob/File Service SAS)\n * @param contentType - Representing the content-type header (only for Blob/File Service SAS)\n */\n constructor(\n version: string,\n signature: string,\n permissions?: string,\n services?: string,\n resourceTypes?: string,\n protocol?: SASProtocol,\n startsOn?: Date,\n expiresOn?: Date,\n ipRange?: SasIPRange,\n identifier?: string,\n resource?: string,\n cacheControl?: string,\n contentDisposition?: string,\n contentEncoding?: string,\n contentLanguage?: string,\n contentType?: string,\n ) {\n this.version = version;\n this.services = services;\n this.resourceTypes = resourceTypes;\n this.expiresOn = expiresOn;\n this.permissions = permissions;\n this.protocol = protocol;\n this.startsOn = startsOn;\n this.ipRangeInner = ipRange;\n this.identifier = identifier;\n this.resource = resource;\n this.signature = signature;\n this.cacheControl = cacheControl;\n this.contentDisposition = contentDisposition;\n this.contentEncoding = contentEncoding;\n this.contentLanguage = contentLanguage;\n this.contentType = contentType;\n }\n\n /**\n * Encodes all SAS query parameters into a string that can be appended to a URL.\n *\n */\n public toString(): string {\n const params: string[] = [\n \"sv\",\n \"ss\",\n \"srt\",\n \"spr\",\n \"st\",\n \"se\",\n \"sip\",\n \"si\",\n \"sr\",\n \"sp\",\n \"sig\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n ];\n const queries: string[] = [];\n\n for (const param of params) {\n switch (param) {\n case \"sv\":\n this.tryAppendQueryParameter(queries, param, this.version);\n break;\n case \"ss\":\n this.tryAppendQueryParameter(queries, param, this.services);\n break;\n case \"srt\":\n this.tryAppendQueryParameter(queries, param, this.resourceTypes);\n break;\n case \"spr\":\n this.tryAppendQueryParameter(queries, param, this.protocol);\n break;\n case \"st\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.startsOn ? truncatedISO8061Date(this.startsOn, false) : undefined,\n );\n break;\n case \"se\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.expiresOn ? truncatedISO8061Date(this.expiresOn, false) : undefined,\n );\n break;\n case \"sip\":\n this.tryAppendQueryParameter(\n queries,\n param,\n this.ipRange ? ipRangeToString(this.ipRange) : undefined,\n );\n break;\n case \"si\":\n this.tryAppendQueryParameter(queries, param, this.identifier);\n break;\n case \"sr\":\n this.tryAppendQueryParameter(queries, param, this.resource);\n break;\n case \"sp\":\n this.tryAppendQueryParameter(queries, param, this.permissions);\n break;\n case \"sig\":\n this.tryAppendQueryParameter(queries, param, this.signature);\n break;\n case \"rscc\":\n this.tryAppendQueryParameter(queries, param, this.cacheControl);\n break;\n case \"rscd\":\n this.tryAppendQueryParameter(queries, param, this.contentDisposition);\n break;\n case \"rsce\":\n this.tryAppendQueryParameter(queries, param, this.contentEncoding);\n break;\n case \"rscl\":\n this.tryAppendQueryParameter(queries, param, this.contentLanguage);\n break;\n case \"rsct\":\n this.tryAppendQueryParameter(queries, param, this.contentType);\n break;\n }\n }\n return queries.join(\"&\");\n }\n\n /**\n * A private helper method used to filter and append query key/value pairs into an array.\n *\n * @param queries -\n * @param key -\n * @param value -\n */\n private tryAppendQueryParameter(queries: string[], key: string, value?: string): void {\n if (!value) {\n return;\n }\n\n key = encodeURIComponent(key);\n value = encodeURIComponent(value);\n if (key.length > 0 && value.length > 0) {\n queries.push(`${key}=${value}`);\n }\n }\n}\n"]}
|
@@ -38,7 +38,7 @@ export declare class ShareSASPermissions {
|
|
38
38
|
* order accepted by the service.
|
39
39
|
*
|
40
40
|
* The order of the characters should be as specified here to ensure correctness.
|
41
|
-
* @see https://learn.microsoft.com/
|
41
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
42
42
|
*
|
43
43
|
*/
|
44
44
|
toString(): string;
|
@@ -66,7 +66,7 @@ export class ShareSASPermissions {
|
|
66
66
|
* order accepted by the service.
|
67
67
|
*
|
68
68
|
* The order of the characters should be as specified here to ensure correctness.
|
69
|
-
* @see https://learn.microsoft.com/
|
69
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas
|
70
70
|
*
|
71
71
|
*/
|
72
72
|
toString() {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ShareSASPermissions.js","sourceRoot":"","sources":["../../src/ShareSASPermissions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;GAMG;AACH,MAAM,OAAO,mBAAmB;IAAhC;QAmCE;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;IA6B/B,CAAC;IAtFC;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,WAAmB;QACrC,MAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC;QAEtD,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;YAC/B,QAAQ,IAAI,EAAE,CAAC;gBACb,KAAK,GAAG;oBACN,mBAAmB,CAAC,IAAI,GAAG,IAAI,CAAC;oBAChC,MAAM;gBACR,KAAK,GAAG;oBACN,mBAAmB,CAAC,MAAM,GAAG,IAAI,CAAC;oBAClC,MAAM;gBACR,KAAK,GAAG;oBACN,mBAAmB,CAAC,KAAK,GAAG,IAAI,CAAC;oBACjC,MAAM;gBACR,KAAK,GAAG;oBACN,mBAAmB,CAAC,MAAM,GAAG,IAAI,CAAC;oBAClC,MAAM;gBACR,KAAK,GAAG;oBACN,mBAAmB,CAAC,IAAI,GAAG,IAAI,CAAC;oBAChC,MAAM;gBACR;oBACE,MAAM,IAAI,UAAU,CAAC,sBAAsB,IAAI,EAAE,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;QAED,OAAO,mBAAmB,CAAC;IAC7B,CAAC;IA2BD;;;;;;;OAOG;IACI,QAAQ;QACb,MAAM,WAAW,GAAa,EAAE,CAAC;QACjC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACxB,CAAC;QACD,OAAO,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a share.\n * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.\n * Once all the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link FileSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nexport class ShareSASPermissions {\n /**\n * Creates an {@link ShareSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n public static parse(permissions: string): ShareSASPermissions {\n const shareSASPermissions = new ShareSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n shareSASPermissions.read = true;\n break;\n case \"c\":\n shareSASPermissions.create = true;\n break;\n case \"w\":\n shareSASPermissions.write = true;\n break;\n case \"d\":\n shareSASPermissions.delete = true;\n break;\n case \"l\":\n shareSASPermissions.list = true;\n break;\n default:\n throw new RangeError(`Invalid permission ${char}`);\n }\n }\n\n return shareSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n */\n public read: boolean = false;\n\n /**\n * Specifies Create access granted.\n */\n public create: boolean = false;\n\n /**\n * Specifies Write access granted.\n */\n public write: boolean = false;\n\n /**\n * Specifies Delete access granted.\n */\n public delete: boolean = false;\n\n /**\n * Specifies List access granted.\n */\n public list: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * The order of the characters should be as specified here to ensure correctness.\n * @see https://learn.microsoft.com/
|
1
|
+
{"version":3,"file":"ShareSASPermissions.js","sourceRoot":"","sources":["../../src/ShareSASPermissions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;GAMG;AACH,MAAM,OAAO,mBAAmB;IAAhC;QAmCE;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;QAE7B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,UAAK,GAAY,KAAK,CAAC;QAE9B;;WAEG;QACI,WAAM,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACI,SAAI,GAAY,KAAK,CAAC;IA6B/B,CAAC;IAtFC;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,WAAmB;QACrC,MAAM,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC;QAEtD,KAAK,MAAM,IAAI,IAAI,WAAW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licensed under the MIT License.\n\n/**\n * This is a helper class to construct a string representing the permissions granted by a ServiceSAS to a share.\n * Setting a value to true means that any SAS which uses these permissions will grant permissions for that operation.\n * Once all the values are set, this should be serialized with toString and set as the permissions field on a\n * {@link FileSASSignatureValues} object. It is possible to construct the permissions string without this class, but\n * the order of the permissions is particular and this class guarantees correctness.\n */\nexport class ShareSASPermissions {\n /**\n * Creates an {@link ShareSASPermissions} from the specified permissions string. This method will throw an\n * Error if it encounters a character that does not correspond to a valid permission.\n *\n * @param permissions -\n */\n public static parse(permissions: string): ShareSASPermissions {\n const shareSASPermissions = new ShareSASPermissions();\n\n for (const char of permissions) {\n switch (char) {\n case \"r\":\n shareSASPermissions.read = true;\n break;\n case \"c\":\n shareSASPermissions.create = true;\n break;\n case \"w\":\n shareSASPermissions.write = true;\n break;\n case \"d\":\n shareSASPermissions.delete = true;\n break;\n case \"l\":\n shareSASPermissions.list = true;\n break;\n default:\n throw new RangeError(`Invalid permission ${char}`);\n }\n }\n\n return shareSASPermissions;\n }\n\n /**\n * Specifies Read access granted.\n */\n public read: boolean = false;\n\n /**\n * Specifies Create access granted.\n */\n public create: boolean = false;\n\n /**\n * Specifies Write access granted.\n */\n public write: boolean = false;\n\n /**\n * Specifies Delete access granted.\n */\n public delete: boolean = false;\n\n /**\n * Specifies List access granted.\n */\n public list: boolean = false;\n\n /**\n * Converts the given permissions to a string. Using this method will guarantee the permissions are in an\n * order accepted by the service.\n *\n * The order of the characters should be as specified here to ensure correctness.\n * @see https://learn.microsoft.com/rest/api/storageservices/constructing-a-service-sas\n *\n */\n public toString(): string {\n const permissions: string[] = [];\n if (this.read) {\n permissions.push(\"r\");\n }\n if (this.create) {\n permissions.push(\"c\");\n }\n if (this.write) {\n permissions.push(\"w\");\n }\n if (this.delete) {\n permissions.push(\"d\");\n }\n if (this.list) {\n permissions.push(\"l\");\n }\n return permissions.join(\"\");\n }\n}\n"]}
|
@@ -223,7 +223,7 @@ export declare class ShareServiceClient extends StorageClient {
|
|
223
223
|
/**
|
224
224
|
* Gets the properties of a storage account’s file service, including properties
|
225
225
|
* for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
226
|
-
* @see https://learn.microsoft.com/
|
226
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-file-service-properties
|
227
227
|
*
|
228
228
|
* @param options - Options to Get Properties operation.
|
229
229
|
* @returns Response data for the Get Properties operation.
|
@@ -232,7 +232,7 @@ export declare class ShareServiceClient extends StorageClient {
|
|
232
232
|
/**
|
233
233
|
* Sets properties for a storage account’s file service endpoint, including properties
|
234
234
|
* for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
|
235
|
-
* @see https://learn.microsoft.com/
|
235
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-file-service-properties
|
236
236
|
*
|
237
237
|
* @param properties -
|
238
238
|
* @param options - Options to Set Properties operation.
|
@@ -399,7 +399,7 @@ export declare class ShareServiceClient extends StorageClient {
|
|
399
399
|
* Generates an account Shared Access Signature (SAS) URI based on the client properties
|
400
400
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
401
401
|
*
|
402
|
-
* @see https://learn.microsoft.com/
|
402
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas
|
403
403
|
*
|
404
404
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.
|
405
405
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
@@ -414,7 +414,7 @@ export declare class ShareServiceClient extends StorageClient {
|
|
414
414
|
* Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties
|
415
415
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
416
416
|
*
|
417
|
-
* @see https://learn.microsoft.com/
|
417
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas
|
418
418
|
*
|
419
419
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.
|
420
420
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
@@ -143,7 +143,7 @@ export class ShareServiceClient extends StorageClient {
|
|
143
143
|
/**
|
144
144
|
* Gets the properties of a storage account’s file service, including properties
|
145
145
|
* for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
|
146
|
-
* @see https://learn.microsoft.com/
|
146
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/get-file-service-properties
|
147
147
|
*
|
148
148
|
* @param options - Options to Get Properties operation.
|
149
149
|
* @returns Response data for the Get Properties operation.
|
@@ -156,7 +156,7 @@ export class ShareServiceClient extends StorageClient {
|
|
156
156
|
/**
|
157
157
|
* Sets properties for a storage account’s file service endpoint, including properties
|
158
158
|
* for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
|
159
|
-
* @see https://learn.microsoft.com/
|
159
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/set-file-service-properties
|
160
160
|
*
|
161
161
|
* @param properties -
|
162
162
|
* @param options - Options to Set Properties operation.
|
@@ -422,7 +422,7 @@ export class ShareServiceClient extends StorageClient {
|
|
422
422
|
* Generates an account Shared Access Signature (SAS) URI based on the client properties
|
423
423
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
424
424
|
*
|
425
|
-
* @see https://learn.microsoft.com/
|
425
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas
|
426
426
|
*
|
427
427
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.
|
428
428
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|
@@ -449,7 +449,7 @@ export class ShareServiceClient extends StorageClient {
|
|
449
449
|
* Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties
|
450
450
|
* and parameters passed in. The SAS is signed by the shared key credential of the client.
|
451
451
|
*
|
452
|
-
* @see https://learn.microsoft.com/
|
452
|
+
* @see https://learn.microsoft.com/rest/api/storageservices/create-account-sas
|
453
453
|
*
|
454
454
|
* @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.
|
455
455
|
* @param permissions - Specifies the list of permissions to be associated with the SAS.
|