@azure/storage-file-share 12.25.0-beta.1 → 12.25.1-alpha.20240930.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -4
- package/dist/index.js +49 -49
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchResponse.js +1 -1
- package/dist-esm/storage-blob/src/BatchResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchResponseParser.js +1 -1
- package/dist-esm/storage-blob/src/BatchResponseParser.js.map +1 -1
- package/dist-esm/storage-blob/src/BatchUtils.js +1 -1
- package/dist-esm/storage-blob/src/BatchUtils.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatch.js +1 -1
- package/dist-esm/storage-blob/src/BlobBatch.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobBatchClient.js +1 -1
- package/dist-esm/storage-blob/src/BlobBatchClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js +1 -1
- package/dist-esm/storage-blob/src/BlobDownloadResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobLeaseClient.js +1 -1
- package/dist-esm/storage-blob/src/BlobLeaseClient.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.js +1 -1
- package/dist-esm/storage-blob/src/BlobQueryResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js +1 -1
- package/dist-esm/storage-blob/src/BlobServiceClient.js.map +1 -1
- package/dist-esm/storage-blob/src/Clients.js +2 -1
- package/dist-esm/storage-blob/src/Clients.js.map +1 -1
- package/dist-esm/storage-blob/src/ContainerClient.js.map +1 -1
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js +1 -1
- package/dist-esm/storage-blob/src/PageBlobRangeResponse.js.map +1 -1
- package/dist-esm/storage-blob/src/Pipeline.js +1 -1
- package/dist-esm/storage-blob/src/Pipeline.js.map +1 -1
- package/dist-esm/storage-blob/src/Range.js +1 -1
- package/dist-esm/storage-blob/src/Range.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js +1 -1
- package/dist-esm/storage-blob/src/StorageBrowserPolicyFactory.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageClient.js +1 -1
- package/dist-esm/storage-blob/src/StorageClient.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageContextClient.js +1 -1
- package/dist-esm/storage-blob/src/StorageContextClient.js.map +1 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js +1 -1
- package/dist-esm/storage-blob/src/StorageRetryPolicyFactory.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/AnonymousCredential.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/Credential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/Credential.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js +1 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/StorageSharedKeyCredential.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js +1 -1
- package/dist-esm/storage-blob/src/credentials/UserDelegationKeyCredential.js.map +1 -1
- package/dist-esm/storage-blob/src/generated/src/storageClient.js +1 -1
- package/dist-esm/storage-blob/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-blob/src/generatedModels.js +1 -1
- package/dist-esm/storage-blob/src/generatedModels.js.map +1 -1
- package/dist-esm/storage-blob/src/index.js +1 -1
- package/dist-esm/storage-blob/src/index.js.map +1 -1
- package/dist-esm/storage-blob/src/log.js +1 -1
- package/dist-esm/storage-blob/src/log.js.map +1 -1
- package/dist-esm/storage-blob/src/models.js +1 -1
- package/dist-esm/storage-blob/src/models.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/AnonymousCredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/CredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/RequestPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageBrowserPolicyV2.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageCorrectContentLengthPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.browser.js.map +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js +1 -1
- package/dist-esm/storage-blob/src/policies/StorageSharedKeyCredentialPolicyV2.js.map +1 -1
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js +1 -1
- package/dist-esm/storage-blob/src/pollers/BlobStartCopyFromUrlPoller.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASPermissions.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASResourceTypes.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASServices.js +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASServices.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js +1 -1
- package/dist-esm/storage-blob/src/sas/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASPermissions.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js +1 -1
- package/dist-esm/storage-blob/src/sas/BlobSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js +1 -1
- package/dist-esm/storage-blob/src/sas/ContainerSASPermissions.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js +1 -1
- package/dist-esm/storage-blob/src/sas/SASQueryParameters.js.map +1 -1
- package/dist-esm/storage-blob/src/sas/SasIPRange.js +1 -1
- package/dist-esm/storage-blob/src/sas/SasIPRange.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/Batch.js +1 -1
- package/dist-esm/storage-blob/src/utils/Batch.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js +1 -1
- package/dist-esm/storage-blob/src/utils/BlobQuickQueryStream.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/Mutex.js +1 -1
- package/dist-esm/storage-blob/src/utils/Mutex.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js +1 -1
- package/dist-esm/storage-blob/src/utils/RetriableReadableStream.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/SharedKeyComparator.js +1 -1
- package/dist-esm/storage-blob/src/utils/SharedKeyComparator.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/cache.js +1 -1
- package/dist-esm/storage-blob/src/utils/cache.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/constants.js +2 -2
- package/dist-esm/storage-blob/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/tracing.js +1 -1
- package/dist-esm/storage-blob/src/utils/tracing.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/utils.common.js +1 -1
- package/dist-esm/storage-blob/src/utils/utils.common.js.map +1 -1
- package/dist-esm/storage-blob/src/utils/utils.node.js +1 -1
- package/dist-esm/storage-blob/src/utils/utils.node.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASPermissions.js +1 -1
- package/dist-esm/storage-file-share/src/AccountSASPermissions.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js +1 -1
- package/dist-esm/storage-file-share/src/AccountSASResourceTypes.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASServices.js +1 -1
- package/dist-esm/storage-file-share/src/AccountSASServices.js.map +1 -1
- package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js +1 -1
- package/dist-esm/storage-file-share/src/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-file-share/src/Clients.js +1 -1
- package/dist-esm/storage-file-share/src/Clients.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileDownloadResponse.browser.js +1 -1
- package/dist-esm/storage-file-share/src/FileDownloadResponse.browser.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileDownloadResponse.js +1 -1
- package/dist-esm/storage-file-share/src/FileDownloadResponse.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileSASPermissions.js +1 -1
- package/dist-esm/storage-file-share/src/FileSASPermissions.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileSASSignatureValues.js +1 -1
- package/dist-esm/storage-file-share/src/FileSASSignatureValues.js.map +1 -1
- package/dist-esm/storage-file-share/src/FileSystemAttributes.js +1 -1
- package/dist-esm/storage-file-share/src/FileSystemAttributes.js.map +1 -1
- package/dist-esm/storage-file-share/src/Pipeline.js +1 -1
- package/dist-esm/storage-file-share/src/Pipeline.js.map +1 -1
- package/dist-esm/storage-file-share/src/Range.js +1 -1
- package/dist-esm/storage-file-share/src/Range.js.map +1 -1
- package/dist-esm/storage-file-share/src/SASQueryParameters.js +1 -1
- package/dist-esm/storage-file-share/src/SASQueryParameters.js.map +1 -1
- package/dist-esm/storage-file-share/src/SasIPRange.js +1 -1
- package/dist-esm/storage-file-share/src/SasIPRange.js.map +1 -1
- package/dist-esm/storage-file-share/src/ShareClientInternal.js +1 -1
- package/dist-esm/storage-file-share/src/ShareClientInternal.js.map +1 -1
- package/dist-esm/storage-file-share/src/ShareSASPermissions.js +1 -1
- package/dist-esm/storage-file-share/src/ShareSASPermissions.js.map +1 -1
- package/dist-esm/storage-file-share/src/ShareServiceClient.js +1 -1
- package/dist-esm/storage-file-share/src/ShareServiceClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/StorageClient.js +1 -1
- package/dist-esm/storage-file-share/src/StorageClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/StorageContextClient.js +1 -1
- package/dist-esm/storage-file-share/src/StorageContextClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/StorageRetryPolicyFactory.js +1 -1
- package/dist-esm/storage-file-share/src/StorageRetryPolicyFactory.js.map +1 -1
- package/dist-esm/storage-file-share/src/generated/src/storageClient.js +1 -1
- package/dist-esm/storage-file-share/src/generated/src/storageClient.js.map +1 -1
- package/dist-esm/storage-file-share/src/generatedModels.js +1 -1
- package/dist-esm/storage-file-share/src/generatedModels.js.map +1 -1
- package/dist-esm/storage-file-share/src/index.browser.js +1 -1
- package/dist-esm/storage-file-share/src/index.browser.js.map +1 -1
- package/dist-esm/storage-file-share/src/index.js +1 -1
- package/dist-esm/storage-file-share/src/index.js.map +1 -1
- package/dist-esm/storage-file-share/src/log.js +1 -1
- package/dist-esm/storage-file-share/src/log.js.map +1 -1
- package/dist-esm/storage-file-share/src/models.js +1 -1
- package/dist-esm/storage-file-share/src/models.js.map +1 -1
- package/dist-esm/storage-file-share/src/policies/StorageRetryPolicy.js +1 -1
- package/dist-esm/storage-file-share/src/policies/StorageRetryPolicy.js.map +1 -1
- package/dist-esm/storage-file-share/src/policies/StorageRetryPolicyV2.js +1 -1
- package/dist-esm/storage-file-share/src/policies/StorageRetryPolicyV2.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/Batch.js +1 -1
- package/dist-esm/storage-file-share/src/utils/Batch.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/BufferScheduler.js +1 -1
- package/dist-esm/storage-file-share/src/utils/BufferScheduler.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/RetriableReadableStream.js +1 -1
- package/dist-esm/storage-file-share/src/utils/RetriableReadableStream.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/constants.js +2 -2
- package/dist-esm/storage-file-share/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/tracing.js +1 -1
- package/dist-esm/storage-file-share/src/utils/tracing.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.browser.js +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.browser.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.common.js +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.common.js.map +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.node.js +1 -1
- package/dist-esm/storage-file-share/src/utils/utils.node.js.map +1 -1
- package/package.json +20 -19
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ShareServiceClient.js","sourceRoot":"","sources":["../../../src/ShareServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAiB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,CAAC,GAAG,CAAC,EACrE,gBAAwB,KAAK,EAC7B,UAA+C,EAAE;QAEjD,IAAI,CAAC,CAAC,IAAI,CAAC,UAAU,YAAY,0BAA0B,CAAC,EAAE,CAAC;YAC7D,MAAM,UAAU,CACd,+FAA+F,CAChG,CAAC;QACJ,CAAC;QAED,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,yCAAyC,iBAE5C,WAAW;YACX,SAAS;YACT,aAAa,EACb,QAAQ,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,IAC/C,OAAO,GAEZ,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n FileServiceProperties,\n ListSharesIncludeType,\n ShareCreateResponse,\n ShareDeleteResponse,\n ServiceGetPropertiesResponse,\n ServiceSetPropertiesResponse,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel,\n SharePropertiesInternal,\n ServiceSetPropertiesHeaders,\n ServiceGetPropertiesHeaders,\n} from \"./generatedModels\";\nimport { Service } from \"./generated/src/operationsInterfaces\";\nimport { isPipelineLike, newPipeline, Pipeline } from \"./Pipeline\";\nimport { StorageClient, CommonOptions } from \"./StorageClient\";\nimport { ShareClientInternal } from \"./ShareClientInternal\";\nimport { ShareClient, ShareCreateOptions, ShareDeleteMethodOptions } from \"./Clients\";\nimport {\n WithResponse,\n appendToURLPath,\n extractConnectionStringParts,\n assertResponse,\n removeEmptyString,\n} from \"./utils/utils.common\";\nimport { Credential } from \"../../storage-blob/src/credentials/Credential\";\nimport { StorageSharedKeyCredential } from \"../../storage-blob/src/credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"../../storage-blob/src/credentials/AnonymousCredential\";\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { isNode } from \"@azure/core-util\";\nimport { tracingClient } from \"./utils/tracing\";\nimport { ShareClientConfig, ShareClientOptions, ShareProtocols, toShareProtocols } from \"./models\";\nimport { AccountSASPermissions } from \"./AccountSASPermissions\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./AccountSASSignatureValues\";\nimport { AccountSASServices } from \"./AccountSASServices\";\nimport { SASProtocol } from \"./SASQueryParameters\";\nimport { SasIPRange } from \"./SasIPRange\";\nimport { appendToURLQuery } from \"./utils/utils.common\";\nimport { TokenCredential, isTokenCredential } from \"@azure/core-auth\";\n\n/**\n * Options to configure Share - List Shares Segment operations.\n *\n * See:\n * - {@link ShareServiceClient.listSegments}\n * - {@link ShareServiceClient.listItems}\n * - {@link ShareServiceClient.listSharesSegment}\n */\ninterface ServiceListSharesSegmentOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only entries whose\n * name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of entries to\n * return. If the request does not specify maxResults, or specifies a value\n * greater than 5,000, the server will return up to 5,000 items.\n */\n maxResults?: number;\n\n /**\n * Include this parameter to\n * specify one or more datasets to include in the response.\n */\n include?: ListSharesIncludeType[];\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.listShares} operation.\n */\nexport interface ServiceListSharesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only entries whose\n * name begins with the specified prefix.\n */\n prefix?: string;\n\n /**\n * Specifies that share snapshots should be included in the enumeration. Share Snapshots are listed from oldest to newest in the response.\n */\n includeMetadata?: boolean;\n\n /**\n * Specifies that share snapshot should be returned in the response.\n */\n includeSnapshots?: boolean;\n\n /**\n * Specifies that share soft deleted should be returned in the response.\n */\n includeDeleted?: boolean;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.getProperties} operation.\n */\nexport interface ServiceGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.setProperties} operation.\n */\nexport interface ServiceSetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.undelete} operation.\n */\nexport interface ServiceUndeleteShareOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Properties of a share.\n */\nexport type ShareProperties = SharePropertiesInternal & {\n /**\n * The protocols that have been enabled on the share.\n */\n protocols?: ShareProtocols;\n};\n\n/**\n * A listed Azure Storage share item.\n */\nexport interface ShareItem {\n name: string;\n snapshot?: string;\n deleted?: boolean;\n version?: string;\n properties: ShareProperties;\n metadata?: { [propertyName: string]: string };\n}\n\n/**\n * An enumeration of shares.\n */\nexport interface ListSharesResponse {\n serviceEndpoint: string;\n prefix?: string;\n marker?: string;\n maxResults?: number;\n shareItems?: ShareItem[];\n continuationToken: string;\n}\n\n/**\n * Contains response data for the {@link ShareServiceClient.listShares} operation.\n */\nexport type ServiceListSharesSegmentResponse = WithResponse<\n ListSharesResponse & ServiceListSharesSegmentHeaders,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel\n>;\n\n/**\n * Options to configure {@link ShareServiceClient.generateAccountSasUrl} operation.\n */\nexport interface ServiceGenerateAccountSasUrlOptions {\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 allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n}\n\n/**\n * A ShareServiceClient represents a URL to the Azure Storage File service allowing you\n * to manipulate file shares.\n */\nexport class ShareServiceClient extends StorageClient {\n /**\n * serviceContext provided by protocol layer.\n */\n private serviceContext: Service;\n\n private shareClientConfig?: ShareClientConfig;\n\n /**\n *\n * Creates an instance of ShareServiceClient from connection string.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param options - Options to configure the HTTP pipeline.\n * @returns A new ShareServiceClient from the given connection string.\n */\n public static fromConnectionString(\n connectionString: string,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n ): ShareServiceClient {\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey,\n );\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new ShareServiceClient(extractedCreds.url, pipeline, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new ShareServiceClient(\n extractedCreds.url + \"?\" + extractedCreds.accountSas,\n pipeline,\n options,\n );\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\",\n );\n }\n }\n\n /**\n * Creates an instance of ShareServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage file service, such as\n * \"https://myaccount.file.core.windows.net\". You can Append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.file.core.windows.net?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential, or TokenCredential,\n * If not specified, AnonymousCredential is used.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n\n constructor(\n url: string,\n credential?: Credential | TokenCredential,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n );\n /**\n * Creates an instance of ShareServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage file service, such as\n * \"https://myaccount.file.core.windows.net\". You can Append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.file.core.windows.net?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);\n constructor(\n url: string,\n credentialOrPipeline?: Credential | TokenCredential | Pipeline,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n ) {\n let pipeline: Pipeline;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n } else if (\n credentialOrPipeline instanceof Credential ||\n isTokenCredential(credentialOrPipeline)\n ) {\n pipeline = newPipeline(credentialOrPipeline, options);\n } else {\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n\n super(url, pipeline);\n this.shareClientConfig = options;\n this.serviceContext = this.storageClientContext.service;\n }\n\n /**\n * Creates a ShareClient object.\n *\n * @param shareName - Name of a share.\n * @returns The ShareClient object for the given share name.\n *\n * Example usage:\n *\n * ```js\n * const shareClient = serviceClient.getShareClient(\"<share name>\");\n * await shareClient.create();\n * console.log(\"Created share successfully!\");\n * ```\n */\n public getShareClient(shareName: string): ShareClient {\n return new ShareClient(\n appendToURLPath(this.url, shareName),\n this.pipeline,\n this.shareClientConfig,\n );\n }\n\n /**\n * Creates a Share.\n *\n * @param shareName -\n * @param options -\n * @returns Share creation response and the corresponding share client.\n */\n public async createShare(\n shareName: string,\n options: ShareCreateOptions = {},\n ): Promise<{ shareCreateResponse: ShareCreateResponse; shareClient: ShareClient }> {\n return tracingClient.withSpan(\n \"ShareServiceClient-createShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(shareName);\n const shareCreateResponse = await shareClient.create(updatedOptions);\n return {\n shareCreateResponse,\n shareClient,\n };\n },\n );\n }\n\n /**\n * Deletes a Share.\n *\n * @param shareName -\n * @param options -\n * @returns Share deletion response and the corresponding share client.\n */\n public async deleteShare(\n shareName: string,\n options: ShareDeleteMethodOptions = {},\n ): Promise<ShareDeleteResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-deleteShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(shareName);\n return shareClient.delete(updatedOptions);\n },\n );\n }\n\n /**\n * Gets the properties of a storage account’s file service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-file-service-properties\n *\n * @param options - Options to Get Properties operation.\n * @returns Response data for the Get Properties operation.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<ServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceGetPropertiesHeaders & FileServiceProperties,\n ServiceGetPropertiesHeaders,\n FileServiceProperties\n >(\n await this.serviceContext.getProperties({\n ...updatedOptions,\n ...this.shareClientConfig,\n }),\n );\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s file service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-file-service-properties\n *\n * @param properties -\n * @param options - Options to Set Properties operation.\n * @returns Response data for the Set Properties operation.\n */\n public async setProperties(\n properties: FileServiceProperties,\n options: ServiceSetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceSetPropertiesHeaders, ServiceSetPropertiesHeaders>(\n await this.serviceContext.setProperties(properties, {\n ...updatedOptions,\n ...this.shareClientConfig,\n }),\n );\n },\n );\n }\n\n /**\n * Returns an AsyncIterableIterator for {@link ServiceListSharesSegmentResponse} objects\n *\n * @param marker - A string value that identifies the portion of\n * the list of shares to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all shares remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list shares operation.\n */\n private async *listSegments(\n marker?: string,\n options: ServiceListSharesSegmentOptions = {},\n ): AsyncIterableIterator<ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let listSharesSegmentResponse;\n do {\n listSharesSegmentResponse = await this.listSharesSegment(marker, options);\n marker = listSharesSegmentResponse.continuationToken;\n yield await listSharesSegmentResponse;\n } while (marker);\n }\n\n /**\n * Returns an AsyncIterableIterator for share items\n *\n * @param options - Options to list shares operation.\n */\n private async *listItems(\n options: ServiceListSharesSegmentOptions = {},\n ): AsyncIterableIterator<ShareItem> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let marker: string | undefined;\n for await (const segment of this.listSegments(marker, options)) {\n if (segment.shareItems) {\n yield* segment.shareItems;\n }\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the shares\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the shares in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const share of serviceClient.listShares()) {\n * console.log(`Share ${i++}: ${share.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = serviceClient.listShares();\n * let shareItem = await iter.next();\n * while (!shareItem.done) {\n * console.log(`Share ${i++}: ${shareItem.value.name}`);\n * shareItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of serviceClient.listShares().byPage({ maxPageSize: 20 })) {\n * if (response.shareItems) {\n * for (const share of response.shareItems) {\n * console.log(`Share ${i++}: ${share.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = serviceClient.listShares().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 share names\n * if (response.shareItems) {\n * for (const share of response.shareItems) {\n * console.log(`Share ${i++}: ${share.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n * iterator = serviceClient.listShares().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 share names\n * if (response.shareItems) {\n * for (const share of response.shareItems) {\n * console.log(`Share ${i++}: ${share.name}`);\n * }\n * }\n * ```\n *\n * @param options - Options to list shares operation.\n *\n * An asyncIterableIterator that supports paging.\n */\n public listShares(\n options: ServiceListSharesOptions = {},\n ): PagedAsyncIterableIterator<ShareItem, ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const include: ListSharesIncludeType[] = [];\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n\n const updatedOptions: ServiceListSharesSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include: include } : {}),\n };\n\n // AsyncIterableIterator to iterate over queues\n const iter = this.listItems(updatedOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(removeEmptyString(settings.continuationToken), {\n maxResults: settings.maxPageSize,\n ...updatedOptions,\n });\n },\n };\n }\n\n /**\n * Gets the properties of a storage account's File service, including properties for Storage\n * Analytics metrics and CORS (Cross-Origin Resource Sharing) rules.\n *\n * @param marker - A string value that identifies the portion of\n * the list to be returned with the next list operation. The operation\n * returns a marker value within the response body if the list returned was\n * not complete. The marker value may then be used in a subsequent call to\n * request the next set of list items. The marker value is opaque to the\n * client.\n * @param options - Options to List Shares Segment operation.\n * @returns Response data for the List Shares Segment operation.\n */\n private async listSharesSegment(\n marker?: string,\n options: ServiceListSharesSegmentOptions = {},\n ): Promise<ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n return tracingClient.withSpan(\n \"ShareServiceClient-listSharesSegment\",\n options,\n async (updatedOptions) => {\n const res = assertResponse<\n ServiceListSharesSegmentHeaders & ListSharesResponseModel,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel\n >(\n await this.serviceContext.listSharesSegment({\n ...updatedOptions,\n ...this.shareClientConfig,\n marker,\n }),\n );\n\n // parse protocols\n if (res.shareItems) {\n for (let i = 0; i < res.shareItems.length; i++) {\n const protocolsStr = res.shareItems[i].properties.enabledProtocols;\n (res.shareItems[i].properties as any).protocols = toShareProtocols(protocolsStr);\n }\n }\n\n return res;\n },\n );\n }\n\n /**\n * Restores a previously deleted share.\n * This API is only functional if Share Soft Delete is enabled\n * for the storage account associated with the share.\n *\n * @param deletedShareName - The name of the previously deleted share.\n * @param deletedShareVersion - The version of the previously deleted share.\n * @param options - Options to Share undelete operation.\n * @returns Restored share.\n */\n public async undeleteShare(\n deletedShareName: string,\n deletedShareVersion: string,\n options: ServiceUndeleteShareOptions = {},\n ): Promise<ShareClient> {\n return tracingClient.withSpan(\n \"ShareServiceClient-undeleteShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(deletedShareName);\n await new ShareClientInternal(shareClient.url, this.pipeline).restore({\n ...updatedOptions,\n ...this.shareClientConfig,\n deletedShareName: deletedShareName,\n deletedShareVersion: deletedShareVersion,\n });\n return shareClient;\n },\n );\n }\n\n /**\n * Only available for ShareServiceClient constructed with a shared key credential.\n *\n * Generates an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateAccountSasUrl(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n const sas = generateAccountSASQueryParameters(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"f\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for ShareServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasStringToSign(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n return generateAccountSASQueryParametersInternal(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"f\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ShareServiceClient.js","sourceRoot":"","sources":["../../../src/ShareServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAiBlC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAY,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,aAAa,EAAiB,MAAM,iBAAiB,CAAC;AAC/D,OA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AAC,EAAE,CAAC;YAC7D,MAAM,UAAU,CACd,+FAA+F,CAChG,CAAC;QACJ,CAAC;QAED,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,yCAAyC,iBAE5C,WAAW;YACX,SAAS;YACT,aAAa,EACb,QAAQ,EAAE,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,IAC/C,OAAO,GAEZ,IAAI,CAAC,UAAU,CAChB,CAAC,YAAY,CAAC;IACjB,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport {\n FileServiceProperties,\n ListSharesIncludeType,\n ShareCreateResponse,\n ShareDeleteResponse,\n ServiceGetPropertiesResponse,\n ServiceSetPropertiesResponse,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel,\n SharePropertiesInternal,\n ServiceSetPropertiesHeaders,\n ServiceGetPropertiesHeaders,\n} from \"./generatedModels\";\nimport { Service } from \"./generated/src/operationsInterfaces\";\nimport { isPipelineLike, newPipeline, Pipeline } from \"./Pipeline\";\nimport { StorageClient, CommonOptions } from \"./StorageClient\";\nimport { ShareClientInternal } from \"./ShareClientInternal\";\nimport { ShareClient, ShareCreateOptions, ShareDeleteMethodOptions } from \"./Clients\";\nimport {\n WithResponse,\n appendToURLPath,\n extractConnectionStringParts,\n assertResponse,\n removeEmptyString,\n} from \"./utils/utils.common\";\nimport { Credential } from \"../../storage-blob/src/credentials/Credential\";\nimport { StorageSharedKeyCredential } from \"../../storage-blob/src/credentials/StorageSharedKeyCredential\";\nimport { AnonymousCredential } from \"../../storage-blob/src/credentials/AnonymousCredential\";\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { isNode } from \"@azure/core-util\";\nimport { tracingClient } from \"./utils/tracing\";\nimport { ShareClientConfig, ShareClientOptions, ShareProtocols, toShareProtocols } from \"./models\";\nimport { AccountSASPermissions } from \"./AccountSASPermissions\";\nimport {\n generateAccountSASQueryParameters,\n generateAccountSASQueryParametersInternal,\n} from \"./AccountSASSignatureValues\";\nimport { AccountSASServices } from \"./AccountSASServices\";\nimport { SASProtocol } from \"./SASQueryParameters\";\nimport { SasIPRange } from \"./SasIPRange\";\nimport { appendToURLQuery } from \"./utils/utils.common\";\nimport { TokenCredential, isTokenCredential } from \"@azure/core-auth\";\n\n/**\n * Options to configure Share - List Shares Segment operations.\n *\n * See:\n * - {@link ShareServiceClient.listSegments}\n * - {@link ShareServiceClient.listItems}\n * - {@link ShareServiceClient.listSharesSegment}\n */\ninterface ServiceListSharesSegmentOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only entries whose\n * name begins with the specified prefix.\n */\n prefix?: string;\n /**\n * Specifies the maximum number of entries to\n * return. If the request does not specify maxResults, or specifies a value\n * greater than 5,000, the server will return up to 5,000 items.\n */\n maxResults?: number;\n\n /**\n * Include this parameter to\n * specify one or more datasets to include in the response.\n */\n include?: ListSharesIncludeType[];\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.listShares} operation.\n */\nexport interface ServiceListSharesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n /**\n * Filters the results to return only entries whose\n * name begins with the specified prefix.\n */\n prefix?: string;\n\n /**\n * Specifies that share snapshots should be included in the enumeration. Share Snapshots are listed from oldest to newest in the response.\n */\n includeMetadata?: boolean;\n\n /**\n * Specifies that share snapshot should be returned in the response.\n */\n includeSnapshots?: boolean;\n\n /**\n * Specifies that share soft deleted should be returned in the response.\n */\n includeDeleted?: boolean;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.getProperties} operation.\n */\nexport interface ServiceGetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.setProperties} operation.\n */\nexport interface ServiceSetPropertiesOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Options to configure the {@link ShareServiceClient.undelete} operation.\n */\nexport interface ServiceUndeleteShareOptions extends CommonOptions {\n /**\n * An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.\n * For example, use the @azure/abort-controller to create an `AbortSignal`.\n */\n abortSignal?: AbortSignalLike;\n}\n\n/**\n * Properties of a share.\n */\nexport type ShareProperties = SharePropertiesInternal & {\n /**\n * The protocols that have been enabled on the share.\n */\n protocols?: ShareProtocols;\n};\n\n/**\n * A listed Azure Storage share item.\n */\nexport interface ShareItem {\n name: string;\n snapshot?: string;\n deleted?: boolean;\n version?: string;\n properties: ShareProperties;\n metadata?: { [propertyName: string]: string };\n}\n\n/**\n * An enumeration of shares.\n */\nexport interface ListSharesResponse {\n serviceEndpoint: string;\n prefix?: string;\n marker?: string;\n maxResults?: number;\n shareItems?: ShareItem[];\n continuationToken: string;\n}\n\n/**\n * Contains response data for the {@link ShareServiceClient.listShares} operation.\n */\nexport type ServiceListSharesSegmentResponse = WithResponse<\n ListSharesResponse & ServiceListSharesSegmentHeaders,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel\n>;\n\n/**\n * Options to configure {@link ShareServiceClient.generateAccountSasUrl} operation.\n */\nexport interface ServiceGenerateAccountSasUrlOptions {\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 allowed.\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n /**\n * Optional. IP range allowed.\n */\n ipRange?: SasIPRange;\n}\n\n/**\n * A ShareServiceClient represents a URL to the Azure Storage File service allowing you\n * to manipulate file shares.\n */\nexport class ShareServiceClient extends StorageClient {\n /**\n * serviceContext provided by protocol layer.\n */\n private serviceContext: Service;\n\n private shareClientConfig?: ShareClientConfig;\n\n /**\n *\n * Creates an instance of ShareServiceClient from connection string.\n *\n * @param connectionString - Account connection string or a SAS connection string of an Azure storage account.\n * [ Note - Account connection string can only be used in NODE.JS runtime. ]\n * Account connection string example -\n * `DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net`\n * SAS connection string example -\n * `BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString`\n * @param options - Options to configure the HTTP pipeline.\n * @returns A new ShareServiceClient from the given connection string.\n */\n public static fromConnectionString(\n connectionString: string,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n ): ShareServiceClient {\n const extractedCreds = extractConnectionStringParts(connectionString);\n if (extractedCreds.kind === \"AccountConnString\") {\n if (isNode) {\n const sharedKeyCredential = new StorageSharedKeyCredential(\n extractedCreds.accountName!,\n extractedCreds.accountKey,\n );\n const pipeline = newPipeline(sharedKeyCredential, options);\n return new ShareServiceClient(extractedCreds.url, pipeline, options);\n } else {\n throw new Error(\"Account connection string is only supported in Node.js environment\");\n }\n } else if (extractedCreds.kind === \"SASConnString\") {\n const pipeline = newPipeline(new AnonymousCredential(), options);\n return new ShareServiceClient(\n extractedCreds.url + \"?\" + extractedCreds.accountSas,\n pipeline,\n options,\n );\n } else {\n throw new Error(\n \"Connection string must be either an Account connection string or a SAS connection string\",\n );\n }\n }\n\n /**\n * Creates an instance of ShareServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage file service, such as\n * \"https://myaccount.file.core.windows.net\". You can Append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.file.core.windows.net?sasString\".\n * @param credential - Such as AnonymousCredential, StorageSharedKeyCredential, or TokenCredential,\n * If not specified, AnonymousCredential is used.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n\n constructor(\n url: string,\n credential?: Credential | TokenCredential,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n );\n /**\n * Creates an instance of ShareServiceClient.\n *\n * @param url - A URL string pointing to Azure Storage file service, such as\n * \"https://myaccount.file.core.windows.net\". You can Append a SAS\n * if using AnonymousCredential, such as \"https://myaccount.file.core.windows.net?sasString\".\n * @param pipeline - Call newPipeline() to create a default\n * pipeline, or provide a customized pipeline.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);\n constructor(\n url: string,\n credentialOrPipeline?: Credential | TokenCredential | Pipeline,\n // Legacy, no way to fix the eslint error without breaking. Disable the rule for this line.\n /* eslint-disable-next-line @azure/azure-sdk/ts-naming-options */\n options?: ShareClientOptions,\n ) {\n let pipeline: Pipeline;\n if (isPipelineLike(credentialOrPipeline)) {\n pipeline = credentialOrPipeline;\n } else if (\n credentialOrPipeline instanceof Credential ||\n isTokenCredential(credentialOrPipeline)\n ) {\n pipeline = newPipeline(credentialOrPipeline, options);\n } else {\n // The second parameter is undefined. Use anonymous credential.\n pipeline = newPipeline(new AnonymousCredential(), options);\n }\n\n super(url, pipeline);\n this.shareClientConfig = options;\n this.serviceContext = this.storageClientContext.service;\n }\n\n /**\n * Creates a ShareClient object.\n *\n * @param shareName - Name of a share.\n * @returns The ShareClient object for the given share name.\n *\n * Example usage:\n *\n * ```js\n * const shareClient = serviceClient.getShareClient(\"<share name>\");\n * await shareClient.create();\n * console.log(\"Created share successfully!\");\n * ```\n */\n public getShareClient(shareName: string): ShareClient {\n return new ShareClient(\n appendToURLPath(this.url, shareName),\n this.pipeline,\n this.shareClientConfig,\n );\n }\n\n /**\n * Creates a Share.\n *\n * @param shareName -\n * @param options -\n * @returns Share creation response and the corresponding share client.\n */\n public async createShare(\n shareName: string,\n options: ShareCreateOptions = {},\n ): Promise<{ shareCreateResponse: ShareCreateResponse; shareClient: ShareClient }> {\n return tracingClient.withSpan(\n \"ShareServiceClient-createShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(shareName);\n const shareCreateResponse = await shareClient.create(updatedOptions);\n return {\n shareCreateResponse,\n shareClient,\n };\n },\n );\n }\n\n /**\n * Deletes a Share.\n *\n * @param shareName -\n * @param options -\n * @returns Share deletion response and the corresponding share client.\n */\n public async deleteShare(\n shareName: string,\n options: ShareDeleteMethodOptions = {},\n ): Promise<ShareDeleteResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-deleteShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(shareName);\n return shareClient.delete(updatedOptions);\n },\n );\n }\n\n /**\n * Gets the properties of a storage account’s file service, including properties\n * for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/get-file-service-properties\n *\n * @param options - Options to Get Properties operation.\n * @returns Response data for the Get Properties operation.\n */\n public async getProperties(\n options: ServiceGetPropertiesOptions = {},\n ): Promise<ServiceGetPropertiesResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-getProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<\n ServiceGetPropertiesHeaders & FileServiceProperties,\n ServiceGetPropertiesHeaders,\n FileServiceProperties\n >(\n await this.serviceContext.getProperties({\n ...updatedOptions,\n ...this.shareClientConfig,\n }),\n );\n },\n );\n }\n\n /**\n * Sets properties for a storage account’s file service endpoint, including properties\n * for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/set-file-service-properties\n *\n * @param properties -\n * @param options - Options to Set Properties operation.\n * @returns Response data for the Set Properties operation.\n */\n public async setProperties(\n properties: FileServiceProperties,\n options: ServiceSetPropertiesOptions = {},\n ): Promise<ServiceSetPropertiesResponse> {\n return tracingClient.withSpan(\n \"ShareServiceClient-setProperties\",\n options,\n async (updatedOptions) => {\n return assertResponse<ServiceSetPropertiesHeaders, ServiceSetPropertiesHeaders>(\n await this.serviceContext.setProperties(properties, {\n ...updatedOptions,\n ...this.shareClientConfig,\n }),\n );\n },\n );\n }\n\n /**\n * Returns an AsyncIterableIterator for {@link ServiceListSharesSegmentResponse} objects\n *\n * @param marker - A string value that identifies the portion of\n * the list of shares to be returned with the next listing operation. The\n * operation returns the ContinuationToken value within the response body if the\n * listing operation did not return all shares remaining to be listed\n * with the current page. The ContinuationToken value can be used as the value for\n * the marker parameter in a subsequent call to request the next page of list\n * items. The marker value is opaque to the client.\n * @param options - Options to list shares operation.\n */\n private async *listSegments(\n marker?: string,\n options: ServiceListSharesSegmentOptions = {},\n ): AsyncIterableIterator<ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let listSharesSegmentResponse;\n do {\n listSharesSegmentResponse = await this.listSharesSegment(marker, options);\n marker = listSharesSegmentResponse.continuationToken;\n yield await listSharesSegmentResponse;\n } while (marker);\n }\n\n /**\n * Returns an AsyncIterableIterator for share items\n *\n * @param options - Options to list shares operation.\n */\n private async *listItems(\n options: ServiceListSharesSegmentOptions = {},\n ): AsyncIterableIterator<ShareItem> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n let marker: string | undefined;\n for await (const segment of this.listSegments(marker, options)) {\n if (segment.shareItems) {\n yield* segment.shareItems;\n }\n }\n }\n\n /**\n * Returns an async iterable iterator to list all the shares\n * under the specified account.\n *\n * .byPage() returns an async iterable iterator to list the shares in pages.\n *\n * Example using `for await` syntax:\n *\n * ```js\n * let i = 1;\n * for await (const share of serviceClient.listShares()) {\n * console.log(`Share ${i++}: ${share.name}`);\n * }\n * ```\n *\n * Example using `iter.next()`:\n *\n * ```js\n * let i = 1;\n * let iter = serviceClient.listShares();\n * let shareItem = await iter.next();\n * while (!shareItem.done) {\n * console.log(`Share ${i++}: ${shareItem.value.name}`);\n * shareItem = await iter.next();\n * }\n * ```\n *\n * Example using `byPage()`:\n *\n * ```js\n * // passing optional maxPageSize in the page settings\n * let i = 1;\n * for await (const response of serviceClient.listShares().byPage({ maxPageSize: 20 })) {\n * if (response.shareItems) {\n * for (const share of response.shareItems) {\n * console.log(`Share ${i++}: ${share.name}`);\n * }\n * }\n * }\n * ```\n *\n * Example using paging with a marker:\n *\n * ```js\n * let i = 1;\n * let iterator = serviceClient.listShares().byPage({ maxPageSize: 2 });\n * let response = (await iterator.next()).value;\n *\n * // Prints 2 share names\n * if (response.shareItems) {\n * for (const share of response.shareItems) {\n * console.log(`Share ${i++}: ${share.name}`);\n * }\n * }\n *\n * // Gets next marker\n * let marker = response.continuationToken;\n *\n * // Passing next marker as continuationToken\n * iterator = serviceClient.listShares().byPage({ continuationToken: marker, maxPageSize: 10 });\n * response = (await iterator.next()).value;\n *\n * // Prints 10 share names\n * if (response.shareItems) {\n * for (const share of response.shareItems) {\n * console.log(`Share ${i++}: ${share.name}`);\n * }\n * }\n * ```\n *\n * @param options - Options to list shares operation.\n *\n * An asyncIterableIterator that supports paging.\n */\n public listShares(\n options: ServiceListSharesOptions = {},\n ): PagedAsyncIterableIterator<ShareItem, ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n\n const include: ListSharesIncludeType[] = [];\n if (options.includeMetadata) {\n include.push(\"metadata\");\n }\n if (options.includeSnapshots) {\n include.push(\"snapshots\");\n }\n if (options.includeDeleted) {\n include.push(\"deleted\");\n }\n\n const updatedOptions: ServiceListSharesSegmentOptions = {\n ...options,\n ...(include.length > 0 ? { include: include } : {}),\n };\n\n // AsyncIterableIterator to iterate over queues\n const iter = this.listItems(updatedOptions);\n return {\n /**\n * The next method, part of the iteration protocol\n */\n next() {\n return iter.next();\n },\n /**\n * The connection to the async iterator, part of the iteration protocol\n */\n [Symbol.asyncIterator]() {\n return this;\n },\n /**\n * Return an AsyncIterableIterator that works a page at a time\n */\n byPage: (settings: PageSettings = {}) => {\n return this.listSegments(removeEmptyString(settings.continuationToken), {\n maxResults: settings.maxPageSize,\n ...updatedOptions,\n });\n },\n };\n }\n\n /**\n * Gets the properties of a storage account's File service, including properties for Storage\n * Analytics metrics and CORS (Cross-Origin Resource Sharing) rules.\n *\n * @param marker - A string value that identifies the portion of\n * the list to be returned with the next list operation. The operation\n * returns a marker value within the response body if the list returned was\n * not complete. The marker value may then be used in a subsequent call to\n * request the next set of list items. The marker value is opaque to the\n * client.\n * @param options - Options to List Shares Segment operation.\n * @returns Response data for the List Shares Segment operation.\n */\n private async listSharesSegment(\n marker?: string,\n options: ServiceListSharesSegmentOptions = {},\n ): Promise<ServiceListSharesSegmentResponse> {\n if (options.prefix === \"\") {\n options.prefix = undefined;\n }\n return tracingClient.withSpan(\n \"ShareServiceClient-listSharesSegment\",\n options,\n async (updatedOptions) => {\n const res = assertResponse<\n ServiceListSharesSegmentHeaders & ListSharesResponseModel,\n ServiceListSharesSegmentHeaders,\n ListSharesResponseModel\n >(\n await this.serviceContext.listSharesSegment({\n ...updatedOptions,\n ...this.shareClientConfig,\n marker,\n }),\n );\n\n // parse protocols\n if (res.shareItems) {\n for (let i = 0; i < res.shareItems.length; i++) {\n const protocolsStr = res.shareItems[i].properties.enabledProtocols;\n (res.shareItems[i].properties as any).protocols = toShareProtocols(protocolsStr);\n }\n }\n\n return res;\n },\n );\n }\n\n /**\n * Restores a previously deleted share.\n * This API is only functional if Share Soft Delete is enabled\n * for the storage account associated with the share.\n *\n * @param deletedShareName - The name of the previously deleted share.\n * @param deletedShareVersion - The version of the previously deleted share.\n * @param options - Options to Share undelete operation.\n * @returns Restored share.\n */\n public async undeleteShare(\n deletedShareName: string,\n deletedShareVersion: string,\n options: ServiceUndeleteShareOptions = {},\n ): Promise<ShareClient> {\n return tracingClient.withSpan(\n \"ShareServiceClient-undeleteShare\",\n options,\n async (updatedOptions) => {\n const shareClient = this.getShareClient(deletedShareName);\n await new ShareClientInternal(shareClient.url, this.pipeline).restore({\n ...updatedOptions,\n ...this.shareClientConfig,\n deletedShareName: deletedShareName,\n deletedShareVersion: deletedShareVersion,\n });\n return shareClient;\n },\n );\n }\n\n /**\n * Only available for ShareServiceClient constructed with a shared key credential.\n *\n * Generates an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateAccountSasUrl(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n const sas = generateAccountSASQueryParameters(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"f\").toString(),\n ...options,\n },\n this.credential,\n ).toString();\n\n return appendToURLQuery(this.url, sas);\n }\n\n /**\n * Only available for ShareServiceClient constructed with a shared key credential.\n *\n * Generates string to sign for an account Shared Access Signature (SAS) URI based on the client properties\n * and parameters passed in. The SAS is signed by the shared key credential of the client.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-account-sas\n *\n * @param expiresOn - Optional. The time at which the shared access signature becomes invalid. Default to an hour later if not specified.\n * @param permissions - Specifies the list of permissions to be associated with the SAS.\n * @param resourceTypes - Specifies the resource types associated with the shared access signature.\n * @param options - Optional parameters.\n * @returns An account SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.\n */\n public generateSasStringToSign(\n expiresOn?: Date,\n permissions: AccountSASPermissions = AccountSASPermissions.parse(\"r\"),\n resourceTypes: string = \"sco\",\n options: ServiceGenerateAccountSasUrlOptions = {},\n ): string {\n if (!(this.credential instanceof StorageSharedKeyCredential)) {\n throw RangeError(\n \"Can only generate the account SAS when the client is initialized with a shared key credential\",\n );\n }\n\n if (expiresOn === undefined) {\n const now = new Date();\n expiresOn = new Date(now.getTime() + 3600 * 1000);\n }\n\n return generateAccountSASQueryParametersInternal(\n {\n permissions,\n expiresOn,\n resourceTypes,\n services: AccountSASServices.parse(\"f\").toString(),\n ...options,\n },\n this.credential,\n ).stringToSign;\n }\n}\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT
|
2
|
+
// Licensed under the MIT License.
|
3
3
|
import { StorageContextClient } from "./StorageContextClient";
|
4
4
|
import { getCoreClientOptions, getCredentialFromPipeline } from "./Pipeline";
|
5
5
|
import { escapeURLPath, getAccountNameFromUrl } from "./utils/utils.common";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StorageClient.js","sourceRoot":"","sources":["../../../src/StorageClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAY,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAa5E;;GAEG;AACH,MAAM,OAAgB,aAAa;IA4BjC;;;;OAIG;IACH,YAAsB,GAAW,EAAE,QAAkB;QACnD,iFAAiF;QACjF,IAAI,CAAC,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC;QAE9C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC/F,4EAA4E;QAC5E,MAAM,oBAAoB,GAAG,IAAI,CAAC,oBAA2B,CAAC;QAC9D,IAAI,oBAAoB,CAAC,kBAAkB,EAAE,CAAC;YAC5C,oBAAoB,CAAC,kBAAkB,GAAG,SAAS,CAAC;QACtD,CAAC;QAED,MAAM,UAAU,GAAG,yBAAyB,CAAC,QAAQ,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT
|
1
|
+
{"version":3,"file":"StorageClient.js","sourceRoot":"","sources":["../../../src/StorageClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAY,oBAAoB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAa5E;;GAEG;AACH,MAAM,OAAgB,aAAa;IA4BjC;;;;OAIG;IACH,YAAsB,GAAW,EAAE,QAAkB;QACnD,iFAAiF;QACjF,IAAI,CAAC,GAAG,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,WAAW,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC;QAE9C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC/F,4EAA4E;QAC5E,MAAM,oBAAoB,GAAG,IAAI,CAAC,oBAA2B,CAAC;QAC9D,IAAI,oBAAoB,CAAC,kBAAkB,EAAE,CAAC;YAC5C,oBAAoB,CAAC,kBAAkB,GAAG,SAAS,CAAC;QACtD,CAAC;QAED,MAAM,UAAU,GAAG,yBAAyB,CAAC,QAAQ,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { StorageClient as StorageClientContext } from \"./generated/src/\";\nimport { StorageContextClient } from \"./StorageContextClient\";\nimport { Pipeline, getCoreClientOptions, getCredentialFromPipeline } from \"./Pipeline\";\nimport { escapeURLPath, getAccountNameFromUrl } from \"./utils/utils.common\";\nimport { OperationTracingOptions } from \"@azure/core-tracing\";\nimport { AnonymousCredential } from \"../../storage-blob/src/credentials/AnonymousCredential\";\nimport { StorageSharedKeyCredential } from \"../../storage-blob/src/credentials/StorageSharedKeyCredential\";\nimport { TokenCredential } from \"@azure/core-auth\";\n\n/**\n * An interface for options common to every remote operation.\n */\nexport interface CommonOptions {\n tracingOptions?: OperationTracingOptions;\n}\n\n/**\n * A StorageClient represents a base client class for ServiceClient, ContainerClient and etc.\n */\nexport abstract class StorageClient {\n /**\n * URL string value.\n */\n public readonly url: string;\n public readonly accountName: string;\n\n /**\n * Request policy pipeline.\n *\n * @internal\n */\n protected readonly pipeline: Pipeline;\n\n /**\n * Credential in the pipeline to authenticate requests to the service, such as AnonymousCredential, StorageSharedKeyCredential.\n * Initialized to an AnonymousCredential if not able to retrieve it from the pipeline.\n *\n * @internal\n */\n protected readonly credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential;\n\n /**\n * StorageClient is a reference to protocol layer operations entry, which is\n * generated by AutoRest generator.\n */\n protected readonly storageClientContext: StorageClientContext;\n\n /**\n * Creates an instance of StorageClient.\n * @param url -\n * @param pipeline -\n */\n protected constructor(url: string, pipeline: Pipeline) {\n // URL should be encoded and only once, protocol layer shouldn't encode URL again\n this.url = escapeURLPath(url);\n this.accountName = getAccountNameFromUrl(url);\n\n this.pipeline = pipeline;\n this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline));\n // Remove the default content-type in generated code of StorageClientContext\n const storageClientContext = this.storageClientContext as any;\n if (storageClientContext.requestContentType) {\n storageClientContext.requestContentType = undefined;\n }\n\n const credential = getCredentialFromPipeline(pipeline);\n this.credential = credential;\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StorageContextClient.js","sourceRoot":"","sources":["../../../src/StorageContextClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,aAAa;IACrD,KAAK,CAAC,oBAAoB,CACxB,kBAAsC,EACtC,aAA4B;QAE5B,MAAM,mBAAmB,qBAAQ,aAAa,CAAE,CAAC;QAEjD,IACE,mBAAmB,CAAC,IAAI,KAAK,cAAc;YAC3C,mBAAmB,CAAC,IAAI,KAAK,0BAA0B;YACvD,mBAAmB,CAAC,IAAI,KAAK,qCAAqC,EAClE,CAAC;YACD,mBAAmB,CAAC,IAAI,GAAG,EAAE,CAAC;QAChC,CAAC;QACD,OAAO,KAAK,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;IAC7E,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT
|
1
|
+
{"version":3,"file":"StorageContextClient.js","sourceRoot":"","sources":["../../../src/StorageContextClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,aAAa;IACrD,KAAK,CAAC,oBAAoB,CACxB,kBAAsC,EACtC,aAA4B;QAE5B,MAAM,mBAAmB,qBAAQ,aAAa,CAAE,CAAC;QAEjD,IACE,mBAAmB,CAAC,IAAI,KAAK,cAAc;YAC3C,mBAAmB,CAAC,IAAI,KAAK,0BAA0B;YACvD,mBAAmB,CAAC,IAAI,KAAK,qCAAqC,EAClE,CAAC;YACD,mBAAmB,CAAC,IAAI,GAAG,EAAE,CAAC;QAChC,CAAC;QACD,OAAO,KAAK,CAAC,oBAAoB,CAAC,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;IAC7E,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { OperationArguments, OperationSpec } from \"@azure/core-client\";\nimport { StorageClient } from \"./generated/src\";\n\n/**\n * @internal\n */\nexport class StorageContextClient extends StorageClient {\n async sendOperationRequest<T>(\n operationArguments: OperationArguments,\n operationSpec: OperationSpec,\n ): Promise<T> {\n const operationSpecToSend = { ...operationSpec };\n\n if (\n operationSpecToSend.path === \"/{shareName}\" ||\n operationSpecToSend.path === \"/{shareName}/{directory}\" ||\n operationSpecToSend.path === \"/{shareName}/{directory}/{fileName}\"\n ) {\n operationSpecToSend.path = \"\";\n }\n return super.sendOperationRequest(operationArguments, operationSpecToSend);\n }\n}\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT
|
2
|
+
// Licensed under the MIT License.
|
3
3
|
import { StorageRetryPolicy, StorageRetryPolicyType } from "./policies/StorageRetryPolicy";
|
4
4
|
export { StorageRetryPolicyType, StorageRetryPolicy };
|
5
5
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StorageRetryPolicyFactory.js","sourceRoot":"","sources":["../../../src/StorageRetryPolicyFactory.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE3F,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,CAAC;AAyCtD;;GAEG;AACH,MAAM,OAAO,yBAAyB;IAGpC;;;OAGG;IACH,YAAY,YAAkC;QAC5C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,UAAyB,EAAE,OAA6B;QACpE,OAAO,IAAI,kBAAkB,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT
|
1
|
+
{"version":3,"file":"StorageRetryPolicyFactory.js","sourceRoot":"","sources":["../../../src/StorageRetryPolicyFactory.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAOlC,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAE3F,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,CAAC;AAyCtD;;GAEG;AACH,MAAM,OAAO,yBAAyB;IAGpC;;;OAGG;IACH,YAAY,YAAkC;QAC5C,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,UAAyB,EAAE,OAA6B;QACpE,OAAO,IAAI,kBAAkB,CAAC,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;IACxE,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n RequestPolicy,\n RequestPolicyOptionsLike as RequestPolicyOptions,\n RequestPolicyFactory,\n} from \"@azure/core-http-compat\";\nimport { StorageRetryPolicy, StorageRetryPolicyType } from \"./policies/StorageRetryPolicy\";\n\nexport { StorageRetryPolicyType, StorageRetryPolicy };\n\n/**\n * Storage Blob retry options interface.\n */\nexport interface StorageRetryOptions {\n /**\n * Optional. StorageRetryPolicyType, default is exponential retry policy.\n */\n readonly retryPolicyType?: StorageRetryPolicyType;\n\n /**\n * Optional. Max try number of attempts, default is 4.\n * A value of 1 means 1 try and no retries.\n * A value smaller than 1 means default retry number of attempts.\n */\n readonly maxTries?: number;\n\n /**\n * Optional. Indicates the maximum time in ms allowed for any single try of an HTTP request.\n * A value of zero or undefined means no default timeout on SDK client, Azure\n * Storage server's default timeout policy will be used.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/setting-timeouts-for-blob-service-operations\n */\n readonly tryTimeoutInMs?: number;\n\n /**\n * Optional. Specifies the amount of delay to use before retrying an operation (default is 4s or 4 * 1000ms).\n * The delay increases (exponentially or linearly) with each retry up to a maximum specified by\n * maxRetryDelayInMs. If you specify 0, then you must also specify 0 for maxRetryDelayInMs.\n */\n readonly retryDelayInMs?: number;\n\n /**\n * Optional. Specifies the maximum delay allowed before retrying an operation (default is 120s or 120 * 1000ms).\n * If you specify 0, then you must also specify 0 for retryDelayInMs.\n */\n readonly maxRetryDelayInMs?: number;\n}\n\n/**\n * StorageRetryPolicyFactory is a factory class helping generating {@link StorageRetryPolicy} objects.\n */\nexport class StorageRetryPolicyFactory implements RequestPolicyFactory {\n private retryOptions?: StorageRetryOptions;\n\n /**\n * Creates an instance of StorageRetryPolicyFactory.\n * @param retryOptions -\n */\n constructor(retryOptions?: StorageRetryOptions) {\n this.retryOptions = retryOptions;\n }\n\n /**\n * Creates a StorageRetryPolicy object.\n *\n * @param nextPolicy -\n * @param options -\n */\n public create(nextPolicy: RequestPolicy, options: RequestPolicyOptions): StorageRetryPolicy {\n return new StorageRetryPolicy(nextPolicy, options, this.retryOptions);\n }\n}\n"]}
|
@@ -26,7 +26,7 @@ export class StorageClient extends coreHttpCompat.ExtendedServiceClient {
|
|
26
26
|
const defaults = {
|
27
27
|
requestContentType: "application/json; charset=utf-8"
|
28
28
|
};
|
29
|
-
const packageDetails = `azsdk-js-azure-storage-file-share/12.25.0
|
29
|
+
const packageDetails = `azsdk-js-azure-storage-file-share/12.25.0`;
|
30
30
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
31
31
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
32
32
|
: `${packageDetails}`;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"storageClient.js","sourceRoot":"","sources":["../../../../../src/generated/src/storageClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAI/E,MAAM,OAAO,aAAc,SAAQ,cAAc,CAAC,qBAAqB;IAKrE;;;;;OAKG;IACH,YAAY,GAAW,EAAE,OAAqC;;QAC5D,IAAI,GAAG,KAAK,SAAS,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAgC;YAC5C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,
|
1
|
+
{"version":3,"file":"storageClient.js","sourceRoot":"","sources":["../../../../../src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,CAAC,OAAO,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;CAMF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreHttpCompat from \"@azure/core-http-compat\";\nimport { ServiceImpl, ShareImpl, DirectoryImpl, FileImpl } from \"./operations\";\nimport { Service, Share, Directory, File } from \"./operationsInterfaces\";\nimport { StorageClientOptionalParams } from \"./models\";\n\nexport class StorageClient extends coreHttpCompat.ExtendedServiceClient {\n url: string;\n version: string;\n fileRangeWriteFromUrl: string;\n\n /**\n * Initializes a new instance of the StorageClient class.\n * @param url The URL of the service account, share, directory or file that is the target of the\n * desired operation.\n * @param options The parameter options\n */\n constructor(url: string, options?: StorageClientOptionalParams) {\n if (url === undefined) {\n throw new Error(\"'url' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: StorageClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-azure-storage-file-share/12.25.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"{url}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.url = url;\n\n // Assigning values to Constant parameters\n this.version = options.version || \"2024-11-04\";\n this.fileRangeWriteFromUrl = options.fileRangeWriteFromUrl || \"update\";\n this.service = new ServiceImpl(this);\n this.share = new ShareImpl(this);\n this.directory = new DirectoryImpl(this);\n this.file = new FileImpl(this);\n }\n\n service: Service;\n share: Share;\n directory: Directory;\n file: File;\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"generatedModels.js","sourceRoot":"","sources":["../../../src/generatedModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAmSlC,yEAAyE;AACzE,MAAM,CAAN,IAAY,qBAEX;AAFD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;AACnB,CAAC,EAFW,qBAAqB,KAArB,qBAAqB,QAEhC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n DirectoryCreateHeaders,\n DirectoryDeleteHeaders,\n DirectoryGetPropertiesHeaders,\n DirectoryListFilesAndDirectoriesSegmentHeaders,\n DirectoryListHandlesHeaders,\n DirectoryRenameHeaders,\n DirectorySetMetadataHeaders,\n DirectorySetPropertiesHeaders,\n FileAbortCopyHeaders,\n FileCreateHeaders,\n FileDeleteHeaders,\n FileDownloadHeaders,\n FileDownloadResponse,\n FileGetPropertiesHeaders,\n FileGetRangeListHeaders,\n FileListHandlesHeaders,\n FileProperty,\n FileRenameHeaders,\n FileServiceProperties,\n FileSetHttpHeadersHeaders,\n FileSetMetadataHeaders,\n FileStartCopyHeaders,\n FileUploadRangeFromURLHeaders,\n FileUploadRangeHeaders,\n ServiceGetPropertiesHeaders,\n ServiceSetPropertiesHeaders,\n ShareCreateHeaders,\n ShareCreatePermissionHeaders,\n ShareCreateSnapshotHeaders,\n ShareDeleteHeaders,\n ShareFileRangeList,\n ShareGetAccessPolicyHeaders,\n ShareGetPermissionHeaders,\n ShareGetPropertiesHeaders,\n ShareGetStatisticsHeaders,\n SharePermission,\n ShareSetAccessPolicyHeaders,\n ShareSetMetadataHeaders,\n ShareStats,\n} from \"./generated/src/models\";\n\n/** Contains response data for the create operation. */\nexport type DirectoryCreateResponse = WithResponse<DirectoryCreateHeaders, DirectoryCreateHeaders>;\n\n/** Contains response data for the delete operation. */\nexport type DirectoryDeleteResponse = WithResponse<DirectoryDeleteHeaders, DirectoryDeleteHeaders>;\n\n/** Contains response data for the getProperties operation. */\nexport type DirectoryGetPropertiesResponse = WithResponse<\n DirectoryGetPropertiesHeaders,\n DirectoryGetPropertiesHeaders\n>;\n\n/** Contains response data for the listFilesAndDirectoriesSegment operation. */\nexport type DirectoryListFilesAndDirectoriesSegmentResponse = WithResponse<\n DirectoryListFilesAndDirectoriesSegmentHeaders & ListFilesAndDirectoriesSegmentResponse,\n DirectoryListFilesAndDirectoriesSegmentHeaders,\n ListFilesAndDirectoriesSegmentResponse\n>;\n\n/** Contains response data for the listHandles operation. */\nexport type DirectoryListHandlesResponse = WithResponse<\n DirectoryListHandlesHeaders & ListHandlesResponse,\n DirectoryListHandlesHeaders,\n ListHandlesResponse\n>;\n\n/** Contains response data for the setMetadata operation. */\nexport type DirectorySetMetadataResponse = WithResponse<\n DirectorySetMetadataHeaders,\n DirectorySetMetadataHeaders\n>;\n\n/** Contains response data for the setProperties operation. */\nexport type DirectorySetPropertiesResponse = WithResponse<\n DirectorySetPropertiesHeaders,\n DirectorySetPropertiesHeaders\n>;\n\n/** Contains response data for the abortCopy operation. */\nexport type FileAbortCopyResponse = WithResponse<FileAbortCopyHeaders, FileAbortCopyHeaders>;\n\n/** Contains response data for the create operation. */\nexport type FileCreateResponse = WithResponse<FileCreateHeaders, FileCreateHeaders>;\n\n/** Contains response data for the delete operation. */\nexport type FileDeleteResponse = WithResponse<FileDeleteHeaders, FileDeleteHeaders>;\n\n/** Contains response data for the getProperties operation. */\nexport type FileGetPropertiesResponse = WithResponse<\n FileGetPropertiesHeaders,\n FileGetPropertiesHeaders\n>;\n\n/** Contains response data for the listHandles operation. */\nexport type FileListHandlesResponse = WithResponse<\n FileListHandlesHeaders & ListHandlesResponse,\n FileListHandlesHeaders,\n ListHandlesResponse\n>;\n\n/** Contains response data for the setMetadata operation. */\nexport type FileSetMetadataResponse = WithResponse<FileSetMetadataHeaders, FileSetMetadataHeaders>;\n\n/** Contains response data for the startCopy operation. */\nexport type FileStartCopyResponse = WithResponse<FileStartCopyHeaders, FileStartCopyHeaders>;\n\n/** Contains response data for the uploadRange operation. */\nexport type FileUploadRangeResponse = WithResponse<FileUploadRangeHeaders, FileUploadRangeHeaders>;\n\n/** Contains response data for the getProperties operation. */\nexport type ServiceGetPropertiesResponse = WithResponse<\n ServiceGetPropertiesHeaders & FileServiceProperties,\n ServiceGetPropertiesHeaders,\n FileServiceProperties\n>;\n\n/** Contains response data for the setProperties operation. */\nexport type ServiceSetPropertiesResponse = WithResponse<\n ServiceSetPropertiesHeaders,\n ServiceSetPropertiesHeaders\n>;\n\n/** Contains response data for the createPermission operation. */\nexport type ShareCreatePermissionResponse = WithResponse<\n ShareCreatePermissionHeaders,\n ShareCreatePermissionHeaders\n>;\n\n/** Contains response data for the create operation. */\nexport type ShareCreateResponse = WithResponse<ShareCreateHeaders, ShareCreateHeaders>;\n\n/** Contains response data for the createSnapshot operation. */\nexport type ShareCreateSnapshotResponse = WithResponse<\n ShareCreateSnapshotHeaders,\n ShareCreateSnapshotHeaders\n>;\n\n/** Contains response data for the delete operation. */\nexport type ShareDeleteResponse = WithResponse<ShareDeleteHeaders, ShareDeleteHeaders>;\n\n/** Contains response data for the getPermission operation. */\nexport type ShareGetPermissionResponse = WithResponse<\n ShareGetPermissionHeaders & SharePermission,\n ShareGetPermissionHeaders,\n SharePermission\n>;\n\n/** Contains response data for the setAccessPolicy operation. */\nexport type ShareSetAccessPolicyResponse = WithResponse<\n ShareSetAccessPolicyHeaders,\n ShareGetAccessPolicyHeaders\n>;\n\n/** Contains response data for the setMetadata operation. */\nexport type ShareSetMetadataResponse = WithResponse<\n ShareSetMetadataHeaders,\n ShareSetMetadataHeaders\n>;\n\n/** Contains response data for the setProperties operation. */\nexport type ShareSetPropertiesResponse = WithResponse<\n ShareSetPropertiesHeaders,\n ShareSetPropertiesHeaders\n>;\n\n/** Contains response data for the rename operation. */\nexport type DirectoryRenameResponse = WithResponse<DirectoryRenameHeaders, DirectoryRenameHeaders>;\n\n/** Contains response data for the download operation. */\nexport type FileDownloadResponseModel = WithResponse<FileDownloadResponse, FileDownloadHeaders>;\n\n/** Contains response data for the uploadRangeFromURL operation. */\nexport type FileUploadRangeFromURLResponse = WithResponse<\n FileUploadRangeFromURLHeaders,\n FileUploadRangeFromURLHeaders\n>;\n\n/** Contains response data for the getProperties operation. */\nexport type ShareGetPropertiesResponseModel = WithResponse<\n ShareGetPropertiesHeaders,\n ShareGetPropertiesHeaders\n>;\n\n/** Contains response data for the getStatistics operation. */\nexport type ShareGetStatisticsResponseModel = WithResponse<\n ShareGetStatisticsHeaders & ShareStats,\n ShareGetStatisticsHeaders,\n ShareStats\n>;\n\n/** Contains response data for the getRangeList operation. */\nexport type FileGetRangeListDiffResponse = WithResponse<\n FileGetRangeListHeaders & ShareFileRangeList,\n FileGetRangeListHeaders,\n ShareFileRangeList\n>;\n\n/** Contains response data for the setHttpHeaders operation. */\nexport type FileSetHTTPHeadersResponse = WithResponse<\n FileSetHttpHeadersHeaders,\n FileSetHttpHeadersHeaders\n>;\n\n/** Contains response data for the rename operation. */\nexport type FileRenameResponse = WithResponse<FileRenameHeaders, FileRenameHeaders>;\n\n// explicitly exporting types that we need.\n\nexport {\n CopyStatusType,\n DeleteSnapshotsOptionType,\n FileDownloadHeaders,\n FileDownloadOptionalParams,\n FileGetRangeListHeaders,\n FileLastWrittenMode,\n FileServiceProperties,\n FileUploadRangeFromURLOptionalParams,\n PermissionCopyModeType,\n ListSharesIncludeType,\n FileRange as RangeModel,\n ShareGetAccessPolicyHeaders,\n ShareItemInternal,\n SignedIdentifier as SignedIdentifierModel,\n SourceModifiedAccessConditions,\n FileForceCloseHandlesHeaders,\n DirectoryForceCloseHandlesHeaders,\n DirectoryCreateHeaders,\n DirectoryDeleteHeaders,\n DirectoryGetPropertiesHeaders,\n DirectoryListFilesAndDirectoriesSegmentHeaders,\n DirectoryRenameHeaders,\n DirectoryListHandlesHeaders,\n DirectorySetMetadataHeaders,\n DirectorySetPropertiesHeaders,\n FileAbortCopyHeaders,\n FileCreateHeaders,\n FileDeleteHeaders,\n FileGetPropertiesHeaders,\n FilePermissionFormat,\n FileProperty,\n FileListHandlesHeaders,\n FileRenameHeaders,\n CorsRule,\n Metrics,\n FileSetHttpHeadersHeaders as FileSetHTTPHeadersHeaders,\n FileSetMetadataHeaders,\n FileStartCopyHeaders,\n FileUploadRangeFromURLHeaders,\n FileUploadRangeHeaders,\n ServiceGetPropertiesHeaders,\n ListSharesResponse as ListSharesResponseModel,\n RetentionPolicy,\n ServiceListSharesSegmentHeaders,\n ServiceSetPropertiesHeaders,\n ShareCreatePermissionHeaders,\n ShareCreateHeaders,\n ShareCreateSnapshotHeaders,\n ShareDeleteHeaders,\n SharePermission,\n ShareGetPermissionHeaders,\n ShareGetPropertiesHeaders,\n ShareStats,\n ShareGetStatisticsHeaders,\n SharePropertiesInternal,\n ShareSetAccessPolicyHeaders,\n ShareSetMetadataHeaders,\n ShareSetPropertiesHeaders,\n ShareTokenIntent,\n AccessPolicy,\n LeaseAccessConditions,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType,\n CopyFileSmbInfo,\n ShareProtocolSettings,\n ShareSmbSettings,\n SmbMultichannel,\n ShareFileRangeList,\n ClearRange,\n ShareAccessTier,\n ShareRootSquash,\n FileDownloadResponse as RawFileDownloadResponse,\n} from \"./generated/src/models\";\n\nimport { ShareSetPropertiesHeaders } from \"./generated/src/models\";\nimport { WithResponse } from \"./utils/utils.common\";\n\n/** Known values of {@link ShareTokenIntent} that the service accepts. */\nexport enum KnownShareTokenIntent {\n Backup = \"backup\",\n}\n\n/**\n * Contains response data for the setQuota operation.\n */\nexport type ShareSetQuotaResponse = WithResponse<ShareSetQuotaHeaders, ShareSetQuotaHeaders>;\n\n/**\n * Defines headers for setQuota operation.\n */\nexport type ShareSetQuotaHeaders = ShareSetPropertiesHeaders;\n\n/** A listed file item. */\nexport interface FileItem {\n name: string;\n fileId?: string;\n /** File properties. */\n properties: FileProperty;\n attributes?: string;\n permissionKey?: string;\n}\n\n/** A listed directory item. */\nexport interface DirectoryItem {\n name: string;\n fileId?: string;\n /** File properties. */\n properties?: FileProperty;\n attributes?: string;\n permissionKey?: string;\n}\n\n/** Abstract for entries that can be listed from Directory. */\nexport interface FilesAndDirectoriesListSegment {\n directoryItems: DirectoryItem[];\n fileItems: FileItem[];\n}\n\n/** An enumeration of directories and files. */\nexport interface ListFilesAndDirectoriesSegmentResponse {\n serviceEndpoint: string;\n shareName: string;\n shareSnapshot?: string;\n directoryPath: string;\n prefix: string;\n marker?: string;\n maxResults?: number;\n /** Abstract for entries that can be listed from Directory. */\n segment: FilesAndDirectoriesListSegment;\n continuationToken: string;\n directoryId?: string;\n}\n\n/** Defines values for AccessRight. */\nexport type ShareFileHandleAccessRights = \"Read\" | \"Write\" | \"Delete\";\n\n/** A listed Azure Storage handle item. */\nexport interface HandleItem {\n /** XSMB service handle ID */\n handleId: string;\n /** File or directory name including full path starting from share root */\n path: string;\n /** FileId uniquely identifies the file or directory. */\n fileId: string;\n /** ParentId uniquely identifies the parent directory of the object. */\n parentId?: string;\n /** SMB session ID in context of which the file handle was opened */\n sessionId: string;\n /** Client IP that opened the handle */\n clientIp: string;\n /** Name of the client machine where the share is being mounted */\n clientName: string;\n /** Time when the session that previously opened the handle has last been reconnected. (UTC) */\n openTime: Date;\n /** Time handle was last connected to (UTC) */\n lastReconnectTime?: Date;\n accessRightList?: ShareFileHandleAccessRights[];\n}\n\n/** An enumeration of handles. */\nexport interface ListHandlesResponse {\n handleList?: HandleItem[];\n continuationToken: string;\n}\n"]}
|
1
|
+
{"version":3,"file":"generatedModels.js","sourceRoot":"","sources":["../../../src/generatedModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAmSlC,yEAAyE;AACzE,MAAM,CAAN,IAAY,qBAEX;AAFD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;AACnB,CAAC,EAFW,qBAAqB,KAArB,qBAAqB,QAEhC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n DirectoryCreateHeaders,\n DirectoryDeleteHeaders,\n DirectoryGetPropertiesHeaders,\n DirectoryListFilesAndDirectoriesSegmentHeaders,\n DirectoryListHandlesHeaders,\n DirectoryRenameHeaders,\n DirectorySetMetadataHeaders,\n DirectorySetPropertiesHeaders,\n FileAbortCopyHeaders,\n FileCreateHeaders,\n FileDeleteHeaders,\n FileDownloadHeaders,\n FileDownloadResponse,\n FileGetPropertiesHeaders,\n FileGetRangeListHeaders,\n FileListHandlesHeaders,\n FileProperty,\n FileRenameHeaders,\n FileServiceProperties,\n FileSetHttpHeadersHeaders,\n FileSetMetadataHeaders,\n FileStartCopyHeaders,\n FileUploadRangeFromURLHeaders,\n FileUploadRangeHeaders,\n ServiceGetPropertiesHeaders,\n ServiceSetPropertiesHeaders,\n ShareCreateHeaders,\n ShareCreatePermissionHeaders,\n ShareCreateSnapshotHeaders,\n ShareDeleteHeaders,\n ShareFileRangeList,\n ShareGetAccessPolicyHeaders,\n ShareGetPermissionHeaders,\n ShareGetPropertiesHeaders,\n ShareGetStatisticsHeaders,\n SharePermission,\n ShareSetAccessPolicyHeaders,\n ShareSetMetadataHeaders,\n ShareStats,\n} from \"./generated/src/models\";\n\n/** Contains response data for the create operation. */\nexport type DirectoryCreateResponse = WithResponse<DirectoryCreateHeaders, DirectoryCreateHeaders>;\n\n/** Contains response data for the delete operation. */\nexport type DirectoryDeleteResponse = WithResponse<DirectoryDeleteHeaders, DirectoryDeleteHeaders>;\n\n/** Contains response data for the getProperties operation. */\nexport type DirectoryGetPropertiesResponse = WithResponse<\n DirectoryGetPropertiesHeaders,\n DirectoryGetPropertiesHeaders\n>;\n\n/** Contains response data for the listFilesAndDirectoriesSegment operation. */\nexport type DirectoryListFilesAndDirectoriesSegmentResponse = WithResponse<\n DirectoryListFilesAndDirectoriesSegmentHeaders & ListFilesAndDirectoriesSegmentResponse,\n DirectoryListFilesAndDirectoriesSegmentHeaders,\n ListFilesAndDirectoriesSegmentResponse\n>;\n\n/** Contains response data for the listHandles operation. */\nexport type DirectoryListHandlesResponse = WithResponse<\n DirectoryListHandlesHeaders & ListHandlesResponse,\n DirectoryListHandlesHeaders,\n ListHandlesResponse\n>;\n\n/** Contains response data for the setMetadata operation. */\nexport type DirectorySetMetadataResponse = WithResponse<\n DirectorySetMetadataHeaders,\n DirectorySetMetadataHeaders\n>;\n\n/** Contains response data for the setProperties operation. */\nexport type DirectorySetPropertiesResponse = WithResponse<\n DirectorySetPropertiesHeaders,\n DirectorySetPropertiesHeaders\n>;\n\n/** Contains response data for the abortCopy operation. */\nexport type FileAbortCopyResponse = WithResponse<FileAbortCopyHeaders, FileAbortCopyHeaders>;\n\n/** Contains response data for the create operation. */\nexport type FileCreateResponse = WithResponse<FileCreateHeaders, FileCreateHeaders>;\n\n/** Contains response data for the delete operation. */\nexport type FileDeleteResponse = WithResponse<FileDeleteHeaders, FileDeleteHeaders>;\n\n/** Contains response data for the getProperties operation. */\nexport type FileGetPropertiesResponse = WithResponse<\n FileGetPropertiesHeaders,\n FileGetPropertiesHeaders\n>;\n\n/** Contains response data for the listHandles operation. */\nexport type FileListHandlesResponse = WithResponse<\n FileListHandlesHeaders & ListHandlesResponse,\n FileListHandlesHeaders,\n ListHandlesResponse\n>;\n\n/** Contains response data for the setMetadata operation. */\nexport type FileSetMetadataResponse = WithResponse<FileSetMetadataHeaders, FileSetMetadataHeaders>;\n\n/** Contains response data for the startCopy operation. */\nexport type FileStartCopyResponse = WithResponse<FileStartCopyHeaders, FileStartCopyHeaders>;\n\n/** Contains response data for the uploadRange operation. */\nexport type FileUploadRangeResponse = WithResponse<FileUploadRangeHeaders, FileUploadRangeHeaders>;\n\n/** Contains response data for the getProperties operation. */\nexport type ServiceGetPropertiesResponse = WithResponse<\n ServiceGetPropertiesHeaders & FileServiceProperties,\n ServiceGetPropertiesHeaders,\n FileServiceProperties\n>;\n\n/** Contains response data for the setProperties operation. */\nexport type ServiceSetPropertiesResponse = WithResponse<\n ServiceSetPropertiesHeaders,\n ServiceSetPropertiesHeaders\n>;\n\n/** Contains response data for the createPermission operation. */\nexport type ShareCreatePermissionResponse = WithResponse<\n ShareCreatePermissionHeaders,\n ShareCreatePermissionHeaders\n>;\n\n/** Contains response data for the create operation. */\nexport type ShareCreateResponse = WithResponse<ShareCreateHeaders, ShareCreateHeaders>;\n\n/** Contains response data for the createSnapshot operation. */\nexport type ShareCreateSnapshotResponse = WithResponse<\n ShareCreateSnapshotHeaders,\n ShareCreateSnapshotHeaders\n>;\n\n/** Contains response data for the delete operation. */\nexport type ShareDeleteResponse = WithResponse<ShareDeleteHeaders, ShareDeleteHeaders>;\n\n/** Contains response data for the getPermission operation. */\nexport type ShareGetPermissionResponse = WithResponse<\n ShareGetPermissionHeaders & SharePermission,\n ShareGetPermissionHeaders,\n SharePermission\n>;\n\n/** Contains response data for the setAccessPolicy operation. */\nexport type ShareSetAccessPolicyResponse = WithResponse<\n ShareSetAccessPolicyHeaders,\n ShareGetAccessPolicyHeaders\n>;\n\n/** Contains response data for the setMetadata operation. */\nexport type ShareSetMetadataResponse = WithResponse<\n ShareSetMetadataHeaders,\n ShareSetMetadataHeaders\n>;\n\n/** Contains response data for the setProperties operation. */\nexport type ShareSetPropertiesResponse = WithResponse<\n ShareSetPropertiesHeaders,\n ShareSetPropertiesHeaders\n>;\n\n/** Contains response data for the rename operation. */\nexport type DirectoryRenameResponse = WithResponse<DirectoryRenameHeaders, DirectoryRenameHeaders>;\n\n/** Contains response data for the download operation. */\nexport type FileDownloadResponseModel = WithResponse<FileDownloadResponse, FileDownloadHeaders>;\n\n/** Contains response data for the uploadRangeFromURL operation. */\nexport type FileUploadRangeFromURLResponse = WithResponse<\n FileUploadRangeFromURLHeaders,\n FileUploadRangeFromURLHeaders\n>;\n\n/** Contains response data for the getProperties operation. */\nexport type ShareGetPropertiesResponseModel = WithResponse<\n ShareGetPropertiesHeaders,\n ShareGetPropertiesHeaders\n>;\n\n/** Contains response data for the getStatistics operation. */\nexport type ShareGetStatisticsResponseModel = WithResponse<\n ShareGetStatisticsHeaders & ShareStats,\n ShareGetStatisticsHeaders,\n ShareStats\n>;\n\n/** Contains response data for the getRangeList operation. */\nexport type FileGetRangeListDiffResponse = WithResponse<\n FileGetRangeListHeaders & ShareFileRangeList,\n FileGetRangeListHeaders,\n ShareFileRangeList\n>;\n\n/** Contains response data for the setHttpHeaders operation. */\nexport type FileSetHTTPHeadersResponse = WithResponse<\n FileSetHttpHeadersHeaders,\n FileSetHttpHeadersHeaders\n>;\n\n/** Contains response data for the rename operation. */\nexport type FileRenameResponse = WithResponse<FileRenameHeaders, FileRenameHeaders>;\n\n// explicitly exporting types that we need.\n\nexport {\n CopyStatusType,\n DeleteSnapshotsOptionType,\n FileDownloadHeaders,\n FileDownloadOptionalParams,\n FileGetRangeListHeaders,\n FileLastWrittenMode,\n FileServiceProperties,\n FileUploadRangeFromURLOptionalParams,\n PermissionCopyModeType,\n ListSharesIncludeType,\n FileRange as RangeModel,\n ShareGetAccessPolicyHeaders,\n ShareItemInternal,\n SignedIdentifier as SignedIdentifierModel,\n SourceModifiedAccessConditions,\n FileForceCloseHandlesHeaders,\n DirectoryForceCloseHandlesHeaders,\n DirectoryCreateHeaders,\n DirectoryDeleteHeaders,\n DirectoryGetPropertiesHeaders,\n DirectoryListFilesAndDirectoriesSegmentHeaders,\n DirectoryRenameHeaders,\n DirectoryListHandlesHeaders,\n DirectorySetMetadataHeaders,\n DirectorySetPropertiesHeaders,\n FileAbortCopyHeaders,\n FileCreateHeaders,\n FileDeleteHeaders,\n FileGetPropertiesHeaders,\n FilePermissionFormat,\n FileProperty,\n FileListHandlesHeaders,\n FileRenameHeaders,\n CorsRule,\n Metrics,\n FileSetHttpHeadersHeaders as FileSetHTTPHeadersHeaders,\n FileSetMetadataHeaders,\n FileStartCopyHeaders,\n FileUploadRangeFromURLHeaders,\n FileUploadRangeHeaders,\n ServiceGetPropertiesHeaders,\n ListSharesResponse as ListSharesResponseModel,\n RetentionPolicy,\n ServiceListSharesSegmentHeaders,\n ServiceSetPropertiesHeaders,\n ShareCreatePermissionHeaders,\n ShareCreateHeaders,\n ShareCreateSnapshotHeaders,\n ShareDeleteHeaders,\n SharePermission,\n ShareGetPermissionHeaders,\n ShareGetPropertiesHeaders,\n ShareStats,\n ShareGetStatisticsHeaders,\n SharePropertiesInternal,\n ShareSetAccessPolicyHeaders,\n ShareSetMetadataHeaders,\n ShareSetPropertiesHeaders,\n ShareTokenIntent,\n AccessPolicy,\n LeaseAccessConditions,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType,\n CopyFileSmbInfo,\n ShareProtocolSettings,\n ShareSmbSettings,\n SmbMultichannel,\n ShareFileRangeList,\n ClearRange,\n ShareAccessTier,\n ShareRootSquash,\n FileDownloadResponse as RawFileDownloadResponse,\n} from \"./generated/src/models\";\n\nimport { ShareSetPropertiesHeaders } from \"./generated/src/models\";\nimport { WithResponse } from \"./utils/utils.common\";\n\n/** Known values of {@link ShareTokenIntent} that the service accepts. */\nexport enum KnownShareTokenIntent {\n Backup = \"backup\",\n}\n\n/**\n * Contains response data for the setQuota operation.\n */\nexport type ShareSetQuotaResponse = WithResponse<ShareSetQuotaHeaders, ShareSetQuotaHeaders>;\n\n/**\n * Defines headers for setQuota operation.\n */\nexport type ShareSetQuotaHeaders = ShareSetPropertiesHeaders;\n\n/** A listed file item. */\nexport interface FileItem {\n name: string;\n fileId?: string;\n /** File properties. */\n properties: FileProperty;\n attributes?: string;\n permissionKey?: string;\n}\n\n/** A listed directory item. */\nexport interface DirectoryItem {\n name: string;\n fileId?: string;\n /** File properties. */\n properties?: FileProperty;\n attributes?: string;\n permissionKey?: string;\n}\n\n/** Abstract for entries that can be listed from Directory. */\nexport interface FilesAndDirectoriesListSegment {\n directoryItems: DirectoryItem[];\n fileItems: FileItem[];\n}\n\n/** An enumeration of directories and files. */\nexport interface ListFilesAndDirectoriesSegmentResponse {\n serviceEndpoint: string;\n shareName: string;\n shareSnapshot?: string;\n directoryPath: string;\n prefix: string;\n marker?: string;\n maxResults?: number;\n /** Abstract for entries that can be listed from Directory. */\n segment: FilesAndDirectoriesListSegment;\n continuationToken: string;\n directoryId?: string;\n}\n\n/** Defines values for AccessRight. */\nexport type ShareFileHandleAccessRights = \"Read\" | \"Write\" | \"Delete\";\n\n/** A listed Azure Storage handle item. */\nexport interface HandleItem {\n /** XSMB service handle ID */\n handleId: string;\n /** File or directory name including full path starting from share root */\n path: string;\n /** FileId uniquely identifies the file or directory. */\n fileId: string;\n /** ParentId uniquely identifies the parent directory of the object. */\n parentId?: string;\n /** SMB session ID in context of which the file handle was opened */\n sessionId: string;\n /** Client IP that opened the handle */\n clientIp: string;\n /** Name of the client machine where the share is being mounted */\n clientName: string;\n /** Time when the session that previously opened the handle has last been reconnected. (UTC) */\n openTime: Date;\n /** Time handle was last connected to (UTC) */\n lastReconnectTime?: Date;\n accessRightList?: ShareFileHandleAccessRights[];\n}\n\n/** An enumeration of handles. */\nexport interface ListHandlesResponse {\n handleList?: HandleItem[];\n continuationToken: string;\n}\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT
|
2
|
+
// Licensed under the MIT License.
|
3
3
|
import { RestError } from "@azure/core-rest-pipeline";
|
4
4
|
export * from "./Clients";
|
5
5
|
export * from "../../storage-blob/src/credentials/AnonymousCredential";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../../../src/index.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,cAAc,WAAW,CAAC;AAC1B,cAAc,wDAAwD,CAAC;AACvE,cAAc,+CAA+C,CAAC;AAY9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EACL,QAAQ,EAGR,cAAc,EACd,WAAW,GAGZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,cAAc,2DAA2D,CAAC;AAC1E,cAAc,kDAAkD,CAAC;AACjE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oDAAoD,CAAC;AACnE,cAAc,sBAAsB,CAAC;AAErC,cAAc,mBAAmB,CAAC;AAQlC,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT
|
1
|
+
{"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../../../src/index.browser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,cAAc,WAAW,CAAC;AAC1B,cAAc,wDAAwD,CAAC;AACvE,cAAc,+CAA+C,CAAC;AAY9D,cAAc,wBAAwB,CAAC;AACvC,OAAO,EACL,QAAQ,EAGR,cAAc,EACd,WAAW,GAGZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,cAAc,2DAA2D,CAAC;AAC1E,cAAc,kDAAkD,CAAC;AACjE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oDAAoD,CAAC;AACnE,cAAc,sBAAsB,CAAC;AAErC,cAAc,mBAAmB,CAAC;AAQlC,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RestError } from \"@azure/core-rest-pipeline\";\n\nexport * from \"./Clients\";\nexport * from \"../../storage-blob/src/credentials/AnonymousCredential\";\nexport * from \"../../storage-blob/src/credentials/Credential\";\nexport { SasIPRange } from \"./SasIPRange\";\nexport { Range } from \"./Range\";\nexport {\n FilePermissionInheritType,\n FilePermissionPreserveType,\n TimeNowType,\n TimePreserveType,\n FileAttributesPreserveType,\n CloseHandlesInfo,\n HttpAuthorization,\n} from \"./models\";\nexport * from \"./FileSystemAttributes\";\nexport {\n Pipeline,\n PipelineLike,\n PipelineOptions,\n isPipelineLike,\n newPipeline,\n StoragePipelineOptions,\n ServiceClientOptions,\n} from \"./Pipeline\";\nexport { BaseRequestPolicy } from \"../../storage-blob/src/policies/RequestPolicy\";\nexport * from \"../../storage-blob/src/policies/AnonymousCredentialPolicy\";\nexport * from \"../../storage-blob/src/policies/CredentialPolicy\";\nexport * from \"./StorageRetryPolicyFactory\";\nexport * from \"../../storage-blob/src/StorageBrowserPolicyFactory\";\nexport * from \"./ShareServiceClient\";\nexport { CommonOptions } from \"./StorageClient\";\nexport * from \"./generatedModels\";\nexport {\n WithResponse,\n ResponseLike,\n ResponseWithBody,\n ResponseWithHeaders,\n HttpResponse,\n} from \"./utils/utils.common\";\nexport { RestError };\nexport { logger } from \"./log\";\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAEL,iCAAiC,GAClC,MAAM,6BAA6B,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAA0B,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAClG,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wDAAwD,CAAC;AACvE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,+DAA+D,CAAC;AAG9E,OAAO,EAaL,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,UAAU,CAAC;AAClB,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EACL,QAAQ,EAGR,cAAc,EACd,WAAW,EAUX,kBAAkB,GAEnB,MAAM,YAAY,CAAC;AACpB,cAAc,2DAA2D,CAAC;AAC1E,cAAc,kDAAkD,CAAC;AACjE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kEAAkE,CAAC;AACjF,cAAc,oDAAoD,CAAC;AACnE,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AAErC,cAAc,mBAAmB,CAAC;AAQlC,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAEL,iCAAiC,GAClC,MAAM,6BAA6B,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAA0B,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAClG,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,wDAAwD,CAAC;AACvE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,+DAA+D,CAAC;AAG9E,OAAO,EAaL,mBAAmB,EACnB,6BAA6B,GAC9B,MAAM,UAAU,CAAC;AAClB,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAClF,OAAO,EACL,QAAQ,EAGR,cAAc,EACd,WAAW,EAUX,kBAAkB,GAEnB,MAAM,YAAY,CAAC;AACpB,cAAc,2DAA2D,CAAC;AAC1E,cAAc,kDAAkD,CAAC;AACjE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kEAAkE,CAAC;AACjF,cAAc,oDAAoD,CAAC;AACnE,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AAErC,cAAc,mBAAmB,CAAC;AAQlC,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RestError } from \"@azure/core-rest-pipeline\";\n\nexport * from \"./AccountSASPermissions\";\nexport * from \"./AccountSASResourceTypes\";\nexport * from \"./AccountSASServices\";\nexport {\n AccountSASSignatureValues,\n generateAccountSASQueryParameters,\n} from \"./AccountSASSignatureValues\";\nexport * from \"./FileSASPermissions\";\nexport { FileSASSignatureValues, generateFileSASQueryParameters } from \"./FileSASSignatureValues\";\nexport * from \"./Clients\";\nexport * from \"./ShareSASPermissions\";\nexport * from \"../../storage-blob/src/credentials/AnonymousCredential\";\nexport * from \"../../storage-blob/src/credentials/Credential\";\nexport * from \"../../storage-blob/src/credentials/StorageSharedKeyCredential\";\nexport { SasIPRange } from \"./SasIPRange\";\nexport { Range } from \"./Range\";\nexport {\n FileAndDirectoryCreateCommonOptions,\n FileAndDirectorySetPropertiesCommonOptions,\n FileHttpHeaders,\n FilePermissionInheritType,\n FilePermissionPreserveType,\n Metadata,\n TimeNowType,\n TimePreserveType,\n FileAttributesPreserveType,\n CloseHandlesInfo,\n ShareProtocols,\n HttpAuthorization,\n StorageFileAudience,\n getFileServiceAccountAudience,\n} from \"./models\";\nexport * from \"./FileSystemAttributes\";\nexport { BaseRequestPolicy } from \"../../storage-blob/src/policies/RequestPolicy\";\nexport {\n Pipeline,\n PipelineLike,\n PipelineOptions,\n isPipelineLike,\n newPipeline,\n StoragePipelineOptions,\n RequestPolicyFactory,\n RequestPolicy,\n RequestPolicyOptions,\n WebResource,\n HttpOperationResponse,\n HttpHeaders,\n HttpRequestBody,\n IHttpClient,\n StorageOAuthScopes,\n ServiceClientOptions,\n} from \"./Pipeline\";\nexport * from \"../../storage-blob/src/policies/AnonymousCredentialPolicy\";\nexport * from \"../../storage-blob/src/policies/CredentialPolicy\";\nexport * from \"./StorageRetryPolicyFactory\";\nexport * from \"../../storage-blob/src/policies/StorageSharedKeyCredentialPolicy\";\nexport * from \"../../storage-blob/src/StorageBrowserPolicyFactory\";\nexport * from \"./ShareServiceClient\";\nexport * from \"./SASQueryParameters\";\nexport { CommonOptions } from \"./StorageClient\";\nexport * from \"./generatedModels\";\nexport {\n WithResponse,\n ResponseLike,\n ResponseWithBody,\n ResponseWithHeaders,\n HttpResponse,\n} from \"./utils/utils.common\";\nexport { RestError };\nexport { logger } from \"./log\";\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../../src/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../../../src/log.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The `@azure/logger` configuration for this package.\n */\nexport const logger = createClientLogger(\"storage-file-share\");\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT
|
2
|
+
// Licensed under the MIT License.
|
3
3
|
import { FileSystemAttributes } from "./FileSystemAttributes";
|
4
4
|
import { truncatedISO8061Date } from "./utils/utils.common";
|
5
5
|
import { logger } from "./log";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAkO/B;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,eAAwB;IACvD,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;QAClC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,gBAAgB,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpD,MAAM,SAAS,GAAmB,EAAE,CAAC;IACrC,KAAK,MAAM,QAAQ,IAAI,gBAAgB,EAAE,CAAC;QACxC,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;YACvB,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC;QAC9B,CAAC;aAAM,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;YAC9B,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC;QAC9B,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,YAA4B,EAAE;IACnE,IAAI,WAAW,GAAG,SAAS,CAAC;IAE5B,IAAI,SAAS,CAAC,UAAU,KAAK,I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;GAEG;AACH,MAAM,UAAU,6BAA6B,CAAC,kBAA0B;IACtE,OAAO,WAAW,kBAAkB,iCAAiC,CAAC;AACxE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { FileSystemAttributes } from \"./FileSystemAttributes\";\nimport { truncatedISO8061Date } from \"./utils/utils.common\";\nimport { logger } from \"./log\";\nimport { FilePermissionFormat, ShareTokenIntent } from \"./generatedModels\";\nimport { StoragePipelineOptions } from \"./Pipeline\";\n\nexport interface Metadata {\n [propertyName: string]: string;\n}\n\nexport interface FileHttpHeaders {\n /**\n * Optional. Sets the file's cache\n * control. If specified, this property is stored with the file and returned\n * with a read request.\n */\n fileCacheControl?: string;\n /**\n * Optional. Sets the file's content type.\n * If specified, this property is stored with the file and returned with a\n * read request.\n */\n fileContentType?: string;\n /**\n * Optional. An MD5 hash of the file\n * content. Note that this hash is not validated, as the hashes for the\n * individual blocks were validated when each was uploaded.\n */\n fileContentMD5?: Uint8Array;\n /**\n * Optional. Sets the file's content\n * encoding. If specified, this property is stored with the file and returned\n * with a read request.\n */\n fileContentEncoding?: string;\n /**\n * Optional. Set the file's content\n * language. If specified, this property is stored with the file and returned\n * with a read request.\n */\n fileContentLanguage?: string;\n /**\n * Optional. Sets the file's\n * Content-Disposition header.\n */\n fileContentDisposition?: string;\n}\n\n/**\n * Indicates inherit file permission from the parent directory.\n */\nexport type FilePermissionInheritType = \"inherit\";\n\n/**\n * Indicates keep existing file permission value unchanged.\n */\nexport type FilePermissionPreserveType = \"preserve\";\n\n/**\n * Indicates setting as the time of the request.\n */\nexport type TimeNowType = \"now\";\n\n/**\n * Indicates keep existing time value unchanged.\n */\nexport type TimePreserveType = \"preserve\";\n\n/**\n * Indicates keep existing file attributes unchanged.\n */\nexport type FileAttributesPreserveType = \"preserve\";\n\nexport interface FileAndDirectoryCreateCommonOptions {\n /**\n * The permission(security descriptor) to be set for the file or directory in the\n * Security Descriptor Definition Language (SDDL) or binary.\n * If specified, it must have an owner, group, and discretionary access control list (DACL).\n * A value of inherit may be passed to inherit from the parent directory.\n *\n * Note that only one of filePermission or filePermissionKey can be specified.\n * And if both are not specified, inherit will be set to filePermission as default value by client library.\n */\n filePermission?: string | FilePermissionInheritType;\n\n /**\n * Optional. Available for version 2023-06-01 and later.\n * Specifies the format in which the permission is returned. Acceptable values are SDDL or binary.\n * If x-ms-file-permission-format is unspecified or explicitly set to SDDL, the permission is returned in SDDL format.\n * If x-ms-file-permission-format is explicitly set to binary, the permission is returned as a base64 string representing the binary encoding of the permission\n */\n filePermissionFormat?: FilePermissionFormat;\n\n /**\n * The key of the permission to be set for the file or directory. This can be created using the Create-Permission API.\n *\n * Note that only one of filePermission or filePermissionKey can be specified.\n */\n filePermissionKey?: string;\n\n /**\n * The file system attributes to be set on the file or directory.\n */\n fileAttributes?: FileSystemAttributes;\n\n /**\n * The Coordinated Universal Time (UTC) creation time property for the directory.\n * A value of now may be used to indicate the time of the request.\n * By default, the value will be set as now.\n */\n creationTime?: Date | TimeNowType;\n\n /**\n * The Coordinated Universal Time (UTC) last write property for the directory.\n * A value of now may be used to indicate the time of the request.\n * By default, the value will be set as now.\n */\n lastWriteTime?: Date | TimeNowType;\n\n /**\n * The Coordinated Universal Time (UTC) change time property for the directory.\n * A value of now may be used to indicate the time of the request.\n * By default, the value will be set to the time of the request.\n */\n changeTime?: Date | TimeNowType;\n}\n\nexport interface FileAndDirectorySetPropertiesCommonOptions {\n /**\n * The permission(security descriptor) to be set for the file or directory in the\n * Security Descriptor Definition Language (SDDL). If specified, it must have an owner, group, and discretionary access control list (DACL).\n * A value of inherit may be passed to inherit from the parent directory.\n * A value of preserve may be passed to keep the value unchanged.\n *\n * Note that only one of filePermission or filePermissionKey can be specified.\n * And if both are not specified, preserve will be set to filePermission as default value by client library.\n */\n filePermission?: string | FilePermissionInheritType | FilePermissionPreserveType;\n\n /**\n * Optional. Available for version 2023-06-01 and later.\n * Specifies the format in which the permission is returned. Acceptable values are SDDL or binary.\n * If x-ms-file-permission-format is unspecified or explicitly set to SDDL, the permission is returned in SDDL format.\n * If x-ms-file-permission-format is explicitly set to binary, the permission is returned as a base64 string representing the binary encoding of the permission\n */\n filePermissionFormat?: FilePermissionFormat;\n\n /**\n * The key of the permission to be set for the file or directory. This can be created using the Create-Permission API.\n *\n * Note that only one of filePermission or filePermissionKey can be specified.\n */\n filePermissionKey?: string;\n\n /**\n * The file system attributes to be set on the file or directory.\n */\n fileAttributes?: FileSystemAttributes | FileAttributesPreserveType;\n\n /**\n * The Coordinated Universal Time (UTC) creation time property for the directory.\n * A value of now may be used to indicate the time of the request.\n * A value of preserve may be passed to keep an existing value unchanged.\n * By default, the value will be set as preserve.\n */\n creationTime?: Date | TimeNowType | TimePreserveType;\n\n /**\n * The Coordinated Universal Time (UTC) last write property for the directory.\n * A value of now may be used to indicate the time of the request.\n * A value of preserve may be passed to keep an existing value unchanged.\n * By default, the value will be set as preserve.\n */\n lastWriteTime?: Date | TimeNowType | TimePreserveType;\n\n /**\n * The Coordinated Universal Time (UTC) change time property for the directory.\n * A value of now may be used to indicate the time of the request.\n * By default, the value will be set to the time of the request.\n */\n changeTime?: Date | TimeNowType;\n}\n\n/**\n * Close handles result information.\n */\nexport interface CloseHandlesInfo {\n closedHandlesCount: number;\n /**\n * Contains count of number of handles that failed to close.\n */\n closeFailureCount?: number;\n}\n\n/**\n * Protocols to enable on the share. For now, only support SMB or NFS.\n */\nexport interface ShareProtocols {\n /**\n * The share can be accessed by SMBv3.0, SMBv2.1 and REST.\n */\n smbEnabled?: boolean;\n /**\n * The share can be accessed by NFSv4.1.\n */\n nfsEnabled?: boolean;\n}\n\nexport interface ShareClientConfig {\n /**\n * The Files OAuth over REST feature requires special permissions to be included in the role definition to use\n * These special permissions will give privileged access to file share data -\n * It will allow users to bypass file/directory level ACL/NTFS permissions and get read/write access to file share data\n * Since this additional permission can be unintended and to prevent unintended and over privileged access,\n * additional checks has been implemented that requires users to explicitly indicate their intent to use these additional permissions.\n * This is done using the fileRequestIntent option.\n * Currently, the only value that the header supports is 'backup'\n * Any user who wishes to use Files OAuth over REST feature has to call the API with the intent header. If the API is not called with the intent header, any subsequent data operation requests will be denied.\n */\n fileRequestIntent?: ShareTokenIntent;\n /** If true, the trailing dot will not be trimmed from the target URI. */\n allowTrailingDot?: boolean;\n /** If true, the trailing dot will not be trimmed from the source URI. */\n allowSourceTrailingDot?: boolean;\n}\n\nexport type ShareClientOptions = StoragePipelineOptions & ShareClientConfig;\n\n/**\n * Convert protocols from joined string to ShareProtocols.\n *\n * @param protocolsString -\n */\nexport function toShareProtocols(protocolsString?: string): ShareProtocols | undefined {\n if (protocolsString === undefined) {\n return undefined;\n }\n\n const protocolStrArray = protocolsString.split(\";\");\n const protocols: ShareProtocols = {};\n for (const protocol of protocolStrArray) {\n if (protocol === \"SMB\") {\n protocols.smbEnabled = true;\n } else if (protocol === \"NFS\") {\n protocols.nfsEnabled = true;\n }\n }\n return protocols;\n}\n\n/**\n * Convert ShareProtocols to joined string.\n *\n * @param protocols -\n */\nexport function toShareProtocolsString(protocols: ShareProtocols = {}): string | undefined {\n let protocolStr = undefined;\n\n if (protocols.smbEnabled === true) {\n protocolStr = \"SMB\";\n }\n if (protocols.nfsEnabled === true) {\n logger.info(\n `Using \"NFS\" in favor of \"SMB\" for the share protocol as currently they can't be supported at the same time.`,\n );\n protocolStr = \"NFS\";\n }\n return protocolStr;\n}\n\nexport function validateFilePermissionOptions(\n filePermission?: string,\n filePermissionKey?: string,\n): void {\n if (filePermission && filePermissionKey) {\n throw new RangeError(\"Only one of filePermission or filePermissionKey can be specified.\");\n }\n}\n\nexport function validateAndSetDefaultsForFileAndDirectoryCreateCommonOptions(\n options: FileAndDirectoryCreateCommonOptions,\n): FileAndDirectoryCreateCommonOptions {\n // Would better deep copy params set by user.\n\n if (!options) {\n options = {};\n }\n\n validateFilePermissionOptions(options.filePermission, options.filePermissionKey);\n\n if (!options.creationTime) {\n options.creationTime = \"now\";\n }\n\n if (!options.lastWriteTime) {\n options.lastWriteTime = \"now\";\n }\n\n if (!options.filePermission && !options.filePermissionKey) {\n options.filePermission = \"inherit\";\n }\n\n return options;\n}\n\nexport function validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(\n options: FileAndDirectorySetPropertiesCommonOptions,\n): FileAndDirectorySetPropertiesCommonOptions {\n // Would better deep copy params set by user.\n\n if (!options) {\n options = {};\n }\n\n validateFilePermissionOptions(options.filePermission, options.filePermissionKey);\n\n if (!options.creationTime) {\n options.creationTime = \"preserve\";\n }\n\n if (!options.lastWriteTime) {\n options.lastWriteTime = \"preserve\";\n }\n\n if (!options.fileAttributes) {\n options.fileAttributes = \"preserve\";\n }\n\n if (!options.filePermission && !options.filePermissionKey) {\n options.filePermission = \"preserve\";\n }\n\n return options;\n}\n\nexport function fileAttributesToString(\n fileAttributes: FileSystemAttributes | FileAttributesPreserveType,\n): string {\n return fileAttributes instanceof FileSystemAttributes\n ? fileAttributes.toString()\n : fileAttributes;\n}\n\nexport function fileCreationTimeToString(\n time: Date | TimeNowType | TimePreserveType | undefined,\n): string | undefined {\n return time instanceof Date ? truncatedISO8061Date(time) : time;\n}\n\nexport function fileLastWriteTimeToString(\n time: Date | TimeNowType | TimePreserveType | undefined,\n): string | undefined {\n return time instanceof Date ? truncatedISO8061Date(time) : time;\n}\n\nexport function fileChangeTimeToString(\n time: Date | TimeNowType | TimePreserveType | undefined,\n): string | undefined {\n return time instanceof Date ? truncatedISO8061Date(time) : time;\n}\n\n/**\n * Represents authentication information in Authorization, ProxyAuthorization,\n * WWW-Authenticate, and Proxy-Authenticate header values.\n */\nexport interface HttpAuthorization {\n /**\n * The scheme to use for authorization.\n */\n scheme: string;\n\n /**\n * the credentials containing the authentication information of the user agent for the resource being requested.\n */\n value: string;\n}\n\n/**\n * Defines the known cloud audiences for Storage.\n */\nexport enum StorageFileAudience {\n /**\n * The OAuth scope to use to retrieve an AAD token for Azure Storage.\n */\n StorageOAuthScopes = \"https://storage.azure.com/.default\",\n}\n\n/**\n * To get the OAuth audience for a storage account for file service.\n */\nexport function getFileServiceAccountAudience(storageAccountName: string): string {\n return `https://${storageAccountName}.file.core.windows.net/.default`;\n}\n"]}
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAkO/B;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,eAAwB;IACvD,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;QAClC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,gBAAgB,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpD,MAAM,SAAS,GAAmB,EAAE,CAAC;IACrC,KAAK,MAAM,QAAQ,IAAI,gBAAgB,EAAE,CAAC;QACxC,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;YACvB,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC;QAC9B,CAAC;aAAM,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;YAC9B,SAAS,CAAC,UAAU,GAAG,IAAI,CAAC;QAC9B,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,YAA4B,EAAE;IACnE,IAAI,WAAW,GAAG,SAAS,CAAC;IAE5B,IAAI,SAAS,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;QAClC,WAAW,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,IAAI,SAAS,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;QAClC,MAAM,CAAC,IAAI,CACT,6GAA6G,CAC9G,CAAC;QACF,WAAW,GAAG,KAAK,CAAC;IACtB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,OAAO,CAAC,cAAc,EAAE,CAAC;QAC5B,OAAO,CAAC,cAAc,GAAG,UAAU,CAAC;IACtC,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,cAAc,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAC1D,OAAO,CAAC,cAAc,GAAG,UAAU,CAAC;IACtC,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,cAAiE;IAEjE,OAAO,cAAc,YAAY,oBAAoB;QACnD,CAAC,CAAC,cAAc,CAAC,QAAQ,EAAE;QAC3B,CAAC,CAAC,cAAc,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,IAAuD;IAEvD,OAAO,IAAI,YAAY,IAAI,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,IAAuD;IAEvD,OAAO,IAAI,YAAY,IAAI,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,IAAuD;IAEvD,OAAO,IAAI,YAAY,IAAI,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC;AAkBD;;GAEG;AACH,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,gFAAyD,CAAA;AAC3D,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAED;;GAEG;AACH,MAAM,UAAU,6BAA6B,CAAC,kBAA0B;IACtE,OAAO,WAAW,kBAAkB,iCAAiC,CAAC;AACxE,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { FileSystemAttributes } from \"./FileSystemAttributes\";\nimport { truncatedISO8061Date } from \"./utils/utils.common\";\nimport { logger } from \"./log\";\nimport { FilePermissionFormat, ShareTokenIntent } from \"./generatedModels\";\nimport { StoragePipelineOptions } from \"./Pipeline\";\n\nexport interface Metadata {\n [propertyName: string]: string;\n}\n\nexport interface FileHttpHeaders {\n /**\n * Optional. Sets the file's cache\n * control. If specified, this property is stored with the file and returned\n * with a read request.\n */\n fileCacheControl?: string;\n /**\n * Optional. Sets the file's content type.\n * If specified, this property is stored with the file and returned with a\n * read request.\n */\n fileContentType?: string;\n /**\n * Optional. An MD5 hash of the file\n * content. Note that this hash is not validated, as the hashes for the\n * individual blocks were validated when each was uploaded.\n */\n fileContentMD5?: Uint8Array;\n /**\n * Optional. Sets the file's content\n * encoding. If specified, this property is stored with the file and returned\n * with a read request.\n */\n fileContentEncoding?: string;\n /**\n * Optional. Set the file's content\n * language. If specified, this property is stored with the file and returned\n * with a read request.\n */\n fileContentLanguage?: string;\n /**\n * Optional. Sets the file's\n * Content-Disposition header.\n */\n fileContentDisposition?: string;\n}\n\n/**\n * Indicates inherit file permission from the parent directory.\n */\nexport type FilePermissionInheritType = \"inherit\";\n\n/**\n * Indicates keep existing file permission value unchanged.\n */\nexport type FilePermissionPreserveType = \"preserve\";\n\n/**\n * Indicates setting as the time of the request.\n */\nexport type TimeNowType = \"now\";\n\n/**\n * Indicates keep existing time value unchanged.\n */\nexport type TimePreserveType = \"preserve\";\n\n/**\n * Indicates keep existing file attributes unchanged.\n */\nexport type FileAttributesPreserveType = \"preserve\";\n\nexport interface FileAndDirectoryCreateCommonOptions {\n /**\n * The permission(security descriptor) to be set for the file or directory in the\n * Security Descriptor Definition Language (SDDL) or binary.\n * If specified, it must have an owner, group, and discretionary access control list (DACL).\n * A value of inherit may be passed to inherit from the parent directory.\n *\n * Note that only one of filePermission or filePermissionKey can be specified.\n * And if both are not specified, inherit will be set to filePermission as default value by client library.\n */\n filePermission?: string | FilePermissionInheritType;\n\n /**\n * Optional. Available for version 2023-06-01 and later.\n * Specifies the format in which the permission is returned. Acceptable values are SDDL or binary.\n * If x-ms-file-permission-format is unspecified or explicitly set to SDDL, the permission is returned in SDDL format.\n * If x-ms-file-permission-format is explicitly set to binary, the permission is returned as a base64 string representing the binary encoding of the permission\n */\n filePermissionFormat?: FilePermissionFormat;\n\n /**\n * The key of the permission to be set for the file or directory. This can be created using the Create-Permission API.\n *\n * Note that only one of filePermission or filePermissionKey can be specified.\n */\n filePermissionKey?: string;\n\n /**\n * The file system attributes to be set on the file or directory.\n */\n fileAttributes?: FileSystemAttributes;\n\n /**\n * The Coordinated Universal Time (UTC) creation time property for the directory.\n * A value of now may be used to indicate the time of the request.\n * By default, the value will be set as now.\n */\n creationTime?: Date | TimeNowType;\n\n /**\n * The Coordinated Universal Time (UTC) last write property for the directory.\n * A value of now may be used to indicate the time of the request.\n * By default, the value will be set as now.\n */\n lastWriteTime?: Date | TimeNowType;\n\n /**\n * The Coordinated Universal Time (UTC) change time property for the directory.\n * A value of now may be used to indicate the time of the request.\n * By default, the value will be set to the time of the request.\n */\n changeTime?: Date | TimeNowType;\n}\n\nexport interface FileAndDirectorySetPropertiesCommonOptions {\n /**\n * The permission(security descriptor) to be set for the file or directory in the\n * Security Descriptor Definition Language (SDDL). If specified, it must have an owner, group, and discretionary access control list (DACL).\n * A value of inherit may be passed to inherit from the parent directory.\n * A value of preserve may be passed to keep the value unchanged.\n *\n * Note that only one of filePermission or filePermissionKey can be specified.\n * And if both are not specified, preserve will be set to filePermission as default value by client library.\n */\n filePermission?: string | FilePermissionInheritType | FilePermissionPreserveType;\n\n /**\n * Optional. Available for version 2023-06-01 and later.\n * Specifies the format in which the permission is returned. Acceptable values are SDDL or binary.\n * If x-ms-file-permission-format is unspecified or explicitly set to SDDL, the permission is returned in SDDL format.\n * If x-ms-file-permission-format is explicitly set to binary, the permission is returned as a base64 string representing the binary encoding of the permission\n */\n filePermissionFormat?: FilePermissionFormat;\n\n /**\n * The key of the permission to be set for the file or directory. This can be created using the Create-Permission API.\n *\n * Note that only one of filePermission or filePermissionKey can be specified.\n */\n filePermissionKey?: string;\n\n /**\n * The file system attributes to be set on the file or directory.\n */\n fileAttributes?: FileSystemAttributes | FileAttributesPreserveType;\n\n /**\n * The Coordinated Universal Time (UTC) creation time property for the directory.\n * A value of now may be used to indicate the time of the request.\n * A value of preserve may be passed to keep an existing value unchanged.\n * By default, the value will be set as preserve.\n */\n creationTime?: Date | TimeNowType | TimePreserveType;\n\n /**\n * The Coordinated Universal Time (UTC) last write property for the directory.\n * A value of now may be used to indicate the time of the request.\n * A value of preserve may be passed to keep an existing value unchanged.\n * By default, the value will be set as preserve.\n */\n lastWriteTime?: Date | TimeNowType | TimePreserveType;\n\n /**\n * The Coordinated Universal Time (UTC) change time property for the directory.\n * A value of now may be used to indicate the time of the request.\n * By default, the value will be set to the time of the request.\n */\n changeTime?: Date | TimeNowType;\n}\n\n/**\n * Close handles result information.\n */\nexport interface CloseHandlesInfo {\n closedHandlesCount: number;\n /**\n * Contains count of number of handles that failed to close.\n */\n closeFailureCount?: number;\n}\n\n/**\n * Protocols to enable on the share. For now, only support SMB or NFS.\n */\nexport interface ShareProtocols {\n /**\n * The share can be accessed by SMBv3.0, SMBv2.1 and REST.\n */\n smbEnabled?: boolean;\n /**\n * The share can be accessed by NFSv4.1.\n */\n nfsEnabled?: boolean;\n}\n\nexport interface ShareClientConfig {\n /**\n * The Files OAuth over REST feature requires special permissions to be included in the role definition to use\n * These special permissions will give privileged access to file share data -\n * It will allow users to bypass file/directory level ACL/NTFS permissions and get read/write access to file share data\n * Since this additional permission can be unintended and to prevent unintended and over privileged access,\n * additional checks has been implemented that requires users to explicitly indicate their intent to use these additional permissions.\n * This is done using the fileRequestIntent option.\n * Currently, the only value that the header supports is 'backup'\n * Any user who wishes to use Files OAuth over REST feature has to call the API with the intent header. If the API is not called with the intent header, any subsequent data operation requests will be denied.\n */\n fileRequestIntent?: ShareTokenIntent;\n /** If true, the trailing dot will not be trimmed from the target URI. */\n allowTrailingDot?: boolean;\n /** If true, the trailing dot will not be trimmed from the source URI. */\n allowSourceTrailingDot?: boolean;\n}\n\nexport type ShareClientOptions = StoragePipelineOptions & ShareClientConfig;\n\n/**\n * Convert protocols from joined string to ShareProtocols.\n *\n * @param protocolsString -\n */\nexport function toShareProtocols(protocolsString?: string): ShareProtocols | undefined {\n if (protocolsString === undefined) {\n return undefined;\n }\n\n const protocolStrArray = protocolsString.split(\";\");\n const protocols: ShareProtocols = {};\n for (const protocol of protocolStrArray) {\n if (protocol === \"SMB\") {\n protocols.smbEnabled = true;\n } else if (protocol === \"NFS\") {\n protocols.nfsEnabled = true;\n }\n }\n return protocols;\n}\n\n/**\n * Convert ShareProtocols to joined string.\n *\n * @param protocols -\n */\nexport function toShareProtocolsString(protocols: ShareProtocols = {}): string | undefined {\n let protocolStr = undefined;\n\n if (protocols.smbEnabled === true) {\n protocolStr = \"SMB\";\n }\n if (protocols.nfsEnabled === true) {\n logger.info(\n `Using \"NFS\" in favor of \"SMB\" for the share protocol as currently they can't be supported at the same time.`,\n );\n protocolStr = \"NFS\";\n }\n return protocolStr;\n}\n\nexport function validateFilePermissionOptions(\n filePermission?: string,\n filePermissionKey?: string,\n): void {\n if (filePermission && filePermissionKey) {\n throw new RangeError(\"Only one of filePermission or filePermissionKey can be specified.\");\n }\n}\n\nexport function validateAndSetDefaultsForFileAndDirectoryCreateCommonOptions(\n options: FileAndDirectoryCreateCommonOptions,\n): FileAndDirectoryCreateCommonOptions {\n // Would better deep copy params set by user.\n\n if (!options) {\n options = {};\n }\n\n validateFilePermissionOptions(options.filePermission, options.filePermissionKey);\n\n if (!options.creationTime) {\n options.creationTime = \"now\";\n }\n\n if (!options.lastWriteTime) {\n options.lastWriteTime = \"now\";\n }\n\n if (!options.filePermission && !options.filePermissionKey) {\n options.filePermission = \"inherit\";\n }\n\n return options;\n}\n\nexport function validateAndSetDefaultsForFileAndDirectorySetPropertiesCommonOptions(\n options: FileAndDirectorySetPropertiesCommonOptions,\n): FileAndDirectorySetPropertiesCommonOptions {\n // Would better deep copy params set by user.\n\n if (!options) {\n options = {};\n }\n\n validateFilePermissionOptions(options.filePermission, options.filePermissionKey);\n\n if (!options.creationTime) {\n options.creationTime = \"preserve\";\n }\n\n if (!options.lastWriteTime) {\n options.lastWriteTime = \"preserve\";\n }\n\n if (!options.fileAttributes) {\n options.fileAttributes = \"preserve\";\n }\n\n if (!options.filePermission && !options.filePermissionKey) {\n options.filePermission = \"preserve\";\n }\n\n return options;\n}\n\nexport function fileAttributesToString(\n fileAttributes: FileSystemAttributes | FileAttributesPreserveType,\n): string {\n return fileAttributes instanceof FileSystemAttributes\n ? fileAttributes.toString()\n : fileAttributes;\n}\n\nexport function fileCreationTimeToString(\n time: Date | TimeNowType | TimePreserveType | undefined,\n): string | undefined {\n return time instanceof Date ? truncatedISO8061Date(time) : time;\n}\n\nexport function fileLastWriteTimeToString(\n time: Date | TimeNowType | TimePreserveType | undefined,\n): string | undefined {\n return time instanceof Date ? truncatedISO8061Date(time) : time;\n}\n\nexport function fileChangeTimeToString(\n time: Date | TimeNowType | TimePreserveType | undefined,\n): string | undefined {\n return time instanceof Date ? truncatedISO8061Date(time) : time;\n}\n\n/**\n * Represents authentication information in Authorization, ProxyAuthorization,\n * WWW-Authenticate, and Proxy-Authenticate header values.\n */\nexport interface HttpAuthorization {\n /**\n * The scheme to use for authorization.\n */\n scheme: string;\n\n /**\n * the credentials containing the authentication information of the user agent for the resource being requested.\n */\n value: string;\n}\n\n/**\n * Defines the known cloud audiences for Storage.\n */\nexport enum StorageFileAudience {\n /**\n * The OAuth scope to use to retrieve an AAD token for Azure Storage.\n */\n StorageOAuthScopes = \"https://storage.azure.com/.default\",\n}\n\n/**\n * To get the OAuth audience for a storage account for file service.\n */\nexport function getFileServiceAccountAudience(storageAccountName: string): string {\n return `https://${storageAccountName}.file.core.windows.net/.default`;\n}\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT
|
2
|
+
// Licensed under the MIT License.
|
3
3
|
import { AbortError } from "@azure/abort-controller";
|
4
4
|
import { BaseRequestPolicy } from "../../../storage-blob/src/policies/RequestPolicy";
|
5
5
|
import { URLConstants } from "../utils/constants";
|