@azure/storage-file-datalake 12.8.1-alpha.20220401.1 → 12.9.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -3
- package/dist/index.js +176 -18
- package/dist/index.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/DataLakeFileSystemClient.js +2 -2
- package/dist-esm/storage-file-datalake/src/DataLakeFileSystemClient.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/clients.js +24 -13
- 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 +70 -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 +31 -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 +13 -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/transforms.js +9 -0
- package/dist-esm/storage-file-datalake/src/transforms.js.map +1 -1
- package/dist-esm/storage-file-datalake/src/utils/constants.js +3 -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 +26 -1
- package/dist-esm/storage-file-datalake/src/utils/utils.common.js.map +1 -1
- package/package.json +10 -6
- package/types/3.1/storage-file-datalake.d.ts +84 -0
- package/types/latest/storage-file-datalake.d.ts +86 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models.ts"],"names":[],"mappings":"AA69BA,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;AA4XD,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 FileSystemListBlobHierarchySegmentHeaders,\n FileSystemListPathsHeaders,\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 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. 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 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\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\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\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\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 conditions?: DataLakeRequestConditions;\n pathHttpHeaders?: PathCreateHttpHeaders;\n}\n\nexport interface PathCreateIfNotExistsOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n metadata?: Metadata;\n permissions?: string;\n umask?: string;\n pathHttpHeaders?: PathCreateHttpHeaders;\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\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 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\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 // customerProvidedKey?: CpkInfo; not supported yet\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\nexport interface FileReadHeaders {\n lastModified?: 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\nexport interface FileFlushOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n conditions?: DataLakeRequestConditions;\n retainUncommittedData?: boolean;\n close?: boolean;\n pathHttpHeaders?: PathHttpHeaders;\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\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\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\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/** DataLakeLeaseClient option and response related models */\n/** *********************************************************/\n"]}
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models.ts"],"names":[],"mappings":"AA2/BA,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;AAoZD,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 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. 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 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\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\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\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 * 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 conditions?: DataLakeRequestConditions;\n pathHttpHeaders?: PathCreateHttpHeaders;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\n}\n\nexport interface PathCreateIfNotExistsOptions extends CommonOptions {\n abortSignal?: AbortSignalLike;\n metadata?: Metadata;\n permissions?: string;\n umask?: string;\n pathHttpHeaders?: PathCreateHttpHeaders;\n /**\n * Customer Provided Key Info.\n */\n customerProvidedKey?: CpkInfo;\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 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 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\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\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/** DataLakeLeaseClient option and response related models */\n/** *********************************************************/\n"]}
|
|
@@ -323,4 +323,13 @@ export function toAccessControlChangeFailureArray(aclFailedEntries = []) {
|
|
|
323
323
|
};
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
|
+
export function toBlobCpkInfo(input) {
|
|
327
|
+
return input
|
|
328
|
+
? {
|
|
329
|
+
encryptionKey: input.encryptionKey,
|
|
330
|
+
encryptionKeySha256: input.encryptionKeySha256,
|
|
331
|
+
encryptionAlgorithm: "AES256",
|
|
332
|
+
}
|
|
333
|
+
: undefined;
|
|
334
|
+
}
|
|
326
335
|
//# sourceMappingURL=transforms.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transforms.js","sourceRoot":"","sources":["../../../src/transforms.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAkB9C,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAExC,IAAI,IAAI,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;IAC/B,IAAI,IAAI,KAAK,SAAS,EAAE;QACtB,MAAM,UAAU,CAAC,qCAAqC,GAAG,8BAA8B,CAAC,CAAC;KAC1F;IAED,KAAK,MAAM,OAAO,IAAI,0BAA0B,EAAE;QAChD,IAAI,IAAI,CAAC,QAAQ,CAAC,OAA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AAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;AACjG,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,WAA4B;IAC9D,OAAO,GAAG,uBAAuB,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,uBAAuB,CAC5E,WAAW,CAAC,KAAK,CAClB,GAAG,uBAAuB,CAAC,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,GACnE,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EACnC,EAAE,CAAC;AACL,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,mBAAqC,EAAE;IAEvC,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC,cAA8B,EAAE,EAAE;QAC7D,OAAO;YACL,IAAI,EAAE,cAAc,CAAC,IAAI,IAAI,EAAE;YAC/B,WAAW,EAAE,CAAC,cAAc,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,WAAW;YACtE,OAAO,EAAE,cAAc,CAAC,YAAY,IAAI,EAAE;SAC3C,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { URLBuilder } from \"@azure/core-http\";\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ContainerItem, PublicAccessType as ContainerPublicAccessType } from \"@azure/storage-blob\";\n\nimport { AclFailedEntry, PathGetPropertiesResponse } from \"./generated/src/models\";\nimport {\n AccessControlChangeError,\n FileSystemItem,\n Metadata,\n PathAccessControlItem,\n PathGetAccessControlResponse,\n PathPermissions,\n PublicAccessType,\n RemovePathAccessControlItem,\n RolePermissions,\n ServiceListContainersSegmentResponse,\n ServiceListFileSystemsSegmentResponse,\n} from \"./models\";\nimport { ToBlobEndpointHostMappings, ToDfsEndpointHostMappings } from \"./utils/constants\";\nimport { base64encode } from \"./utils/utils.common\";\n\n/**\n * Get a blob endpoint URL from incoming blob or dfs endpoint URLs.\n * Only handle known host name pair patterns, add more patterns into ToBlobEndpointHostMappings in constants.ts.\n *\n * Expected input and outputs:\n * http://account.blob.core.windows.net - http://account.blob.core.windows.net\n * http://account.dfs.core.windows.net - http://account.blob.core.windows.net\n * http://127.0.0.1:10000 - http://127.0.0.1:10000\n * http://account.blob.core.windows.net/abc - http://account.blob.core.windows.net/abc\n * http://account.dfs.core.windows.net/abc - http://account.blob.core.windows.net/abc\n * http://127.0.0.1:10000/abc - http://127.0.0.1:10000/abc\n *\n * @param url -\n */\nexport function toBlobEndpointUrl(url: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let host = urlParsed.getHost();\n if (host === undefined) {\n throw RangeError(`toBlobEndpointUrl() parameter url ${url} doesn't include valid host.`);\n }\n\n for (const mapping of ToBlobEndpointHostMappings) {\n if (host.includes(mapping[0])) {\n host = host.replace(mapping[0], mapping[1]);\n break;\n }\n }\n\n urlParsed.setHost(host);\n return urlParsed.toString();\n}\n\n/**\n * Get a dfs endpoint URL from incoming blob or dfs endpoint URLs.\n * Only handle known host name pair patterns, add more patterns into ToDfsEndpointHostMappings in constants.ts.\n *\n * Expected input and outputs:\n * http://account.blob.core.windows.net - http://account.dfs.core.windows.net\n * http://account.dfs.core.windows.net - http://account.dfs.core.windows.net\n * http://127.0.0.1:10000 - http://127.0.0.1:10000\n * http://account.blob.core.windows.net/abc - http://account.dfs.core.windows.net/abc\n * http://account.dfs.core.windows.net/abc - http://account.dfs.core.windows.net/abc\n * http://127.0.0.1:10000/abc - http://127.0.0.1:10000/abc\n *\n * @param url -\n */\nexport function toDfsEndpointUrl(url: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let host = urlParsed.getHost();\n if (host === undefined) {\n throw RangeError(`toDfsEndpointUrl() parameter url ${url} doesn't include valid host.`);\n }\n\n for (const mapping of ToDfsEndpointHostMappings) {\n if (host.includes(mapping[0])) {\n host = host.replace(mapping[0], mapping[1]);\n break;\n }\n }\n\n urlParsed.setHost(host);\n return urlParsed.toString();\n}\n\nfunction toFileSystemAsyncIterableIterator(\n iter: AsyncIterableIterator<ServiceListContainersSegmentResponse>\n): AsyncIterableIterator<ServiceListFileSystemsSegmentResponse> {\n return {\n async next() {\n const rawResult = await iter.next();\n if (rawResult.value) {\n rawResult.value.fileSystemItems = rawResult.value.containerItems.map(\n (val: ContainerItem): FileSystemItem => {\n return {\n ...val,\n versionId: val.version,\n properties: {\n ...val.properties,\n publicAccess: toPublicAccessType(val.properties.publicAccess),\n },\n };\n }\n );\n }\n return rawResult as any;\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n };\n}\n\nexport function toFileSystemPagedAsyncIterableIterator(\n iter: PagedAsyncIterableIterator<ContainerItem, ServiceListContainersSegmentResponse>\n): PagedAsyncIterableIterator<FileSystemItem, ServiceListFileSystemsSegmentResponse> {\n return {\n async next(): Promise<IteratorResult<FileSystemItem>> {\n const rawResult = await iter.next();\n const result = rawResult as IteratorResult<FileSystemItem>;\n if (!result.done && !rawResult.done) {\n result.value.properties.publicAccess = toPublicAccessType(\n rawResult.value.properties.publicAccess\n );\n result.value.versionId = rawResult.value.version;\n }\n return result;\n },\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<\n FileSystemItem,\n ServiceListFileSystemsSegmentResponse\n > {\n return this;\n },\n byPage(\n settings: PageSettings = {}\n ): AsyncIterableIterator<ServiceListFileSystemsSegmentResponse> {\n return toFileSystemAsyncIterableIterator(iter.byPage(settings));\n },\n };\n}\n\nexport function toContainerPublicAccessType(\n publicAccessType?: PublicAccessType\n): ContainerPublicAccessType | undefined {\n if (!publicAccessType) {\n return undefined;\n }\n\n switch (publicAccessType) {\n case \"filesystem\":\n return \"container\";\n case \"file\":\n return \"blob\";\n default:\n throw TypeError(\n `toContainerPublicAccessType() parameter ${publicAccessType} is not recognized.`\n );\n }\n}\n\nexport function toPublicAccessType(\n containerPublicAccessType?: ContainerPublicAccessType\n): PublicAccessType | undefined {\n if (!containerPublicAccessType) {\n return undefined;\n }\n\n switch (containerPublicAccessType) {\n case \"container\":\n return \"filesystem\";\n case \"blob\":\n return \"file\";\n default:\n throw TypeError(\n `toPublicAccessType() parameter ${containerPublicAccessType} is not recognized.`\n );\n }\n}\n\nexport function toProperties(metadata?: Metadata): string | undefined {\n if (metadata === undefined) {\n return undefined;\n }\n\n const properties = [];\n for (const key in metadata) {\n if (Object.prototype.hasOwnProperty.call(metadata, key)) {\n const value = metadata[key];\n properties.push(`${key}=${base64encode(value)}`);\n }\n }\n\n return properties.join(\",\");\n}\n\nexport function toPathGetAccessControlResponse(\n response: PathGetPropertiesResponse\n): PathGetAccessControlResponse {\n return {\n ...response,\n _response: response._response,\n permissions: toPermissions(response.permissions),\n acl: toAcl(response.acl),\n };\n}\n\nexport function toRolePermissions(\n permissionsString: string,\n allowStickyBit: boolean = false\n): RolePermissions {\n const error = new RangeError(\n `toRolePermissions() Invalid role permissions string ${permissionsString}`\n );\n if (permissionsString.length !== 3) {\n throw error;\n }\n\n permissionsString = permissionsString.toLowerCase();\n\n let read = false;\n if (permissionsString[0] === \"r\") {\n read = true;\n } else if (permissionsString[0] !== \"-\") {\n throw error;\n }\n\n let write = false;\n if (permissionsString[1] === \"w\") {\n write = true;\n } else if (permissionsString[1] !== \"-\") {\n throw error;\n }\n\n let execute = false;\n if (permissionsString[2] === \"x\") {\n execute = true;\n } else if (allowStickyBit) {\n if (permissionsString[2] === \"t\") {\n execute = true;\n } else if (permissionsString[2] !== \"-\") {\n throw error;\n }\n } else if (permissionsString[2] !== \"-\") {\n throw error;\n }\n\n return { read, write, execute };\n}\n\nexport function toPermissions(permissionsString?: string): PathPermissions | undefined {\n if (permissionsString === undefined || permissionsString === \"\" || permissionsString === null) {\n return undefined;\n }\n\n if (permissionsString.length !== 9 && permissionsString.length !== 10) {\n throw RangeError(`toPermissions() Invalid permissions string ${permissionsString}`);\n }\n\n // Case insensitive\n permissionsString = permissionsString.toLowerCase();\n\n let stickyBit = false;\n if (permissionsString[8] === \"t\") {\n stickyBit = true;\n }\n\n let extendedAcls = false;\n if (permissionsString.length === 10) {\n if (permissionsString[9] === \"+\") {\n extendedAcls = true;\n } else {\n throw RangeError(\n `toPermissions() Invalid extendedAcls bit ${permissionsString[9]} in permissions string ${permissionsString}`\n );\n }\n }\n\n const owner = toRolePermissions(permissionsString.substr(0, 3), false);\n const group = toRolePermissions(permissionsString.substr(3, 3), false);\n const other = toRolePermissions(permissionsString.substr(6, 3), true);\n\n return {\n owner,\n group,\n other,\n stickyBit,\n extendedAcls,\n };\n}\n\nexport function toAccessControlItem(aclItemString: string): PathAccessControlItem {\n const error = new RangeError(\n `toAccessControlItem() Parameter access control item string ${aclItemString} is not valid.`\n );\n if (aclItemString === \"\") {\n throw error;\n }\n\n aclItemString = aclItemString.toLowerCase();\n\n const parts = aclItemString.split(\":\");\n if (parts.length < 3 || parts.length > 4) {\n throw error;\n }\n\n let defaultScope = false;\n let index = 0;\n if (parts.length === 4) {\n if (parts[index] !== \"default\") {\n throw error;\n }\n defaultScope = true;\n index++;\n }\n\n const accessControlType = parts[index++];\n if (\n accessControlType !== \"user\" &&\n accessControlType !== \"group\" &&\n accessControlType !== \"mask\" &&\n accessControlType !== \"other\"\n ) {\n throw error;\n }\n\n const entityId = parts[index++];\n const permissions = toRolePermissions(parts[index++]);\n\n return {\n defaultScope,\n accessControlType,\n entityId,\n permissions,\n };\n}\n\nexport function toRemoveAccessControlItem(aclItemString: string): RemovePathAccessControlItem {\n const error = new RangeError(\n `toAccessControlItem() Parameter access control item string \"${aclItemString}\" is not valid.`\n );\n if (aclItemString === \"\") {\n throw error;\n }\n\n aclItemString = aclItemString.toLowerCase();\n\n const parts = aclItemString.split(\":\");\n if (parts.length < 1 || parts.length > 3) {\n throw error;\n }\n\n if (parts.length === 3) {\n if (parts[0] !== \"default\") {\n throw error;\n }\n }\n\n let defaultScope = false;\n let index = 0;\n if (parts[index] === \"default\") {\n defaultScope = true;\n index++;\n }\n\n const accessControlType = parts[index++];\n if (\n accessControlType !== \"user\" &&\n accessControlType !== \"group\" &&\n accessControlType !== \"mask\" &&\n accessControlType !== \"other\"\n ) {\n throw error;\n }\n\n const entityId = parts[index++];\n\n return {\n defaultScope,\n accessControlType,\n entityId,\n };\n}\n\nexport function toAcl(aclString?: string): PathAccessControlItem[] {\n if (aclString === undefined || aclString === \"\" || aclString === null) {\n return [];\n }\n\n const acls = [];\n const aclParts = aclString.split(\",\");\n for (const aclPart of aclParts) {\n acls.push(toAccessControlItem(aclPart));\n }\n\n return acls;\n}\n\nexport function toRemoveAcl(aclString?: string): RemovePathAccessControlItem[] {\n if (aclString === undefined || aclString === \"\" || aclString === null) {\n return [];\n }\n\n const acls = [];\n const aclParts = aclString.split(\",\");\n for (const aclPart of aclParts) {\n acls.push(toRemoveAccessControlItem(aclPart));\n }\n\n return acls;\n}\n\nexport function toAccessControlItemString(item: PathAccessControlItem): string {\n const entityIdString = item.entityId !== undefined ? `:${item.entityId}` : \"\";\n const permissionsString =\n item.permissions !== undefined ? `:${toRolePermissionsString(item.permissions)}` : \"\";\n return `${item.defaultScope ? \"default:\" : \"\"}${\n item.accessControlType\n }${entityIdString}${permissionsString}`;\n}\n\nexport function toAclString(acl: PathAccessControlItem[]): string {\n return acl.map(toAccessControlItemString).join(\",\");\n}\n\nexport function toRolePermissionsString(p: RolePermissions, stickyBit: boolean = false): string {\n return `${p.read ? \"r\" : \"-\"}${p.write ? \"w\" : \"-\"}${stickyBit ? \"t\" : p.execute ? \"x\" : \"-\"}`;\n}\n\nexport function toPermissionsString(permissions: PathPermissions): string {\n return `${toRolePermissionsString(permissions.owner)}${toRolePermissionsString(\n permissions.group\n )}${toRolePermissionsString(permissions.other, permissions.stickyBit)}${\n permissions.extendedAcls ? \"+\" : \"\"\n }`;\n}\n\nexport function toAccessControlChangeFailureArray(\n aclFailedEntries: AclFailedEntry[] = []\n): AccessControlChangeError[] {\n return aclFailedEntries.map((aclFailedEntry: AclFailedEntry) => {\n return {\n name: aclFailedEntry.name || \"\",\n isDirectory: (aclFailedEntry.type || \"\").toLowerCase() === \"directory\",\n message: aclFailedEntry.errorMessage || \"\",\n };\n });\n}\n"]}
|
|
1
|
+
{"version":3,"file":"transforms.js","sourceRoot":"","sources":["../../../src/transforms.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAsB9C,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAExC,IAAI,IAAI,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;IAC/B,IAAI,IAAI,KAAK,SAAS,EAAE;QACtB,MAAM,UAAU,CAAC,qCAAqC,GAAG,8BAA8B,CAAC,CAAC;KAC1F;IAED,KAAK,MAAM,OAAO,IAAI,0BAA0B,EAAE;QAChD,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE;YAC7B,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,MAAM;SACP;KACF;IAED,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;AAC9B,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAW;IAC1C,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAExC,IAAI,IAAI,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC;IAC/B,IAAI,IAAI,KAAK,SAAS,EAA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O;YACL,IAAI,EAAE,cAAc,CAAC,IAAI,IAAI,EAAE;YAC/B,WAAW,EAAE,CAAC,cAAc,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,KAAK,WAAW;YACtE,OAAO,EAAE,cAAc,CAAC,YAAY,IAAI,EAAE;SAC3C,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAe;IAC3C,OAAO,KAAK;QACV,CAAC,CAAC;YACE,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;YAC9C,mBAAmB,EAAE,QAAQ;SAC9B;QACH,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { URLBuilder } from \"@azure/core-http\";\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport {\n ContainerItem,\n CpkInfo as BlobCpkInfo,\n PublicAccessType as ContainerPublicAccessType,\n} from \"@azure/storage-blob\";\n\nimport { AclFailedEntry, CpkInfo, PathGetPropertiesResponse } from \"./generated/src/models\";\nimport {\n AccessControlChangeError,\n FileSystemItem,\n Metadata,\n PathAccessControlItem,\n PathGetAccessControlResponse,\n PathPermissions,\n PublicAccessType,\n RemovePathAccessControlItem,\n RolePermissions,\n ServiceListContainersSegmentResponse,\n ServiceListFileSystemsSegmentResponse,\n} from \"./models\";\nimport { ToBlobEndpointHostMappings, ToDfsEndpointHostMappings } from \"./utils/constants\";\nimport { base64encode } from \"./utils/utils.common\";\n\n/**\n * Get a blob endpoint URL from incoming blob or dfs endpoint URLs.\n * Only handle known host name pair patterns, add more patterns into ToBlobEndpointHostMappings in constants.ts.\n *\n * Expected input and outputs:\n * http://account.blob.core.windows.net - http://account.blob.core.windows.net\n * http://account.dfs.core.windows.net - http://account.blob.core.windows.net\n * http://127.0.0.1:10000 - http://127.0.0.1:10000\n * http://account.blob.core.windows.net/abc - http://account.blob.core.windows.net/abc\n * http://account.dfs.core.windows.net/abc - http://account.blob.core.windows.net/abc\n * http://127.0.0.1:10000/abc - http://127.0.0.1:10000/abc\n *\n * @param url -\n */\nexport function toBlobEndpointUrl(url: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let host = urlParsed.getHost();\n if (host === undefined) {\n throw RangeError(`toBlobEndpointUrl() parameter url ${url} doesn't include valid host.`);\n }\n\n for (const mapping of ToBlobEndpointHostMappings) {\n if (host.includes(mapping[0])) {\n host = host.replace(mapping[0], mapping[1]);\n break;\n }\n }\n\n urlParsed.setHost(host);\n return urlParsed.toString();\n}\n\n/**\n * Get a dfs endpoint URL from incoming blob or dfs endpoint URLs.\n * Only handle known host name pair patterns, add more patterns into ToDfsEndpointHostMappings in constants.ts.\n *\n * Expected input and outputs:\n * http://account.blob.core.windows.net - http://account.dfs.core.windows.net\n * http://account.dfs.core.windows.net - http://account.dfs.core.windows.net\n * http://127.0.0.1:10000 - http://127.0.0.1:10000\n * http://account.blob.core.windows.net/abc - http://account.dfs.core.windows.net/abc\n * http://account.dfs.core.windows.net/abc - http://account.dfs.core.windows.net/abc\n * http://127.0.0.1:10000/abc - http://127.0.0.1:10000/abc\n *\n * @param url -\n */\nexport function toDfsEndpointUrl(url: string): string {\n const urlParsed = URLBuilder.parse(url);\n\n let host = urlParsed.getHost();\n if (host === undefined) {\n throw RangeError(`toDfsEndpointUrl() parameter url ${url} doesn't include valid host.`);\n }\n\n for (const mapping of ToDfsEndpointHostMappings) {\n if (host.includes(mapping[0])) {\n host = host.replace(mapping[0], mapping[1]);\n break;\n }\n }\n\n urlParsed.setHost(host);\n return urlParsed.toString();\n}\n\nfunction toFileSystemAsyncIterableIterator(\n iter: AsyncIterableIterator<ServiceListContainersSegmentResponse>\n): AsyncIterableIterator<ServiceListFileSystemsSegmentResponse> {\n return {\n async next() {\n const rawResult = await iter.next();\n if (rawResult.value) {\n rawResult.value.fileSystemItems = rawResult.value.containerItems.map(\n (val: ContainerItem): FileSystemItem => {\n return {\n ...val,\n versionId: val.version,\n properties: {\n ...val.properties,\n publicAccess: toPublicAccessType(val.properties.publicAccess),\n },\n };\n }\n );\n }\n return rawResult as any;\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n };\n}\n\nexport function toFileSystemPagedAsyncIterableIterator(\n iter: PagedAsyncIterableIterator<ContainerItem, ServiceListContainersSegmentResponse>\n): PagedAsyncIterableIterator<FileSystemItem, ServiceListFileSystemsSegmentResponse> {\n return {\n async next(): Promise<IteratorResult<FileSystemItem>> {\n const rawResult = await iter.next();\n const result = rawResult as IteratorResult<FileSystemItem>;\n if (!result.done && !rawResult.done) {\n result.value.properties.publicAccess = toPublicAccessType(\n rawResult.value.properties.publicAccess\n );\n result.value.versionId = rawResult.value.version;\n }\n return result;\n },\n [Symbol.asyncIterator](): PagedAsyncIterableIterator<\n FileSystemItem,\n ServiceListFileSystemsSegmentResponse\n > {\n return this;\n },\n byPage(\n settings: PageSettings = {}\n ): AsyncIterableIterator<ServiceListFileSystemsSegmentResponse> {\n return toFileSystemAsyncIterableIterator(iter.byPage(settings));\n },\n };\n}\n\nexport function toContainerPublicAccessType(\n publicAccessType?: PublicAccessType\n): ContainerPublicAccessType | undefined {\n if (!publicAccessType) {\n return undefined;\n }\n\n switch (publicAccessType) {\n case \"filesystem\":\n return \"container\";\n case \"file\":\n return \"blob\";\n default:\n throw TypeError(\n `toContainerPublicAccessType() parameter ${publicAccessType} is not recognized.`\n );\n }\n}\n\nexport function toPublicAccessType(\n containerPublicAccessType?: ContainerPublicAccessType\n): PublicAccessType | undefined {\n if (!containerPublicAccessType) {\n return undefined;\n }\n\n switch (containerPublicAccessType) {\n case \"container\":\n return \"filesystem\";\n case \"blob\":\n return \"file\";\n default:\n throw TypeError(\n `toPublicAccessType() parameter ${containerPublicAccessType} is not recognized.`\n );\n }\n}\n\nexport function toProperties(metadata?: Metadata): string | undefined {\n if (metadata === undefined) {\n return undefined;\n }\n\n const properties = [];\n for (const key in metadata) {\n if (Object.prototype.hasOwnProperty.call(metadata, key)) {\n const value = metadata[key];\n properties.push(`${key}=${base64encode(value)}`);\n }\n }\n\n return properties.join(\",\");\n}\n\nexport function toPathGetAccessControlResponse(\n response: PathGetPropertiesResponse\n): PathGetAccessControlResponse {\n return {\n ...response,\n _response: response._response,\n permissions: toPermissions(response.permissions),\n acl: toAcl(response.acl),\n };\n}\n\nexport function toRolePermissions(\n permissionsString: string,\n allowStickyBit: boolean = false\n): RolePermissions {\n const error = new RangeError(\n `toRolePermissions() Invalid role permissions string ${permissionsString}`\n );\n if (permissionsString.length !== 3) {\n throw error;\n }\n\n permissionsString = permissionsString.toLowerCase();\n\n let read = false;\n if (permissionsString[0] === \"r\") {\n read = true;\n } else if (permissionsString[0] !== \"-\") {\n throw error;\n }\n\n let write = false;\n if (permissionsString[1] === \"w\") {\n write = true;\n } else if (permissionsString[1] !== \"-\") {\n throw error;\n }\n\n let execute = false;\n if (permissionsString[2] === \"x\") {\n execute = true;\n } else if (allowStickyBit) {\n if (permissionsString[2] === \"t\") {\n execute = true;\n } else if (permissionsString[2] !== \"-\") {\n throw error;\n }\n } else if (permissionsString[2] !== \"-\") {\n throw error;\n }\n\n return { read, write, execute };\n}\n\nexport function toPermissions(permissionsString?: string): PathPermissions | undefined {\n if (permissionsString === undefined || permissionsString === \"\" || permissionsString === null) {\n return undefined;\n }\n\n if (permissionsString.length !== 9 && permissionsString.length !== 10) {\n throw RangeError(`toPermissions() Invalid permissions string ${permissionsString}`);\n }\n\n // Case insensitive\n permissionsString = permissionsString.toLowerCase();\n\n let stickyBit = false;\n if (permissionsString[8] === \"t\") {\n stickyBit = true;\n }\n\n let extendedAcls = false;\n if (permissionsString.length === 10) {\n if (permissionsString[9] === \"+\") {\n extendedAcls = true;\n } else {\n throw RangeError(\n `toPermissions() Invalid extendedAcls bit ${permissionsString[9]} in permissions string ${permissionsString}`\n );\n }\n }\n\n const owner = toRolePermissions(permissionsString.substr(0, 3), false);\n const group = toRolePermissions(permissionsString.substr(3, 3), false);\n const other = toRolePermissions(permissionsString.substr(6, 3), true);\n\n return {\n owner,\n group,\n other,\n stickyBit,\n extendedAcls,\n };\n}\n\nexport function toAccessControlItem(aclItemString: string): PathAccessControlItem {\n const error = new RangeError(\n `toAccessControlItem() Parameter access control item string ${aclItemString} is not valid.`\n );\n if (aclItemString === \"\") {\n throw error;\n }\n\n aclItemString = aclItemString.toLowerCase();\n\n const parts = aclItemString.split(\":\");\n if (parts.length < 3 || parts.length > 4) {\n throw error;\n }\n\n let defaultScope = false;\n let index = 0;\n if (parts.length === 4) {\n if (parts[index] !== \"default\") {\n throw error;\n }\n defaultScope = true;\n index++;\n }\n\n const accessControlType = parts[index++];\n if (\n accessControlType !== \"user\" &&\n accessControlType !== \"group\" &&\n accessControlType !== \"mask\" &&\n accessControlType !== \"other\"\n ) {\n throw error;\n }\n\n const entityId = parts[index++];\n const permissions = toRolePermissions(parts[index++]);\n\n return {\n defaultScope,\n accessControlType,\n entityId,\n permissions,\n };\n}\n\nexport function toRemoveAccessControlItem(aclItemString: string): RemovePathAccessControlItem {\n const error = new RangeError(\n `toAccessControlItem() Parameter access control item string \"${aclItemString}\" is not valid.`\n );\n if (aclItemString === \"\") {\n throw error;\n }\n\n aclItemString = aclItemString.toLowerCase();\n\n const parts = aclItemString.split(\":\");\n if (parts.length < 1 || parts.length > 3) {\n throw error;\n }\n\n if (parts.length === 3) {\n if (parts[0] !== \"default\") {\n throw error;\n }\n }\n\n let defaultScope = false;\n let index = 0;\n if (parts[index] === \"default\") {\n defaultScope = true;\n index++;\n }\n\n const accessControlType = parts[index++];\n if (\n accessControlType !== \"user\" &&\n accessControlType !== \"group\" &&\n accessControlType !== \"mask\" &&\n accessControlType !== \"other\"\n ) {\n throw error;\n }\n\n const entityId = parts[index++];\n\n return {\n defaultScope,\n accessControlType,\n entityId,\n };\n}\n\nexport function toAcl(aclString?: string): PathAccessControlItem[] {\n if (aclString === undefined || aclString === \"\" || aclString === null) {\n return [];\n }\n\n const acls = [];\n const aclParts = aclString.split(\",\");\n for (const aclPart of aclParts) {\n acls.push(toAccessControlItem(aclPart));\n }\n\n return acls;\n}\n\nexport function toRemoveAcl(aclString?: string): RemovePathAccessControlItem[] {\n if (aclString === undefined || aclString === \"\" || aclString === null) {\n return [];\n }\n\n const acls = [];\n const aclParts = aclString.split(\",\");\n for (const aclPart of aclParts) {\n acls.push(toRemoveAccessControlItem(aclPart));\n }\n\n return acls;\n}\n\nexport function toAccessControlItemString(item: PathAccessControlItem): string {\n const entityIdString = item.entityId !== undefined ? `:${item.entityId}` : \"\";\n const permissionsString =\n item.permissions !== undefined ? `:${toRolePermissionsString(item.permissions)}` : \"\";\n return `${item.defaultScope ? \"default:\" : \"\"}${\n item.accessControlType\n }${entityIdString}${permissionsString}`;\n}\n\nexport function toAclString(acl: PathAccessControlItem[]): string {\n return acl.map(toAccessControlItemString).join(\",\");\n}\n\nexport function toRolePermissionsString(p: RolePermissions, stickyBit: boolean = false): string {\n return `${p.read ? \"r\" : \"-\"}${p.write ? \"w\" : \"-\"}${stickyBit ? \"t\" : p.execute ? \"x\" : \"-\"}`;\n}\n\nexport function toPermissionsString(permissions: PathPermissions): string {\n return `${toRolePermissionsString(permissions.owner)}${toRolePermissionsString(\n permissions.group\n )}${toRolePermissionsString(permissions.other, permissions.stickyBit)}${\n permissions.extendedAcls ? \"+\" : \"\"\n }`;\n}\n\nexport function toAccessControlChangeFailureArray(\n aclFailedEntries: AclFailedEntry[] = []\n): AccessControlChangeError[] {\n return aclFailedEntries.map((aclFailedEntry: AclFailedEntry) => {\n return {\n name: aclFailedEntry.name || \"\",\n isDirectory: (aclFailedEntry.type || \"\").toLowerCase() === \"directory\",\n message: aclFailedEntry.errorMessage || \"\",\n };\n });\n}\n\nexport function toBlobCpkInfo(input?: CpkInfo): BlobCpkInfo | undefined {\n return input\n ? {\n encryptionKey: input.encryptionKey,\n encryptionKeySha256: input.encryptionKeySha256,\n encryptionAlgorithm: \"AES256\",\n }\n : undefined;\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 = "2021-
|
|
3
|
+
export const SDK_VERSION = "12.9.0-beta.1";
|
|
4
|
+
export const SERVICE_VERSION = "2021-06-08";
|
|
5
5
|
export const KB = 1024;
|
|
6
6
|
export const MB = KB * 1024;
|
|
7
7
|
export const GB = MB * 1024;
|
|
@@ -207,6 +207,7 @@ export const ToDfsEndpointHostMappings = [
|
|
|
207
207
|
];
|
|
208
208
|
export const ETagAny = "*";
|
|
209
209
|
export const DeletionIdKey = "deletionid";
|
|
210
|
+
export const EncryptionAlgorithmAES25 = "AES256";
|
|
210
211
|
export const PathResultTypeConstants = {
|
|
211
212
|
FileResourceType: "file",
|
|
212
213
|
DirectoryResourceType: "directory",
|
|
@@ -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,QAAQ,CAAC;AAC5C,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,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AC,4BAA4B,EAAE,2BAA2B,CAAC;IAC3D,CAAC,yBAAyB,EAAE,wBAAwB,CAAC;CACtD,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,CAAC;AAE3B,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC;AAE1C,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,gBAAgB,EAAE,MAAM;IACxB,qBAAqB,EAAE,WAAW;CACnC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport const SDK_VERSION: string = \"12.8.1\";\nexport const SERVICE_VERSION: string = \"2021-04-10\";\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];\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];\n\nexport const ETagAny = \"*\";\n\nexport const DeletionIdKey = \"deletionid\";\n\nexport const PathResultTypeConstants = {\n FileResourceType: \"file\",\n DirectoryResourceType: \"directory\",\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,eAAe,CAAC;AACnD,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;IACnB,YAAY;IACZ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under the MIT license.\n\nexport const SDK_VERSION: string = \"12.9.0-beta.1\";\nexport const SERVICE_VERSION: string = \"2021-06-08\";\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];\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];\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"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpHeaders, isNode, URLBuilder } from "@azure/core-http";
|
|
2
|
-
import { DevelopmentConnectionString, HeaderConstants, UrlConstants } from "./constants";
|
|
2
|
+
import { DevelopmentConnectionString, EncryptionAlgorithmAES25, HeaderConstants, UrlConstants, } from "./constants";
|
|
3
3
|
/**
|
|
4
4
|
* Reserved URL characters must be properly escaped for Storage services like Blob or File.
|
|
5
5
|
*
|
|
@@ -478,4 +478,29 @@ export function isIpEndpointStyle(parsedUrl) {
|
|
|
478
478
|
// For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.
|
|
479
479
|
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);
|
|
480
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* This is to convert a Windows File Time ticks to a Date object.
|
|
483
|
+
*/
|
|
484
|
+
export function windowsFileTimeTicksToTime(timeNumber) {
|
|
485
|
+
if (!timeNumber)
|
|
486
|
+
return undefined;
|
|
487
|
+
const timeNumberInternal = parseInt(timeNumber);
|
|
488
|
+
if (timeNumberInternal === 0)
|
|
489
|
+
return undefined;
|
|
490
|
+
// A windows file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed
|
|
491
|
+
// since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC).
|
|
492
|
+
// Date accepts a value that represents miliseconds from 12:00 A.M. January 1, 1970
|
|
493
|
+
// Here should correct the year number after converting.
|
|
494
|
+
const date = new Date(timeNumberInternal / 10000);
|
|
495
|
+
date.setUTCFullYear(date.getUTCFullYear() - 369);
|
|
496
|
+
return date;
|
|
497
|
+
}
|
|
498
|
+
export function ensureCpkIfSpecified(cpk, isHttps) {
|
|
499
|
+
if (cpk && !isHttps) {
|
|
500
|
+
throw new RangeError("Customer-provided encryption key must be used over HTTPS.");
|
|
501
|
+
}
|
|
502
|
+
if (cpk && !cpk.encryptionAlgorithm) {
|
|
503
|
+
cpk.encryptionAlgorithm = EncryptionAlgorithmAES25;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
481
506
|
//# sourceMappingURL=utils.common.js.map
|