@azure/storage-file-datalake 12.12.0 → 12.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +54 -9
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/clients.js +6 -3
- package/dist-esm/storage-file-datalake/src/clients.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/mappers.js +7 -0
- package/dist-esm/storage-file-datalake/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/parameters.js +11 -1
- package/dist-esm/storage-file-datalake/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operations/path.js +2 -1
- package/dist-esm/storage-file-datalake/src/generated/src/operations/path.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/generated/src/storageClientContext.js +2 -2
- package/dist-esm/storage-file-datalake/src/generated/src/storageClientContext.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/models.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/utils/constants.js +2 -2
- package/dist-esm/storage-file-datalake/src/utils/constants.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/utils/utils.common.js +25 -1
- package/dist-esm/storage-file-datalake/src/utils/utils.common.js.map +1 -1
- package/package.json +2 -2
- package/types/3.1/storage-file-datalake.d.ts +25 -0
- package/types/latest/storage-file-datalake.d.ts +25 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models.ts"],"names":[],"mappings":"AA6kCA,iFAAiF;AACjF;;;;GAIG;AACH,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,gEAAqC,CAAA;IACrC,kDAAuB,CAAA;AACzB,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AACD;;;;GAIG;AACH,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AACD;;;;GAIG;AACH,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,iCAAa,CAAA;AACf,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AA+bD,8DAA8D;AAC9D,6DAA6D;AAC7D,8DAA8D","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { HttpResponse, TransferProgressEvent } from \"@azure/core-http\";\n\nimport {\n LeaseAccessConditions,\n ModifiedAccessConditions as ModifiedAccessConditionsModel,\n UserDelegationKeyModel,\n BlobQueryArrowConfiguration,\n ServiceRenameContainerOptions,\n ContainerRenameResponse,\n ContainerUndeleteResponse,\n} from \"@azure/storage-blob\";\nimport { DataLakePathClient } from \"./clients\";\nexport type ModifiedAccessConditions = Omit<ModifiedAccessConditionsModel, \"ifTags\">;\n\n/**\n * Options to query file with Apache Arrow format. Only valid for {@link FileQueryOptions.outputTextConfiguration}.\n */\nexport type FileQueryArrowConfiguration = BlobQueryArrowConfiguration;\n\n/**\n * Options to configure {@link DataLakeServiceClient.renameFileSystem}.\n */\nexport type ServiceRenameFileSystemOptions = ServiceRenameContainerOptions;\n\n/**\n * Contains response data for the {@link DataLakeServiceClient.renameFileSystem} operation.\n */\nexport type FileSystemRenameResponse = ContainerRenameResponse;\n\n/**\n * Contains response data for the {@link DataLakeServiceClient.undeleteFileSystem} operation.\n */\nexport type FileSystemUndeleteResponse = ContainerUndeleteResponse;\n\nimport {\n CpkInfo,\n FileSystemListBlobHierarchySegmentHeaders,\n FileSystemListPathsHeaders,\n LeaseAction,\n ListBlobsHierarchySegmentResponse,\n PathCreateResponse,\n PathDeleteResponse,\n PathGetPropertiesHeaders as PathGetPropertiesHeadersModel,\n PathList as PathListModel,\n PathUndeleteHeaders,\n} from \"./generated/src/models\";\nimport { DataLakeSASPermissions } from \"./sas/DataLakeSASPermissions\";\nimport { DirectorySASPermissions } from \"./sas/DirectorySASPermissions\";\nimport { FileSystemSASPermissions } from \"./sas/FileSystemSASPermissions\";\nimport { SasIPRange } from \"./sas/SasIPRange\";\nimport { SASProtocol } from \"./sas/SASQueryParameters\";\nimport { CommonOptions } from \"./StorageClient\";\n\nexport {\n LeaseAccessConditions,\n UserDelegationKeyModel,\n ServiceListContainersSegmentResponse,\n Lease,\n LeaseOperationOptions,\n LeaseOperationResponse,\n} from \"@azure/storage-blob\";\n\nexport {\n BlobHierarchyListSegment,\n BlobItemModel,\n BlobPrefix,\n BlobPropertiesModel,\n CpkInfo,\n EncryptionAlgorithmType,\n FileSystemListPathsHeaders,\n FileSystemListBlobHierarchySegmentHeaders,\n FileSystemListPathsResponse as ListPathsSegmentResponse,\n ListBlobsHierarchySegmentResponse,\n Path as PathModel,\n PathList as PathListModel,\n PathCreateHeaders,\n PathDeleteHeaders,\n PathDeleteResponse,\n PathGetPropertiesHeaders as PathGetPropertiesHeadersModel,\n PathSetAccessControlHeaders,\n PathSetAccessControlResponse,\n PathSetAccessControlResponse as PathSetPermissionsResponse,\n PathResourceType as PathResourceTypeModel,\n PathUndeleteHeaders,\n PathUpdateHeaders,\n PathAppendDataHeaders,\n PathFlushDataHeaders,\n PathAppendDataResponse as FileAppendResponse,\n PathFlushDataResponse as FileFlushResponse,\n PathFlushDataResponse as FileUploadResponse,\n PathGetPropertiesAction as PathGetPropertiesActionModel,\n PathRenameMode as PathRenameModeModel,\n PathExpiryOptions as FileExpiryMode,\n PathSetExpiryResponse as FileSetExpiryResponse,\n PathSetExpiryHeaders as FileSetExpiryHeaders,\n} from \"./generated/src/models\";\n\nexport { PathCreateResponse };\n\n/**\n * Common options of the {@link FileSystemGenerateSasUrlOptions}, {@link DirectoryGenerateSasUrlOptions}\n * and {@link FileGenerateSasUrlOptions}.\n */\nexport interface CommonGenerateSasUrlOptions {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n */\n expiresOn?: Date;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n\n /**\n * Optional. The name of the access policy on the container this SAS references if any.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n\n /**\n * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n\n /**\n * Optional. The cache-control header for the SAS.\n */\n cacheControl?: string;\n\n /**\n * Optional. The content-disposition header for the SAS.\n */\n contentDisposition?: string;\n\n /**\n * Optional. The content-encoding header for the SAS.\n */\n contentEncoding?: string;\n\n /**\n * Optional. The content-language header for the SAS.\n */\n contentLanguage?: string;\n\n /**\n * Optional. The content-type header for the SAS.\n */\n contentType?: string;\n}\n\n/** ***********************************************************/\n/** DataLakeServiceClient option and response related models */\n/** ***********************************************************/\n\nexport interface ServiceGetUserDelegationKeyOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n}\n\n// TODO: Leverage interface definitions from blob package directly, or duplicate create a copy here which will not have generation benefits\nexport interface ServiceGetUserDelegationKeyHeaders {\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport interface UserDelegationKey {\n signedObjectId: string;\n signedTenantId: string;\n signedStartsOn: Date;\n signedExpiresOn: Date;\n signedService: string;\n signedVersion: string;\n value: string;\n}\n\nexport type ServiceGetUserDelegationKeyResponse = UserDelegationKey &\n ServiceGetUserDelegationKeyHeaders & {\n _response: HttpResponse & {\n parsedHeaders: ServiceGetUserDelegationKeyHeaders;\n bodyAsText: string;\n parsedBody: UserDelegationKeyModel;\n };\n };\n\nexport interface ServiceListFileSystemsOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n prefix?: string;\n includeMetadata?: boolean;\n\n /**\n * Specifies whether soft deleted File System should be included in the response.\n */\n includeDeleted?: boolean;\n}\n\nexport type LeaseStatusType = \"locked\" | \"unlocked\";\nexport type LeaseStateType = \"available\" | \"leased\" | \"expired\" | \"breaking\" | \"broken\";\nexport type LeaseDurationType = \"infinite\" | \"fixed\";\nexport type PublicAccessType = \"filesystem\" | \"file\";\n\nexport interface FileSystemProperties {\n lastModified: Date;\n etag: string;\n leaseStatus?: LeaseStatusType;\n leaseState?: LeaseStateType;\n leaseDuration?: LeaseDurationType;\n publicAccess?: PublicAccessType;\n hasImmutabilityPolicy?: boolean;\n hasLegalHold?: boolean;\n defaultEncryptionScope?: string;\n deletedOn?: Date;\n remainingRetentionDays?: number;\n}\n\nexport interface FileSystemItem {\n name: string;\n properties: FileSystemProperties;\n metadata?: Metadata;\n deleted?: boolean;\n versionId?: string;\n}\n\nexport interface ListFileSystemsSegmentResponse {\n serviceEndpoint: string;\n prefix?: string;\n marker?: string;\n maxPageSize?: number;\n fileSystemItems: FileSystemItem[];\n continuationToken?: string;\n}\n\nexport interface ServiceListFileSystemsSegmentHeaders {\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n}\n\nexport type ServiceListFileSystemsSegmentResponse = ListFileSystemsSegmentResponse &\n ServiceListFileSystemsSegmentHeaders & {\n _response: HttpResponse & {\n parsedHeaders: ServiceListFileSystemsSegmentHeaders;\n bodyAsText: string;\n parsedBody: ListFileSystemsSegmentResponse;\n };\n };\n\n/**\n * Options to configure {@link DataLakeServiceClient.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 * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure {@link DataLakeServiceClient.undeleteFileSystem}.\n */\nexport interface ServiceUndeleteFileSystemOptions 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 * Optional. Specifies the new name of the restored File System.\n * Will use its original name if this is not specified.\n * @deprecated Restore FileSystem to a different name is not supported by service anymore.\n */\n destinationFileSystemName?: string;\n}\n\n/** **************************************************************/\n/** DataLakeFileSystemClient option and response related models */\n/** **************************************************************/\n\nexport interface FileSystemCreateOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n metadata?: Metadata;\n access?: PublicAccessType;\n /**\n * File System encryption scope info.\n */\n fileSystemEncryptionScope?: FileSystemEncryptionScope;\n}\n\nexport interface FileSystemCreateHeaders {\n etag?: string;\n lastModified?: Date;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport type FileSystemCreateResponse = FileSystemCreateHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemCreateHeaders;\n };\n};\n\nexport interface FileSystemDeleteOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n}\n\nexport interface FileSystemDeleteHeaders {\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport type FileSystemDeleteResponse = FileSystemDeleteHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemDeleteHeaders;\n };\n};\n\nexport interface FileSystemGetPropertiesOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: LeaseAccessConditions;\n}\n\nexport interface FileSystemGetPropertiesHeaders {\n metadata?: Metadata;\n etag?: string;\n lastModified?: Date;\n leaseDuration?: LeaseDurationType;\n leaseState?: LeaseStateType;\n leaseStatus?: LeaseStatusType;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n publicAccess?: PublicAccessType;\n hasImmutabilityPolicy?: boolean;\n hasLegalHold?: boolean;\n /**\n * The default encryption scope for the file system.\n */\n defaultEncryptionScope?: string;\n}\n\nexport type FileSystemGetPropertiesResponse = FileSystemGetPropertiesHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemGetPropertiesHeaders;\n };\n};\n\nexport interface FileSystemSetMetadataOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n}\n\nexport interface FileSystemSetMetadataHeaders {\n etag?: string;\n lastModified?: Date;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport type FileSystemSetMetadataResponse = FileSystemSetMetadataHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemSetMetadataHeaders;\n };\n};\n\nexport interface FileSystemGetAccessPolicyOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: LeaseAccessConditions;\n}\n\nexport interface FileSystemGetAccessPolicyHeaders {\n publicAccess?: PublicAccessType;\n etag?: string;\n lastModified?: Date;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport interface RawAccessPolicy {\n startsOn?: string;\n expiresOn?: string;\n permissions: string;\n}\n\nexport interface AccessPolicy {\n startsOn?: Date;\n expiresOn?: Date;\n permissions: string;\n}\n\nexport interface SignedIdentifier<T> {\n id: string;\n accessPolicy: T;\n}\n\nexport type FileSystemGetAccessPolicyResponse = {\n signedIdentifiers: SignedIdentifier<AccessPolicy>[];\n} & FileSystemGetAccessPolicyHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemGetAccessPolicyHeaders;\n bodyAsText: string;\n parsedBody: SignedIdentifier<RawAccessPolicy>[];\n };\n };\n\nexport interface FileSystemSetAccessPolicyOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n}\n\nexport interface FileSystemSetAccessPolicyHeaders {\n etag?: string;\n lastModified?: Date;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport type FileSystemSetAccessPolicyResponse = FileSystemSetAccessPolicyHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemSetAccessPolicyHeaders;\n };\n};\n\nexport interface ListPathsOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n recursive?: boolean;\n path?: string;\n userPrincipalName?: boolean;\n}\n\nexport interface ListPathsSegmentOptions extends ListPathsOptions {\n maxResults?: number;\n}\n\nexport interface Path {\n name?: string;\n isDirectory?: boolean;\n lastModified?: Date;\n etag?: string;\n contentLength?: number;\n owner?: string;\n group?: string;\n permissions?: PathPermissions;\n /**\n * The name of the encryption scope under which the blob is encrypted.\n */\n encryptionScope?: string;\n /**\n * Creation time of the path.\n */\n createdOn?: Date;\n /**\n * Expiry time of the path.\n */\n expiresOn?: Date;\n}\n\nexport interface PathList {\n pathItems?: Path[];\n}\n\nexport type FileSystemListPathsResponse = PathList &\n FileSystemListPathsHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemListPathsHeaders;\n bodyAsText: string;\n parsedBody: PathListModel;\n };\n };\n\nexport interface ListDeletedPathsOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n /** Filters results to filesystems within the specified prefix. */\n prefix?: string;\n}\n\nexport interface ListDeletedPathsSegmentOptions extends ListDeletedPathsOptions {\n maxResults?: number;\n}\n\nexport interface DeletedPath {\n name: string;\n deletionId?: string;\n deletedOn?: Date;\n remainingRetentionDays?: number;\n}\n\nexport interface DeletedPathList {\n pathItems?: DeletedPath[];\n}\n\nexport type FileSystemListDeletedPathsResponse = DeletedPathList &\n FileSystemListBlobHierarchySegmentHeaders &\n ListBlobsHierarchySegmentResponse & {\n _response: HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: ListBlobsHierarchySegmentResponse;\n /** The parsed HTTP response headers. */\n parsedHeaders: FileSystemListBlobHierarchySegmentHeaders;\n };\n\n continuation?: string;\n };\n\nexport interface FileSystemUndeletePathOption extends CommonOptions {\n abortSignal?: AbortSignalLike;\n}\n\nexport type FileSystemUndeletePathResponse = PathUndeleteHeaders & {\n _response: HttpResponse & {\n parsedHeaders: PathUndeleteHeaders;\n };\n pathClient: DataLakePathClient;\n};\n\n/**\n * Option interface for Data Lake file system exists operations\n *\n * See:\n * - {@link DataLakeFileSystemClient.exists}\n */\nexport interface FileSystemExistsOptions 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 * Contains response data for the {@link DataLakeFileSystemClient.createIfNotExists} operation.\n */\nexport interface FileSystemCreateIfNotExistsResponse extends FileSystemCreateResponse {\n /**\n * Indicate whether the file system is successfully created. Is false when the file system is not changed as it already exists.\n */\n succeeded: boolean;\n}\n\n/**\n * Contains response data for the {@link DataLakeFileSystemClient.deleteIfExists} operation.\n */\nexport interface FileSystemDeleteIfExistsResponse extends FileSystemDeleteResponse {\n /**\n * Indicate whether the file system is successfully deleted. Is false if the file system doesn't exist in the first place.\n */\n succeeded: boolean;\n}\n\n/**\n * Options to configure {@link DataLakeFileSystemClient.generateSasUrl} operation.\n */\nexport interface FileSystemGenerateSasUrlOptions extends CommonGenerateSasUrlOptions {\n /**\n * Optional only when identifier is provided. Specifies the list of permissions to be associated with the SAS.\n */\n permissions?: FileSystemSASPermissions;\n}\n\n/** ********************************************************/\n/** DataLakePathClient option and response related models */\n/** ********************************************************/\n\nexport interface Metadata {\n [propertyName: string]: string;\n}\n\nexport interface DataLakeRequestConditions\n extends ModifiedAccessConditions,\n LeaseAccessConditions {}\n\nexport interface RolePermissions {\n read: boolean;\n write: boolean;\n execute: boolean;\n}\n\nexport interface PathPermissions {\n owner: RolePermissions;\n group: RolePermissions;\n other: RolePermissions;\n stickyBit: boolean;\n extendedAcls: boolean;\n}\n\nexport type AccessControlType = \"user\" | \"group\" | \"mask\" | \"other\";\n\nexport interface RemovePathAccessControlItem {\n /**\n * Indicates whether this is the default entry for the ACL.\n */\n defaultScope: boolean;\n /**\n * Specifies which role this entry targets.\n */\n accessControlType: AccessControlType;\n /**\n * Specifies the entity for which this entry applies.\n * Must be omitted for types mask or other. It must also be omitted when the user or group is the owner.\n */\n entityId?: string;\n}\n\nexport interface PathAccessControlItem {\n /**\n * Indicates whether this is the default entry for the ACL.\n */\n defaultScope: boolean;\n /**\n * Specifies which role this entry targets.\n */\n accessControlType: AccessControlType;\n /**\n * Specifies the entity for which this entry applies.\n */\n entityId: string;\n /**\n * Access control permissions.\n */\n permissions: RolePermissions;\n}\n\nexport interface PathCreateHttpHeaders {\n cacheControl?: string;\n contentEncoding?: string;\n contentLanguage?: string;\n contentDisposition?: string;\n contentType?: string;\n}\n\nexport interface PathCreateOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n metadata?: Metadata;\n permissions?: string; // TODO: model or string?\n umask?: string; // TODO: model or string?\n /**\n * Optional. The owner of the blob or directory.\n */\n owner?: string;\n /**\n * Optional. The owning group of the blob or directory.\n */\n group?: string;\n /**\n * Optional. POSIX access control rights on files and directories.\n */\n acl?: PathAccessControlItem[];\n conditions?: DataLakeRequestConditions;\n pathHttpHeaders?: PathCreateHttpHeaders;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats.\n */\n proposedLeaseId?: string;\n /**\n * The lease duration is required to acquire a lease, and specifies the duration of the lease in seconds. The lease duration must be between 15 and 60 seconds or -1 for infinite lease.\n */\n leaseDuration?: number;\n /**\n * Optional. Options for scheduling the deletion of a path.\n * A number value indicates duration before file should be deleted in milliseconds.\n * A Date value indicates the time to set for when the path will be deleted.\n * Does not apply to directories.\n */\n expiresOn?: number | Date;\n}\n\nexport interface PathCreateIfNotExistsOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n metadata?: Metadata;\n permissions?: string;\n umask?: string;\n /**\n * Optional. The owner of the blob or directory.\n */\n owner?: string;\n /**\n * Optional. The owning group of the blob or directory.\n */\n group?: string;\n /**\n * Optional. POSIX access control rights on files and directories.\n */\n acl?: PathAccessControlItem[];\n pathHttpHeaders?: PathCreateHttpHeaders;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats.\n */\n proposedLeaseId?: string;\n /**\n * The lease duration is required to acquire a lease, and specifies the duration of the lease in seconds. The lease duration must be between 15 and 60 seconds or -1 for infinite lease.\n */\n leaseDuration?: number;\n /**\n * Optional. Options for scheduling the deletion of a path.\n * A number value indicates duration before file should be deleted in milliseconds.\n * A Date value indicates the time to set for when the path will be deleted.\n * Does not apply to directories.\n */\n expiresOn?: number | Date;\n}\n\nexport interface PathDeleteOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n}\n\nexport interface PathGetAccessControlOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n userPrincipalName?: boolean;\n}\n\nexport interface PathGetAccessControlHeaders {\n date?: Date;\n etag?: string;\n lastModified?: Date;\n owner?: string;\n group?: string;\n requestId?: string;\n version?: string;\n}\n\nexport interface PathAccessControl {\n owner?: string;\n group?: string;\n permissions?: PathPermissions;\n acl: PathAccessControlItem[];\n}\n\nexport type PathGetAccessControlResponse = PathAccessControl &\n PathGetAccessControlHeaders & {\n _response: HttpResponse & {\n parsedHeaders: PathGetPropertiesHeadersModel;\n };\n };\n\nexport interface PathSetAccessControlOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n owner?: string;\n group?: string;\n}\n\n/**\n * Options type for `setAccessControlRecursive`, `updateAccessControlRecursive` and `removeAccessControlRecursive`.\n */\nexport interface PathChangeAccessControlRecursiveOptions 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 * Optional. If data set size exceeds batch size then operation will be split into multiple requests so that progress can be tracked.\n * Batch size should be between 1 and 2000. The default when unspecified is 2000.\n */\n batchSize?: number;\n /**\n * Optional. Defines maximum number of batches that single change Access Control operation can execute.\n * If maximum is reached before all subpaths are processed then continuation token can be used to resume operation.\n * Empty value indicates that maximum number of batches in unbound and operation continues till end.\n */\n maxBatches?: number;\n /**\n * Optional. Default false. If set to false, the operation will terminate quickly on encountering user failures.\n * If true, the operation will ignore user failures and proceed with the operation on other sub-entities of the directory.\n */\n continueOnFailure?: boolean;\n /**\n * Continuation token to continue next batch of operations.\n */\n continuationToken?: string;\n /**\n * Callback where caller can track progress of the operation\n * as well as collect paths that failed to change Access Control.\n */\n onProgress?: (progress: AccessControlChanges) => void;\n}\n\n/**\n * Represents an entry that failed to update Access Control List during `setAccessControlRecursive`, `updateAccessControlRecursive` and `removeAccessControlRecursive`.\n */\nexport interface AccessControlChangeError {\n /**\n * Returns name of an entry.\n */\n name: string;\n /**\n * Returns whether entry is a directory.\n */\n isDirectory: boolean;\n /**\n * Returns error message that is the reason why entry failed to update.\n */\n message: string;\n}\n\n/**\n * AccessControlChanges contains batch and cumulative counts of operations that change Access Control Lists recursively.\n * Additionally it exposes path entries that failed to update while these operations progress.\n */\nexport interface AccessControlChanges {\n /**\n * Path entries that failed to update Access Control List within single batch.\n */\n batchFailures: AccessControlChangeError[];\n /**\n * Counts of paths changed within single batch.\n */\n batchCounters: AccessControlChangeCounters;\n /**\n * Counts of paths changed from start of the operation.\n */\n aggregateCounters: AccessControlChangeCounters;\n /**\n * Optional. Value is present when operation is split into multiple batches and can be used to resume progress.\n */\n continuationToken?: string;\n}\n\n/**\n * AccessControlChangeCounters contains counts of operations that change Access Control Lists recursively.\n */\nexport interface AccessControlChangeCounters {\n /**\n * Returns number of directories where Access Control List has been updated successfully.\n */\n changedDirectoriesCount: number;\n /**\n * Returns number of files where Access Control List has been updated successfully.\n */\n changedFilesCount: number;\n /**\n * Returns number of paths where Access Control List update has failed.\n */\n failedChangesCount: number;\n}\n\n/**\n * Response type for `setAccessControlRecursive`, `updateAccessControlRecursive` and `removeAccessControlRecursive`.\n */\nexport interface PathChangeAccessControlRecursiveResponse {\n /**\n * Contains counts of paths changed from start of the operation.\n */\n counters: AccessControlChangeCounters;\n /**\n * Optional. Value is present when operation is split into multiple batches and can be used to resume progress.\n */\n continuationToken?: string;\n}\n\nexport interface PathSetPermissionsOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n owner?: string;\n group?: string;\n}\n\nexport interface PathGetPropertiesOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\nexport type CopyStatusType = \"pending\" | \"success\" | \"aborted\" | \"failed\";\n\nexport interface PathGetPropertiesHeaders {\n lastModified?: Date;\n createdOn?: Date;\n metadata?: Metadata;\n copyCompletedOn?: Date;\n copyStatusDescription?: string;\n copyId?: string;\n copyProgress?: string;\n copySource?: string;\n copyStatus?: CopyStatusType;\n isIncrementalCopy?: boolean;\n destinationSnapshot?: string;\n leaseDuration?: LeaseDurationType;\n leaseState?: LeaseStateType;\n leaseStatus?: LeaseStatusType;\n contentLength?: number;\n contentType?: string;\n etag?: string;\n contentMD5?: Uint8Array;\n contentEncoding?: string;\n contentDisposition?: string;\n contentLanguage?: string;\n cacheControl?: string;\n // blobSequenceNumber?: number;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n acceptRanges?: string;\n // blobCommittedBlockCount?: number;\n isServerEncrypted?: boolean;\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the path contents and application metadata.\n * Note that the absence of this header implies use of the default account encryption scope.\n */\n encryptionScope?: string;\n accessTier?: string;\n accessTierInferred?: boolean;\n archiveStatus?: string;\n accessTierChangedOn?: Date;\n\n /**\n * The time the file will expire.\n */\n expiresOn?: Date;\n}\n\nexport type PathGetPropertiesResponse = PathGetPropertiesHeaders & {\n _response: HttpResponse & {\n parsedHeaders: PathGetPropertiesHeaders;\n };\n};\n\nexport interface PathSetHttpHeadersOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n}\n\nexport interface PathHttpHeaders {\n cacheControl?: string;\n contentEncoding?: string;\n contentLanguage?: string;\n contentDisposition?: string;\n contentType?: string;\n contentMD5?: Uint8Array;\n}\n\nexport interface PathSetHttpHeadersHeaders {\n etag?: string;\n lastModified?: Date;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport type PathSetHttpHeadersResponse = PathSetHttpHeadersHeaders & {\n _response: HttpResponse & {\n parsedHeaders: PathSetHttpHeadersHeaders;\n };\n};\n\nexport interface PathSetMetadataOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\nexport interface PathSetMetadataHeaders {\n etag?: string;\n lastModified?: Date;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n isServerEncrypted?: boolean;\n encryptionKeySha256?: string;\n}\n\nexport type PathSetMetadataResponse = PathSetMetadataHeaders & {\n _response: HttpResponse & {\n parsedHeaders: PathSetMetadataHeaders;\n };\n};\n\nexport interface PathMoveOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n destinationConditions?: DataLakeRequestConditions;\n}\n\nexport interface PathRemoveHeaders {\n date?: Date;\n etag?: string;\n lastModified?: Date;\n requestId?: string;\n version?: string;\n contentLength?: number;\n}\n\nexport type PathMoveResponse = PathRemoveHeaders & {\n _response: HttpResponse & {\n parsedHeaders: PathRemoveHeaders;\n };\n};\n\n/**\n * Option interface for Data Lake directory/file exists operations\n *\n * See:\n * - {@link DataLakePathClient.exists}\n */\nexport interface PathExistsOptions 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 * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Contains response data for the {@link DataLakePathClient.createIfNotExists} operation.\n */\nexport interface PathCreateIfNotExistsResponse extends PathCreateResponse {\n /**\n * Indicate whether the directory/file is successfully created. Is false when the directory/file is not changed as it already exists.\n */\n succeeded: boolean;\n}\n\n/**\n * Contains response data for the {@link DataLakePathClient.deleteIfExists} operation.\n */\nexport interface PathDeleteIfExistsResponse extends PathDeleteResponse {\n /**\n * Indicate whether the directory/file is successfully deleted. Is false if the directory/file doesn't exist in the first place.\n */\n succeeded: boolean;\n}\n\n// Keeping these for backward compatibility when we changed to use string unions.\n/**\n * Defines values for PathGetPropertiesAction.\n * Possible values include: 'getAccessControl', 'getStatus'\n * @readonly\n */\nexport enum PathGetPropertiesAction {\n GetAccessControl = \"getAccessControl\",\n GetStatus = \"getStatus\",\n}\n/**\n * Defines values for PathRenameMode.\n * Possible values include: 'legacy', 'posix'\n * @readonly\n */\nexport enum PathRenameMode {\n Legacy = \"legacy\",\n Posix = \"posix\",\n}\n/**\n * Defines values for PathResourceType.\n * Possible values include: 'directory', 'file'\n * @readonly\n */\nexport enum PathResourceType {\n Directory = \"directory\",\n File = \"file\",\n}\n\n/** **************************************************************/\n/** DataLakeDirectoryClient option and response related models **/\n/** **************************************************************/\n\nexport interface DirectoryCreateOptions extends PathCreateOptions {}\n\nexport interface DirectoryCreateIfNotExistsOptions extends PathCreateIfNotExistsOptions {}\n\nexport interface DirectoryCreateResponse extends PathCreateResponse {}\n\nexport interface DirectoryCreateIfNotExistsResponse extends PathCreateIfNotExistsResponse {}\n\n/**\n * Options to configure {@link DataLakeDirectoryClient.generateSasUrl} operation.\n */\nexport interface DirectoryGenerateSasUrlOptions extends CommonGenerateSasUrlOptions {\n /**\n * Optional only when identifier is provided. Specifies the list of permissions to be associated with the SAS.\n */\n permissions?: DirectorySASPermissions;\n}\n\n/** *********************************************************/\n/** DataLakeFileClient option and response related models **/\n/** *********************************************************/\n\nexport interface FileReadOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n rangeGetContentMD5?: boolean;\n rangeGetContentCrc64?: boolean;\n conditions?: DataLakeRequestConditions;\n onProgress?: (progress: TransferProgressEvent) => void;\n maxRetryRequests?: number;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\nexport interface FileReadHeaders {\n lastModified?: Date;\n /**\n * Returns the date and time the file was created.\n */\n createdOn?: Date;\n metadata?: Metadata;\n contentLength?: number;\n contentType?: string;\n contentRange?: string;\n etag?: string;\n contentMD5?: Uint8Array;\n contentEncoding?: string;\n cacheControl?: string;\n contentDisposition?: string;\n contentLanguage?: string;\n // blobSequenceNumber?: number;\n copyCompletedOn?: Date;\n copyStatusDescription?: string;\n copyId?: string;\n copyProgress?: string;\n copySource?: string;\n copyStatus?: CopyStatusType;\n leaseDuration?: LeaseDurationType;\n leaseState?: LeaseStateType;\n leaseStatus?: LeaseStatusType;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n acceptRanges?: string;\n date?: Date;\n // blobCommittedBlockCount?: number;\n isServerEncrypted?: boolean;\n encryptionKeySha256?: string;\n fileContentMD5?: Uint8Array; // Content MD5 for whole file\n contentCrc64?: Uint8Array;\n}\n\nexport type FileReadResponse = FileReadHeaders & {\n contentAsBlob?: Promise<Blob>;\n readableStreamBody?: NodeJS.ReadableStream;\n _response: HttpResponse & {\n parsedHeaders: FileReadHeaders;\n };\n};\n\nexport interface FileAppendOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: LeaseAccessConditions;\n transactionalContentMD5?: Uint8Array;\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * If file should be flushed automatically after the append\n */\n flush?: boolean;\n /**\n * Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats.\n * */\n proposedLeaseId?: string;\n /**\n * The lease duration is required to acquire a lease, and specifies the duration of the lease in seconds. The lease duration must be between 15 and 60 seconds or -1 for infinite lease.\n * */\n leaseDurationInSeconds?: number;\n /**\n * Optional. If \"acquire\" it will acquire the lease. If \"auto-renew\" it will renew the lease. If \"release\" it will release the lease only on flush. If \"acquire-release\" it will acquire & complete the operation & release the lease once operation is done.\n * */\n leaseAction?: LeaseAction;\n}\n\nexport interface FileFlushOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n retainUncommittedData?: boolean;\n close?: boolean;\n pathHttpHeaders?: PathHttpHeaders;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats.\n */\n proposedLeaseId?: string;\n /**\n * The lease duration is required to acquire a lease, and specifies the duration of the lease in seconds. The lease duration must be between 15 and 60 seconds or -1 for infinite lease.\n */\n leaseDurationInSeconds?: number;\n /**\n * Optional. If \"acquire\" it will acquire the lease. If \"auto-renew\" it will renew the lease. If \"release\" it will release the lease only on flush. If \"acquire-release\" it will acquire & complete the operation & release the lease once operation is done.\n */\n leaseAction?: LeaseAction;\n}\n\nexport interface FileCreateOptions extends PathCreateOptions {}\n\nexport interface FileCreateIfNotExistsOptions extends PathCreateIfNotExistsOptions {}\n\nexport interface FileCreateResponse extends PathCreateResponse {}\n\nexport interface FileCreateIfNotExistsResponse extends PathCreateIfNotExistsResponse {}\n\n/**\n * Option interface for Data Lake file - Upload operations\n *\n * See:\n * - {@link DataLakeFileClient.upload}\n * - {@link DataLakeFileClient.uploadFile}\n * - {@link DataLakeFileClient.uploadStream}\n */\nexport interface FileParallelUploadOptions extends CommonOptions {\n // For all.\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 * Access conditions headers.\n */\n conditions?: DataLakeRequestConditions;\n\n // For create and flush.\n /**\n * Http headers.\n */\n pathHttpHeaders?: PathHttpHeaders;\n\n // For create.\n /**\n * A collection of key-value string pair to associate with the Data Lake file.\n */\n metadata?: Metadata;\n\n /**\n * Sets POSIX access permissions for the file owner, the file owning group, and others.\n * Each class may be granted read, write, or execute permission. The sticky bit is also supported.\n * Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported.\n */\n permissions?: string; // TODO: model or string?\n\n /**\n * The umask restricts the permissions of the file to be created.\n * The resulting permission is given by p & ^u, where p is the permission and u is the umask.\n * For example, if p is 0777 and u is 0057, then the resulting permission is 0720.\n * The default permission is 0666 for a file. The default umask is 0027.\n * The umask must be specified in 4-digit octal notation (e.g. 0766).\n */\n umask?: string; // TODO: model or string?\n\n // For append.\n /**\n * Progress updater.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n // For flush.\n /**\n * When Azure Storage Events are enabled, a file changed event is raised.\n * This event has a property indicating whether this is the final change\n * to distinguish the difference between an intermediate flush to a file stream (when close set to \"false\")\n * and the final close of a file stream (when close set to \"true\").\n */\n close?: boolean;\n\n // For parallel transfer control.\n\n /**\n * Data size threshold in bytes to use a single upload operation rather than parallel uploading.\n * Data of smaller size than this limit will be transferred in a single upload.\n * Data larger than this limit will be transferred in chunks in parallel.\n * Its default and max value is FILE_MAX_SINGLE_UPLOAD_THRESHOLD.\n * Note: {@link DataLakeFileClient.uploadStream} do not respect this field and always do parallel uploading.\n */\n singleUploadThreshold?: number;\n\n /**\n * The size of data in bytes that will be transferred in parallel.\n * If set to 0 or undefined, it will be automatically calculated according\n * to the data size. Its max value is FILE_UPLOAD_MAX_CHUNK_SIZE.\n */\n chunkSize?: number;\n /**\n * Max concurrency of parallel uploading. Must be greater than or equal to 0. Its default value is DEFAULT_HIGH_LEVEL_CONCURRENCY.\n */\n maxConcurrency?: number;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Option interface for Data Lake file - readToBuffer operations\n *\n * See:\n * - {@link DataLakeFileClient.readToBuffer}\n */\nexport interface FileReadToBufferOptions 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 * Access conditions headers.\n */\n conditions?: DataLakeRequestConditions;\n\n /**\n * Progress updater.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * How many retries will perform for each read when the original chunk read stream ends unexpectedly.\n * Above kind of ends will not trigger retry policy defined in a pipeline,\n * because they doesn't emit network errors. Default value is 5.\n */\n maxRetryRequestsPerChunk?: number;\n\n /**\n * chunkSize is size of data every request trying to read.\n * Must be greater than or equal to 0, if set to 0 or undefined, it will automatically calculated according\n * to the file size.\n */\n chunkSize?: number;\n\n /**\n * Concurrency of parallel read.\n */\n concurrency?: number;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to query file with JSON format.\n */\nexport interface FileQueryJsonTextConfiguration {\n /**\n * Record separator.\n */\n recordSeparator: string;\n /**\n * Query for a JSON format file.\n */\n kind: \"json\";\n}\n\n/**\n * Options to query file with CSV format.\n */\nexport interface FileQueryCsvTextConfiguration {\n /**\n * Record separator.\n */\n recordSeparator: string;\n /**\n * Query for a CSV format file.\n */\n kind: \"csv\";\n /**\n * Column separator. Default is \",\".\n */\n columnSeparator?: string;\n /**\n * Field quote.\n */\n fieldQuote?: string;\n /**\n * Escape character.\n */\n escapeCharacter?: string;\n /**\n * Has headers. Default is false.\n */\n hasHeaders?: boolean;\n}\n\n/**\n * Options to query file with Parquet format.\n */\nexport interface FileQueryParquetConfiguration {\n /**\n * Kind.\n */\n kind: \"parquet\";\n}\n\n/**\n * File query error type.\n */\nexport interface FileQueryError {\n /**\n * Whether the error is fatal or not. A fatal error will stop the query.\n */\n isFatal: boolean;\n /**\n * Error name.\n */\n name: string;\n /**\n * Position in bytes of the query.\n */\n position: number;\n /**\n * Error description.\n */\n description: string;\n}\n\n/**\n * Option interface for Data Lake file - query operations\n *\n * See:\n * - {@link DataLakeFileClient.query}\n */\nexport interface FileQueryOptions 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 * Configurations for the query input.\n */\n inputTextConfiguration?:\n | FileQueryJsonTextConfiguration\n | FileQueryCsvTextConfiguration\n | FileQueryParquetConfiguration;\n /**\n * Configurations for the query output.\n */\n outputTextConfiguration?:\n | FileQueryJsonTextConfiguration\n | FileQueryCsvTextConfiguration\n | FileQueryArrowConfiguration;\n /**\n * Callback to receive events on the progress of query operation.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * Callback to receive error events during the query operaiton.\n */\n onError?: (error: FileQueryError) => void;\n /**\n * Conditions to meet when uploading to the block file.\n */\n conditions?: DataLakeRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Option interface for the {@link DataLakeFileClient.setExpiry} operation.\n */\nexport interface FileSetExpiryOptions 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 * The time to set the file to expire on, used in combination with the \"Absolute\" {@link FileExpiryMode}.\n * A time in the past is not allowed and milliseconds will be dropped.\n */\n expiresOn?: Date;\n\n /**\n * The number of milliseconds to elapse before the file expires, used in combination with the \"RelativeToCreation\" or \"RelativeToNow\" {@link FileExpiryMode}.\n */\n timeToExpireInMs?: number;\n}\n\n/**\n * Options to configure {@link DataLakeFileClient.generateSasUrl} operation.\n */\nexport interface FileGenerateSasUrlOptions extends CommonGenerateSasUrlOptions {\n /**\n * Optional only when identifier is provided. Specifies the list of permissions to be associated with the SAS.\n */\n permissions?: DataLakeSASPermissions;\n}\n\n/**\n * Options to specify encryption scope on a file system.\n */\nexport declare interface FileSystemEncryptionScope {\n /** Optional. Version 2021-02-12 and later. Specifies the default encryption scope to set on the file system and use for all future writes. */\n defaultEncryptionScope?: string;\n\n /** Optional. Version 2021-02-12 and newer. If true, prevents any request from specifying a different encryption scope than the scope set on the container. */\n preventEncryptionScopeOverride?: boolean;\n}\n\n/** *********************************************************/\n/** DataLakeLeaseClient option and response related models */\n/** *********************************************************/\n"]}
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models.ts"],"names":[],"mappings":"AA6lCA,iFAAiF;AACjF;;;;GAIG;AACH,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IACjC,gEAAqC,CAAA;IACrC,kDAAuB,CAAA;AACzB,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AACD;;;;GAIG;AACH,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AACD;;;;GAIG;AACH,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,2CAAuB,CAAA;IACvB,iCAAa,CAAA;AACf,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AAucD,8DAA8D;AAC9D,6DAA6D;AAC7D,8DAA8D","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { HttpResponse, TransferProgressEvent } from \"@azure/core-http\";\n\nimport {\n LeaseAccessConditions,\n ModifiedAccessConditions as ModifiedAccessConditionsModel,\n UserDelegationKeyModel,\n BlobQueryArrowConfiguration,\n ServiceRenameContainerOptions,\n ContainerRenameResponse,\n ContainerUndeleteResponse,\n} from \"@azure/storage-blob\";\nimport { DataLakePathClient } from \"./clients\";\nexport type ModifiedAccessConditions = Omit<ModifiedAccessConditionsModel, \"ifTags\">;\n\n/**\n * Options to query file with Apache Arrow format. Only valid for {@link FileQueryOptions.outputTextConfiguration}.\n */\nexport type FileQueryArrowConfiguration = BlobQueryArrowConfiguration;\n\n/**\n * Options to configure {@link DataLakeServiceClient.renameFileSystem}.\n */\nexport type ServiceRenameFileSystemOptions = ServiceRenameContainerOptions;\n\n/**\n * Contains response data for the {@link DataLakeServiceClient.renameFileSystem} operation.\n */\nexport type FileSystemRenameResponse = ContainerRenameResponse;\n\n/**\n * Contains response data for the {@link DataLakeServiceClient.undeleteFileSystem} operation.\n */\nexport type FileSystemUndeleteResponse = ContainerUndeleteResponse;\n\nimport {\n CpkInfo,\n FileSystemListBlobHierarchySegmentHeaders,\n FileSystemListPathsHeaders,\n LeaseAction,\n ListBlobsHierarchySegmentResponse,\n PathCreateResponse,\n PathDeleteResponse,\n PathGetPropertiesHeaders as PathGetPropertiesHeadersModel,\n PathList as PathListModel,\n PathUndeleteHeaders,\n} from \"./generated/src/models\";\nimport { DataLakeSASPermissions } from \"./sas/DataLakeSASPermissions\";\nimport { DirectorySASPermissions } from \"./sas/DirectorySASPermissions\";\nimport { FileSystemSASPermissions } from \"./sas/FileSystemSASPermissions\";\nimport { SasIPRange } from \"./sas/SasIPRange\";\nimport { SASProtocol } from \"./sas/SASQueryParameters\";\nimport { CommonOptions } from \"./StorageClient\";\n\nexport {\n LeaseAccessConditions,\n UserDelegationKeyModel,\n ServiceListContainersSegmentResponse,\n Lease,\n LeaseOperationOptions,\n LeaseOperationResponse,\n} from \"@azure/storage-blob\";\n\nexport {\n BlobHierarchyListSegment,\n BlobItemModel,\n BlobPrefix,\n BlobPropertiesModel,\n CpkInfo,\n EncryptionAlgorithmType,\n FileSystemListPathsHeaders,\n FileSystemListBlobHierarchySegmentHeaders,\n FileSystemListPathsResponse as ListPathsSegmentResponse,\n ListBlobsHierarchySegmentResponse,\n Path as PathModel,\n PathList as PathListModel,\n PathCreateHeaders,\n PathDeleteHeaders,\n PathDeleteResponse,\n PathGetPropertiesHeaders as PathGetPropertiesHeadersModel,\n PathSetAccessControlHeaders,\n PathSetAccessControlResponse,\n PathSetAccessControlResponse as PathSetPermissionsResponse,\n PathResourceType as PathResourceTypeModel,\n PathUndeleteHeaders,\n PathUpdateHeaders,\n PathAppendDataHeaders,\n PathFlushDataHeaders,\n PathAppendDataResponse as FileAppendResponse,\n PathFlushDataResponse as FileFlushResponse,\n PathFlushDataResponse as FileUploadResponse,\n PathGetPropertiesAction as PathGetPropertiesActionModel,\n PathRenameMode as PathRenameModeModel,\n PathExpiryOptions as FileExpiryMode,\n PathSetExpiryResponse as FileSetExpiryResponse,\n PathSetExpiryHeaders as FileSetExpiryHeaders,\n} from \"./generated/src/models\";\n\nexport { PathCreateResponse };\n\n/**\n * Common options of the {@link FileSystemGenerateSasUrlOptions}, {@link DirectoryGenerateSasUrlOptions}\n * and {@link FileGenerateSasUrlOptions}.\n */\nexport interface CommonGenerateSasUrlOptions {\n /**\n * The version of the service this SAS will target. If not specified, it will default to the version targeted by the\n * library.\n */\n version?: string;\n\n /**\n * Optional. SAS protocols, HTTPS only or HTTPSandHTTP\n */\n protocol?: SASProtocol;\n\n /**\n * Optional. When the SAS will take effect.\n */\n startsOn?: Date;\n\n /**\n * Optional only when identifier is provided. The time after which the SAS will no longer work.\n */\n expiresOn?: Date;\n\n /**\n * Optional. IP ranges allowed in this SAS.\n */\n ipRange?: SasIPRange;\n\n /**\n * Optional. The name of the access policy on the container this SAS references if any.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy\n */\n identifier?: string;\n\n /**\n * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n\n /**\n * Optional. The cache-control header for the SAS.\n */\n cacheControl?: string;\n\n /**\n * Optional. The content-disposition header for the SAS.\n */\n contentDisposition?: string;\n\n /**\n * Optional. The content-encoding header for the SAS.\n */\n contentEncoding?: string;\n\n /**\n * Optional. The content-language header for the SAS.\n */\n contentLanguage?: string;\n\n /**\n * Optional. The content-type header for the SAS.\n */\n contentType?: string;\n}\n\n/** ***********************************************************/\n/** DataLakeServiceClient option and response related models */\n/** ***********************************************************/\n\nexport interface ServiceGetUserDelegationKeyOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n}\n\n// TODO: Leverage interface definitions from blob package directly, or duplicate create a copy here which will not have generation benefits\nexport interface ServiceGetUserDelegationKeyHeaders {\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport interface UserDelegationKey {\n signedObjectId: string;\n signedTenantId: string;\n signedStartsOn: Date;\n signedExpiresOn: Date;\n signedService: string;\n signedVersion: string;\n value: string;\n}\n\nexport type ServiceGetUserDelegationKeyResponse = UserDelegationKey &\n ServiceGetUserDelegationKeyHeaders & {\n _response: HttpResponse & {\n parsedHeaders: ServiceGetUserDelegationKeyHeaders;\n bodyAsText: string;\n parsedBody: UserDelegationKeyModel;\n };\n };\n\nexport interface ServiceListFileSystemsOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n prefix?: string;\n includeMetadata?: boolean;\n\n /**\n * Specifies whether soft deleted File System should be included in the response.\n */\n includeDeleted?: boolean;\n}\n\nexport type LeaseStatusType = \"locked\" | \"unlocked\";\nexport type LeaseStateType = \"available\" | \"leased\" | \"expired\" | \"breaking\" | \"broken\";\nexport type LeaseDurationType = \"infinite\" | \"fixed\";\nexport type PublicAccessType = \"filesystem\" | \"file\";\n\nexport interface FileSystemProperties {\n lastModified: Date;\n etag: string;\n leaseStatus?: LeaseStatusType;\n leaseState?: LeaseStateType;\n leaseDuration?: LeaseDurationType;\n publicAccess?: PublicAccessType;\n hasImmutabilityPolicy?: boolean;\n hasLegalHold?: boolean;\n defaultEncryptionScope?: string;\n deletedOn?: Date;\n remainingRetentionDays?: number;\n}\n\nexport interface FileSystemItem {\n name: string;\n properties: FileSystemProperties;\n metadata?: Metadata;\n deleted?: boolean;\n versionId?: string;\n}\n\nexport interface ListFileSystemsSegmentResponse {\n serviceEndpoint: string;\n prefix?: string;\n marker?: string;\n maxPageSize?: number;\n fileSystemItems: FileSystemItem[];\n continuationToken?: string;\n}\n\nexport interface ServiceListFileSystemsSegmentHeaders {\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n}\n\nexport type ServiceListFileSystemsSegmentResponse = ListFileSystemsSegmentResponse &\n ServiceListFileSystemsSegmentHeaders & {\n _response: HttpResponse & {\n parsedHeaders: ServiceListFileSystemsSegmentHeaders;\n bodyAsText: string;\n parsedBody: ListFileSystemsSegmentResponse;\n };\n };\n\n/**\n * Options to configure {@link DataLakeServiceClient.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 * Optional. Encryption scope to use when sending requests authorized with this SAS URI.\n */\n encryptionScope?: string;\n}\n\n/**\n * Options to configure {@link DataLakeServiceClient.undeleteFileSystem}.\n */\nexport interface ServiceUndeleteFileSystemOptions 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 * Optional. Specifies the new name of the restored File System.\n * Will use its original name if this is not specified.\n * @deprecated Restore FileSystem to a different name is not supported by service anymore.\n */\n destinationFileSystemName?: string;\n}\n\n/** **************************************************************/\n/** DataLakeFileSystemClient option and response related models */\n/** **************************************************************/\n\nexport interface FileSystemCreateOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n metadata?: Metadata;\n access?: PublicAccessType;\n /**\n * File System encryption scope info.\n */\n fileSystemEncryptionScope?: FileSystemEncryptionScope;\n}\n\nexport interface FileSystemCreateHeaders {\n etag?: string;\n lastModified?: Date;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport type FileSystemCreateResponse = FileSystemCreateHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemCreateHeaders;\n };\n};\n\nexport interface FileSystemDeleteOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n}\n\nexport interface FileSystemDeleteHeaders {\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport type FileSystemDeleteResponse = FileSystemDeleteHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemDeleteHeaders;\n };\n};\n\nexport interface FileSystemGetPropertiesOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: LeaseAccessConditions;\n}\n\nexport interface FileSystemGetPropertiesHeaders {\n metadata?: Metadata;\n etag?: string;\n lastModified?: Date;\n leaseDuration?: LeaseDurationType;\n leaseState?: LeaseStateType;\n leaseStatus?: LeaseStatusType;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n publicAccess?: PublicAccessType;\n hasImmutabilityPolicy?: boolean;\n hasLegalHold?: boolean;\n /**\n * The default encryption scope for the file system.\n */\n defaultEncryptionScope?: string;\n}\n\nexport type FileSystemGetPropertiesResponse = FileSystemGetPropertiesHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemGetPropertiesHeaders;\n };\n};\n\nexport interface FileSystemSetMetadataOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n}\n\nexport interface FileSystemSetMetadataHeaders {\n etag?: string;\n lastModified?: Date;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport type FileSystemSetMetadataResponse = FileSystemSetMetadataHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemSetMetadataHeaders;\n };\n};\n\nexport interface FileSystemGetAccessPolicyOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: LeaseAccessConditions;\n}\n\nexport interface FileSystemGetAccessPolicyHeaders {\n publicAccess?: PublicAccessType;\n etag?: string;\n lastModified?: Date;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport interface RawAccessPolicy {\n startsOn?: string;\n expiresOn?: string;\n permissions: string;\n}\n\nexport interface AccessPolicy {\n startsOn?: Date;\n expiresOn?: Date;\n permissions: string;\n}\n\nexport interface SignedIdentifier<T> {\n id: string;\n accessPolicy: T;\n}\n\nexport type FileSystemGetAccessPolicyResponse = {\n signedIdentifiers: SignedIdentifier<AccessPolicy>[];\n} & FileSystemGetAccessPolicyHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemGetAccessPolicyHeaders;\n bodyAsText: string;\n parsedBody: SignedIdentifier<RawAccessPolicy>[];\n };\n };\n\nexport interface FileSystemSetAccessPolicyOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n}\n\nexport interface FileSystemSetAccessPolicyHeaders {\n etag?: string;\n lastModified?: Date;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport type FileSystemSetAccessPolicyResponse = FileSystemSetAccessPolicyHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemSetAccessPolicyHeaders;\n };\n};\n\nexport interface ListPathsOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n recursive?: boolean;\n path?: string;\n userPrincipalName?: boolean;\n}\n\nexport interface ListPathsSegmentOptions extends ListPathsOptions {\n maxResults?: number;\n}\n\nexport interface Path {\n name?: string;\n isDirectory?: boolean;\n lastModified?: Date;\n etag?: string;\n contentLength?: number;\n owner?: string;\n group?: string;\n permissions?: PathPermissions;\n /**\n * The name of the encryption scope under which the blob is encrypted.\n */\n encryptionScope?: string;\n /**\n * Creation time of the path.\n */\n createdOn?: Date;\n /**\n * Expiry time of the path.\n */\n expiresOn?: Date;\n /**\n * Specifies the encryption context to set on the file.\n */\n encryptionContext?: string;\n}\n\nexport interface PathList {\n pathItems?: Path[];\n}\n\nexport type FileSystemListPathsResponse = PathList &\n FileSystemListPathsHeaders & {\n _response: HttpResponse & {\n parsedHeaders: FileSystemListPathsHeaders;\n bodyAsText: string;\n parsedBody: PathListModel;\n };\n };\n\nexport interface ListDeletedPathsOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n /** Filters results to filesystems within the specified prefix. */\n prefix?: string;\n}\n\nexport interface ListDeletedPathsSegmentOptions extends ListDeletedPathsOptions {\n maxResults?: number;\n}\n\nexport interface DeletedPath {\n name: string;\n deletionId?: string;\n deletedOn?: Date;\n remainingRetentionDays?: number;\n}\n\nexport interface DeletedPathList {\n pathItems?: DeletedPath[];\n}\n\nexport type FileSystemListDeletedPathsResponse = DeletedPathList &\n FileSystemListBlobHierarchySegmentHeaders &\n ListBlobsHierarchySegmentResponse & {\n _response: HttpResponse & {\n /** The response body as text (string format) */\n bodyAsText: string;\n\n /** The response body as parsed JSON or XML */\n parsedBody: ListBlobsHierarchySegmentResponse;\n /** The parsed HTTP response headers. */\n parsedHeaders: FileSystemListBlobHierarchySegmentHeaders;\n };\n\n continuation?: string;\n };\n\nexport interface FileSystemUndeletePathOption extends CommonOptions {\n abortSignal?: AbortSignalLike;\n}\n\nexport type FileSystemUndeletePathResponse = PathUndeleteHeaders & {\n _response: HttpResponse & {\n parsedHeaders: PathUndeleteHeaders;\n };\n pathClient: DataLakePathClient;\n};\n\n/**\n * Option interface for Data Lake file system exists operations\n *\n * See:\n * - {@link DataLakeFileSystemClient.exists}\n */\nexport interface FileSystemExistsOptions 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 * Contains response data for the {@link DataLakeFileSystemClient.createIfNotExists} operation.\n */\nexport interface FileSystemCreateIfNotExistsResponse extends FileSystemCreateResponse {\n /**\n * Indicate whether the file system is successfully created. Is false when the file system is not changed as it already exists.\n */\n succeeded: boolean;\n}\n\n/**\n * Contains response data for the {@link DataLakeFileSystemClient.deleteIfExists} operation.\n */\nexport interface FileSystemDeleteIfExistsResponse extends FileSystemDeleteResponse {\n /**\n * Indicate whether the file system is successfully deleted. Is false if the file system doesn't exist in the first place.\n */\n succeeded: boolean;\n}\n\n/**\n * Options to configure {@link DataLakeFileSystemClient.generateSasUrl} operation.\n */\nexport interface FileSystemGenerateSasUrlOptions extends CommonGenerateSasUrlOptions {\n /**\n * Optional only when identifier is provided. Specifies the list of permissions to be associated with the SAS.\n */\n permissions?: FileSystemSASPermissions;\n}\n\n/** ********************************************************/\n/** DataLakePathClient option and response related models */\n/** ********************************************************/\n\nexport interface Metadata {\n [propertyName: string]: string;\n}\n\nexport interface DataLakeRequestConditions\n extends ModifiedAccessConditions,\n LeaseAccessConditions {}\n\nexport interface RolePermissions {\n read: boolean;\n write: boolean;\n execute: boolean;\n}\n\nexport interface PathPermissions {\n owner: RolePermissions;\n group: RolePermissions;\n other: RolePermissions;\n stickyBit: boolean;\n extendedAcls: boolean;\n}\n\nexport type AccessControlType = \"user\" | \"group\" | \"mask\" | \"other\";\n\nexport interface RemovePathAccessControlItem {\n /**\n * Indicates whether this is the default entry for the ACL.\n */\n defaultScope: boolean;\n /**\n * Specifies which role this entry targets.\n */\n accessControlType: AccessControlType;\n /**\n * Specifies the entity for which this entry applies.\n * Must be omitted for types mask or other. It must also be omitted when the user or group is the owner.\n */\n entityId?: string;\n}\n\nexport interface PathAccessControlItem {\n /**\n * Indicates whether this is the default entry for the ACL.\n */\n defaultScope: boolean;\n /**\n * Specifies which role this entry targets.\n */\n accessControlType: AccessControlType;\n /**\n * Specifies the entity for which this entry applies.\n */\n entityId: string;\n /**\n * Access control permissions.\n */\n permissions: RolePermissions;\n}\n\nexport interface PathCreateHttpHeaders {\n cacheControl?: string;\n contentEncoding?: string;\n contentLanguage?: string;\n contentDisposition?: string;\n contentType?: string;\n}\n\nexport interface PathCreateOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n metadata?: Metadata;\n permissions?: string; // TODO: model or string?\n umask?: string; // TODO: model or string?\n /**\n * Optional. The owner of the blob or directory.\n */\n owner?: string;\n /**\n * Optional. The owning group of the blob or directory.\n */\n group?: string;\n /**\n * Optional. POSIX access control rights on files and directories.\n */\n acl?: PathAccessControlItem[];\n conditions?: DataLakeRequestConditions;\n pathHttpHeaders?: PathCreateHttpHeaders;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats.\n */\n proposedLeaseId?: string;\n /**\n * The lease duration is required to acquire a lease, and specifies the duration of the lease in seconds. The lease duration must be between 15 and 60 seconds or -1 for infinite lease.\n */\n leaseDuration?: number;\n /**\n * Optional. Options for scheduling the deletion of a path.\n * A number value indicates duration before file should be deleted in milliseconds.\n * A Date value indicates the time to set for when the path will be deleted.\n * Does not apply to directories.\n */\n expiresOn?: number | Date;\n /**\n * Optional. Specifies the encryption context to set on the file.\n */\n encryptionContext?: string;\n}\n\nexport interface PathCreateIfNotExistsOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n metadata?: Metadata;\n permissions?: string;\n umask?: string;\n /**\n * Optional. The owner of the blob or directory.\n */\n owner?: string;\n /**\n * Optional. The owning group of the blob or directory.\n */\n group?: string;\n /**\n * Optional. POSIX access control rights on files and directories.\n */\n acl?: PathAccessControlItem[];\n pathHttpHeaders?: PathCreateHttpHeaders;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats.\n */\n proposedLeaseId?: string;\n /**\n * The lease duration is required to acquire a lease, and specifies the duration of the lease in seconds. The lease duration must be between 15 and 60 seconds or -1 for infinite lease.\n */\n leaseDuration?: number;\n /**\n * Optional. Options for scheduling the deletion of a path.\n * A number value indicates duration before file should be deleted in milliseconds.\n * A Date value indicates the time to set for when the path will be deleted.\n * Does not apply to directories.\n */\n expiresOn?: number | Date;\n /**\n * Optional. Specifies the encryption context to set on the file.\n */\n encryptionContext?: string;\n}\n\nexport interface PathDeleteOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n}\n\nexport interface PathGetAccessControlOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n userPrincipalName?: boolean;\n}\n\nexport interface PathGetAccessControlHeaders {\n date?: Date;\n etag?: string;\n lastModified?: Date;\n owner?: string;\n group?: string;\n requestId?: string;\n version?: string;\n}\n\nexport interface PathAccessControl {\n owner?: string;\n group?: string;\n permissions?: PathPermissions;\n acl: PathAccessControlItem[];\n}\n\nexport type PathGetAccessControlResponse = PathAccessControl &\n PathGetAccessControlHeaders & {\n _response: HttpResponse & {\n parsedHeaders: PathGetPropertiesHeadersModel;\n };\n };\n\nexport interface PathSetAccessControlOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n owner?: string;\n group?: string;\n}\n\n/**\n * Options type for `setAccessControlRecursive`, `updateAccessControlRecursive` and `removeAccessControlRecursive`.\n */\nexport interface PathChangeAccessControlRecursiveOptions 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 * Optional. If data set size exceeds batch size then operation will be split into multiple requests so that progress can be tracked.\n * Batch size should be between 1 and 2000. The default when unspecified is 2000.\n */\n batchSize?: number;\n /**\n * Optional. Defines maximum number of batches that single change Access Control operation can execute.\n * If maximum is reached before all subpaths are processed then continuation token can be used to resume operation.\n * Empty value indicates that maximum number of batches in unbound and operation continues till end.\n */\n maxBatches?: number;\n /**\n * Optional. Default false. If set to false, the operation will terminate quickly on encountering user failures.\n * If true, the operation will ignore user failures and proceed with the operation on other sub-entities of the directory.\n */\n continueOnFailure?: boolean;\n /**\n * Continuation token to continue next batch of operations.\n */\n continuationToken?: string;\n /**\n * Callback where caller can track progress of the operation\n * as well as collect paths that failed to change Access Control.\n */\n onProgress?: (progress: AccessControlChanges) => void;\n}\n\n/**\n * Represents an entry that failed to update Access Control List during `setAccessControlRecursive`, `updateAccessControlRecursive` and `removeAccessControlRecursive`.\n */\nexport interface AccessControlChangeError {\n /**\n * Returns name of an entry.\n */\n name: string;\n /**\n * Returns whether entry is a directory.\n */\n isDirectory: boolean;\n /**\n * Returns error message that is the reason why entry failed to update.\n */\n message: string;\n}\n\n/**\n * AccessControlChanges contains batch and cumulative counts of operations that change Access Control Lists recursively.\n * Additionally it exposes path entries that failed to update while these operations progress.\n */\nexport interface AccessControlChanges {\n /**\n * Path entries that failed to update Access Control List within single batch.\n */\n batchFailures: AccessControlChangeError[];\n /**\n * Counts of paths changed within single batch.\n */\n batchCounters: AccessControlChangeCounters;\n /**\n * Counts of paths changed from start of the operation.\n */\n aggregateCounters: AccessControlChangeCounters;\n /**\n * Optional. Value is present when operation is split into multiple batches and can be used to resume progress.\n */\n continuationToken?: string;\n}\n\n/**\n * AccessControlChangeCounters contains counts of operations that change Access Control Lists recursively.\n */\nexport interface AccessControlChangeCounters {\n /**\n * Returns number of directories where Access Control List has been updated successfully.\n */\n changedDirectoriesCount: number;\n /**\n * Returns number of files where Access Control List has been updated successfully.\n */\n changedFilesCount: number;\n /**\n * Returns number of paths where Access Control List update has failed.\n */\n failedChangesCount: number;\n}\n\n/**\n * Response type for `setAccessControlRecursive`, `updateAccessControlRecursive` and `removeAccessControlRecursive`.\n */\nexport interface PathChangeAccessControlRecursiveResponse {\n /**\n * Contains counts of paths changed from start of the operation.\n */\n counters: AccessControlChangeCounters;\n /**\n * Optional. Value is present when operation is split into multiple batches and can be used to resume progress.\n */\n continuationToken?: string;\n}\n\nexport interface PathSetPermissionsOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n owner?: string;\n group?: string;\n}\n\nexport interface PathGetPropertiesOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\nexport type CopyStatusType = \"pending\" | \"success\" | \"aborted\" | \"failed\";\n\nexport interface PathGetPropertiesHeaders {\n lastModified?: Date;\n createdOn?: Date;\n metadata?: Metadata;\n copyCompletedOn?: Date;\n copyStatusDescription?: string;\n copyId?: string;\n copyProgress?: string;\n copySource?: string;\n copyStatus?: CopyStatusType;\n isIncrementalCopy?: boolean;\n destinationSnapshot?: string;\n leaseDuration?: LeaseDurationType;\n leaseState?: LeaseStateType;\n leaseStatus?: LeaseStatusType;\n contentLength?: number;\n contentType?: string;\n etag?: string;\n contentMD5?: Uint8Array;\n contentEncoding?: string;\n contentDisposition?: string;\n contentLanguage?: string;\n cacheControl?: string;\n // blobSequenceNumber?: number;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n acceptRanges?: string;\n // blobCommittedBlockCount?: number;\n isServerEncrypted?: boolean;\n encryptionKeySha256?: string;\n /**\n * Returns the name of the encryption scope used to encrypt the path contents and application metadata.\n * Note that the absence of this header implies use of the default account encryption scope.\n */\n encryptionScope?: string;\n accessTier?: string;\n accessTierInferred?: boolean;\n archiveStatus?: string;\n accessTierChangedOn?: Date;\n\n /**\n * The time the file will expire.\n */\n expiresOn?: Date;\n /**\n * Optional. Specifies the encryption context to set on the file.\n */\n encryptionContext?: string;\n}\n\nexport type PathGetPropertiesResponse = PathGetPropertiesHeaders & {\n _response: HttpResponse & {\n parsedHeaders: PathGetPropertiesHeaders;\n };\n};\n\nexport interface PathSetHttpHeadersOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n}\n\nexport interface PathHttpHeaders {\n cacheControl?: string;\n contentEncoding?: string;\n contentLanguage?: string;\n contentDisposition?: string;\n contentType?: string;\n contentMD5?: Uint8Array;\n}\n\nexport interface PathSetHttpHeadersHeaders {\n etag?: string;\n lastModified?: Date;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n}\n\nexport type PathSetHttpHeadersResponse = PathSetHttpHeadersHeaders & {\n _response: HttpResponse & {\n parsedHeaders: PathSetHttpHeadersHeaders;\n };\n};\n\nexport interface PathSetMetadataOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\nexport interface PathSetMetadataHeaders {\n etag?: string;\n lastModified?: Date;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n date?: Date;\n isServerEncrypted?: boolean;\n encryptionKeySha256?: string;\n}\n\nexport type PathSetMetadataResponse = PathSetMetadataHeaders & {\n _response: HttpResponse & {\n parsedHeaders: PathSetMetadataHeaders;\n };\n};\n\nexport interface PathMoveOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n destinationConditions?: DataLakeRequestConditions;\n}\n\nexport interface PathRemoveHeaders {\n date?: Date;\n etag?: string;\n lastModified?: Date;\n requestId?: string;\n version?: string;\n contentLength?: number;\n}\n\nexport type PathMoveResponse = PathRemoveHeaders & {\n _response: HttpResponse & {\n parsedHeaders: PathRemoveHeaders;\n };\n};\n\n/**\n * Option interface for Data Lake directory/file exists operations\n *\n * See:\n * - {@link DataLakePathClient.exists}\n */\nexport interface PathExistsOptions 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 * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Contains response data for the {@link DataLakePathClient.createIfNotExists} operation.\n */\nexport interface PathCreateIfNotExistsResponse extends PathCreateResponse {\n /**\n * Indicate whether the directory/file is successfully created. Is false when the directory/file is not changed as it already exists.\n */\n succeeded: boolean;\n}\n\n/**\n * Contains response data for the {@link DataLakePathClient.deleteIfExists} operation.\n */\nexport interface PathDeleteIfExistsResponse extends PathDeleteResponse {\n /**\n * Indicate whether the directory/file is successfully deleted. Is false if the directory/file doesn't exist in the first place.\n */\n succeeded: boolean;\n}\n\n// Keeping these for backward compatibility when we changed to use string unions.\n/**\n * Defines values for PathGetPropertiesAction.\n * Possible values include: 'getAccessControl', 'getStatus'\n * @readonly\n */\nexport enum PathGetPropertiesAction {\n GetAccessControl = \"getAccessControl\",\n GetStatus = \"getStatus\",\n}\n/**\n * Defines values for PathRenameMode.\n * Possible values include: 'legacy', 'posix'\n * @readonly\n */\nexport enum PathRenameMode {\n Legacy = \"legacy\",\n Posix = \"posix\",\n}\n/**\n * Defines values for PathResourceType.\n * Possible values include: 'directory', 'file'\n * @readonly\n */\nexport enum PathResourceType {\n Directory = \"directory\",\n File = \"file\",\n}\n\n/** **************************************************************/\n/** DataLakeDirectoryClient option and response related models **/\n/** **************************************************************/\n\nexport interface DirectoryCreateOptions extends PathCreateOptions {}\n\nexport interface DirectoryCreateIfNotExistsOptions extends PathCreateIfNotExistsOptions {}\n\nexport interface DirectoryCreateResponse extends PathCreateResponse {}\n\nexport interface DirectoryCreateIfNotExistsResponse extends PathCreateIfNotExistsResponse {}\n\n/**\n * Options to configure {@link DataLakeDirectoryClient.generateSasUrl} operation.\n */\nexport interface DirectoryGenerateSasUrlOptions extends CommonGenerateSasUrlOptions {\n /**\n * Optional only when identifier is provided. Specifies the list of permissions to be associated with the SAS.\n */\n permissions?: DirectorySASPermissions;\n}\n\n/** *********************************************************/\n/** DataLakeFileClient option and response related models **/\n/** *********************************************************/\n\nexport interface FileReadOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n rangeGetContentMD5?: boolean;\n rangeGetContentCrc64?: boolean;\n conditions?: DataLakeRequestConditions;\n onProgress?: (progress: TransferProgressEvent) => void;\n maxRetryRequests?: number;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\nexport interface FileReadHeaders {\n lastModified?: Date;\n /**\n * Returns the date and time the file was created.\n */\n createdOn?: Date;\n metadata?: Metadata;\n contentLength?: number;\n contentType?: string;\n contentRange?: string;\n etag?: string;\n contentMD5?: Uint8Array;\n contentEncoding?: string;\n cacheControl?: string;\n contentDisposition?: string;\n contentLanguage?: string;\n // blobSequenceNumber?: number;\n copyCompletedOn?: Date;\n copyStatusDescription?: string;\n copyId?: string;\n copyProgress?: string;\n copySource?: string;\n copyStatus?: CopyStatusType;\n leaseDuration?: LeaseDurationType;\n leaseState?: LeaseStateType;\n leaseStatus?: LeaseStatusType;\n clientRequestId?: string;\n requestId?: string;\n version?: string;\n acceptRanges?: string;\n date?: Date;\n // blobCommittedBlockCount?: number;\n isServerEncrypted?: boolean;\n encryptionKeySha256?: string;\n fileContentMD5?: Uint8Array; // Content MD5 for whole file\n contentCrc64?: Uint8Array;\n /**\n * Specifies the encryption context to set on the file.\n */\n encryptionContext?: string;\n}\n\nexport type FileReadResponse = FileReadHeaders & {\n contentAsBlob?: Promise<Blob>;\n readableStreamBody?: NodeJS.ReadableStream;\n _response: HttpResponse & {\n parsedHeaders: FileReadHeaders;\n };\n};\n\nexport interface FileAppendOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: LeaseAccessConditions;\n transactionalContentMD5?: Uint8Array;\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * If file should be flushed automatically after the append\n */\n flush?: boolean;\n /**\n * Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats.\n * */\n proposedLeaseId?: string;\n /**\n * The lease duration is required to acquire a lease, and specifies the duration of the lease in seconds. The lease duration must be between 15 and 60 seconds or -1 for infinite lease.\n * */\n leaseDurationInSeconds?: number;\n /**\n * Optional. If \"acquire\" it will acquire the lease. If \"auto-renew\" it will renew the lease. If \"release\" it will release the lease only on flush. If \"acquire-release\" it will acquire & complete the operation & release the lease once operation is done.\n * */\n leaseAction?: LeaseAction;\n}\n\nexport interface FileFlushOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n retainUncommittedData?: boolean;\n close?: boolean;\n pathHttpHeaders?: PathHttpHeaders;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Proposed lease ID, in a GUID string format. The Blob service returns 400 (Invalid request) if the proposed lease ID is not in the correct format. See Guid Constructor (String) for a list of valid GUID string formats.\n */\n proposedLeaseId?: string;\n /**\n * The lease duration is required to acquire a lease, and specifies the duration of the lease in seconds. The lease duration must be between 15 and 60 seconds or -1 for infinite lease.\n */\n leaseDurationInSeconds?: number;\n /**\n * Optional. If \"acquire\" it will acquire the lease. If \"auto-renew\" it will renew the lease. If \"release\" it will release the lease only on flush. If \"acquire-release\" it will acquire & complete the operation & release the lease once operation is done.\n */\n leaseAction?: LeaseAction;\n}\n\nexport interface FileCreateOptions extends PathCreateOptions {}\n\nexport interface FileCreateIfNotExistsOptions extends PathCreateIfNotExistsOptions {}\n\nexport interface FileCreateResponse extends PathCreateResponse {}\n\nexport interface FileCreateIfNotExistsResponse extends PathCreateIfNotExistsResponse {}\n\n/**\n * Option interface for Data Lake file - Upload operations\n *\n * See:\n * - {@link DataLakeFileClient.upload}\n * - {@link DataLakeFileClient.uploadFile}\n * - {@link DataLakeFileClient.uploadStream}\n */\nexport interface FileParallelUploadOptions extends CommonOptions {\n // For all.\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 * Access conditions headers.\n */\n conditions?: DataLakeRequestConditions;\n\n // For create and flush.\n /**\n * Http headers.\n */\n pathHttpHeaders?: PathHttpHeaders;\n\n // For create.\n /**\n * A collection of key-value string pair to associate with the Data Lake file.\n */\n metadata?: Metadata;\n\n /**\n * Sets POSIX access permissions for the file owner, the file owning group, and others.\n * Each class may be granted read, write, or execute permission. The sticky bit is also supported.\n * Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported.\n */\n permissions?: string; // TODO: model or string?\n\n /**\n * The umask restricts the permissions of the file to be created.\n * The resulting permission is given by p & ^u, where p is the permission and u is the umask.\n * For example, if p is 0777 and u is 0057, then the resulting permission is 0720.\n * The default permission is 0666 for a file. The default umask is 0027.\n * The umask must be specified in 4-digit octal notation (e.g. 0766).\n */\n umask?: string; // TODO: model or string?\n\n // For append.\n /**\n * Progress updater.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n // For flush.\n /**\n * When Azure Storage Events are enabled, a file changed event is raised.\n * This event has a property indicating whether this is the final change\n * to distinguish the difference between an intermediate flush to a file stream (when close set to \"false\")\n * and the final close of a file stream (when close set to \"true\").\n */\n close?: boolean;\n\n // For parallel transfer control.\n\n /**\n * Data size threshold in bytes to use a single upload operation rather than parallel uploading.\n * Data of smaller size than this limit will be transferred in a single upload.\n * Data larger than this limit will be transferred in chunks in parallel.\n * Its default and max value is FILE_MAX_SINGLE_UPLOAD_THRESHOLD.\n * Note: {@link DataLakeFileClient.uploadStream} do not respect this field and always do parallel uploading.\n */\n singleUploadThreshold?: number;\n\n /**\n * The size of data in bytes that will be transferred in parallel.\n * If set to 0 or undefined, it will be automatically calculated according\n * to the data size. Its max value is FILE_UPLOAD_MAX_CHUNK_SIZE.\n */\n chunkSize?: number;\n /**\n * Max concurrency of parallel uploading. Must be greater than or equal to 0. Its default value is DEFAULT_HIGH_LEVEL_CONCURRENCY.\n */\n maxConcurrency?: number;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n /**\n * Specifies the encryption context to set on the file.\n */\n encryptionContext?: string;\n}\n\n/**\n * Option interface for Data Lake file - readToBuffer operations\n *\n * See:\n * - {@link DataLakeFileClient.readToBuffer}\n */\nexport interface FileReadToBufferOptions 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 * Access conditions headers.\n */\n conditions?: DataLakeRequestConditions;\n\n /**\n * Progress updater.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n\n /**\n * How many retries will perform for each read when the original chunk read stream ends unexpectedly.\n * Above kind of ends will not trigger retry policy defined in a pipeline,\n * because they doesn't emit network errors. Default value is 5.\n */\n maxRetryRequestsPerChunk?: number;\n\n /**\n * chunkSize is size of data every request trying to read.\n * Must be greater than or equal to 0, if set to 0 or undefined, it will automatically calculated according\n * to the file size.\n */\n chunkSize?: number;\n\n /**\n * Concurrency of parallel read.\n */\n concurrency?: number;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Options to query file with JSON format.\n */\nexport interface FileQueryJsonTextConfiguration {\n /**\n * Record separator.\n */\n recordSeparator: string;\n /**\n * Query for a JSON format file.\n */\n kind: \"json\";\n}\n\n/**\n * Options to query file with CSV format.\n */\nexport interface FileQueryCsvTextConfiguration {\n /**\n * Record separator.\n */\n recordSeparator: string;\n /**\n * Query for a CSV format file.\n */\n kind: \"csv\";\n /**\n * Column separator. Default is \",\".\n */\n columnSeparator?: string;\n /**\n * Field quote.\n */\n fieldQuote?: string;\n /**\n * Escape character.\n */\n escapeCharacter?: string;\n /**\n * Has headers. Default is false.\n */\n hasHeaders?: boolean;\n}\n\n/**\n * Options to query file with Parquet format.\n */\nexport interface FileQueryParquetConfiguration {\n /**\n * Kind.\n */\n kind: \"parquet\";\n}\n\n/**\n * File query error type.\n */\nexport interface FileQueryError {\n /**\n * Whether the error is fatal or not. A fatal error will stop the query.\n */\n isFatal: boolean;\n /**\n * Error name.\n */\n name: string;\n /**\n * Position in bytes of the query.\n */\n position: number;\n /**\n * Error description.\n */\n description: string;\n}\n\n/**\n * Option interface for Data Lake file - query operations\n *\n * See:\n * - {@link DataLakeFileClient.query}\n */\nexport interface FileQueryOptions 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 * Configurations for the query input.\n */\n inputTextConfiguration?:\n | FileQueryJsonTextConfiguration\n | FileQueryCsvTextConfiguration\n | FileQueryParquetConfiguration;\n /**\n * Configurations for the query output.\n */\n outputTextConfiguration?:\n | FileQueryJsonTextConfiguration\n | FileQueryCsvTextConfiguration\n | FileQueryArrowConfiguration;\n /**\n * Callback to receive events on the progress of query operation.\n */\n onProgress?: (progress: TransferProgressEvent) => void;\n /**\n * Callback to receive error events during the query operaiton.\n */\n onError?: (error: FileQueryError) => void;\n /**\n * Conditions to meet when uploading to the block file.\n */\n conditions?: DataLakeRequestConditions;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\n/**\n * Option interface for the {@link DataLakeFileClient.setExpiry} operation.\n */\nexport interface FileSetExpiryOptions 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 * The time to set the file to expire on, used in combination with the \"Absolute\" {@link FileExpiryMode}.\n * A time in the past is not allowed and milliseconds will be dropped.\n */\n expiresOn?: Date;\n\n /**\n * The number of milliseconds to elapse before the file expires, used in combination with the \"RelativeToCreation\" or \"RelativeToNow\" {@link FileExpiryMode}.\n */\n timeToExpireInMs?: number;\n}\n\n/**\n * Options to configure {@link DataLakeFileClient.generateSasUrl} operation.\n */\nexport interface FileGenerateSasUrlOptions extends CommonGenerateSasUrlOptions {\n /**\n * Optional only when identifier is provided. Specifies the list of permissions to be associated with the SAS.\n */\n permissions?: DataLakeSASPermissions;\n}\n\n/**\n * Options to specify encryption scope on a file system.\n */\nexport declare interface FileSystemEncryptionScope {\n /** Optional. Version 2021-02-12 and later. Specifies the default encryption scope to set on the file system and use for all future writes. */\n defaultEncryptionScope?: string;\n\n /** Optional. Version 2021-02-12 and newer. If true, prevents any request from specifying a different encryption scope than the scope set on the container. */\n preventEncryptionScopeOverride?: boolean;\n}\n\n/** *********************************************************/\n/** DataLakeLeaseClient option and response related models */\n/** *********************************************************/\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
|
-
export const SDK_VERSION = "12.
|
|
4
|
-
export const SERVICE_VERSION = "
|
|
3
|
+
export const SDK_VERSION = "12.13.0";
|
|
4
|
+
export const SERVICE_VERSION = "2022-11-02";
|
|
5
5
|
export const KB = 1024;
|
|
6
6
|
export const MB = KB * 1024;
|
|
7
7
|
export const GB = MB * 1024;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,SAAS,CAAC;AAC7C,MAAM,CAAC,MAAM,eAAe,GAAW,YA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A6B,CAAC;IAC7D,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;IACjD,CAAC,2BAA2B,EAAE,4BAA4B,CAAC;IAC3D,CAAC,wBAAwB,EAAE,yBAAyB,CAAC;IACrD,CAAC,uBAAuB,EAAE,wBAAwB,CAAC;CACpD,CAAC;AAEF,oEAAoE;AACpE,oDAAoD;AACpD,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,CAAC,+BAA+B,EAAE,8BAA8B,CAAC;IACjE,CAAC,uBAAuB,EAAE,sBAAsB,CAAC;IACjD,CAAC,4BAA4B,EAAE,2BAA2B,CAAC;IAC3D,CAAC,6BAA6B,EAAE,4BAA4B,CAAC;IAC7D,CAAC,uBAAuB,EAAE,sBAAsB,CAAC;IACjD,CAAC,4BAA4B,EAAE,2BAA2B,CAAC;IAC3D,CAAC,yBAAyB,EAAE,wBAAwB,CAAC;IACrD,CAAC,wBAAwB,EAAE,uBAAuB,CAAC;CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAC;AAE3B,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAC1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAAC;AAEjD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,gBAAgB,EAAE,MAAM;IACxB,qBAAqB,EAAE,WAAW;CACnC,CAAC;AAEF,iDAAiD;AACjD,wGAAwG;AACxG,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;CACR,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const SDK_VERSION: string = \"12.12.0\";\nexport const SERVICE_VERSION: string = \"2021-12-02\";\n\nexport const KB: number = 1024;\nexport const MB: number = KB * 1024;\nexport const GB: number = MB * 1024;\nexport const TB: number = GB * 1024;\n\nexport const DEFAULT_HIGH_LEVEL_CONCURRENCY: number = 5;\nexport const FILE_MAX_SINGLE_UPLOAD_THRESHOLD: number = 100 * MB;\nexport const FILE_UPLOAD_MAX_CHUNK_SIZE: number = 4000 * MB;\nexport const FILE_UPLOAD_DEFAULT_CHUNK_SIZE: number = 8 * MB;\nexport const BLOCK_BLOB_MAX_BLOCKS: number = 50000;\nexport const FILE_MAX_SIZE_BYTES: number = BLOCK_BLOB_MAX_BLOCKS * FILE_UPLOAD_MAX_CHUNK_SIZE;\n\nexport const StorageOAuthScopes: string | string[] = \"https://storage.azure.com/.default\";\n\nexport const StorageDataLakeLoggingAllowedHeaderNames = [\n \"Access-Control-Allow-Origin\",\n \"Cache-Control\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"Request-Id\",\n \"traceparent\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"x-ms-client-request-id\",\n \"x-ms-date\",\n \"x-ms-error-code\",\n \"x-ms-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-version\",\n \"Accept-Ranges\",\n \"Content-Disposition\",\n \"Content-Encoding\",\n \"Content-Language\",\n \"Content-MD5\",\n \"Content-Range\",\n \"ETag\",\n \"Last-Modified\",\n \"Server\",\n \"Vary\",\n \"x-ms-content-crc64\",\n \"x-ms-copy-action\",\n \"x-ms-copy-completion-time\",\n \"x-ms-copy-id\",\n \"x-ms-copy-progress\",\n \"x-ms-copy-status\",\n \"x-ms-has-immutability-policy\",\n \"x-ms-has-legal-hold\",\n \"x-ms-lease-state\",\n \"x-ms-lease-status\",\n \"x-ms-range\",\n \"x-ms-request-server-encrypted\",\n \"x-ms-server-encrypted\",\n \"x-ms-snapshot\",\n \"x-ms-source-range\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"x-ms-access-tier\",\n \"x-ms-access-tier-change-time\",\n \"x-ms-access-tier-inferred\",\n \"x-ms-account-kind\",\n \"x-ms-archive-status\",\n \"x-ms-blob-append-offset\",\n \"x-ms-blob-cache-control\",\n \"x-ms-blob-committed-block-count\",\n \"x-ms-blob-condition-appendpos\",\n \"x-ms-blob-condition-maxsize\",\n \"x-ms-blob-content-disposition\",\n \"x-ms-blob-content-encoding\",\n \"x-ms-blob-content-language\",\n \"x-ms-blob-content-length\",\n \"x-ms-blob-content-md5\",\n \"x-ms-blob-content-type\",\n \"x-ms-blob-public-access\",\n \"x-ms-blob-sequence-number\",\n \"x-ms-blob-type\",\n \"x-ms-copy-destination-snapshot\",\n \"x-ms-creation-time\",\n \"x-ms-default-encryption-scope\",\n \"x-ms-delete-snapshots\",\n \"x-ms-delete-type-permanent\",\n \"x-ms-deny-encryption-scope-override\",\n \"x-ms-encryption-algorithm\",\n \"x-ms-if-sequence-number-eq\",\n \"x-ms-if-sequence-number-le\",\n \"x-ms-if-sequence-number-lt\",\n \"x-ms-incremental-copy\",\n \"x-ms-lease-action\",\n \"x-ms-lease-break-period\",\n \"x-ms-lease-duration\",\n \"x-ms-lease-id\",\n \"x-ms-lease-time\",\n \"x-ms-page-write\",\n \"x-ms-proposed-lease-id\",\n \"x-ms-range-get-content-md5\",\n \"x-ms-rehydrate-priority\",\n \"x-ms-sequence-number-action\",\n \"x-ms-sku-name\",\n \"x-ms-source-content-md5\",\n \"x-ms-source-if-match\",\n \"x-ms-source-if-modified-since\",\n \"x-ms-source-if-none-match\",\n \"x-ms-source-if-unmodified-since\",\n \"x-ms-tag-count\",\n \"x-ms-encryption-key-sha256\",\n];\n\nexport const StorageDataLakeLoggingAllowedQueryParameters = [\n \"comp\",\n \"maxresults\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"se\",\n \"si\",\n \"sip\",\n \"sp\",\n \"spr\",\n \"sr\",\n \"srt\",\n \"ss\",\n \"st\",\n \"sv\",\n \"include\",\n \"marker\",\n \"prefix\",\n \"copyid\",\n \"restype\",\n \"blockid\",\n \"blocklisttype\",\n \"delimiter\",\n \"prevsnapshot\",\n \"ske\",\n \"skoid\",\n \"sks\",\n \"skt\",\n \"sktid\",\n \"skv\",\n \"snapshot\",\n];\n\nexport const UrlConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SIGNATURE: \"sig\",\n SNAPSHOT: \"snapshot\",\n TIMEOUT: \"timeout\",\n },\n};\n\nexport const HttpUrlConnection = {\n HTTP_ACCEPTED: 202,\n HTTP_CONFLICT: 409,\n HTTP_NOT_FOUND: 404,\n HTTP_PRECON_FAILED: 412,\n HTTP_RANGE_NOT_SATISFIABLE: 416,\n};\n\nexport const HeaderConstants = {\n AUTHORIZATION: \"Authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n CONTENT_ENCODING: \"Content-Encoding\",\n CONTENT_ID: \"Content-ID\",\n CONTENT_LANGUAGE: \"Content-Language\",\n CONTENT_LENGTH: \"Content-Length\",\n CONTENT_MD5: \"Content-Md5\",\n CONTENT_TRANSFER_ENCODING: \"Content-Transfer-Encoding\",\n CONTENT_TYPE: \"Content-Type\",\n COOKIE: \"Cookie\",\n DATE: \"date\",\n IF_MATCH: \"if-match\",\n IF_MODIFIED_SINCE: \"if-modified-since\",\n IF_NONE_MATCH: \"if-none-match\",\n IF_UNMODIFIED_SINCE: \"if-unmodified-since\",\n PREFIX_FOR_STORAGE: \"x-ms-\",\n RANGE: \"Range\",\n USER_AGENT: \"User-Agent\",\n X_MS_CLIENT_REQUEST_ID: \"x-ms-client-request-id\",\n X_MS_COPY_SOURCE: \"x-ms-copy-source\",\n X_MS_DATE: \"x-ms-date\",\n X_MS_ERROR_CODE: \"x-ms-error-code\",\n X_MS_VERSION: \"x-ms-version\",\n};\n\nexport const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;\n\n// Mapping pairs to transform url from dfs endpoint to blob endpoint\n// Customize this value to add more mapping patterns\nexport const ToBlobEndpointHostMappings = [\n [\"dfs.preprod.core.windows.net\", \"blob.preprod.core.windows.net\"],\n [\"dfs.core.windows.net\", \"blob.core.windows.net\"],\n [\"dfs.core.chinacloudapi.cn\", \"blob.core.chinacloudapi.cn\"],\n [\"dfs.core.usgovcloudapi.net\", \"blob.core.usgovcloudapi.net\"],\n [\"dfs.core.cloudapi.de\", \"blob.core.cloudapi.de\"],\n [\"dfs.core.microsoft.scloud\", \"blob.core.microsoft.scloud\"],\n [\"dfs.core.eaglex.ic.gov\", \"blob.core.eaglex.ic.gov\"],\n [\"dfs.storage.azure.net\", \"blob.storage.azure.net\"],\n];\n\n// Mapping pairs to transform url from blob endpoint to dfs endpoint\n// Customize this value to add more mapping patterns\nexport const ToDfsEndpointHostMappings = [\n [\"blob.preprod.core.windows.net\", \"dfs.preprod.core.windows.net\"],\n [\"blob.core.windows.net\", \"dfs.core.windows.net\"],\n [\"blob.core.chinacloudapi.cn\", \"dfs.core.chinacloudapi.cn\"],\n [\"blob.core.usgovcloudapi.net\", \"dfs.core.usgovcloudapi.net\"],\n [\"blob.core.cloudapi.de\", \"dfs.core.cloudapi.de\"],\n [\"blob.core.microsoft.scloud\", \"dfs.core.microsoft.scloud\"],\n [\"blob.core.eaglex.ic.gov\", \"dfs.core.eaglex.ic.gov\"],\n [\"blob.storage.azure.net\", \"dfs.storage.azure.net\"],\n];\n\nexport const ETagAny = \"*\";\n\nexport const DeletionIdKey = \"deletionid\";\nexport const EncryptionAlgorithmAES25 = \"AES256\";\n\nexport const PathResultTypeConstants = {\n FileResourceType: \"file\",\n DirectoryResourceType: \"directory\",\n};\n\n/// List of ports used for path style addressing.\n/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.\nexport const PathStylePorts = [\n \"10000\",\n \"10001\",\n \"10002\",\n \"10003\",\n \"10004\",\n \"10100\",\n \"10101\",\n \"10102\",\n \"10103\",\n \"10104\",\n \"11000\",\n \"11001\",\n \"11002\",\n \"11003\",\n \"11004\",\n \"11100\",\n \"11101\",\n \"11102\",\n \"11103\",\n \"11104\",\n];\n"]}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,CAAC,MAAM,WAAW,GAAW,SAAS,CAAC;AAC7C,MAAM,CAAC,MAAM,eAAe,GAAW,YAAY,CAAC;AAEpD,MAAM,CAAC,MAAM,EAAE,GAAW,IAAI,CAAC;AAC/B,MAAM,CAAC,MAAM,EAAE,GAAW,EAAE,GAAG,IAAI,CAAC;AACpC,MAAM,CAAC,MAAM,EAAE,GAAW,EAAE,GAAG,IAAI,CAAC;AACpC,MAAM,CAAC,MAAM,EAAE,GAAW,EAAE,GAAG,IAAI,CAAC;AAEpC,MAAM,CAAC,MAAM,8BAA8B,GAAW,CAAC,CAAC;AACxD,MAAM,CAAC,MAAM,gCAAgC,GAAW,GAAG,GAAG,EAAE,CAAC;AACjE,MAAM,CAAC,MAAM,0BAA0B,GAAW,IAAI,GAAG,EAAE,CAAC;AAC5D,MAAM,CAAC,MAAM,8BAA8B,GAAW,CAAC,GAAG,EAAE,CAAC;AAC7D,MAAM,CAAC,MAAM,qBAAqB,GAAW,KAAK,CAAC;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAAW,qBAAqB,GAAG,0BAA0B,CAAC;AAE9F,MAAM,CAAC,MAAM,kBAAkB,GAAsB,oCAAoC,CAAC;AAE1F,MAAM,CAAC,MAAM,wCAAwC,GAAG;IACtD,6BAA6B;IAC7B,eAAe;IACf,gBAAgB;IAChB,cAAc;IACd,MAAM;IACN,YAAY;IACZ,aAAa;IACb,mBAAmB;I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BAAgB,EAAE,MAAM;IACxB,qBAAqB,EAAE,WAAW;CACnC,CAAC;AAEF,iDAAiD;AACjD,wGAAwG;AACxG,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;CACR,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const SDK_VERSION: string = \"12.13.0\";\nexport const SERVICE_VERSION: string = \"2022-11-02\";\n\nexport const KB: number = 1024;\nexport const MB: number = KB * 1024;\nexport const GB: number = MB * 1024;\nexport const TB: number = GB * 1024;\n\nexport const DEFAULT_HIGH_LEVEL_CONCURRENCY: number = 5;\nexport const FILE_MAX_SINGLE_UPLOAD_THRESHOLD: number = 100 * MB;\nexport const FILE_UPLOAD_MAX_CHUNK_SIZE: number = 4000 * MB;\nexport const FILE_UPLOAD_DEFAULT_CHUNK_SIZE: number = 8 * MB;\nexport const BLOCK_BLOB_MAX_BLOCKS: number = 50000;\nexport const FILE_MAX_SIZE_BYTES: number = BLOCK_BLOB_MAX_BLOCKS * FILE_UPLOAD_MAX_CHUNK_SIZE;\n\nexport const StorageOAuthScopes: string | string[] = \"https://storage.azure.com/.default\";\n\nexport const StorageDataLakeLoggingAllowedHeaderNames = [\n \"Access-Control-Allow-Origin\",\n \"Cache-Control\",\n \"Content-Length\",\n \"Content-Type\",\n \"Date\",\n \"Request-Id\",\n \"traceparent\",\n \"Transfer-Encoding\",\n \"User-Agent\",\n \"x-ms-client-request-id\",\n \"x-ms-date\",\n \"x-ms-error-code\",\n \"x-ms-request-id\",\n \"x-ms-return-client-request-id\",\n \"x-ms-version\",\n \"Accept-Ranges\",\n \"Content-Disposition\",\n \"Content-Encoding\",\n \"Content-Language\",\n \"Content-MD5\",\n \"Content-Range\",\n \"ETag\",\n \"Last-Modified\",\n \"Server\",\n \"Vary\",\n \"x-ms-content-crc64\",\n \"x-ms-copy-action\",\n \"x-ms-copy-completion-time\",\n \"x-ms-copy-id\",\n \"x-ms-copy-progress\",\n \"x-ms-copy-status\",\n \"x-ms-has-immutability-policy\",\n \"x-ms-has-legal-hold\",\n \"x-ms-lease-state\",\n \"x-ms-lease-status\",\n \"x-ms-range\",\n \"x-ms-request-server-encrypted\",\n \"x-ms-server-encrypted\",\n \"x-ms-snapshot\",\n \"x-ms-source-range\",\n \"If-Match\",\n \"If-Modified-Since\",\n \"If-None-Match\",\n \"If-Unmodified-Since\",\n \"x-ms-access-tier\",\n \"x-ms-access-tier-change-time\",\n \"x-ms-access-tier-inferred\",\n \"x-ms-account-kind\",\n \"x-ms-archive-status\",\n \"x-ms-blob-append-offset\",\n \"x-ms-blob-cache-control\",\n \"x-ms-blob-committed-block-count\",\n \"x-ms-blob-condition-appendpos\",\n \"x-ms-blob-condition-maxsize\",\n \"x-ms-blob-content-disposition\",\n \"x-ms-blob-content-encoding\",\n \"x-ms-blob-content-language\",\n \"x-ms-blob-content-length\",\n \"x-ms-blob-content-md5\",\n \"x-ms-blob-content-type\",\n \"x-ms-blob-public-access\",\n \"x-ms-blob-sequence-number\",\n \"x-ms-blob-type\",\n \"x-ms-copy-destination-snapshot\",\n \"x-ms-creation-time\",\n \"x-ms-default-encryption-scope\",\n \"x-ms-delete-snapshots\",\n \"x-ms-delete-type-permanent\",\n \"x-ms-deny-encryption-scope-override\",\n \"x-ms-encryption-algorithm\",\n \"x-ms-if-sequence-number-eq\",\n \"x-ms-if-sequence-number-le\",\n \"x-ms-if-sequence-number-lt\",\n \"x-ms-incremental-copy\",\n \"x-ms-lease-action\",\n \"x-ms-lease-break-period\",\n \"x-ms-lease-duration\",\n \"x-ms-lease-id\",\n \"x-ms-lease-time\",\n \"x-ms-page-write\",\n \"x-ms-proposed-lease-id\",\n \"x-ms-range-get-content-md5\",\n \"x-ms-rehydrate-priority\",\n \"x-ms-sequence-number-action\",\n \"x-ms-sku-name\",\n \"x-ms-source-content-md5\",\n \"x-ms-source-if-match\",\n \"x-ms-source-if-modified-since\",\n \"x-ms-source-if-none-match\",\n \"x-ms-source-if-unmodified-since\",\n \"x-ms-tag-count\",\n \"x-ms-encryption-key-sha256\",\n];\n\nexport const StorageDataLakeLoggingAllowedQueryParameters = [\n \"comp\",\n \"maxresults\",\n \"rscc\",\n \"rscd\",\n \"rsce\",\n \"rscl\",\n \"rsct\",\n \"se\",\n \"si\",\n \"sip\",\n \"sp\",\n \"spr\",\n \"sr\",\n \"srt\",\n \"ss\",\n \"st\",\n \"sv\",\n \"include\",\n \"marker\",\n \"prefix\",\n \"copyid\",\n \"restype\",\n \"blockid\",\n \"blocklisttype\",\n \"delimiter\",\n \"prevsnapshot\",\n \"ske\",\n \"skoid\",\n \"sks\",\n \"skt\",\n \"sktid\",\n \"skv\",\n \"snapshot\",\n];\n\nexport const UrlConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SIGNATURE: \"sig\",\n SNAPSHOT: \"snapshot\",\n TIMEOUT: \"timeout\",\n },\n};\n\nexport const HttpUrlConnection = {\n HTTP_ACCEPTED: 202,\n HTTP_CONFLICT: 409,\n HTTP_NOT_FOUND: 404,\n HTTP_PRECON_FAILED: 412,\n HTTP_RANGE_NOT_SATISFIABLE: 416,\n};\n\nexport const HeaderConstants = {\n AUTHORIZATION: \"Authorization\",\n AUTHORIZATION_SCHEME: \"Bearer\",\n CONTENT_ENCODING: \"Content-Encoding\",\n CONTENT_ID: \"Content-ID\",\n CONTENT_LANGUAGE: \"Content-Language\",\n CONTENT_LENGTH: \"Content-Length\",\n CONTENT_MD5: \"Content-Md5\",\n CONTENT_TRANSFER_ENCODING: \"Content-Transfer-Encoding\",\n CONTENT_TYPE: \"Content-Type\",\n COOKIE: \"Cookie\",\n DATE: \"date\",\n IF_MATCH: \"if-match\",\n IF_MODIFIED_SINCE: \"if-modified-since\",\n IF_NONE_MATCH: \"if-none-match\",\n IF_UNMODIFIED_SINCE: \"if-unmodified-since\",\n PREFIX_FOR_STORAGE: \"x-ms-\",\n RANGE: \"Range\",\n USER_AGENT: \"User-Agent\",\n X_MS_CLIENT_REQUEST_ID: \"x-ms-client-request-id\",\n X_MS_COPY_SOURCE: \"x-ms-copy-source\",\n X_MS_DATE: \"x-ms-date\",\n X_MS_ERROR_CODE: \"x-ms-error-code\",\n X_MS_VERSION: \"x-ms-version\",\n};\n\nexport const DevelopmentConnectionString = `DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;`;\n\n// Mapping pairs to transform url from dfs endpoint to blob endpoint\n// Customize this value to add more mapping patterns\nexport const ToBlobEndpointHostMappings = [\n [\"dfs.preprod.core.windows.net\", \"blob.preprod.core.windows.net\"],\n [\"dfs.core.windows.net\", \"blob.core.windows.net\"],\n [\"dfs.core.chinacloudapi.cn\", \"blob.core.chinacloudapi.cn\"],\n [\"dfs.core.usgovcloudapi.net\", \"blob.core.usgovcloudapi.net\"],\n [\"dfs.core.cloudapi.de\", \"blob.core.cloudapi.de\"],\n [\"dfs.core.microsoft.scloud\", \"blob.core.microsoft.scloud\"],\n [\"dfs.core.eaglex.ic.gov\", \"blob.core.eaglex.ic.gov\"],\n [\"dfs.storage.azure.net\", \"blob.storage.azure.net\"],\n];\n\n// Mapping pairs to transform url from blob endpoint to dfs endpoint\n// Customize this value to add more mapping patterns\nexport const ToDfsEndpointHostMappings = [\n [\"blob.preprod.core.windows.net\", \"dfs.preprod.core.windows.net\"],\n [\"blob.core.windows.net\", \"dfs.core.windows.net\"],\n [\"blob.core.chinacloudapi.cn\", \"dfs.core.chinacloudapi.cn\"],\n [\"blob.core.usgovcloudapi.net\", \"dfs.core.usgovcloudapi.net\"],\n [\"blob.core.cloudapi.de\", \"dfs.core.cloudapi.de\"],\n [\"blob.core.microsoft.scloud\", \"dfs.core.microsoft.scloud\"],\n [\"blob.core.eaglex.ic.gov\", \"dfs.core.eaglex.ic.gov\"],\n [\"blob.storage.azure.net\", \"dfs.storage.azure.net\"],\n];\n\nexport const ETagAny = \"*\";\n\nexport const DeletionIdKey = \"deletionid\";\nexport const EncryptionAlgorithmAES25 = \"AES256\";\n\nexport const PathResultTypeConstants = {\n FileResourceType: \"file\",\n DirectoryResourceType: \"directory\",\n};\n\n/// List of ports used for path style addressing.\n/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.\nexport const PathStylePorts = [\n \"10000\",\n \"10001\",\n \"10002\",\n \"10003\",\n \"10004\",\n \"10100\",\n \"10101\",\n \"10102\",\n \"10103\",\n \"10104\",\n \"11000\",\n \"11001\",\n \"11002\",\n \"11003\",\n \"11004\",\n \"11100\",\n \"11101\",\n \"11102\",\n \"11103\",\n \"11104\",\n];\n"]}
|
|
@@ -480,6 +480,7 @@ export function isIpEndpointStyle(parsedUrl) {
|
|
|
480
480
|
return (/^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(host) ||
|
|
481
481
|
(parsedUrl.getPort() !== undefined && PathStylePorts.includes(parsedUrl.getPort())));
|
|
482
482
|
}
|
|
483
|
+
const BugTimeBeginningInMS = 13322188800000;
|
|
483
484
|
/**
|
|
484
485
|
* This is to convert a Windows File Time ticks to a Date object.
|
|
485
486
|
*/
|
|
@@ -493,7 +494,14 @@ export function windowsFileTimeTicksToTime(timeNumber) {
|
|
|
493
494
|
// since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC).
|
|
494
495
|
// Date accepts a value that represents miliseconds from 12:00 A.M. January 1, 1970
|
|
495
496
|
// Here should correct the year number after converting.
|
|
496
|
-
const
|
|
497
|
+
const timeNumerInMs = timeNumberInternal / 10000;
|
|
498
|
+
const date = new Date(timeNumerInMs);
|
|
499
|
+
// When initializing date from a miliseconds number the day after 2023-03-01 is still 2023-03-01.
|
|
500
|
+
// For example, 13322188799999 is 2023-03-01T23:59:59.999Z, while 13322188800000 is 2023-03-01T00:00:00.000Z
|
|
501
|
+
// Here is to work around the bug.
|
|
502
|
+
if (timeNumerInMs >= BugTimeBeginningInMS) {
|
|
503
|
+
date.setUTCDate(date.getUTCDate() + 1);
|
|
504
|
+
}
|
|
497
505
|
date.setUTCFullYear(date.getUTCFullYear() - 369);
|
|
498
506
|
return date;
|
|
499
507
|
}
|
|
@@ -525,4 +533,20 @@ export function EscapePath(pathName) {
|
|
|
525
533
|
}
|
|
526
534
|
return split.join("/");
|
|
527
535
|
}
|
|
536
|
+
/**
|
|
537
|
+
* Parse value of encryption context from headers in raw response.
|
|
538
|
+
*/
|
|
539
|
+
export function ParseEncryptionContextHeaderValue(rawResponse) {
|
|
540
|
+
const response = rawResponse;
|
|
541
|
+
if (rawResponse._response) {
|
|
542
|
+
const headers = rawResponse._response.headers;
|
|
543
|
+
if (headers) {
|
|
544
|
+
response.encryptionContext = headers.get("x-ms-encryption-context");
|
|
545
|
+
if (response._response.parsedHeaders) {
|
|
546
|
+
response._response.parsedHeaders.encryptionContext = response.encryptionContext;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
return response;
|
|
551
|
+
}
|
|
528
552
|
//# sourceMappingURL=utils.common.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.common.js","sourceRoot":"","sources":["../../../../src/utils/utils.common.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInE,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,eAAe,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AC7E,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE;QACnB,MAAM,IAAI,UAAU,CAAC,2DAA2D,CAAC,CAAC;KACnF;IAED,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,mBAAmB,EAAE;QACnC,GAAG,CAAC,mBAAmB,GAAG,wBAAwB,CAAC;KACpD;AACH,CAAC;AAED,MAAM,UAAU,8BAA8B,CAC5C,yBAAqD;IAErD,IAAI,CAAC,yBAAyB;QAAE,OAAO,SAAS,CAAC;IAEjD,IAAI,CAAC,yBAAyB,CAAC,sBAAsB;QAAE,OAAO,SAAS,CAAC;IAExE,OAAO;QACL,sBAAsB,EAAE,yBAAyB,CAAC,sBAAsB;QACxE,8BAA8B,EAAE,IAAI;KACrC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,QAAgB;IACzC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,KAAK,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KACzC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { HttpHeaders, isNode, URLBuilder } from \"@azure/core-http\";\nimport { ContainerEncryptionScope } from \"@azure/storage-blob\";\nimport { CpkInfo, FileSystemEncryptionScope } from \"../models\";\n\nimport {\n DevelopmentConnectionString,\n EncryptionAlgorithmAES25,\n HeaderConstants,\n PathStylePorts,\n UrlConstants,\n} from \"./constants\";\n\n/**\n * Reserved URL characters must be properly escaped for Storage services like Blob or File.\n *\n * ## URL encode and escape strategy for JS SDKs\n *\n * When customers pass a URL string into XxxClient classes constructors, the URL string may already be URL encoded or not.\n * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL\n * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors.\n *\n * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK.\n *\n * This is what legacy V2 SDK does, simple and works for most of the cases.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%253A\" and send to server. A blob named \"b%3A\" will be created.\n *\n * But this strategy will make it not possible to create a blob with \"?\" in it's name. Because when customer URL string is\n * \"http://account.blob.core.windows.net/con/blob?name\", the \"?name\" will be treated as URL paramter instead of blob name.\n * If customer URL string is \"http://account.blob.core.windows.net/con/blob%3Fname\", a blob named \"blob%3Fname\" will be created.\n * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it.\n * We cannot accept a SDK cannot create a blob name with \"?\". So we implement strategy two:\n *\n * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters.\n *\n * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will escape \":\" like \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%3A\" to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%253A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%253A\" to server. A blob named \"b%3A\" will be created.\n *\n * This strategy gives us flexibility to create with any special characters. But \"%\" will be treated as a special characters, if the URL string\n * is not encoded, there shouldn't a \"%\" in the URL string, otherwise the URL is not a valid URL.\n * If customer needs to create a blob with \"%\" in it's blob name, use \"%25\" instead of \"%\". Just like above 3rd sample.\n * And following URL strings are invalid:\n * - \"http://account.blob.core.windows.net/con/b%\"\n * - \"http://account.blob.core.windows.net/con/b%2\"\n * - \"http://account.blob.core.windows.net/con/b%G\"\n *\n * Another special character is \"?\", use \"%2F\" to represent a blob name with \"?\" in a URL string.\n *\n * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)`\n *\n * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata\n *\n * @param url -\n */\nexport function escapeURLPath(url: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let path = urlParsed.getPath();\n path = path || \"/\";\n\n path = escape(path);\n urlParsed.setPath(path);\n\n return urlParsed.toString();\n}\n\nexport interface ConnectionString {\n kind: \"AccountConnString\" | \"SASConnString\";\n url: string;\n accountName: string;\n accountKey?: any;\n accountSas?: string;\n proxyUri?: string; // Development Connection String may contain proxyUri\n}\n\nfunction getProxyUriFromDevConnString(connectionString: string): string {\n // Development Connection String\n // https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key\n let proxyUri = \"\";\n if (connectionString.search(\"DevelopmentStorageProxyUri=\") !== -1) {\n // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri\n const matchCredentials = connectionString.split(\";\");\n for (const element of matchCredentials) {\n if (element.trim().startsWith(\"DevelopmentStorageProxyUri=\")) {\n proxyUri = element.trim().match(\"DevelopmentStorageProxyUri=(.*)\")![1];\n }\n }\n }\n return proxyUri;\n}\n\nexport function getValueInConnString(\n connectionString: string,\n argument:\n | \"BlobEndpoint\"\n | \"AccountName\"\n | \"AccountKey\"\n | \"DefaultEndpointsProtocol\"\n | \"EndpointSuffix\"\n | \"SharedAccessSignature\"\n): string {\n const elements = connectionString.split(\";\");\n for (const element of elements) {\n if (element.trim().startsWith(argument)) {\n return element.trim().match(argument + \"=(.*)\")![1];\n }\n }\n return \"\";\n}\n\n/**\n * Extracts the parts of an Azure Storage account connection string.\n *\n * @param connectionString - Connection string.\n * @returns String key value pairs of the storage account's url and credentials.\n */\nexport function extractConnectionStringParts(connectionString: string): ConnectionString {\n let proxyUri = \"\";\n\n if (connectionString.startsWith(\"UseDevelopmentStorage=true\")) {\n // Development connection string\n proxyUri = getProxyUriFromDevConnString(connectionString);\n connectionString = DevelopmentConnectionString;\n }\n\n // Matching BlobEndpoint in the Account connection string\n let blobEndpoint = getValueInConnString(connectionString, \"BlobEndpoint\");\n // Slicing off '/' at the end if exists\n // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end)\n blobEndpoint = blobEndpoint.endsWith(\"/\") ? blobEndpoint.slice(0, -1) : blobEndpoint;\n\n if (\n connectionString.search(\"DefaultEndpointsProtocol=\") !== -1 &&\n connectionString.search(\"AccountKey=\") !== -1\n ) {\n // Account connection string\n\n let defaultEndpointsProtocol = \"\";\n let accountName = \"\";\n let accountKey = Buffer.from(\"accountKey\", \"base64\");\n let endpointSuffix = \"\";\n\n // Get account name and key\n accountName = getValueInConnString(connectionString, \"AccountName\");\n accountKey = Buffer.from(getValueInConnString(connectionString, \"AccountKey\"), \"base64\");\n\n if (!blobEndpoint) {\n // BlobEndpoint is not present in the Account connection string\n // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`\n\n defaultEndpointsProtocol = getValueInConnString(connectionString, \"DefaultEndpointsProtocol\");\n const protocol = defaultEndpointsProtocol!.toLowerCase();\n if (protocol !== \"https\" && protocol !== \"http\") {\n throw new Error(\n \"Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'\"\n );\n }\n\n endpointSuffix = getValueInConnString(connectionString, \"EndpointSuffix\");\n if (!endpointSuffix) {\n throw new Error(\"Invalid EndpointSuffix in the provided Connection String\");\n }\n blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n }\n\n if (!accountName) {\n throw new Error(\"Invalid AccountName in the provided Connection String\");\n } else if (accountKey.length === 0) {\n throw new Error(\"Invalid AccountKey in the provided Connection String\");\n }\n\n return {\n kind: \"AccountConnString\",\n url: blobEndpoint,\n accountName,\n accountKey,\n proxyUri,\n };\n } else {\n // SAS connection string\n\n const accountSas = getValueInConnString(connectionString, \"SharedAccessSignature\");\n const accountName = getAccountNameFromUrl(blobEndpoint);\n if (!blobEndpoint) {\n throw new Error(\"Invalid BlobEndpoint in the provided SAS Connection String\");\n } else if (!accountSas) {\n throw new Error(\"Invalid SharedAccessSignature in the provided SAS Connection String\");\n }\n\n return { kind: \"SASConnString\", url: blobEndpoint, accountName, accountSas };\n }\n}\n\n/**\n * Internal escape method implemented Strategy Two mentioned in escapeURL() description.\n *\n * @param text -\n */\nfunction escape(text: string): string {\n return encodeURIComponent(text)\n .replace(/%2F/g, \"/\") // Don't escape for \"/\"\n .replace(/'/g, \"%27\") // Escape for \"'\"\n .replace(/\\+/g, \"%20\")\n .replace(/%25/g, \"%\"); // Revert encoded \"%\"\n}\n\n/**\n * Append a string to URL path. Will remove duplicated \"/\" in front of the string\n * when URL path ends with a \"/\".\n *\n * @param url - Source URL string\n * @param name - String to be appended to URL\n * @returns An updated URL string\n */\nexport function appendToURLPath(url: string, name: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let path = urlParsed.getPath();\n path = path ? (path.endsWith(\"/\") ? `${path}${name}` : `${path}/${name}`) : name;\n urlParsed.setPath(path);\n\n const normalizedUrl = new URL(urlParsed.toString());\n\n return normalizedUrl.toString();\n}\n\n/**\n * Append a string to URL query.\n *\n * @param url - Source URL string.\n * @param queryParts - String to be appended to the URL query.\n * @returns An updated URL string.\n */\nexport function appendToURLQuery(url: string, queryParts: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let query = urlParsed.getQuery();\n if (query) {\n query += \"&\" + queryParts;\n } else {\n query = queryParts;\n }\n\n urlParsed.setQuery(query);\n return urlParsed.toString();\n}\n\n/**\n * Set URL parameter name and value. If name exists in URL parameters, old value\n * will be replaced by name key. If not provide value, the parameter will be deleted.\n *\n * @param url - Source URL string\n * @param name - Parameter name\n * @param value - Parameter value\n * @returns An updated URL string\n */\nexport function setURLParameter(url: string, name: string, value?: string): string {\n const urlParsed = URLBuilder.parse(url);\n urlParsed.setQueryParameter(name, value);\n return urlParsed.toString();\n}\n\n/**\n * Get URL parameter by name.\n *\n * @param url -\n * @param name -\n */\nexport function getURLParameter(url: string, name: string): string | string[] | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getQueryParameterValue(name);\n}\n\n/**\n * Set URL host.\n *\n * @param url - Source URL string\n * @param host - New host string\n * @returns An updated URL string\n */\nexport function setURLHost(url: string, host: string): string {\n const urlParsed = URLBuilder.parse(url);\n urlParsed.setHost(host);\n return urlParsed.toString();\n}\n\n/**\n * Get URL path from an URL string.\n *\n * @param url - Source URL string\n */\nexport function getURLPath(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getPath();\n}\n\n/**\n * Set URL path.\n *\n * @param url -\n * @param path -\n */\nexport function setURLPath(url: string, path?: string): string {\n const urlParsed = URLBuilder.parse(url);\n urlParsed.setPath(path);\n return urlParsed.toString();\n}\n\n/**\n * Get URL scheme from an URL string.\n *\n * @param url - Source URL string\n */\nexport function getURLScheme(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getScheme();\n}\n\n/**\n * Get URL path and query from an URL string.\n *\n * @param url - Source URL string\n */\nexport function getURLPathAndQuery(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n const pathString = urlParsed.getPath();\n if (!pathString) {\n throw new RangeError(\"Invalid url without valid path.\");\n }\n\n let queryString = urlParsed.getQuery() || \"\";\n queryString = queryString.trim();\n if (queryString !== \"\") {\n queryString = queryString.startsWith(\"?\") ? queryString : `?${queryString}`; // Ensure query string start with '?'\n }\n\n return `${pathString}${queryString}`;\n}\n\n/**\n * Get URL query key value pairs from an URL string.\n *\n * @param url -\n */\nexport function getURLQueries(url: string): { [key: string]: string } {\n let queryString = URLBuilder.parse(url).getQuery();\n if (!queryString) {\n return {};\n }\n\n queryString = queryString.trim();\n queryString = queryString.startsWith(\"?\") ? queryString.substr(1) : queryString;\n\n let querySubStrings: string[] = queryString.split(\"&\");\n querySubStrings = querySubStrings.filter((value: string) => {\n const indexOfEqual = value.indexOf(\"=\");\n const lastIndexOfEqual = value.lastIndexOf(\"=\");\n return (\n indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1\n );\n });\n\n const queries: { [key: string]: string } = {};\n for (const querySubString of querySubStrings) {\n const splitResults = querySubString.split(\"=\");\n const key: string = splitResults[0];\n const value: string = splitResults[1];\n queries[key] = value;\n }\n\n return queries;\n}\n\n/**\n * Get URL query string.\n *\n * @param url -\n */\nexport function getURLQueryString(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getQuery();\n}\n\n/**\n * Set URL query string.\n *\n * @param url -\n * @param queryString -\n */\nexport function setURLQueries(url: string, queryString: string): string {\n const urlParsed = URLBuilder.parse(url);\n urlParsed.setQuery(queryString);\n return urlParsed.toString();\n}\n\n/**\n * Rounds a date off to seconds.\n *\n * @param date -\n * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned;\n * If false, YYYY-MM-DDThh:mm:ssZ will be returned.\n * @returns Date string in ISO8061 format, with or without 7 milliseconds component\n */\nexport function truncatedISO8061Date(date: Date, withMilliseconds: boolean = true): string {\n // Date.toISOString() will return like \"2018-10-29T06:34:36.139Z\"\n const dateString = date.toISOString();\n\n return withMilliseconds\n ? dateString.substring(0, dateString.length - 1) + \"0000\" + \"Z\"\n : dateString.substring(0, dateString.length - 5) + \"Z\";\n}\n\n/**\n * Base64 encode.\n *\n * @param content -\n */\nexport function base64encode(content: string): string {\n return !isNode ? btoa(content) : Buffer.from(content).toString(\"base64\");\n}\n\n/**\n * Base64 decode.\n *\n * @param encodedString -\n */\nexport function base64decode(encodedString: string): string {\n return !isNode ? atob(encodedString) : Buffer.from(encodedString, \"base64\").toString();\n}\n\n/**\n * Generate a 64 bytes base64 block ID string.\n *\n * @param blockIndex -\n */\nexport function generateBlockID(blockIDPrefix: string, blockIndex: number): string {\n // To generate a 64 bytes base64 string, source string should be 48\n const maxSourceStringLength = 48;\n\n // A blob can have a maximum of 100,000 uncommitted blocks at any given time\n const maxBlockIndexLength = 6;\n\n const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength;\n\n if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) {\n blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength);\n }\n const res =\n blockIDPrefix +\n blockIndex.toString().padStart(maxSourceStringLength - blockIDPrefix.length, \"0\");\n return base64encode(res);\n}\n\n/**\n * Delay specified time interval.\n *\n * @param timeInMs -\n * @param aborter -\n * @param abortError -\n */\nexport async function delay(\n timeInMs: number,\n aborter?: AbortSignalLike,\n abortError?: Error\n): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n /* eslint-disable-next-line prefer-const*/\n let timeout: any;\n\n const abortHandler = () => {\n if (timeout !== undefined) {\n clearTimeout(timeout);\n }\n reject(abortError);\n };\n\n const resolveHandler = () => {\n if (aborter !== undefined) {\n aborter.removeEventListener(\"abort\", abortHandler);\n }\n resolve();\n };\n\n timeout = setTimeout(resolveHandler, timeInMs);\n if (aborter !== undefined) {\n aborter.addEventListener(\"abort\", abortHandler);\n }\n });\n}\n\nexport function sanitizeURL(url: string): string {\n let safeURL: string = url;\n if (getURLParameter(safeURL, UrlConstants.Parameters.SIGNATURE)) {\n safeURL = setURLParameter(safeURL, UrlConstants.Parameters.SIGNATURE, \"*****\");\n }\n\n return safeURL;\n}\n\nexport function sanitizeHeaders(originalHeader: HttpHeaders): HttpHeaders {\n const headers: HttpHeaders = new HttpHeaders();\n for (const header of originalHeader.headersArray()) {\n if (header.name.toLowerCase() === HeaderConstants.AUTHORIZATION.toLowerCase()) {\n headers.set(header.name, \"*****\");\n } else if (header.name.toLowerCase() === HeaderConstants.X_MS_COPY_SOURCE) {\n headers.set(header.name, sanitizeURL(header.value));\n } else {\n headers.set(header.name, header.value);\n }\n }\n\n return headers;\n}\n/**\n * If two strings are equal when compared case insensitive.\n *\n * @param str1 -\n * @param str2 -\n */\nexport function iEqual(str1: string, str2: string): boolean {\n return str1.toLocaleLowerCase() === str2.toLocaleLowerCase();\n}\n\n/**\n * Extracts account name from the blobEndpointUrl\n * @param blobEndpointUrl - blobEndpointUrl to extract the account name from\n * @returns account name\n */\nexport function getAccountNameFromUrl(blobEndpointUrl: string): string {\n const parsedUrl: URLBuilder = URLBuilder.parse(blobEndpointUrl);\n let accountName;\n try {\n if (parsedUrl.getHost()!.split(\".\")[1] === \"blob\") {\n // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n accountName = parsedUrl.getHost()!.split(\".\")[0];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/\n // .getPath() -> /devstoreaccount1/\n accountName = parsedUrl.getPath()!.split(\"/\")[1];\n } else {\n // Custom domain case: \"https://customdomain.com/containername/blob\".\n accountName = \"\";\n }\n\n return accountName;\n } catch (error: any) {\n throw new Error(\"Unable to extract accountName with provided information.\");\n }\n}\n\nexport function isIpEndpointStyle(parsedUrl: URLBuilder): boolean {\n if (parsedUrl.getHost() === undefined) {\n return false;\n }\n\n const host =\n parsedUrl.getHost()! + (parsedUrl.getPort() === undefined ? \"\" : \":\" + parsedUrl.getPort());\n\n // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.\n // Case 2: localhost(:port), use broad regex to match port part.\n // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.\n // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.\n return (\n /^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])){3}(:[0-9]+)?$/.test(\n host\n ) ||\n (parsedUrl.getPort() !== undefined && PathStylePorts.includes(parsedUrl.getPort()!))\n );\n}\n\n/**\n * This is to convert a Windows File Time ticks to a Date object.\n */\nexport function windowsFileTimeTicksToTime(timeNumber: string | undefined): Date | undefined {\n if (!timeNumber) return undefined;\n const timeNumberInternal = parseInt(timeNumber!);\n\n if (timeNumberInternal === 0) return undefined;\n\n // A windows file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed\n // since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC).\n // Date accepts a value that represents miliseconds from 12:00 A.M. January 1, 1970\n // Here should correct the year number after converting.\n const date = new Date(timeNumberInternal / 10000);\n date.setUTCFullYear(date.getUTCFullYear() - 369);\n return date;\n}\n\nexport function ensureCpkIfSpecified(cpk: CpkInfo | undefined, isHttps: boolean): void {\n if (cpk && !isHttps) {\n throw new RangeError(\"Customer-provided encryption key must be used over HTTPS.\");\n }\n\n if (cpk && !cpk.encryptionAlgorithm) {\n cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;\n }\n}\n\nexport function ToBlobContainerEncryptionScope(\n fileSystemEncryptionScope?: FileSystemEncryptionScope\n): ContainerEncryptionScope | undefined {\n if (!fileSystemEncryptionScope) return undefined;\n\n if (!fileSystemEncryptionScope.defaultEncryptionScope) return undefined;\n\n return {\n defaultEncryptionScope: fileSystemEncryptionScope.defaultEncryptionScope,\n preventEncryptionScopeOverride: true,\n };\n}\n\n/**\n * Escape the file or directory name but keep path separator ('/').\n */\nexport function EscapePath(pathName: string): string {\n const split = pathName.split(\"/\");\n for (let i = 0; i < split.length; i++) {\n split[i] = encodeURIComponent(split[i]);\n }\n return split.join(\"/\");\n}\n"]}
|
|
1
|
+
{"version":3,"file":"utils.common.js","sourceRoot":"","sources":["../../../../src/utils/utils.common.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAiC,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAIlG,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,EACxB,eAAe,EACf,cAAc,EACd,YAAY,GACb,MAAM,aAAa,CAAC;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAExC,IAAI,IAAI,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;IAC/B,IAAI,GAAG,IAAI,IAAI,GAAG,CAAC;IAEnB,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;IACpB,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;AAC9B,CAAC;AAWD,SAAS,4BAA4B,CAAC,gBAAwB;IAC5D,gCAAgC;IAChC,sKAAsK;IACtK,IAAI,QAAQ,GAAG,EAAE,CAAC;IAClB,IAAI,gBAAgB,CAAC,MAAM,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAC,EAAE;QACjE,4FAA4F;QAC5F,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrD,KAAK,MAAM,OAAO,IAAI,gBAAgB,EAAE;YACtC,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,6BAA6B,CAAC,EAAE;gBAC5D,QAAQ,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C,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,KAAK,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;KACzC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC;AAWD;;GAEG;AACH,MAAM,UAAU,iCAAiC,CAC/C,WAAiD;IAEjD,MAAM,QAAQ,GAAG,WAAW,CAAC;IAC7B,IAAI,WAAW,CAAC,SAAS,EAAE;QACzB,MAAM,OAAO,GAAG,WAAW,CAAC,SAAS,CAAC,OAA0B,CAAC;QACjE,IAAI,OAAO,EAAE;YACX,QAAQ,CAAC,iBAAiB,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;YACpE,IAAI,QAAQ,CAAC,SAAS,CAAC,aAAa,EAAE;gBACpC,QAAQ,CAAC,SAAS,CAAC,aAAa,CAAC,iBAAiB,GAAG,QAAQ,CAAC,iBAAiB,CAAC;aACjF;SACF;KACF;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortSignalLike } from \"@azure/abort-controller\";\nimport { HttpHeaders, HttpHeadersLike, HttpResponse, isNode, URLBuilder } from \"@azure/core-http\";\nimport { ContainerEncryptionScope } from \"@azure/storage-blob\";\nimport { CpkInfo, FileSystemEncryptionScope } from \"../models\";\n\nimport {\n DevelopmentConnectionString,\n EncryptionAlgorithmAES25,\n HeaderConstants,\n PathStylePorts,\n UrlConstants,\n} from \"./constants\";\n\n/**\n * Reserved URL characters must be properly escaped for Storage services like Blob or File.\n *\n * ## URL encode and escape strategy for JS SDKs\n *\n * When customers pass a URL string into XxxClient classes constructors, the URL string may already be URL encoded or not.\n * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL\n * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XxxClient constructors.\n *\n * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK.\n *\n * This is what legacy V2 SDK does, simple and works for most of the cases.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%253A\" and send to server. A blob named \"b%3A\" will be created.\n *\n * But this strategy will make it not possible to create a blob with \"?\" in it's name. Because when customer URL string is\n * \"http://account.blob.core.windows.net/con/blob?name\", the \"?name\" will be treated as URL paramter instead of blob name.\n * If customer URL string is \"http://account.blob.core.windows.net/con/blob%3Fname\", a blob named \"blob%3Fname\" will be created.\n * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it.\n * We cannot accept a SDK cannot create a blob name with \"?\". So we implement strategy two:\n *\n * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters.\n *\n * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will escape \":\" like \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%3A\" to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%253A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%253A\" to server. A blob named \"b%3A\" will be created.\n *\n * This strategy gives us flexibility to create with any special characters. But \"%\" will be treated as a special characters, if the URL string\n * is not encoded, there shouldn't a \"%\" in the URL string, otherwise the URL is not a valid URL.\n * If customer needs to create a blob with \"%\" in it's blob name, use \"%25\" instead of \"%\". Just like above 3rd sample.\n * And following URL strings are invalid:\n * - \"http://account.blob.core.windows.net/con/b%\"\n * - \"http://account.blob.core.windows.net/con/b%2\"\n * - \"http://account.blob.core.windows.net/con/b%G\"\n *\n * Another special character is \"?\", use \"%2F\" to represent a blob name with \"?\" in a URL string.\n *\n * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `containerClient.getBlobClient(blobName)`\n *\n * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL.\n *\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata\n * @see https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata\n *\n * @param url -\n */\nexport function escapeURLPath(url: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let path = urlParsed.getPath();\n path = path || \"/\";\n\n path = escape(path);\n urlParsed.setPath(path);\n\n return urlParsed.toString();\n}\n\nexport interface ConnectionString {\n kind: \"AccountConnString\" | \"SASConnString\";\n url: string;\n accountName: string;\n accountKey?: any;\n accountSas?: string;\n proxyUri?: string; // Development Connection String may contain proxyUri\n}\n\nfunction getProxyUriFromDevConnString(connectionString: string): string {\n // Development Connection String\n // https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string#connect-to-the-emulator-account-using-the-well-known-account-name-and-key\n let proxyUri = \"\";\n if (connectionString.search(\"DevelopmentStorageProxyUri=\") !== -1) {\n // CONNECTION_STRING=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://myProxyUri\n const matchCredentials = connectionString.split(\";\");\n for (const element of matchCredentials) {\n if (element.trim().startsWith(\"DevelopmentStorageProxyUri=\")) {\n proxyUri = element.trim().match(\"DevelopmentStorageProxyUri=(.*)\")![1];\n }\n }\n }\n return proxyUri;\n}\n\nexport function getValueInConnString(\n connectionString: string,\n argument:\n | \"BlobEndpoint\"\n | \"AccountName\"\n | \"AccountKey\"\n | \"DefaultEndpointsProtocol\"\n | \"EndpointSuffix\"\n | \"SharedAccessSignature\"\n): string {\n const elements = connectionString.split(\";\");\n for (const element of elements) {\n if (element.trim().startsWith(argument)) {\n return element.trim().match(argument + \"=(.*)\")![1];\n }\n }\n return \"\";\n}\n\n/**\n * Extracts the parts of an Azure Storage account connection string.\n *\n * @param connectionString - Connection string.\n * @returns String key value pairs of the storage account's url and credentials.\n */\nexport function extractConnectionStringParts(connectionString: string): ConnectionString {\n let proxyUri = \"\";\n\n if (connectionString.startsWith(\"UseDevelopmentStorage=true\")) {\n // Development connection string\n proxyUri = getProxyUriFromDevConnString(connectionString);\n connectionString = DevelopmentConnectionString;\n }\n\n // Matching BlobEndpoint in the Account connection string\n let blobEndpoint = getValueInConnString(connectionString, \"BlobEndpoint\");\n // Slicing off '/' at the end if exists\n // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end)\n blobEndpoint = blobEndpoint.endsWith(\"/\") ? blobEndpoint.slice(0, -1) : blobEndpoint;\n\n if (\n connectionString.search(\"DefaultEndpointsProtocol=\") !== -1 &&\n connectionString.search(\"AccountKey=\") !== -1\n ) {\n // Account connection string\n\n let defaultEndpointsProtocol = \"\";\n let accountName = \"\";\n let accountKey = Buffer.from(\"accountKey\", \"base64\");\n let endpointSuffix = \"\";\n\n // Get account name and key\n accountName = getValueInConnString(connectionString, \"AccountName\");\n accountKey = Buffer.from(getValueInConnString(connectionString, \"AccountKey\"), \"base64\");\n\n if (!blobEndpoint) {\n // BlobEndpoint is not present in the Account connection string\n // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`\n\n defaultEndpointsProtocol = getValueInConnString(connectionString, \"DefaultEndpointsProtocol\");\n const protocol = defaultEndpointsProtocol!.toLowerCase();\n if (protocol !== \"https\" && protocol !== \"http\") {\n throw new Error(\n \"Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'\"\n );\n }\n\n endpointSuffix = getValueInConnString(connectionString, \"EndpointSuffix\");\n if (!endpointSuffix) {\n throw new Error(\"Invalid EndpointSuffix in the provided Connection String\");\n }\n blobEndpoint = `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n }\n\n if (!accountName) {\n throw new Error(\"Invalid AccountName in the provided Connection String\");\n } else if (accountKey.length === 0) {\n throw new Error(\"Invalid AccountKey in the provided Connection String\");\n }\n\n return {\n kind: \"AccountConnString\",\n url: blobEndpoint,\n accountName,\n accountKey,\n proxyUri,\n };\n } else {\n // SAS connection string\n\n const accountSas = getValueInConnString(connectionString, \"SharedAccessSignature\");\n const accountName = getAccountNameFromUrl(blobEndpoint);\n if (!blobEndpoint) {\n throw new Error(\"Invalid BlobEndpoint in the provided SAS Connection String\");\n } else if (!accountSas) {\n throw new Error(\"Invalid SharedAccessSignature in the provided SAS Connection String\");\n }\n\n return { kind: \"SASConnString\", url: blobEndpoint, accountName, accountSas };\n }\n}\n\n/**\n * Internal escape method implemented Strategy Two mentioned in escapeURL() description.\n *\n * @param text -\n */\nfunction escape(text: string): string {\n return encodeURIComponent(text)\n .replace(/%2F/g, \"/\") // Don't escape for \"/\"\n .replace(/'/g, \"%27\") // Escape for \"'\"\n .replace(/\\+/g, \"%20\")\n .replace(/%25/g, \"%\"); // Revert encoded \"%\"\n}\n\n/**\n * Append a string to URL path. Will remove duplicated \"/\" in front of the string\n * when URL path ends with a \"/\".\n *\n * @param url - Source URL string\n * @param name - String to be appended to URL\n * @returns An updated URL string\n */\nexport function appendToURLPath(url: string, name: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let path = urlParsed.getPath();\n path = path ? (path.endsWith(\"/\") ? `${path}${name}` : `${path}/${name}`) : name;\n urlParsed.setPath(path);\n\n const normalizedUrl = new URL(urlParsed.toString());\n\n return normalizedUrl.toString();\n}\n\n/**\n * Append a string to URL query.\n *\n * @param url - Source URL string.\n * @param queryParts - String to be appended to the URL query.\n * @returns An updated URL string.\n */\nexport function appendToURLQuery(url: string, queryParts: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let query = urlParsed.getQuery();\n if (query) {\n query += \"&\" + queryParts;\n } else {\n query = queryParts;\n }\n\n urlParsed.setQuery(query);\n return urlParsed.toString();\n}\n\n/**\n * Set URL parameter name and value. If name exists in URL parameters, old value\n * will be replaced by name key. If not provide value, the parameter will be deleted.\n *\n * @param url - Source URL string\n * @param name - Parameter name\n * @param value - Parameter value\n * @returns An updated URL string\n */\nexport function setURLParameter(url: string, name: string, value?: string): string {\n const urlParsed = URLBuilder.parse(url);\n urlParsed.setQueryParameter(name, value);\n return urlParsed.toString();\n}\n\n/**\n * Get URL parameter by name.\n *\n * @param url -\n * @param name -\n */\nexport function getURLParameter(url: string, name: string): string | string[] | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getQueryParameterValue(name);\n}\n\n/**\n * Set URL host.\n *\n * @param url - Source URL string\n * @param host - New host string\n * @returns An updated URL string\n */\nexport function setURLHost(url: string, host: string): string {\n const urlParsed = URLBuilder.parse(url);\n urlParsed.setHost(host);\n return urlParsed.toString();\n}\n\n/**\n * Get URL path from an URL string.\n *\n * @param url - Source URL string\n */\nexport function getURLPath(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getPath();\n}\n\n/**\n * Set URL path.\n *\n * @param url -\n * @param path -\n */\nexport function setURLPath(url: string, path?: string): string {\n const urlParsed = URLBuilder.parse(url);\n urlParsed.setPath(path);\n return urlParsed.toString();\n}\n\n/**\n * Get URL scheme from an URL string.\n *\n * @param url - Source URL string\n */\nexport function getURLScheme(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getScheme();\n}\n\n/**\n * Get URL path and query from an URL string.\n *\n * @param url - Source URL string\n */\nexport function getURLPathAndQuery(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n const pathString = urlParsed.getPath();\n if (!pathString) {\n throw new RangeError(\"Invalid url without valid path.\");\n }\n\n let queryString = urlParsed.getQuery() || \"\";\n queryString = queryString.trim();\n if (queryString !== \"\") {\n queryString = queryString.startsWith(\"?\") ? queryString : `?${queryString}`; // Ensure query string start with '?'\n }\n\n return `${pathString}${queryString}`;\n}\n\n/**\n * Get URL query key value pairs from an URL string.\n *\n * @param url -\n */\nexport function getURLQueries(url: string): { [key: string]: string } {\n let queryString = URLBuilder.parse(url).getQuery();\n if (!queryString) {\n return {};\n }\n\n queryString = queryString.trim();\n queryString = queryString.startsWith(\"?\") ? queryString.substr(1) : queryString;\n\n let querySubStrings: string[] = queryString.split(\"&\");\n querySubStrings = querySubStrings.filter((value: string) => {\n const indexOfEqual = value.indexOf(\"=\");\n const lastIndexOfEqual = value.lastIndexOf(\"=\");\n return (\n indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1\n );\n });\n\n const queries: { [key: string]: string } = {};\n for (const querySubString of querySubStrings) {\n const splitResults = querySubString.split(\"=\");\n const key: string = splitResults[0];\n const value: string = splitResults[1];\n queries[key] = value;\n }\n\n return queries;\n}\n\n/**\n * Get URL query string.\n *\n * @param url -\n */\nexport function getURLQueryString(url: string): string | undefined {\n const urlParsed = URLBuilder.parse(url);\n return urlParsed.getQuery();\n}\n\n/**\n * Set URL query string.\n *\n * @param url -\n * @param queryString -\n */\nexport function setURLQueries(url: string, queryString: string): string {\n const urlParsed = URLBuilder.parse(url);\n urlParsed.setQuery(queryString);\n return urlParsed.toString();\n}\n\n/**\n * Rounds a date off to seconds.\n *\n * @param date -\n * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned;\n * If false, YYYY-MM-DDThh:mm:ssZ will be returned.\n * @returns Date string in ISO8061 format, with or without 7 milliseconds component\n */\nexport function truncatedISO8061Date(date: Date, withMilliseconds: boolean = true): string {\n // Date.toISOString() will return like \"2018-10-29T06:34:36.139Z\"\n const dateString = date.toISOString();\n\n return withMilliseconds\n ? dateString.substring(0, dateString.length - 1) + \"0000\" + \"Z\"\n : dateString.substring(0, dateString.length - 5) + \"Z\";\n}\n\n/**\n * Base64 encode.\n *\n * @param content -\n */\nexport function base64encode(content: string): string {\n return !isNode ? btoa(content) : Buffer.from(content).toString(\"base64\");\n}\n\n/**\n * Base64 decode.\n *\n * @param encodedString -\n */\nexport function base64decode(encodedString: string): string {\n return !isNode ? atob(encodedString) : Buffer.from(encodedString, \"base64\").toString();\n}\n\n/**\n * Generate a 64 bytes base64 block ID string.\n *\n * @param blockIndex -\n */\nexport function generateBlockID(blockIDPrefix: string, blockIndex: number): string {\n // To generate a 64 bytes base64 string, source string should be 48\n const maxSourceStringLength = 48;\n\n // A blob can have a maximum of 100,000 uncommitted blocks at any given time\n const maxBlockIndexLength = 6;\n\n const maxAllowedBlockIDPrefixLength = maxSourceStringLength - maxBlockIndexLength;\n\n if (blockIDPrefix.length > maxAllowedBlockIDPrefixLength) {\n blockIDPrefix = blockIDPrefix.slice(0, maxAllowedBlockIDPrefixLength);\n }\n const res =\n blockIDPrefix +\n blockIndex.toString().padStart(maxSourceStringLength - blockIDPrefix.length, \"0\");\n return base64encode(res);\n}\n\n/**\n * Delay specified time interval.\n *\n * @param timeInMs -\n * @param aborter -\n * @param abortError -\n */\nexport async function delay(\n timeInMs: number,\n aborter?: AbortSignalLike,\n abortError?: Error\n): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n /* eslint-disable-next-line prefer-const*/\n let timeout: any;\n\n const abortHandler = () => {\n if (timeout !== undefined) {\n clearTimeout(timeout);\n }\n reject(abortError);\n };\n\n const resolveHandler = () => {\n if (aborter !== undefined) {\n aborter.removeEventListener(\"abort\", abortHandler);\n }\n resolve();\n };\n\n timeout = setTimeout(resolveHandler, timeInMs);\n if (aborter !== undefined) {\n aborter.addEventListener(\"abort\", abortHandler);\n }\n });\n}\n\nexport function sanitizeURL(url: string): string {\n let safeURL: string = url;\n if (getURLParameter(safeURL, UrlConstants.Parameters.SIGNATURE)) {\n safeURL = setURLParameter(safeURL, UrlConstants.Parameters.SIGNATURE, \"*****\");\n }\n\n return safeURL;\n}\n\nexport function sanitizeHeaders(originalHeader: HttpHeaders): HttpHeaders {\n const headers: HttpHeaders = new HttpHeaders();\n for (const header of originalHeader.headersArray()) {\n if (header.name.toLowerCase() === HeaderConstants.AUTHORIZATION.toLowerCase()) {\n headers.set(header.name, \"*****\");\n } else if (header.name.toLowerCase() === HeaderConstants.X_MS_COPY_SOURCE) {\n headers.set(header.name, sanitizeURL(header.value));\n } else {\n headers.set(header.name, header.value);\n }\n }\n\n return headers;\n}\n/**\n * If two strings are equal when compared case insensitive.\n *\n * @param str1 -\n * @param str2 -\n */\nexport function iEqual(str1: string, str2: string): boolean {\n return str1.toLocaleLowerCase() === str2.toLocaleLowerCase();\n}\n\n/**\n * Extracts account name from the blobEndpointUrl\n * @param blobEndpointUrl - blobEndpointUrl to extract the account name from\n * @returns account name\n */\nexport function getAccountNameFromUrl(blobEndpointUrl: string): string {\n const parsedUrl: URLBuilder = URLBuilder.parse(blobEndpointUrl);\n let accountName;\n try {\n if (parsedUrl.getHost()!.split(\".\")[1] === \"blob\") {\n // `${defaultEndpointsProtocol}://${accountName}.blob.${endpointSuffix}`;\n accountName = parsedUrl.getHost()!.split(\".\")[0];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/\n // .getPath() -> /devstoreaccount1/\n accountName = parsedUrl.getPath()!.split(\"/\")[1];\n } else {\n // Custom domain case: \"https://customdomain.com/containername/blob\".\n accountName = \"\";\n }\n\n return accountName;\n } catch (error: any) {\n throw new Error(\"Unable to extract accountName with provided information.\");\n }\n}\n\nexport function isIpEndpointStyle(parsedUrl: URLBuilder): boolean {\n if (parsedUrl.getHost() === undefined) {\n return false;\n }\n\n const host =\n parsedUrl.getHost()! + (parsedUrl.getPort() === undefined ? \"\" : \":\" + parsedUrl.getPort());\n\n // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.\n // Case 2: localhost(:port), use broad regex to match port part.\n // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.\n // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.\n return (\n /^.*:.*:.*$|^localhost(:[0-9]+)?$|^(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])){3}(:[0-9]+)?$/.test(\n host\n ) ||\n (parsedUrl.getPort() !== undefined && PathStylePorts.includes(parsedUrl.getPort()!))\n );\n}\n\nconst BugTimeBeginningInMS = 13322188800000;\n\n/**\n * This is to convert a Windows File Time ticks to a Date object.\n */\nexport function windowsFileTimeTicksToTime(timeNumber: string | undefined): Date | undefined {\n if (!timeNumber) return undefined;\n const timeNumberInternal = parseInt(timeNumber!);\n\n if (timeNumberInternal === 0) return undefined;\n\n // A windows file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed\n // since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC).\n // Date accepts a value that represents miliseconds from 12:00 A.M. January 1, 1970\n // Here should correct the year number after converting.\n const timeNumerInMs = timeNumberInternal / 10000;\n const date = new Date(timeNumerInMs);\n\n // When initializing date from a miliseconds number the day after 2023-03-01 is still 2023-03-01.\n // For example, 13322188799999 is 2023-03-01T23:59:59.999Z, while 13322188800000 is 2023-03-01T00:00:00.000Z\n // Here is to work around the bug.\n if (timeNumerInMs >= BugTimeBeginningInMS) {\n date.setUTCDate(date.getUTCDate() + 1);\n }\n date.setUTCFullYear(date.getUTCFullYear() - 369);\n return date;\n}\n\nexport function ensureCpkIfSpecified(cpk: CpkInfo | undefined, isHttps: boolean): void {\n if (cpk && !isHttps) {\n throw new RangeError(\"Customer-provided encryption key must be used over HTTPS.\");\n }\n\n if (cpk && !cpk.encryptionAlgorithm) {\n cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;\n }\n}\n\nexport function ToBlobContainerEncryptionScope(\n fileSystemEncryptionScope?: FileSystemEncryptionScope\n): ContainerEncryptionScope | undefined {\n if (!fileSystemEncryptionScope) return undefined;\n\n if (!fileSystemEncryptionScope.defaultEncryptionScope) return undefined;\n\n return {\n defaultEncryptionScope: fileSystemEncryptionScope.defaultEncryptionScope,\n preventEncryptionScopeOverride: true,\n };\n}\n\n/**\n * Escape the file or directory name but keep path separator ('/').\n */\nexport function EscapePath(pathName: string): string {\n const split = pathName.split(\"/\");\n for (let i = 0; i < split.length; i++) {\n split[i] = encodeURIComponent(split[i]);\n }\n return split.join(\"/\");\n}\n\nexport interface RawResponseWithEncryptionContextLike {\n encryptionContext?: string;\n _response: HttpResponse & {\n parsedHeaders: {\n encryptionContext?: string;\n };\n };\n}\n\n/**\n * Parse value of encryption context from headers in raw response.\n */\nexport function ParseEncryptionContextHeaderValue(\n rawResponse: RawResponseWithEncryptionContextLike\n): RawResponseWithEncryptionContextLike {\n const response = rawResponse;\n if (rawResponse._response) {\n const headers = rawResponse._response.headers as HttpHeadersLike;\n if (headers) {\n response.encryptionContext = headers.get(\"x-ms-encryption-context\");\n if (response._response.parsedHeaders) {\n response._response.parsedHeaders.encryptionContext = response.encryptionContext;\n }\n }\n }\n return response;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/storage-file-datalake",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.13.0",
|
|
4
4
|
"description": "Microsoft Azure Storage SDK for JavaScript - DataLake",
|
|
5
5
|
"sdk-type": "client",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"@azure/core-paging": "^1.1.1",
|
|
123
123
|
"@azure/core-tracing": "1.0.0-preview.13",
|
|
124
124
|
"@azure/logger": "^1.0.0",
|
|
125
|
-
"@azure/storage-blob": "^12.
|
|
125
|
+
"@azure/storage-blob": "^12.14.0",
|
|
126
126
|
"events": "^3.0.0",
|
|
127
127
|
"tslib": "^2.2.0"
|
|
128
128
|
},
|