@azure/storage-file-share 12.31.0 → 12.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/README.md +5 -16
  2. package/dist/browser/Clients.d.ts +25 -16
  3. package/dist/browser/Clients.d.ts.map +1 -1
  4. package/dist/browser/Clients.js +19 -18
  5. package/dist/browser/Clients.js.map +1 -1
  6. package/dist/browser/generated/src/models/index.d.ts +10 -4
  7. package/dist/browser/generated/src/models/index.d.ts.map +1 -1
  8. package/dist/browser/generated/src/models/index.js.map +1 -1
  9. package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
  10. package/dist/browser/generated/src/models/mappers.js +7 -0
  11. package/dist/browser/generated/src/models/mappers.js.map +1 -1
  12. package/dist/browser/generated/src/models/parameters.d.ts +2 -2
  13. package/dist/browser/generated/src/models/parameters.d.ts.map +1 -1
  14. package/dist/browser/generated/src/models/parameters.js +21 -21
  15. package/dist/browser/generated/src/models/parameters.js.map +1 -1
  16. package/dist/browser/generated/src/operations/file.d.ts +1 -1
  17. package/dist/browser/generated/src/operations/file.js +5 -3
  18. package/dist/browser/generated/src/operations/file.js.map +1 -1
  19. package/dist/browser/generated/src/operationsInterfaces/file.d.ts +1 -1
  20. package/dist/browser/generated/src/operationsInterfaces/file.js.map +1 -1
  21. package/dist/browser/generated/src/storageClient.js +2 -2
  22. package/dist/browser/generated/src/storageClient.js.map +1 -1
  23. package/dist/browser/generatedModels.d.ts +2 -0
  24. package/dist/browser/generatedModels.d.ts.map +1 -1
  25. package/dist/browser/generatedModels.js.map +1 -1
  26. package/dist/browser/utils/constants.js +2 -2
  27. package/dist/browser/utils/constants.js.map +1 -1
  28. package/dist/browser/utils/utils.common.d.ts.map +1 -1
  29. package/dist/browser/utils/utils.common.js +14 -0
  30. package/dist/browser/utils/utils.common.js.map +1 -1
  31. package/dist/commonjs/Clients.d.ts +25 -16
  32. package/dist/commonjs/Clients.d.ts.map +1 -1
  33. package/dist/commonjs/Clients.js +25 -18
  34. package/dist/commonjs/Clients.js.map +2 -2
  35. package/dist/commonjs/generated/src/models/index.d.ts +10 -4
  36. package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
  37. package/dist/commonjs/generated/src/models/index.js.map +2 -2
  38. package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
  39. package/dist/commonjs/generated/src/models/mappers.js +7 -0
  40. package/dist/commonjs/generated/src/models/mappers.js.map +2 -2
  41. package/dist/commonjs/generated/src/models/parameters.d.ts +2 -2
  42. package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -1
  43. package/dist/commonjs/generated/src/models/parameters.js +21 -21
  44. package/dist/commonjs/generated/src/models/parameters.js.map +2 -2
  45. package/dist/commonjs/generated/src/operations/file.d.ts +1 -1
  46. package/dist/commonjs/generated/src/operations/file.js +8 -6
  47. package/dist/commonjs/generated/src/operations/file.js.map +2 -2
  48. package/dist/commonjs/generated/src/operationsInterfaces/file.d.ts +1 -1
  49. package/dist/commonjs/generated/src/operationsInterfaces/file.js.map +1 -1
  50. package/dist/commonjs/generated/src/storageClient.js +2 -2
  51. package/dist/commonjs/generated/src/storageClient.js.map +1 -1
  52. package/dist/commonjs/generatedModels.d.ts +2 -0
  53. package/dist/commonjs/generatedModels.d.ts.map +1 -1
  54. package/dist/commonjs/generatedModels.js.map +2 -2
  55. package/dist/commonjs/tsdoc-metadata.json +1 -1
  56. package/dist/commonjs/utils/constants.js +2 -2
  57. package/dist/commonjs/utils/constants.js.map +1 -1
  58. package/dist/commonjs/utils/utils.common.d.ts.map +1 -1
  59. package/dist/commonjs/utils/utils.common.js +13 -0
  60. package/dist/commonjs/utils/utils.common.js.map +2 -2
  61. package/dist/esm/Clients.d.ts +25 -16
  62. package/dist/esm/Clients.d.ts.map +1 -1
  63. package/dist/esm/Clients.js +19 -18
  64. package/dist/esm/Clients.js.map +1 -1
  65. package/dist/esm/generated/src/models/index.d.ts +10 -4
  66. package/dist/esm/generated/src/models/index.d.ts.map +1 -1
  67. package/dist/esm/generated/src/models/index.js.map +1 -1
  68. package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
  69. package/dist/esm/generated/src/models/mappers.js +7 -0
  70. package/dist/esm/generated/src/models/mappers.js.map +1 -1
  71. package/dist/esm/generated/src/models/parameters.d.ts +2 -2
  72. package/dist/esm/generated/src/models/parameters.d.ts.map +1 -1
  73. package/dist/esm/generated/src/models/parameters.js +21 -21
  74. package/dist/esm/generated/src/models/parameters.js.map +1 -1
  75. package/dist/esm/generated/src/operations/file.d.ts +1 -1
  76. package/dist/esm/generated/src/operations/file.js +5 -3
  77. package/dist/esm/generated/src/operations/file.js.map +1 -1
  78. package/dist/esm/generated/src/operationsInterfaces/file.d.ts +1 -1
  79. package/dist/esm/generated/src/operationsInterfaces/file.js.map +1 -1
  80. package/dist/esm/generated/src/storageClient.js +2 -2
  81. package/dist/esm/generated/src/storageClient.js.map +1 -1
  82. package/dist/esm/generatedModels.d.ts +2 -0
  83. package/dist/esm/generatedModels.d.ts.map +1 -1
  84. package/dist/esm/generatedModels.js.map +1 -1
  85. package/dist/esm/utils/constants.js +2 -2
  86. package/dist/esm/utils/constants.js.map +1 -1
  87. package/dist/esm/utils/utils.common.d.ts.map +1 -1
  88. package/dist/esm/utils/utils.common.js +14 -0
  89. package/dist/esm/utils/utils.common.js.map +1 -1
  90. package/dist/react-native/Clients.d.ts +25 -16
  91. package/dist/react-native/Clients.d.ts.map +1 -1
  92. package/dist/react-native/Clients.js +19 -18
  93. package/dist/react-native/Clients.js.map +1 -1
  94. package/dist/react-native/generated/src/models/index.d.ts +10 -4
  95. package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
  96. package/dist/react-native/generated/src/models/index.js.map +1 -1
  97. package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
  98. package/dist/react-native/generated/src/models/mappers.js +7 -0
  99. package/dist/react-native/generated/src/models/mappers.js.map +1 -1
  100. package/dist/react-native/generated/src/models/parameters.d.ts +2 -2
  101. package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -1
  102. package/dist/react-native/generated/src/models/parameters.js +21 -21
  103. package/dist/react-native/generated/src/models/parameters.js.map +1 -1
  104. package/dist/react-native/generated/src/operations/file.d.ts +1 -1
  105. package/dist/react-native/generated/src/operations/file.js +5 -3
  106. package/dist/react-native/generated/src/operations/file.js.map +1 -1
  107. package/dist/react-native/generated/src/operationsInterfaces/file.d.ts +1 -1
  108. package/dist/react-native/generated/src/operationsInterfaces/file.js.map +1 -1
  109. package/dist/react-native/generated/src/storageClient.js +2 -2
  110. package/dist/react-native/generated/src/storageClient.js.map +1 -1
  111. package/dist/react-native/generatedModels.d.ts +2 -0
  112. package/dist/react-native/generatedModels.d.ts.map +1 -1
  113. package/dist/react-native/generatedModels.js.map +1 -1
  114. package/dist/react-native/utils/constants.js +2 -2
  115. package/dist/react-native/utils/constants.js.map +1 -1
  116. package/dist/react-native/utils/utils.common.d.ts.map +1 -1
  117. package/dist/react-native/utils/utils.common.js +14 -0
  118. package/dist/react-native/utils/utils.common.js.map +1 -1
  119. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/generatedModels.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { UserDelegationKey } from \"@azure/storage-common\";\nimport type {\n CopyStatusType,\n DirectoryDeleteHeaders,\n DirectoryListFilesAndDirectoriesSegmentHeaders,\n DirectoryListHandlesHeaders,\n DirectoryRenameHeaders,\n DirectorySetMetadataHeaders,\n FileAbortCopyHeaders,\n FileDeleteHeaders,\n FileGetRangeListHeaders,\n FileGetSymbolicLinkHeaders,\n FileListHandlesHeaders,\n FileProperty,\n FileRenameHeaders,\n FileServiceProperties,\n FileSetMetadataHeaders,\n FileStartCopyHeaders,\n FileUploadRangeFromURLHeaders,\n FileUploadRangeHeaders,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType,\n ServiceGetPropertiesHeaders,\n ServiceSetPropertiesHeaders,\n ShareCreateHeaders,\n ShareCreatePermissionHeaders,\n ShareCreateSnapshotHeaders,\n ShareDeleteHeaders,\n ShareFileRangeList,\n ShareGetAccessPolicyHeaders,\n ShareGetPermissionHeaders,\n ShareGetPropertiesHeaders,\n ShareGetStatisticsHeaders,\n SharePermission,\n ShareSetAccessPolicyHeaders,\n ShareSetMetadataHeaders,\n ShareStats,\n ShareSetPropertiesHeaders,\n ServiceGetUserDelegationKeyHeaders,\n UserDelegationKey as UserDelegationKeyModel,\n} from \"./generated/src/models/index.js\";\nimport type {\n FileDownloadResponse,\n FilePosixProperties,\n FileSetHttpHeadersHeaders,\n} from \"./models.js\";\nimport type { WithResponse } from \"./utils/utils.common.js\";\n\n/** Defines headers for Directory_create operation. */\nexport interface DirectoryCreateHeaders {\n /** The ETag contains a value which represents the version of the directory, in quotes. */\n etag?: string;\n /** Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */\n lastModified?: Date;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */\n isServerEncrypted?: boolean;\n /** Key of the permission set for the directory. */\n filePermissionKey?: string;\n /** Attributes set for the directory. */\n fileAttributes?: string;\n /** Creation time for the directory. */\n fileCreatedOn?: Date;\n /** Last write time for the directory. */\n fileLastWriteOn?: Date;\n /** Change time for the directory. */\n fileChangeOn?: Date;\n /** The fileId of the directory. */\n fileId?: string;\n /** The parent fileId of the directory. */\n fileParentId?: string;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n /** Error Code */\n errorCode?: string;\n}\n\n/** Contains response data for the create operation. */\nexport type DirectoryCreateResponse = WithResponse<DirectoryCreateHeaders, DirectoryCreateHeaders>;\n\n/** Contains response data for the delete operation. */\nexport type DirectoryDeleteResponse = WithResponse<DirectoryDeleteHeaders, DirectoryDeleteHeaders>;\n\n/** Defines headers for Directory_getProperties operation. */\nexport interface DirectoryGetPropertiesHeaders {\n /** A set of name-value pairs that contain metadata for the directory. */\n metadata?: { [propertyName: string]: string };\n /** The ETag contains a value that you can use to perform operations conditionally, in quotes. */\n etag?: string;\n /** Returns the date and time the Directory was last modified. Operations on files within the directory do not affect the last modified time of the directory. */\n lastModified?: Date;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** The value of this header is set to true if the directory metadata is completely encrypted using the specified algorithm. Otherwise, the value is set to false. */\n isServerEncrypted?: boolean;\n /** Attributes set for the directory. */\n fileAttributes?: string;\n /** Creation time for the directory. */\n fileCreatedOn?: Date;\n /** Last write time for the directory. */\n fileLastWriteOn?: Date;\n /** Change time for the directory. */\n fileChangeOn?: Date;\n /** Key of the permission set for the directory. */\n filePermissionKey?: string;\n /** The fileId of the directory. */\n fileId?: string;\n /** The parent fileId of the directory. */\n fileParentId?: string;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n /** Error Code */\n errorCode?: string;\n}\n\n/** Contains response data for the getProperties operation. */\nexport type DirectoryGetPropertiesResponse = WithResponse<\n DirectoryGetPropertiesHeaders,\n DirectoryGetPropertiesHeaders\n>;\n\n/** Contains response data for the listFilesAndDirectoriesSegment operation. */\nexport type DirectoryListFilesAndDirectoriesSegmentResponse = WithResponse<\n DirectoryListFilesAndDirectoriesSegmentHeaders & ListFilesAndDirectoriesSegmentResponse,\n DirectoryListFilesAndDirectoriesSegmentHeaders,\n ListFilesAndDirectoriesSegmentResponse\n>;\n\n/** Contains response data for the listHandles operation. */\nexport type DirectoryListHandlesResponse = WithResponse<\n DirectoryListHandlesHeaders & ListHandlesResponse,\n DirectoryListHandlesHeaders,\n ListHandlesResponse\n>;\n\n/** Contains response data for the setMetadata operation. */\nexport type DirectorySetMetadataResponse = WithResponse<\n DirectorySetMetadataHeaders,\n DirectorySetMetadataHeaders\n>;\n\n/** Defines headers for Directory_setProperties operation. */\nexport interface DirectorySetPropertiesHeaders {\n /** The ETag contains a value which represents the version of the file, in quotes. */\n etag?: string;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Returns the date and time the directory was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */\n lastModified?: Date;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */\n isServerEncrypted?: boolean;\n /** Key of the permission set for the directory. */\n filePermissionKey?: string;\n /** Attributes set for the directory. */\n fileAttributes?: string;\n /** Creation time for the directory. */\n fileCreatedOn?: Date;\n /** Last write time for the directory. */\n fileLastWriteOn?: Date;\n /** Change time for the directory. */\n fileChangeOn?: Date;\n /** The fileId of the directory. */\n fileId?: string;\n /** The parent fileId of the directory. */\n fileParentId?: string;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n /** Error Code */\n errorCode?: string;\n}\n\n/** Contains response data for the setProperties operation. */\nexport type DirectorySetPropertiesResponse = WithResponse<\n DirectorySetPropertiesHeaders,\n DirectorySetPropertiesHeaders\n>;\n\n/** Contains response data for the abortCopy operation. */\nexport type FileAbortCopyResponse = WithResponse<FileAbortCopyHeaders, FileAbortCopyHeaders>;\n\n/** Defines headers for File_create operation. */\nexport interface FileCreateHeaders {\n /** The ETag contains a value which represents the version of the file, in quotes. */\n etag?: string;\n /** Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */\n lastModified?: Date;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */\n isServerEncrypted?: boolean;\n /** Key of the permission set for the file. */\n filePermissionKey?: string;\n /** Attributes set for the file. */\n fileAttributes?: string;\n /** Creation time for the file. */\n fileCreatedOn?: Date;\n /** Last write time for the file. */\n fileLastWriteOn?: Date;\n /** Change time for the file. */\n fileChangeOn?: Date;\n /** The fileId of the file. */\n fileId?: string;\n /** The parent fileId of the file. */\n fileParentId?: string;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n /** Error Code */\n errorCode?: string;\n}\n\n/** Contains response data for the create operation. */\nexport type FileCreateResponse = WithResponse<FileCreateHeaders, FileCreateHeaders>;\n\n/** Contains response data for the delete operation. */\nexport type FileDeleteResponse = WithResponse<FileDeleteHeaders, FileDeleteHeaders>;\n\n/** Defines headers for File_createHardLink operation. */\nexport interface FileCreateHardLinkHeaders {\n /** The ETag contains a value which represents the version of the file, in quotes. */\n etag?: string;\n /** Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */\n lastModified?: Date;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** Creation time for the file. */\n fileCreationTime?: Date;\n /** Last write time for the file. */\n fileLastWriteTime?: Date;\n /** Change time for the file. */\n fileChangeTime?: Date;\n /** The fileId of the file. */\n fileId?: string;\n /** The parent fileId of the directory. */\n fileParentId?: string;\n /** If a client request id header is sent in the request, this header will be present in the response with the same value. */\n clientRequestId?: string;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n}\n\n/** Contains response data for the create hard link operation. */\nexport type FileCreateHardLinkResponse = WithResponse<\n FileCreateHardLinkHeaders,\n FileCreateHardLinkHeaders\n>;\n\n/** Defines headers for File_createSymbolicLink operation. */\nexport interface FileCreateSymbolicLinkHeaders {\n /** The ETag contains a value which represents the version of the file, in quotes. */\n etag?: string;\n /** Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */\n lastModified?: Date;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** Creation time for the file. */\n fileCreationTime?: Date;\n /** Last write time for the file. */\n fileLastWriteTime?: Date;\n /** Change time for the file. */\n fileChangeTime?: Date;\n /** The fileId of the file. */\n fileId?: string;\n /** The parent fileId of the directory. */\n fileParentId?: string;\n /** If a client request id header is sent in the request, this header will be present in the response with the same value. */\n clientRequestId?: string;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n}\n\n/** Contains response data for the create hard link operation. */\nexport type FileCreateSymbolicLinkResponse = WithResponse<\n FileCreateSymbolicLinkHeaders,\n FileCreateSymbolicLinkHeaders\n>;\n\n/** Contains response data for the create hard link operation. */\nexport type FileGetSymbolicLinkResponse = WithResponse<\n FileGetSymbolicLinkHeaders,\n FileGetSymbolicLinkHeaders\n>;\n\n/** Defines headers for File_getProperties operation. */\nexport interface FileGetPropertiesHeaders {\n /** Returns the date and time the file was last modified. The date format follows RFC 1123. Any operation that modifies the file or its properties updates the last modified time. */\n lastModified?: Date;\n /** A set of name-value pairs associated with this file as user-defined metadata. */\n metadata?: { [propertyName: string]: string };\n /** Returns the type File. Reserved for future use. */\n fileType?: string;\n /** The size of the file in bytes. This header returns the value of the 'x-ms-content-length' header that is stored with the file. */\n contentLength?: number;\n /** The content type specified for the file. The default content type is 'application/octet-stream' */\n contentType?: string;\n /** The ETag contains a value that you can use to perform operations conditionally, in quotes. */\n etag?: string;\n /** If the Content-MD5 header has been set for the file, the Content-MD5 response header is returned so that the client can check for message content integrity. */\n contentMD5?: Uint8Array;\n /** If the Content-Encoding request header has previously been set for the file, the Content-Encoding value is returned in this header. */\n contentEncoding?: string;\n /** If the Cache-Control request header has previously been set for the file, the Cache-Control value is returned in this header. */\n cacheControl?: string;\n /** Returns the value that was specified for the 'x-ms-content-disposition' header and specifies how to process the response. */\n contentDisposition?: string;\n /** Returns the value that was specified for the Content-Language request header. */\n contentLanguage?: string;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** Conclusion time of the last attempted Copy File operation where this file was the destination file. This value can specify the time of a completed, aborted, or failed copy attempt. */\n copyCompletedOn?: Date;\n /** Only appears when x-ms-copy-status is failed or pending. Describes cause of fatal or non-fatal copy operation failure. */\n copyStatusDescription?: string;\n /** String identifier for the last attempted Copy File operation where this file was the destination file. */\n copyId?: string;\n /** Contains the number of bytes copied and the total bytes in the source in the last attempted Copy File operation where this file was the destination file. Can show between 0 and Content-Length bytes copied. */\n copyProgress?: string;\n /** URL up to 2KB in length that specifies the source file used in the last attempted Copy File operation where this file was the destination file. */\n copySource?: string;\n /** State of the copy operation identified by 'x-ms-copy-id'. */\n copyStatus?: CopyStatusType;\n /** The value of this header is set to true if the file data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the file is unencrypted, or if only parts of the file/application metadata are encrypted). */\n isServerEncrypted?: boolean;\n /** Attributes set for the file. */\n fileAttributes?: string;\n /** Creation time for the file. */\n fileCreatedOn?: Date;\n /** Last write time for the file. */\n fileLastWriteOn?: Date;\n /** Change time for the file. */\n fileChangeOn?: Date;\n /** Key of the permission set for the file. */\n filePermissionKey?: string;\n /** The fileId of the file. */\n fileId?: string;\n /** The parent fileId of the file. */\n fileParentId?: string;\n /** When a file is leased, specifies whether the lease is of infinite or fixed duration. */\n leaseDuration?: LeaseDurationType;\n /** Lease state of the file. */\n leaseState?: LeaseStateType;\n /** The current lease status of the file. */\n leaseStatus?: LeaseStatusType;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n /** Error Code */\n errorCode?: string;\n}\n\n/** Contains response data for the getProperties operation. */\nexport type FileGetPropertiesResponse = WithResponse<\n FileGetPropertiesHeaders,\n FileGetPropertiesHeaders\n>;\n\n/** Contains response data for the listHandles operation. */\nexport type FileListHandlesResponse = WithResponse<\n FileListHandlesHeaders & ListHandlesResponse,\n FileListHandlesHeaders,\n ListHandlesResponse\n>;\n\n/** Contains response data for the setMetadata operation. */\nexport type FileSetMetadataResponse = WithResponse<FileSetMetadataHeaders, FileSetMetadataHeaders>;\n\n/** Contains response data for the startCopy operation. */\nexport type FileStartCopyResponse = WithResponse<FileStartCopyHeaders, FileStartCopyHeaders>;\n\n/** Contains response data for the uploadRange operation. */\nexport type FileUploadRangeResponse = WithResponse<FileUploadRangeHeaders, FileUploadRangeHeaders>;\n\n/** Contains response data for the getProperties operation. */\nexport type ServiceGetPropertiesResponse = WithResponse<\n ServiceGetPropertiesHeaders & FileServiceProperties,\n ServiceGetPropertiesHeaders,\n FileServiceProperties\n>;\n\n/** Contains response data for the setProperties operation. */\nexport type ServiceSetPropertiesResponse = WithResponse<\n ServiceSetPropertiesHeaders,\n ServiceSetPropertiesHeaders\n>;\n\n/** Contains response data for the createPermission operation. */\nexport type ShareCreatePermissionResponse = WithResponse<\n ShareCreatePermissionHeaders,\n ShareCreatePermissionHeaders\n>;\n\n/** Contains response data for the create operation. */\nexport type ShareCreateResponse = WithResponse<ShareCreateHeaders, ShareCreateHeaders>;\n\n/** Contains response data for the createSnapshot operation. */\nexport type ShareCreateSnapshotResponse = WithResponse<\n ShareCreateSnapshotHeaders,\n ShareCreateSnapshotHeaders\n>;\n\n/** Contains response data for the delete operation. */\nexport type ShareDeleteResponse = WithResponse<ShareDeleteHeaders, ShareDeleteHeaders>;\n\n/** Contains response data for the getPermission operation. */\nexport type ShareGetPermissionResponse = WithResponse<\n ShareGetPermissionHeaders & SharePermission,\n ShareGetPermissionHeaders,\n SharePermission\n>;\n\n/** Contains response data for the setAccessPolicy operation. */\nexport type ShareSetAccessPolicyResponse = WithResponse<\n ShareSetAccessPolicyHeaders,\n ShareGetAccessPolicyHeaders\n>;\n\n/** Contains response data for the setMetadata operation. */\nexport type ShareSetMetadataResponse = WithResponse<\n ShareSetMetadataHeaders,\n ShareSetMetadataHeaders\n>;\n\n/** Contains response data for the setProperties operation. */\nexport type ShareSetPropertiesResponse = WithResponse<\n ShareSetPropertiesHeaders,\n ShareSetPropertiesHeaders\n>;\n\n/** Contains response data for the rename operation. */\nexport type DirectoryRenameResponse = WithResponse<DirectoryRenameHeaders, DirectoryRenameHeaders>;\n\n/** Defines headers for File_download operation. */\nexport interface FileDownloadHeaders {\n /** Returns the date and time the file was last modified. Any operation that modifies the file or its properties updates the last modified time. */\n lastModified?: Date;\n /** A set of name-value pairs associated with this file as user-defined metadata. */\n metadata?: { [propertyName: string]: string };\n /** The number of bytes present in the response body. */\n contentLength?: number;\n /** The content type specified for the file. The default content type is 'application/octet-stream' */\n contentType?: string;\n /** Indicates the range of bytes returned if the client requested a subset of the file by setting the Range request header. */\n contentRange?: string;\n /** The ETag contains a value that you can use to perform operations conditionally, in quotes. */\n etag?: string;\n /** If the file has an MD5 hash and the request is to read the full file, this response header is returned so that the client can check for message content integrity. If the request is to read a specified range and the 'x-ms-range-get-content-md5' is set to true, then the request returns an MD5 hash for the range, as long as the range size is less than or equal to 4 MB. If neither of these sets of conditions is true, then no value is returned for the 'Content-MD5' header. */\n contentMD5?: Uint8Array;\n /** Returns the value that was specified for the Content-Encoding request header. */\n contentEncoding?: string;\n /** Returned if it was previously specified for the file. */\n cacheControl?: string;\n /** Returns the value that was specified for the 'x-ms-content-disposition' header and specifies how to process the response. */\n contentDisposition?: string;\n /** Returns the value that was specified for the Content-Language request header. */\n contentLanguage?: string;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** Indicates that the service supports requests for partial file content. */\n acceptRanges?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** Conclusion time of the last attempted Copy File operation where this file was the destination file. This value can specify the time of a completed, aborted, or failed copy attempt. */\n copyCompletedOn?: Date;\n /** Only appears when x-ms-copy-status is failed or pending. Describes cause of fatal or non-fatal copy operation failure. */\n copyStatusDescription?: string;\n /** String identifier for the last attempted Copy File operation where this file was the destination file. */\n copyId?: string;\n /** Contains the number of bytes copied and the total bytes in the source in the last attempted Copy File operation where this file was the destination file. Can show between 0 and Content-Length bytes copied. */\n copyProgress?: string;\n /** URL up to 2KB in length that specifies the source file used in the last attempted Copy File operation where this file was the destination file. */\n copySource?: string;\n /** State of the copy operation identified by 'x-ms-copy-id'. */\n copyStatus?: CopyStatusType;\n /** If the file has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole file's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range. */\n fileContentMD5?: Uint8Array;\n /** The value of this header is set to true if the file data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the file is unencrypted, or if only parts of the file/application metadata are encrypted). */\n isServerEncrypted?: boolean;\n /** Attributes set for the file. */\n fileAttributes?: string;\n /** Creation time for the file. */\n fileCreatedOn?: Date;\n /** Last write time for the file. */\n fileLastWriteOn?: Date;\n /** Change time for the file. */\n fileChangeOn?: Date;\n /** Key of the permission set for the file. */\n filePermissionKey?: string;\n /** The fileId of the file. */\n fileId?: string;\n /** The parent fileId of the file. */\n fileParentId?: string;\n /** When a file is leased, specifies whether the lease is of infinite or fixed duration. */\n leaseDuration?: LeaseDurationType;\n /** Lease state of the file. */\n leaseState?: LeaseStateType;\n /** The current lease status of the file. */\n leaseStatus?: LeaseStatusType;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n /** Indicates the response body contains a structured message and specifies the message schema version and properties. */\n structuredBodyType?: string;\n /** The length of the blob/file content inside the message body when the response body is returned as a structured message. Will always be smaller than Content-Length. */\n structuredContentLength?: number;\n /** Error Code */\n errorCode?: string;\n}\n\n/** Contains response data for the download operation. */\nexport type FileDownloadResponseModel = WithResponse<FileDownloadResponse, FileDownloadHeaders>;\n\n/** Contains response data for the uploadRangeFromURL operation. */\nexport type FileUploadRangeFromURLResponse = WithResponse<\n FileUploadRangeFromURLHeaders,\n FileUploadRangeFromURLHeaders\n>;\n\n/** Contains response data for the getProperties operation. */\nexport type ShareGetPropertiesResponseModel = WithResponse<\n ShareGetPropertiesHeaders,\n ShareGetPropertiesHeaders\n>;\n\n/** Contains response data for the getStatistics operation. */\nexport type ShareGetStatisticsResponseModel = WithResponse<\n ShareGetStatisticsHeaders & ShareStats,\n ShareGetStatisticsHeaders,\n ShareStats\n>;\n\n/** Contains response data for the getRangeList operation. */\nexport type FileGetRangeListDiffResponse = WithResponse<\n FileGetRangeListHeaders & ShareFileRangeList,\n FileGetRangeListHeaders,\n ShareFileRangeList\n>;\n\n/** Contains response data for the setHttpHeaders operation. */\nexport type FileSetHTTPHeadersResponse = WithResponse<\n FileSetHttpHeadersHeaders,\n FileSetHttpHeadersHeaders\n>;\n\n/** Contains response data for the rename operation. */\nexport type FileRenameResponse = WithResponse<FileRenameHeaders, FileRenameHeaders>;\n\n// explicitly exporting types that we need.\n\nexport type {\n CopyStatusType,\n DeleteSnapshotsOptionType,\n FileDownloadOptionalParams,\n FileGetRangeListHeaders,\n FileLastWrittenMode,\n FileServiceProperties,\n FileUploadRangeFromURLOptionalParams,\n PermissionCopyModeType,\n ListSharesIncludeType,\n FileRange as RangeModel,\n ShareGetAccessPolicyHeaders,\n ShareItemInternal,\n SignedIdentifier as SignedIdentifierModel,\n SourceModifiedAccessConditions,\n FileForceCloseHandlesHeaders,\n DirectoryForceCloseHandlesHeaders,\n DirectoryDeleteHeaders,\n DirectoryListFilesAndDirectoriesSegmentHeaders,\n DirectoryRenameHeaders,\n DirectoryListHandlesHeaders,\n DirectorySetMetadataHeaders,\n FileAbortCopyHeaders,\n FileDeleteHeaders,\n FileGetSymbolicLinkHeaders,\n FilePermissionFormat,\n FileProperty,\n FileListHandlesHeaders,\n FileRenameHeaders,\n CorsRule,\n Metrics,\n ModeCopyMode,\n NfsFileType,\n FileSetMetadataHeaders,\n FileStartCopyHeaders,\n FileUploadRangeFromURLHeaders,\n FileUploadRangeHeaders,\n OwnerCopyMode,\n ServiceGetPropertiesHeaders,\n ListSharesResponse as ListSharesResponseModel,\n RetentionPolicy,\n ServiceGetUserDelegationKeyHeaders,\n ServiceListSharesSegmentHeaders,\n ServiceSetPropertiesHeaders,\n ShareCreatePermissionHeaders,\n ShareCreateHeaders,\n ShareCreateSnapshotHeaders,\n ShareDeleteHeaders,\n SharePermission,\n ShareGetPermissionHeaders,\n ShareGetPropertiesHeaders,\n ShareStats,\n ShareGetStatisticsHeaders,\n SharePropertiesInternal,\n ShareSetAccessPolicyHeaders,\n ShareSetMetadataHeaders,\n ShareSetPropertiesHeaders,\n ShareTokenIntent,\n AccessPolicy,\n LeaseAccessConditions,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType,\n CopyFileSmbInfo,\n ShareNfsSettings,\n ShareNfsSettingsEncryptionInTransit,\n ShareProtocolSettings,\n ShareSmbSettings,\n ShareSmbSettingsEncryptionInTransit,\n SmbMultichannel,\n ShareFileRangeList,\n ClearRange,\n ShareAccessTier,\n ShareRootSquash,\n UserDelegationKey as UserDelegationKeyModel,\n} from \"./generated/src/models/index.js\";\n\nexport type {\n FileDownloadResponse as RawFileDownloadResponse,\n FileSetHttpHeadersHeaders as FileSetHTTPHeadersHeaders,\n} from \"./models.js\";\n/** Known values of {@link ShareTokenIntent} that the service accepts. */\nexport enum KnownShareTokenIntent {\n Backup = \"backup\",\n}\n\n/**\n * Contains response data for the setQuota operation.\n */\nexport type ShareSetQuotaResponse = WithResponse<ShareSetQuotaHeaders, ShareSetQuotaHeaders>;\n\n/**\n * Defines headers for setQuota operation.\n */\nexport type ShareSetQuotaHeaders = ShareSetPropertiesHeaders;\n\n/** A listed file item. */\nexport interface FileItem {\n name: string;\n fileId?: string;\n /** File properties. */\n properties: FileProperty;\n attributes?: string;\n permissionKey?: string;\n}\n\n/** A listed directory item. */\nexport interface DirectoryItem {\n name: string;\n fileId?: string;\n /** File properties. */\n properties?: FileProperty;\n attributes?: string;\n permissionKey?: string;\n}\n\n/** Abstract for entries that can be listed from Directory. */\nexport interface FilesAndDirectoriesListSegment {\n directoryItems: DirectoryItem[];\n fileItems: FileItem[];\n}\n\n/** An enumeration of directories and files. */\nexport interface ListFilesAndDirectoriesSegmentResponse {\n serviceEndpoint: string;\n shareName: string;\n shareSnapshot?: string;\n directoryPath: string;\n prefix: string;\n marker?: string;\n maxResults?: number;\n /** Abstract for entries that can be listed from Directory. */\n segment: FilesAndDirectoriesListSegment;\n continuationToken: string;\n directoryId?: string;\n}\n\n/** Defines values for AccessRight. */\nexport type ShareFileHandleAccessRights = \"Read\" | \"Write\" | \"Delete\";\n\n/** A listed Azure Storage handle item. */\nexport interface HandleItem {\n /** XSMB service handle ID */\n handleId: string;\n /** File or directory name including full path starting from share root */\n path: string;\n /** FileId uniquely identifies the file or directory. */\n fileId: string;\n /** ParentId uniquely identifies the parent directory of the object. */\n parentId?: string;\n /** SMB session ID in context of which the file handle was opened */\n sessionId: string;\n /** Client IP that opened the handle */\n clientIp: string;\n /** Name of the client machine where the share is being mounted */\n clientName: string;\n /** Time when the session that previously opened the handle has last been reconnected. (UTC) */\n openTime: Date;\n /** Time handle was last connected to (UTC) */\n lastReconnectTime?: Date;\n accessRightList?: ShareFileHandleAccessRights[];\n}\n\n/** An enumeration of handles. */\nexport interface ListHandlesResponse {\n handleList?: HandleItem[];\n continuationToken: string;\n}\n\n/**\n * Contains response data for the {@link getUserDelegationKey} operation.\n */\nexport declare type ServiceGetUserDelegationKeyResponse = WithResponse<\n UserDelegationKey & ServiceGetUserDelegationKeyHeaders,\n ServiceGetUserDelegationKeyHeaders,\n UserDelegationKeyModel\n>;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAspBO,IAAK,wBAAL,kBAAKA,2BAAL;AACL,EAAAA,uBAAA,YAAS;AADC,SAAAA;AAAA,GAAA;",
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { UserDelegationKey } from \"@azure/storage-common\";\nimport type {\n CopyStatusType,\n DirectoryDeleteHeaders,\n DirectoryListFilesAndDirectoriesSegmentHeaders,\n DirectoryListHandlesHeaders,\n DirectoryRenameHeaders,\n DirectorySetMetadataHeaders,\n FileAbortCopyHeaders,\n FileDeleteHeaders,\n FileGetRangeListHeaders,\n FileGetSymbolicLinkHeaders,\n FileListHandlesHeaders,\n FileProperty,\n FileRenameHeaders,\n FileServiceProperties,\n FileSetMetadataHeaders,\n FileStartCopyHeaders,\n FileUploadRangeFromURLHeaders,\n FileUploadRangeHeaders,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType,\n ServiceGetPropertiesHeaders,\n ServiceSetPropertiesHeaders,\n ShareCreateHeaders,\n ShareCreatePermissionHeaders,\n ShareCreateSnapshotHeaders,\n ShareDeleteHeaders,\n ShareFileRangeList,\n ShareGetAccessPolicyHeaders,\n ShareGetPermissionHeaders,\n ShareGetPropertiesHeaders,\n ShareGetStatisticsHeaders,\n SharePermission,\n ShareSetAccessPolicyHeaders,\n ShareSetMetadataHeaders,\n ShareStats,\n ShareSetPropertiesHeaders,\n ServiceGetUserDelegationKeyHeaders,\n UserDelegationKey as UserDelegationKeyModel,\n} from \"./generated/src/models/index.js\";\nimport type {\n FileDownloadResponse,\n FilePosixProperties,\n FileSetHttpHeadersHeaders,\n} from \"./models.js\";\nimport type { WithResponse } from \"./utils/utils.common.js\";\n\n/** Defines headers for Directory_create operation. */\nexport interface DirectoryCreateHeaders {\n /** The ETag contains a value which represents the version of the directory, in quotes. */\n etag?: string;\n /** Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */\n lastModified?: Date;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */\n isServerEncrypted?: boolean;\n /** Key of the permission set for the directory. */\n filePermissionKey?: string;\n /** Attributes set for the directory. */\n fileAttributes?: string;\n /** Creation time for the directory. */\n fileCreatedOn?: Date;\n /** Last write time for the directory. */\n fileLastWriteOn?: Date;\n /** Change time for the directory. */\n fileChangeOn?: Date;\n /** The fileId of the directory. */\n fileId?: string;\n /** The parent fileId of the directory. */\n fileParentId?: string;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n /** Error Code */\n errorCode?: string;\n}\n\n/** Contains response data for the create operation. */\nexport type DirectoryCreateResponse = WithResponse<DirectoryCreateHeaders, DirectoryCreateHeaders>;\n\n/** Contains response data for the delete operation. */\nexport type DirectoryDeleteResponse = WithResponse<DirectoryDeleteHeaders, DirectoryDeleteHeaders>;\n\n/** Defines headers for Directory_getProperties operation. */\nexport interface DirectoryGetPropertiesHeaders {\n /** A set of name-value pairs that contain metadata for the directory. */\n metadata?: { [propertyName: string]: string };\n /** The ETag contains a value that you can use to perform operations conditionally, in quotes. */\n etag?: string;\n /** Returns the date and time the Directory was last modified. Operations on files within the directory do not affect the last modified time of the directory. */\n lastModified?: Date;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** The value of this header is set to true if the directory metadata is completely encrypted using the specified algorithm. Otherwise, the value is set to false. */\n isServerEncrypted?: boolean;\n /** Attributes set for the directory. */\n fileAttributes?: string;\n /** Creation time for the directory. */\n fileCreatedOn?: Date;\n /** Last write time for the directory. */\n fileLastWriteOn?: Date;\n /** Change time for the directory. */\n fileChangeOn?: Date;\n /** Key of the permission set for the directory. */\n filePermissionKey?: string;\n /** The fileId of the directory. */\n fileId?: string;\n /** The parent fileId of the directory. */\n fileParentId?: string;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n /** Error Code */\n errorCode?: string;\n}\n\n/** Contains response data for the getProperties operation. */\nexport type DirectoryGetPropertiesResponse = WithResponse<\n DirectoryGetPropertiesHeaders,\n DirectoryGetPropertiesHeaders\n>;\n\n/** Contains response data for the listFilesAndDirectoriesSegment operation. */\nexport type DirectoryListFilesAndDirectoriesSegmentResponse = WithResponse<\n DirectoryListFilesAndDirectoriesSegmentHeaders & ListFilesAndDirectoriesSegmentResponse,\n DirectoryListFilesAndDirectoriesSegmentHeaders,\n ListFilesAndDirectoriesSegmentResponse\n>;\n\n/** Contains response data for the listHandles operation. */\nexport type DirectoryListHandlesResponse = WithResponse<\n DirectoryListHandlesHeaders & ListHandlesResponse,\n DirectoryListHandlesHeaders,\n ListHandlesResponse\n>;\n\n/** Contains response data for the setMetadata operation. */\nexport type DirectorySetMetadataResponse = WithResponse<\n DirectorySetMetadataHeaders,\n DirectorySetMetadataHeaders\n>;\n\n/** Defines headers for Directory_setProperties operation. */\nexport interface DirectorySetPropertiesHeaders {\n /** The ETag contains a value which represents the version of the file, in quotes. */\n etag?: string;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Returns the date and time the directory was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */\n lastModified?: Date;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */\n isServerEncrypted?: boolean;\n /** Key of the permission set for the directory. */\n filePermissionKey?: string;\n /** Attributes set for the directory. */\n fileAttributes?: string;\n /** Creation time for the directory. */\n fileCreatedOn?: Date;\n /** Last write time for the directory. */\n fileLastWriteOn?: Date;\n /** Change time for the directory. */\n fileChangeOn?: Date;\n /** The fileId of the directory. */\n fileId?: string;\n /** The parent fileId of the directory. */\n fileParentId?: string;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n /** Error Code */\n errorCode?: string;\n}\n\n/** Contains response data for the setProperties operation. */\nexport type DirectorySetPropertiesResponse = WithResponse<\n DirectorySetPropertiesHeaders,\n DirectorySetPropertiesHeaders\n>;\n\n/** Contains response data for the abortCopy operation. */\nexport type FileAbortCopyResponse = WithResponse<FileAbortCopyHeaders, FileAbortCopyHeaders>;\n\n/** Defines headers for File_create operation. */\nexport interface FileCreateHeaders {\n /** The ETag contains a value which represents the version of the file, in quotes. */\n etag?: string;\n /** Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */\n lastModified?: Date;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** The value of this header is set to true if the contents of the request are successfully encrypted using the specified algorithm, and false otherwise. */\n isServerEncrypted?: boolean;\n /** Key of the permission set for the file. */\n filePermissionKey?: string;\n /** Attributes set for the file. */\n fileAttributes?: string;\n /** Creation time for the file. */\n fileCreatedOn?: Date;\n /** Last write time for the file. */\n fileLastWriteOn?: Date;\n /** Change time for the file. */\n fileChangeOn?: Date;\n /** The fileId of the file. */\n fileId?: string;\n /** The parent fileId of the file. */\n fileParentId?: string;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n /** Indicates the structured message body was accepted and mirrors back the message schema version and properties. */\n structuredBodyType?: string;\n /** Error Code */\n errorCode?: string;\n}\n\n/** Contains response data for the create operation. */\nexport type FileCreateResponse = WithResponse<FileCreateHeaders, FileCreateHeaders>;\n\n/** Contains response data for the delete operation. */\nexport type FileDeleteResponse = WithResponse<FileDeleteHeaders, FileDeleteHeaders>;\n\n/** Defines headers for File_createHardLink operation. */\nexport interface FileCreateHardLinkHeaders {\n /** The ETag contains a value which represents the version of the file, in quotes. */\n etag?: string;\n /** Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */\n lastModified?: Date;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** Creation time for the file. */\n fileCreationTime?: Date;\n /** Last write time for the file. */\n fileLastWriteTime?: Date;\n /** Change time for the file. */\n fileChangeTime?: Date;\n /** The fileId of the file. */\n fileId?: string;\n /** The parent fileId of the directory. */\n fileParentId?: string;\n /** If a client request id header is sent in the request, this header will be present in the response with the same value. */\n clientRequestId?: string;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n}\n\n/** Contains response data for the create hard link operation. */\nexport type FileCreateHardLinkResponse = WithResponse<\n FileCreateHardLinkHeaders,\n FileCreateHardLinkHeaders\n>;\n\n/** Defines headers for File_createSymbolicLink operation. */\nexport interface FileCreateSymbolicLinkHeaders {\n /** The ETag contains a value which represents the version of the file, in quotes. */\n etag?: string;\n /** Returns the date and time the share was last modified. Any operation that modifies the directory or its properties updates the last modified time. Operations on files do not affect the last modified time of the directory. */\n lastModified?: Date;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** Creation time for the file. */\n fileCreationTime?: Date;\n /** Last write time for the file. */\n fileLastWriteTime?: Date;\n /** Change time for the file. */\n fileChangeTime?: Date;\n /** The fileId of the file. */\n fileId?: string;\n /** The parent fileId of the directory. */\n fileParentId?: string;\n /** If a client request id header is sent in the request, this header will be present in the response with the same value. */\n clientRequestId?: string;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n}\n\n/** Contains response data for the create hard link operation. */\nexport type FileCreateSymbolicLinkResponse = WithResponse<\n FileCreateSymbolicLinkHeaders,\n FileCreateSymbolicLinkHeaders\n>;\n\n/** Contains response data for the create hard link operation. */\nexport type FileGetSymbolicLinkResponse = WithResponse<\n FileGetSymbolicLinkHeaders,\n FileGetSymbolicLinkHeaders\n>;\n\n/** Defines headers for File_getProperties operation. */\nexport interface FileGetPropertiesHeaders {\n /** Returns the date and time the file was last modified. The date format follows RFC 1123. Any operation that modifies the file or its properties updates the last modified time. */\n lastModified?: Date;\n /** A set of name-value pairs associated with this file as user-defined metadata. */\n metadata?: { [propertyName: string]: string };\n /** Returns the type File. Reserved for future use. */\n fileType?: string;\n /** The size of the file in bytes. This header returns the value of the 'x-ms-content-length' header that is stored with the file. */\n contentLength?: number;\n /** The content type specified for the file. The default content type is 'application/octet-stream' */\n contentType?: string;\n /** The ETag contains a value that you can use to perform operations conditionally, in quotes. */\n etag?: string;\n /** If the Content-MD5 header has been set for the file, the Content-MD5 response header is returned so that the client can check for message content integrity. */\n contentMD5?: Uint8Array;\n /** If the Content-Encoding request header has previously been set for the file, the Content-Encoding value is returned in this header. */\n contentEncoding?: string;\n /** If the Cache-Control request header has previously been set for the file, the Cache-Control value is returned in this header. */\n cacheControl?: string;\n /** Returns the value that was specified for the 'x-ms-content-disposition' header and specifies how to process the response. */\n contentDisposition?: string;\n /** Returns the value that was specified for the Content-Language request header. */\n contentLanguage?: string;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** Conclusion time of the last attempted Copy File operation where this file was the destination file. This value can specify the time of a completed, aborted, or failed copy attempt. */\n copyCompletedOn?: Date;\n /** Only appears when x-ms-copy-status is failed or pending. Describes cause of fatal or non-fatal copy operation failure. */\n copyStatusDescription?: string;\n /** String identifier for the last attempted Copy File operation where this file was the destination file. */\n copyId?: string;\n /** Contains the number of bytes copied and the total bytes in the source in the last attempted Copy File operation where this file was the destination file. Can show between 0 and Content-Length bytes copied. */\n copyProgress?: string;\n /** URL up to 2KB in length that specifies the source file used in the last attempted Copy File operation where this file was the destination file. */\n copySource?: string;\n /** State of the copy operation identified by 'x-ms-copy-id'. */\n copyStatus?: CopyStatusType;\n /** The value of this header is set to true if the file data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the file is unencrypted, or if only parts of the file/application metadata are encrypted). */\n isServerEncrypted?: boolean;\n /** Attributes set for the file. */\n fileAttributes?: string;\n /** Creation time for the file. */\n fileCreatedOn?: Date;\n /** Last write time for the file. */\n fileLastWriteOn?: Date;\n /** Change time for the file. */\n fileChangeOn?: Date;\n /** Key of the permission set for the file. */\n filePermissionKey?: string;\n /** The fileId of the file. */\n fileId?: string;\n /** The parent fileId of the file. */\n fileParentId?: string;\n /** When a file is leased, specifies whether the lease is of infinite or fixed duration. */\n leaseDuration?: LeaseDurationType;\n /** Lease state of the file. */\n leaseState?: LeaseStateType;\n /** The current lease status of the file. */\n leaseStatus?: LeaseStatusType;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n /** Error Code */\n errorCode?: string;\n}\n\n/** Contains response data for the getProperties operation. */\nexport type FileGetPropertiesResponse = WithResponse<\n FileGetPropertiesHeaders,\n FileGetPropertiesHeaders\n>;\n\n/** Contains response data for the listHandles operation. */\nexport type FileListHandlesResponse = WithResponse<\n FileListHandlesHeaders & ListHandlesResponse,\n FileListHandlesHeaders,\n ListHandlesResponse\n>;\n\n/** Contains response data for the setMetadata operation. */\nexport type FileSetMetadataResponse = WithResponse<FileSetMetadataHeaders, FileSetMetadataHeaders>;\n\n/** Contains response data for the startCopy operation. */\nexport type FileStartCopyResponse = WithResponse<FileStartCopyHeaders, FileStartCopyHeaders>;\n\n/** Contains response data for the uploadRange operation. */\nexport type FileUploadRangeResponse = WithResponse<FileUploadRangeHeaders, FileUploadRangeHeaders>;\n\n/** Contains response data for the getProperties operation. */\nexport type ServiceGetPropertiesResponse = WithResponse<\n ServiceGetPropertiesHeaders & FileServiceProperties,\n ServiceGetPropertiesHeaders,\n FileServiceProperties\n>;\n\n/** Contains response data for the setProperties operation. */\nexport type ServiceSetPropertiesResponse = WithResponse<\n ServiceSetPropertiesHeaders,\n ServiceSetPropertiesHeaders\n>;\n\n/** Contains response data for the createPermission operation. */\nexport type ShareCreatePermissionResponse = WithResponse<\n ShareCreatePermissionHeaders,\n ShareCreatePermissionHeaders\n>;\n\n/** Contains response data for the create operation. */\nexport type ShareCreateResponse = WithResponse<ShareCreateHeaders, ShareCreateHeaders>;\n\n/** Contains response data for the createSnapshot operation. */\nexport type ShareCreateSnapshotResponse = WithResponse<\n ShareCreateSnapshotHeaders,\n ShareCreateSnapshotHeaders\n>;\n\n/** Contains response data for the delete operation. */\nexport type ShareDeleteResponse = WithResponse<ShareDeleteHeaders, ShareDeleteHeaders>;\n\n/** Contains response data for the getPermission operation. */\nexport type ShareGetPermissionResponse = WithResponse<\n ShareGetPermissionHeaders & SharePermission,\n ShareGetPermissionHeaders,\n SharePermission\n>;\n\n/** Contains response data for the setAccessPolicy operation. */\nexport type ShareSetAccessPolicyResponse = WithResponse<\n ShareSetAccessPolicyHeaders,\n ShareGetAccessPolicyHeaders\n>;\n\n/** Contains response data for the setMetadata operation. */\nexport type ShareSetMetadataResponse = WithResponse<\n ShareSetMetadataHeaders,\n ShareSetMetadataHeaders\n>;\n\n/** Contains response data for the setProperties operation. */\nexport type ShareSetPropertiesResponse = WithResponse<\n ShareSetPropertiesHeaders,\n ShareSetPropertiesHeaders\n>;\n\n/** Contains response data for the rename operation. */\nexport type DirectoryRenameResponse = WithResponse<DirectoryRenameHeaders, DirectoryRenameHeaders>;\n\n/** Defines headers for File_download operation. */\nexport interface FileDownloadHeaders {\n /** Returns the date and time the file was last modified. Any operation that modifies the file or its properties updates the last modified time. */\n lastModified?: Date;\n /** A set of name-value pairs associated with this file as user-defined metadata. */\n metadata?: { [propertyName: string]: string };\n /** The number of bytes present in the response body. */\n contentLength?: number;\n /** The content type specified for the file. The default content type is 'application/octet-stream' */\n contentType?: string;\n /** Indicates the range of bytes returned if the client requested a subset of the file by setting the Range request header. */\n contentRange?: string;\n /** The ETag contains a value that you can use to perform operations conditionally, in quotes. */\n etag?: string;\n /** If the file has an MD5 hash and the request is to read the full file, this response header is returned so that the client can check for message content integrity. If the request is to read a specified range and the 'x-ms-range-get-content-md5' is set to true, then the request returns an MD5 hash for the range, as long as the range size is less than or equal to 4 MB. If neither of these sets of conditions is true, then no value is returned for the 'Content-MD5' header. */\n contentMD5?: Uint8Array;\n /** Returns the value that was specified for the Content-Encoding request header. */\n contentEncoding?: string;\n /** Returned if it was previously specified for the file. */\n cacheControl?: string;\n /** Returns the value that was specified for the 'x-ms-content-disposition' header and specifies how to process the response. */\n contentDisposition?: string;\n /** Returns the value that was specified for the Content-Language request header. */\n contentLanguage?: string;\n /** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */\n requestId?: string;\n /** Indicates the version of the File service used to execute the request. */\n version?: string;\n /** Indicates that the service supports requests for partial file content. */\n acceptRanges?: string;\n /** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */\n date?: Date;\n /** Conclusion time of the last attempted Copy File operation where this file was the destination file. This value can specify the time of a completed, aborted, or failed copy attempt. */\n copyCompletedOn?: Date;\n /** Only appears when x-ms-copy-status is failed or pending. Describes cause of fatal or non-fatal copy operation failure. */\n copyStatusDescription?: string;\n /** String identifier for the last attempted Copy File operation where this file was the destination file. */\n copyId?: string;\n /** Contains the number of bytes copied and the total bytes in the source in the last attempted Copy File operation where this file was the destination file. Can show between 0 and Content-Length bytes copied. */\n copyProgress?: string;\n /** URL up to 2KB in length that specifies the source file used in the last attempted Copy File operation where this file was the destination file. */\n copySource?: string;\n /** State of the copy operation identified by 'x-ms-copy-id'. */\n copyStatus?: CopyStatusType;\n /** If the file has a MD5 hash, and if request contains range header (Range or x-ms-range), this response header is returned with the value of the whole file's MD5 value. This value may or may not be equal to the value returned in Content-MD5 header, with the latter calculated from the requested range. */\n fileContentMD5?: Uint8Array;\n /** The value of this header is set to true if the file data and application metadata are completely encrypted using the specified algorithm. Otherwise, the value is set to false (when the file is unencrypted, or if only parts of the file/application metadata are encrypted). */\n isServerEncrypted?: boolean;\n /** Attributes set for the file. */\n fileAttributes?: string;\n /** Creation time for the file. */\n fileCreatedOn?: Date;\n /** Last write time for the file. */\n fileLastWriteOn?: Date;\n /** Change time for the file. */\n fileChangeOn?: Date;\n /** Key of the permission set for the file. */\n filePermissionKey?: string;\n /** The fileId of the file. */\n fileId?: string;\n /** The parent fileId of the file. */\n fileParentId?: string;\n /** When a file is leased, specifies whether the lease is of infinite or fixed duration. */\n leaseDuration?: LeaseDurationType;\n /** Lease state of the file. */\n leaseState?: LeaseStateType;\n /** The current lease status of the file. */\n leaseStatus?: LeaseStatusType;\n /** Properties of NFS files. */\n posixProperties?: FilePosixProperties;\n /** Indicates the response body contains a structured message and specifies the message schema version and properties. */\n structuredBodyType?: string;\n /** The length of the blob/file content inside the message body when the response body is returned as a structured message. Will always be smaller than Content-Length. */\n structuredContentLength?: number;\n /** Error Code */\n errorCode?: string;\n}\n\n/** Contains response data for the download operation. */\nexport type FileDownloadResponseModel = WithResponse<FileDownloadResponse, FileDownloadHeaders>;\n\n/** Contains response data for the uploadRangeFromURL operation. */\nexport type FileUploadRangeFromURLResponse = WithResponse<\n FileUploadRangeFromURLHeaders,\n FileUploadRangeFromURLHeaders\n>;\n\n/** Contains response data for the getProperties operation. */\nexport type ShareGetPropertiesResponseModel = WithResponse<\n ShareGetPropertiesHeaders,\n ShareGetPropertiesHeaders\n>;\n\n/** Contains response data for the getStatistics operation. */\nexport type ShareGetStatisticsResponseModel = WithResponse<\n ShareGetStatisticsHeaders & ShareStats,\n ShareGetStatisticsHeaders,\n ShareStats\n>;\n\n/** Contains response data for the getRangeList operation. */\nexport type FileGetRangeListDiffResponse = WithResponse<\n FileGetRangeListHeaders & ShareFileRangeList,\n FileGetRangeListHeaders,\n ShareFileRangeList\n>;\n\n/** Contains response data for the setHttpHeaders operation. */\nexport type FileSetHTTPHeadersResponse = WithResponse<\n FileSetHttpHeadersHeaders,\n FileSetHttpHeadersHeaders\n>;\n\n/** Contains response data for the rename operation. */\nexport type FileRenameResponse = WithResponse<FileRenameHeaders, FileRenameHeaders>;\n\n// explicitly exporting types that we need.\n\nexport type {\n CopyStatusType,\n DeleteSnapshotsOptionType,\n FileDownloadOptionalParams,\n FileGetRangeListHeaders,\n FileLastWrittenMode,\n FileServiceProperties,\n FileUploadRangeFromURLOptionalParams,\n PermissionCopyModeType,\n ListSharesIncludeType,\n FileRange as RangeModel,\n ShareGetAccessPolicyHeaders,\n ShareItemInternal,\n SignedIdentifier as SignedIdentifierModel,\n SourceModifiedAccessConditions,\n FileForceCloseHandlesHeaders,\n DirectoryForceCloseHandlesHeaders,\n DirectoryDeleteHeaders,\n DirectoryListFilesAndDirectoriesSegmentHeaders,\n DirectoryRenameHeaders,\n DirectoryListHandlesHeaders,\n DirectorySetMetadataHeaders,\n FileAbortCopyHeaders,\n FileDeleteHeaders,\n FileGetSymbolicLinkHeaders,\n FilePermissionFormat,\n FileProperty,\n FileListHandlesHeaders,\n FileRenameHeaders,\n CorsRule,\n Metrics,\n ModeCopyMode,\n NfsFileType,\n FileSetMetadataHeaders,\n FileStartCopyHeaders,\n FileUploadRangeFromURLHeaders,\n FileUploadRangeHeaders,\n OwnerCopyMode,\n ServiceGetPropertiesHeaders,\n ListSharesResponse as ListSharesResponseModel,\n RetentionPolicy,\n ServiceGetUserDelegationKeyHeaders,\n ServiceListSharesSegmentHeaders,\n ServiceSetPropertiesHeaders,\n ShareCreatePermissionHeaders,\n ShareCreateHeaders,\n ShareCreateSnapshotHeaders,\n ShareDeleteHeaders,\n SharePermission,\n ShareGetPermissionHeaders,\n ShareGetPropertiesHeaders,\n ShareStats,\n ShareGetStatisticsHeaders,\n SharePropertiesInternal,\n ShareSetAccessPolicyHeaders,\n ShareSetMetadataHeaders,\n ShareSetPropertiesHeaders,\n ShareTokenIntent,\n AccessPolicy,\n LeaseAccessConditions,\n LeaseDurationType,\n LeaseStateType,\n LeaseStatusType,\n CopyFileSmbInfo,\n ShareNfsSettings,\n ShareNfsSettingsEncryptionInTransit,\n ShareProtocolSettings,\n ShareSmbSettings,\n ShareSmbSettingsEncryptionInTransit,\n SmbMultichannel,\n ShareFileRangeList,\n ClearRange,\n ShareAccessTier,\n ShareRootSquash,\n UserDelegationKey as UserDelegationKeyModel,\n} from \"./generated/src/models/index.js\";\n\nexport type {\n FileDownloadResponse as RawFileDownloadResponse,\n FileSetHttpHeadersHeaders as FileSetHTTPHeadersHeaders,\n} from \"./models.js\";\n/** Known values of {@link ShareTokenIntent} that the service accepts. */\nexport enum KnownShareTokenIntent {\n Backup = \"backup\",\n}\n\n/**\n * Contains response data for the setQuota operation.\n */\nexport type ShareSetQuotaResponse = WithResponse<ShareSetQuotaHeaders, ShareSetQuotaHeaders>;\n\n/**\n * Defines headers for setQuota operation.\n */\nexport type ShareSetQuotaHeaders = ShareSetPropertiesHeaders;\n\n/** A listed file item. */\nexport interface FileItem {\n name: string;\n fileId?: string;\n /** File properties. */\n properties: FileProperty;\n attributes?: string;\n permissionKey?: string;\n}\n\n/** A listed directory item. */\nexport interface DirectoryItem {\n name: string;\n fileId?: string;\n /** File properties. */\n properties?: FileProperty;\n attributes?: string;\n permissionKey?: string;\n}\n\n/** Abstract for entries that can be listed from Directory. */\nexport interface FilesAndDirectoriesListSegment {\n directoryItems: DirectoryItem[];\n fileItems: FileItem[];\n}\n\n/** An enumeration of directories and files. */\nexport interface ListFilesAndDirectoriesSegmentResponse {\n serviceEndpoint: string;\n shareName: string;\n shareSnapshot?: string;\n directoryPath: string;\n prefix: string;\n marker?: string;\n maxResults?: number;\n /** Abstract for entries that can be listed from Directory. */\n segment: FilesAndDirectoriesListSegment;\n continuationToken: string;\n directoryId?: string;\n}\n\n/** Defines values for AccessRight. */\nexport type ShareFileHandleAccessRights = \"Read\" | \"Write\" | \"Delete\";\n\n/** A listed Azure Storage handle item. */\nexport interface HandleItem {\n /** XSMB service handle ID */\n handleId: string;\n /** File or directory name including full path starting from share root */\n path: string;\n /** FileId uniquely identifies the file or directory. */\n fileId: string;\n /** ParentId uniquely identifies the parent directory of the object. */\n parentId?: string;\n /** SMB session ID in context of which the file handle was opened */\n sessionId: string;\n /** Client IP that opened the handle */\n clientIp: string;\n /** Name of the client machine where the share is being mounted */\n clientName: string;\n /** Time when the session that previously opened the handle has last been reconnected. (UTC) */\n openTime: Date;\n /** Time handle was last connected to (UTC) */\n lastReconnectTime?: Date;\n accessRightList?: ShareFileHandleAccessRights[];\n}\n\n/** An enumeration of handles. */\nexport interface ListHandlesResponse {\n handleList?: HandleItem[];\n continuationToken: string;\n}\n\n/**\n * Contains response data for the {@link getUserDelegationKey} operation.\n */\nexport declare type ServiceGetUserDelegationKeyResponse = WithResponse<\n UserDelegationKey & ServiceGetUserDelegationKeyHeaders,\n ServiceGetUserDelegationKeyHeaders,\n UserDelegationKeyModel\n>;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwpBO,IAAK,wBAAL,kBAAKA,2BAAL;AACL,EAAAA,uBAAA,YAAS;AADC,SAAAA;AAAA,GAAA;",
6
6
  "names": ["KnownShareTokenIntent"]
7
7
  }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.58.7"
8
+ "packageVersion": "7.58.9"
9
9
  }
10
10
  ]
11
11
  }
@@ -37,8 +37,8 @@ __export(constants_exports, {
37
37
  URLConstants: () => URLConstants
38
38
  });
39
39
  module.exports = __toCommonJS(constants_exports);
40
- const SDK_VERSION = "12.31.0";
41
- const SERVICE_VERSION = "2026-04-06";
40
+ const SDK_VERSION = "12.32.0";
41
+ const SERVICE_VERSION = "2026-06-06";
42
42
  const FILE_MAX_SIZE_BYTES = 4 * 1024 * 1024 * 1024 * 1024;
43
43
  const FILE_RANGE_MAX_SIZE_BYTES = 4 * 1024 * 1024;
44
44
  const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS = 5;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/utils/constants.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"12.31.0\";\nexport const SERVICE_VERSION: string = \"2026-04-06\";\n\nexport const FILE_MAX_SIZE_BYTES: number = 4 * 1024 * 1024 * 1024 * 1024; // 4TB\nexport const FILE_RANGE_MAX_SIZE_BYTES: number = 4 * 1024 * 1024; // 4MB\nexport const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS: number = 5;\nexport const DEFAULT_HIGH_LEVEL_CONCURRENCY: number = 5;\nexport const REQUEST_TIMEOUT: number = 100 * 1000; // In ms\n/**\n * The OAuth scope to use with Azure Storage.\n */\nexport const StorageOAuthScopes: string | string[] = \"https://storage.azure.com/.default\";\n\nexport const URLConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SHARE_SNAPSHOT: \"sharesnapshot\",\n SIGNATURE: \"sig\",\n TIMEOUT: \"timeout\",\n },\n};\n\nexport const HttpUrlConnection = {\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_LANGUAGE: \"content-language\",\n CONTENT_LENGTH: \"content-length\",\n CONTENT_MD5: \"content-md5\",\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_CopySourceErrorCode: \"x-ms-copy-source-error-code\",\n X_MS_DATE: \"x-ms-date\",\n};\n\nexport const ETagNone = \"\";\nexport const ETagAny = \"*\";\nexport const FileAttributesPreserve = \"Preserve\";\nexport const FileAttributesNone = \"None\";\n\nexport const StorageFileLoggingAllowedHeaderNames = [\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 \"x-ms-cache-control\",\n \"x-ms-content-disposition\",\n \"x-ms-content-encoding\",\n \"x-ms-content-language\",\n \"x-ms-content-length\",\n \"x-ms-content-md5\",\n \"x-ms-content-type\",\n \"x-ms-copy-source-error-code\",\n \"x-ms-copy-source-status-code\",\n \"x-ms-file-attributes\",\n \"x-ms-file-change-time\",\n \"x-ms-file-creation-time\",\n \"x-ms-file-id\",\n \"x-ms-file-last-write-time\",\n \"x-ms-file-parent-id\",\n \"x-ms-handle-id\",\n \"x-ms-number-of-handles-closed\",\n \"x-ms-recursive\",\n \"x-ms-share-quota\",\n \"x-ms-type\",\n \"x-ms-write\",\n];\n\nexport const StorageFileLoggingAllowedQueryParameters = [\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 \"copyid\",\n \"restype\",\n];\n\n/// List of ports used for path style addressing.\n/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.\nexport const PathStylePorts = [\n \"10000\",\n \"10001\",\n \"10002\",\n \"10003\",\n \"10004\",\n \"10100\",\n \"10101\",\n \"10102\",\n \"10103\",\n \"10104\",\n \"11000\",\n \"11001\",\n \"11002\",\n \"11003\",\n \"11004\",\n \"11100\",\n \"11101\",\n \"11102\",\n \"11103\",\n \"11104\",\n];\n"],
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"12.32.0\";\nexport const SERVICE_VERSION: string = \"2026-06-06\";\n\nexport const FILE_MAX_SIZE_BYTES: number = 4 * 1024 * 1024 * 1024 * 1024; // 4TB\nexport const FILE_RANGE_MAX_SIZE_BYTES: number = 4 * 1024 * 1024; // 4MB\nexport const DEFAULT_MAX_DOWNLOAD_RETRY_REQUESTS: number = 5;\nexport const DEFAULT_HIGH_LEVEL_CONCURRENCY: number = 5;\nexport const REQUEST_TIMEOUT: number = 100 * 1000; // In ms\n/**\n * The OAuth scope to use with Azure Storage.\n */\nexport const StorageOAuthScopes: string | string[] = \"https://storage.azure.com/.default\";\n\nexport const URLConstants = {\n Parameters: {\n FORCE_BROWSER_NO_CACHE: \"_\",\n SHARE_SNAPSHOT: \"sharesnapshot\",\n SIGNATURE: \"sig\",\n TIMEOUT: \"timeout\",\n },\n};\n\nexport const HttpUrlConnection = {\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_LANGUAGE: \"content-language\",\n CONTENT_LENGTH: \"content-length\",\n CONTENT_MD5: \"content-md5\",\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_CopySourceErrorCode: \"x-ms-copy-source-error-code\",\n X_MS_DATE: \"x-ms-date\",\n};\n\nexport const ETagNone = \"\";\nexport const ETagAny = \"*\";\nexport const FileAttributesPreserve = \"Preserve\";\nexport const FileAttributesNone = \"None\";\n\nexport const StorageFileLoggingAllowedHeaderNames = [\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 \"x-ms-cache-control\",\n \"x-ms-content-disposition\",\n \"x-ms-content-encoding\",\n \"x-ms-content-language\",\n \"x-ms-content-length\",\n \"x-ms-content-md5\",\n \"x-ms-content-type\",\n \"x-ms-copy-source-error-code\",\n \"x-ms-copy-source-status-code\",\n \"x-ms-file-attributes\",\n \"x-ms-file-change-time\",\n \"x-ms-file-creation-time\",\n \"x-ms-file-id\",\n \"x-ms-file-last-write-time\",\n \"x-ms-file-parent-id\",\n \"x-ms-handle-id\",\n \"x-ms-number-of-handles-closed\",\n \"x-ms-recursive\",\n \"x-ms-share-quota\",\n \"x-ms-type\",\n \"x-ms-write\",\n];\n\nexport const StorageFileLoggingAllowedQueryParameters = [\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 \"copyid\",\n \"restype\",\n];\n\n/// List of ports used for path style addressing.\n/// Path style addressing means that storage account is put in URI's Path segment in instead of in host.\nexport const PathStylePorts = [\n \"10000\",\n \"10001\",\n \"10002\",\n \"10003\",\n \"10004\",\n \"10100\",\n \"10101\",\n \"10102\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,uCAAuC;AAAA,EAClD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,2CAA2C;AAAA,EACtD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAIO,MAAM,iBAAiB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
6
6
  "names": []
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.common.d.ts","sourceRoot":"","sources":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pC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,yBAAyB,CAAC,EAAE,UAAU,CAAC;IACvC,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,UAAU,kBAAkB;IAC1B,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,IAAI,EAAE,eAAe,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,wBAAsB,2BAA2B,CAC/C,IAAI,EAAE,eAAe,EACrB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,4BAA4B,EACxC,aAAa,EAAE,4BAA4B,EAC3C,8BAA8B,CAAC,EAAE,wBAAwB,GACxD,OAAO,CAAC,kBAAkB,CAAC,CA4B7B"}
@@ -257,6 +257,13 @@ function sanitizeHeaders(originalHeader) {
257
257
  }
258
258
  return headers;
259
259
  }
260
+ const accountNameSuffixes = [
261
+ "-secondary-ipv6",
262
+ "-secondary-dualstack",
263
+ "-ipv6",
264
+ "-dualstack",
265
+ "-secondary"
266
+ ];
260
267
  function getAccountNameFromUrl(url) {
261
268
  const parsedUrl = new URL(url);
262
269
  let accountName;
@@ -264,6 +271,12 @@ function getAccountNameFromUrl(url) {
264
271
  if (parsedUrl.hostname.split(".")[1] === "file") {
265
272
  url = url.endsWith("/") ? url.slice(0, -1) : url;
266
273
  accountName = parsedUrl.hostname.split(".")[0];
274
+ for (let i = 0; i < accountNameSuffixes.length; ++i) {
275
+ const suffix = accountNameSuffixes[i];
276
+ if (accountName.endsWith(suffix)) {
277
+ accountName = accountName.substring(0, accountName.length - suffix.length);
278
+ }
279
+ }
267
280
  } else if (isIpEndpointStyle(parsedUrl)) {
268
281
  accountName = parsedUrl.pathname.split("/")[1];
269
282
  } else {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/utils/utils.common.ts"],
4
- "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { HttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport type {\n ListFilesAndDirectoriesSegmentResponse as ListFilesAndDirectoriesSegmentResponseInternal,\n ListHandlesResponse as ListHandlesResponseInternal,\n SharePermission,\n StringEncoded,\n} from \"../generated/src/models/index.js\";\nimport type {\n DirectoryItem,\n FileItem,\n HandleItem,\n ListFilesAndDirectoriesSegmentResponse,\n ListHandlesResponse,\n} from \"../generatedModels.js\";\nimport {\n HttpAuthorization,\n NfsFileMode,\n PosixRolePermissions,\n StorageChecksumAlgorithm,\n} from \"../models.js\";\nimport { HeaderConstants, PathStylePorts, URLConstants } from \"./constants.js\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport type { HttpHeadersLike, WebResourceLike } from \"@azure/core-http-compat\";\nimport { HttpRequestBody } from \"../Pipeline.js\";\nimport { StorageCRC64Calculator, structuredMessageEncoding } from \"@azure/storage-common\";\n\n/**\n * Reserved URL characters must be properly escaped for Storage services like Blob or File.\n *\n * ## URL encode and escape strategy for JS SDKs\n *\n * When customers pass a URL string into XXXClient classes constructor, the URL string may already be URL encoded or not.\n * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL\n * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XXXClient constructors.\n *\n * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK.\n *\n * This is what legacy V2 SDK does, simple and works for most of the cases.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%253A\" and send to server. A blob named \"b%3A\" will be created.\n *\n * But this strategy will make it not possible to create a blob with \"?\" in it's name. Because when customer URL string is\n * \"http://account.blob.core.windows.net/con/blob?name\", the \"?name\" will be treated as URL paramter instead of blob name.\n * If customer URL string is \"http://account.blob.core.windows.net/con/blob%3Fname\", a blob named \"blob%3Fname\" will be created.\n * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it.\n * We cannot accept a SDK cannot create a blob name with \"?\". So we implement strategy two:\n *\n * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters.\n *\n * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will escape \":\" like \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%3A\" to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%253A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%253A\" to server. A blob named \"b%3A\" will be created.\n *\n * This strategy gives us flexibility to create with any special characters. But \"%\" will be treated as a special characters, if the URL string\n * is not encoded, there shouldn't a \"%\" in the URL string, otherwise the URL is not a valid URL.\n * If customer needs to create a blob with \"%\" in it's blob name, use \"%25\" insead of \"%\". Just like above 3rd sample.\n * And following URL strings are invalid:\n * - \"http://account.blob.core.windows.net/con/b%\"\n * - \"http://account.blob.core.windows.net/con/b%2\"\n * - \"http://account.blob.core.windows.net/con/b%G\"\n *\n * Another special character is \"?\", use \"%2F\" to represent a blob name with \"?\" in a URL string.\n *\n * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `ContainerClient.getBlobClient(blobName)`\n *\n * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata\n * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata\n *\n * @param url -\n */\nexport function escapeURLPath(url: string): string {\n const urlParsed = new URL(url);\n\n let path = urlParsed.pathname;\n path = path || \"/\";\n\n path = escape(path);\n urlParsed.pathname = path;\n\n return urlParsed.toString();\n}\n\nexport interface ConnectionString {\n kind: \"AccountConnString\" | \"SASConnString\";\n url: string;\n accountName: string;\n accountKey?: any;\n accountSas?: string;\n}\n\nfunction getValueInConnString(\n connectionString: string,\n argument:\n | \"FileEndpoint\"\n | \"AccountName\"\n | \"AccountKey\"\n | \"DefaultEndpointsProtocol\"\n | \"EndpointSuffix\"\n | \"SharedAccessSignature\",\n): string {\n const elements = connectionString.split(\";\");\n for (const element of elements) {\n if (element.trim().startsWith(argument)) {\n return element.trim().match(argument + \"=(.*)\")![1];\n }\n }\n return \"\";\n}\n\n/**\n * Extracts the parts of an Azure Storage account connection string.\n *\n * @param connectionString - Connection string.\n * @returns String key value pairs of the storage account's url and credentials.\n */\nexport function extractConnectionStringParts(connectionString: string): ConnectionString {\n // Matching FileEndpoint in the Account connection string\n let fileEndpoint = getValueInConnString(connectionString, \"FileEndpoint\");\n // Slicing off '/' at the end if exists\n // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end)\n fileEndpoint = fileEndpoint.endsWith(\"/\") ? fileEndpoint.slice(0, -1) : fileEndpoint;\n\n if (\n connectionString.search(\"DefaultEndpointsProtocol=\") !== -1 &&\n connectionString.search(\"AccountKey=\") !== -1\n ) {\n // Account connection string\n\n let defaultEndpointsProtocol = \"\";\n let accountName = \"\";\n let accountKey = Buffer.from(\"accountKey\", \"base64\");\n let endpointSuffix = \"\";\n\n // Get account name and key\n accountName = getValueInConnString(connectionString, \"AccountName\");\n accountKey = Buffer.from(getValueInConnString(connectionString, \"AccountKey\"), \"base64\");\n\n if (!fileEndpoint) {\n // FileEndpoint is not present in the Account connection string\n // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.file.${endpointSuffix}`\n\n defaultEndpointsProtocol = getValueInConnString(connectionString, \"DefaultEndpointsProtocol\");\n const protocol = defaultEndpointsProtocol!.toLowerCase();\n if (protocol !== \"https\" && protocol !== \"http\") {\n throw new Error(\n \"Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'\",\n );\n }\n\n endpointSuffix = getValueInConnString(connectionString, \"EndpointSuffix\");\n if (!endpointSuffix) {\n throw new Error(\"Invalid EndpointSuffix in the provided Connection String\");\n }\n fileEndpoint = `${defaultEndpointsProtocol}://${accountName}.file.${endpointSuffix}`;\n }\n\n if (!accountName) {\n throw new Error(\"Invalid AccountName in the provided Connection String\");\n } else if (accountKey.length === 0) {\n throw new Error(\"Invalid AccountKey in the provided Connection String\");\n }\n\n return {\n kind: \"AccountConnString\",\n url: fileEndpoint,\n accountName,\n accountKey,\n };\n } else {\n // SAS connection string\n const accountSas = getValueInConnString(connectionString, \"SharedAccessSignature\");\n let accountName = getValueInConnString(connectionString, \"AccountName\");\n // if accountName is empty, try to read it from BlobEndpoint\n if (!accountName) {\n accountName = getAccountNameFromUrl(fileEndpoint);\n }\n if (!fileEndpoint) {\n throw new Error(\"Invalid FileEndpoint in the provided SAS Connection String\");\n } else if (!accountSas) {\n throw new Error(\"Invalid SharedAccessSignature in the provided SAS Connection String\");\n }\n\n return { kind: \"SASConnString\", url: fileEndpoint, accountName, accountSas };\n }\n}\n\n/**\n * Internal escape method implemented Strategy Two mentioned in escapeURL() description.\n *\n * @param text -\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nfunction escape(text: string): string {\n return encodeURIComponent(text)\n .replace(/%2F/g, \"/\") // Don't escape for \"/\"\n .replace(/'/g, \"%27\") // Escape for \"'\"\n .replace(/\\+/g, \"%20\")\n .replace(/%25/g, \"%\"); // Revert encoded \"%\"\n}\n\n/**\n * Append a string to URL path. Will remove duplicated \"/\" in front of the string\n * when URL path ends with a \"/\".\n *\n * @param url - Source URL string\n * @param name - String to be appended to URL\n * @returns An updated URL string\n */\nexport function appendToURLPath(url: string, name: string): string {\n const urlParsed = new URL(url);\n\n let path = urlParsed.pathname;\n path = path ? (path.endsWith(\"/\") ? `${path}${name}` : `${path}/${name}`) : name;\n urlParsed.pathname = path;\n\n return urlParsed.toString();\n}\n\n/**\n * Append a string to URL query.\n *\n * @param url - Source URL string.\n * @param queryParts - String to be appended to the URL query.\n * @returns An updated URL string.\n */\nexport function appendToURLQuery(url: string, queryParts: string): string {\n const urlParsed = new URL(url);\n\n let query = urlParsed.search;\n if (query) {\n query += \"&\" + queryParts;\n } else {\n query = queryParts;\n }\n\n urlParsed.search = query;\n return urlParsed.toString();\n}\n\n/**\n * Set URL parameter name and value. If name exists in URL parameters, old value\n * will be replaced by name key. If not provide value, the parameter will be deleted.\n *\n * @param url - Source URL string\n * @param name - Parameter name\n * @param value - Parameter value\n * @returns An updated URL string\n */\nexport function setURLParameter(url: string, name: string, value?: string): string {\n const urlParsed = new URL(url);\n const encodedName = encodeURIComponent(name);\n const encodedValue = value ? encodeURIComponent(value) : undefined;\n // mutating searchParams will change the encoding, so we have to do this ourselves\n const searchString = urlParsed.search === \"\" ? \"?\" : urlParsed.search;\n\n const searchPieces: string[] = [];\n\n for (const pair of searchString.slice(1).split(\"&\")) {\n if (pair) {\n const [key] = pair.split(\"=\", 2);\n if (key !== encodedName) {\n searchPieces.push(pair);\n }\n }\n }\n if (encodedValue) {\n searchPieces.push(`${encodedName}=${encodedValue}`);\n }\n\n urlParsed.search = searchPieces.length ? `?${searchPieces.join(\"&\")}` : \"\";\n\n return urlParsed.toString();\n}\n\n/**\n * Get URL parameter by name.\n *\n * @param url -\n * @param name -\n */\nexport function getURLParameter(url: string, name: string): string | string[] | undefined {\n const urlParsed = new URL(url);\n return urlParsed.searchParams.get(name) ?? undefined;\n}\n\n/**\n * Set URL host.\n *\n * @param url - Source URL string\n * @param host - New host string\n * @returns An updated URL string\n */\nexport function setURLHost(url: string, host: string): string {\n const urlParsed = new URL(url);\n urlParsed.hostname = host;\n return urlParsed.toString();\n}\n\n/**\n * Get URL path from an URL string.\n *\n * @param url - Source URL string\n */\nexport function getURLPath(url: string): string | undefined {\n try {\n const urlParsed = new URL(url);\n return urlParsed.pathname;\n } catch (e) {\n return undefined;\n }\n}\n\n/**\n * Get URL query key value pairs from an URL string.\n *\n * @param url -\n */\nexport function getURLQueries(url: string): { [key: string]: string } {\n let queryString = new URL(url).search;\n if (!queryString) {\n return {};\n }\n\n queryString = queryString.trim();\n queryString = queryString.startsWith(\"?\") ? queryString.substring(1) : queryString;\n\n let querySubStrings: string[] = queryString.split(\"&\");\n querySubStrings = querySubStrings.filter((value: string) => {\n const indexOfEqual = value.indexOf(\"=\");\n const lastIndexOfEqual = value.lastIndexOf(\"=\");\n return (\n indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1\n );\n });\n\n const queries: { [key: string]: string } = {};\n for (const querySubString of querySubStrings) {\n const splitResults = querySubString.split(\"=\");\n const key: string = splitResults[0];\n const value: string = splitResults[1];\n queries[key] = value;\n }\n\n return queries;\n}\n\n/**\n * Rounds a date off to seconds.\n *\n * @param date -\n * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned;\n * If false, YYYY-MM-DDThh:mm:ssZ will be returned.\n * @returns Date string in ISO8061 format, with or without 7 milliseconds component\n */\nexport function truncatedISO8061Date(date: Date, withMilliseconds: boolean = true): string {\n // Date.toISOString() will return like \"2018-10-29T06:34:36.139Z\"\n const dateString = date.toISOString();\n\n return withMilliseconds\n ? dateString.substring(0, dateString.length - 1) + \"0000\" + \"Z\"\n : dateString.substring(0, dateString.length - 5) + \"Z\";\n}\n\n/**\n * Base64 encode.\n *\n * @param content -\n */\nexport function base64encode(content: string): string {\n return !isNodeLike ? btoa(content) : Buffer.from(content).toString(\"base64\");\n}\n\n/**\n * Base64 decode.\n *\n * @param encodedString -\n */\nexport function base64decode(encodedString: string): string {\n return !isNodeLike ? atob(encodedString) : Buffer.from(encodedString, \"base64\").toString();\n}\n\n/**\n * Delay specified time interval.\n *\n * @param timeInMs -\n * @param aborter -\n * @param abortError -\n */\nexport async function delay(\n timeInMs: number,\n aborter?: AbortSignalLike,\n abortError?: Error,\n): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n /* eslint-disable-next-line prefer-const */\n let timeout: any;\n\n const abortHandler = (): void => {\n if (timeout !== undefined) {\n clearTimeout(timeout);\n }\n reject(abortError);\n };\n\n const resolveHandler = (): void => {\n if (aborter !== undefined) {\n aborter.removeEventListener(\"abort\", abortHandler);\n }\n resolve();\n };\n\n timeout = setTimeout(resolveHandler, timeInMs);\n if (aborter !== undefined) {\n aborter.addEventListener(\"abort\", abortHandler);\n }\n });\n}\n\nexport function sanitizeURL(url: string): string {\n let safeURL: string = url;\n if (getURLParameter(safeURL, URLConstants.Parameters.SIGNATURE)) {\n safeURL = setURLParameter(safeURL, URLConstants.Parameters.SIGNATURE, \"*****\");\n }\n\n return safeURL;\n}\n\nexport function sanitizeHeaders(originalHeader: HttpHeaders): HttpHeaders {\n const headers: HttpHeaders = createHttpHeaders();\n for (const [name, value] of originalHeader) {\n if (name.toLowerCase() === HeaderConstants.AUTHORIZATION.toLowerCase()) {\n headers.set(name, \"*****\");\n } else if (name.toLowerCase() === HeaderConstants.X_MS_COPY_SOURCE) {\n headers.set(name, sanitizeURL(value));\n } else {\n headers.set(name, value);\n }\n }\n\n return headers;\n}\n\n/**\n * Extracts account name from the url\n * @param url - url to extract the account name from\n * @returns with the account name\n */\nexport function getAccountNameFromUrl(url: string): string {\n const parsedUrl = new URL(url);\n let accountName;\n try {\n if (parsedUrl.hostname.split(\".\")[1] === \"file\") {\n // `${defaultEndpointsProtocol}://${accountName}.file.${endpointSuffix}`;\n // Slicing off '/' at the end if exists\n url = url.endsWith(\"/\") ? url.slice(0, -1) : url;\n\n accountName = parsedUrl.hostname.split(\".\")[0];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/\n // .getPath() -> /devstoreaccount1/\n accountName = parsedUrl.pathname.split(\"/\")[1];\n } else {\n // Custom domain case: \"https://customdomain.com/containername/blob\".\n accountName = \"\";\n }\n return accountName;\n } catch (error: any) {\n throw new Error(\"Unable to extract accountName with provided information.\");\n }\n}\n\nexport function isIpEndpointStyle(parsedUrl: URL): boolean {\n const host = parsedUrl.host;\n\n // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.\n // Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part.\n // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.\n // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.\n return (\n /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])){3}(:[0-9]+)?$/.test(\n host,\n ) ||\n (Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port))\n );\n}\n\nexport function getShareNameAndPathFromUrl(url: string): {\n baseName: string;\n shareName: string;\n path: string;\n} {\n // URL may look like the following\n // \"https://myaccount.file.core.windows.net/myshare/mydirectory/file?sasString\";\n // \"https://myaccount.file.core.windows.net/myshare/mydirectory/file\";\n // \"https://myaccount.file.core.windows.net/myshare/mydirectory?sasString\";\n // \"https://myaccount.file.core.windows.net/myshare/mydirectory\";\n // \"https://myaccount.file.core.windows.net/myshare?sasString\";\n // \"https://myaccount.file.core.windows.net/myshare\";\n // IPv4/IPv6 address hosts, Endpoints - `http://187.24.0.1:1000/devstoreaccount1/mydirectory/file`\n // http://localhost:1000/devstoreaccount1/mydirectory/file\n // mydirectory can consist of multiple directories - dir1/dir2/dir3\n\n let shareName;\n let path;\n let baseName;\n\n try {\n const parsedUrl = new URL(url);\n if (parsedUrl.hostname.split(\".\")[1] === \"file\") {\n // \"https://myaccount.file.core.windows.net/myshare/mydirectory/file\";\n // .getPath() -> /myshare/mydirectory/file\n const pathComponents = parsedUrl.pathname.match(\"/([^/]*)(/(.*))?\");\n shareName = pathComponents![1];\n path = pathComponents![3];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://187.24.0.1:1000/devstoreaccount1/mydirectory/file\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:1000/devstoreaccount1/mydirectory/file\n // .getPath() -> /devstoreaccount1/mydirectory/file\n const pathComponents = parsedUrl.pathname.match(\"/([^/]*)/([^/]*)(/(.*))?\");\n shareName = pathComponents![2];\n path = pathComponents![4];\n } else {\n // \"https://customdomain.com/myshare/mydirectory/file\";\n // .getPath() -> /myshare/mydirectory/file\n const pathComponents = parsedUrl.pathname.match(\"/([^/]*)(/(.*))?\");\n shareName = pathComponents![1];\n path = pathComponents![3];\n }\n\n // decode the encoded shareName and filePath - to get all the special characters that might be present in it\n shareName = decodeURIComponent(shareName);\n path = decodeURIComponent(path);\n\n // Cast to string is required as TypeScript cannot infer that split() always returns\n // an array with length >= 1\n baseName = path.split(\"/\").pop() as string;\n\n if (!shareName) {\n throw new Error(\"Provided shareName is invalid.\");\n } else {\n return { baseName, shareName, path };\n }\n } catch (error: any) {\n throw new Error(\n \"Unable to extract shareName and filePath/directoryPath with provided information.\",\n );\n }\n}\n\nexport function httpAuthorizationToString(\n httpAuthorization?: HttpAuthorization,\n): string | undefined {\n return httpAuthorization ? httpAuthorization.scheme + \" \" + httpAuthorization.value : undefined;\n}\n\n/**\n * Set URL path.\n *\n * @param url - URL to change path to.\n * @param path - Path to set into the URL.\n */\nexport function setURLPath(url: string, path: string): string {\n const urlParsed = new URL(url);\n urlParsed.pathname = path;\n return urlParsed.toString();\n}\n\n/**\n * Set URL query string.\n *\n * @param url - URL to set query string to.\n * @param queryString - Query string to set to the URL.\n */\nexport function setURLQueries(url: string, queryString: string): string {\n const urlParsed = new URL(url);\n urlParsed.search = queryString;\n return urlParsed.toString();\n}\n\n/**\n * Escape the file or directory name but keep path separator ('/').\n */\nexport function EscapePath(pathName: string): string {\n const split = pathName.split(\"/\");\n for (let i = 0; i < split.length; i++) {\n split[i] = encodeURIComponent(split[i]);\n }\n return split.join(\"/\");\n}\n\n/**\n * A representation of an HTTP response that\n * includes a reference to the request that\n * originated it.\n */\nexport interface HttpResponse {\n /**\n * The headers from the response.\n */\n headers: HttpHeadersLike;\n /**\n * The original request that resulted in this response.\n */\n request: WebResourceLike;\n /**\n * The HTTP status code returned from the service.\n */\n status: number;\n}\n\n/**\n * An object with a _response property that has\n * headers already parsed into a typed object.\n */\nexport interface ResponseWithHeaders<Headers> {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: Headers;\n };\n}\n\n/**\n * An object with a _response property that has body\n * and headers already parsed into known types.\n */\nexport interface ResponseWithBody<Headers, Body> {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: Headers;\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: Body;\n };\n}\n\n/**\n * An object with a simple _response property.\n */\nexport interface ResponseLike {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse;\n}\n\n/**\n * A type that represents an operation result with a known _response property.\n */\nexport type WithResponse<T, Headers = undefined, Body = undefined> = T &\n (Body extends object\n ? ResponseWithBody<Headers, Body>\n : Headers extends object\n ? ResponseWithHeaders<Headers>\n : ResponseLike);\n\n/**\n * A typesafe helper for ensuring that a given response object has\n * the original _response attached.\n * @param response - A response object from calling a client operation\n * @returns The same object, but with known _response property\n */\nexport function assertResponse<T extends object, Headers = undefined, Body = undefined>(\n response: T,\n): WithResponse<T, Headers, Body> {\n if (`_response` in response) {\n return response as WithResponse<T, Headers, Body>;\n }\n\n throw new TypeError(`Unexpected response object ${response}`);\n}\n\nexport function StringEncodedToString(name: StringEncoded): string {\n if (name.encoded) {\n return decodeURIComponent(name.content!);\n } else {\n return name.content!;\n }\n}\n\nexport function ConvertInternalResponseOfListFiles(\n internalResponse: ListFilesAndDirectoriesSegmentResponseInternal,\n): ListFilesAndDirectoriesSegmentResponse {\n const wrappedResponse = {\n ...internalResponse,\n prefix: undefined,\n directoryPath: StringEncodedToString({\n encoded: internalResponse.encoded,\n content: internalResponse.directoryPath,\n }),\n segment: {\n fileItems: internalResponse.segment.fileItems.map((fileItemInternal) => {\n const fileItem: FileItem = {\n ...fileItemInternal,\n name: StringEncodedToString(fileItemInternal.name),\n };\n return fileItem;\n }),\n directoryItems: internalResponse.segment.directoryItems.map((directoryItemInternal) => {\n const directoryItem: DirectoryItem = {\n ...directoryItemInternal,\n name: StringEncodedToString(directoryItemInternal.name),\n };\n return directoryItem;\n }),\n },\n };\n\n delete wrappedResponse.encoded;\n\n const listResponse: ListFilesAndDirectoriesSegmentResponse = wrappedResponse as any;\n\n if (internalResponse.prefix) {\n listResponse.prefix = StringEncodedToString(internalResponse.prefix);\n }\n\n return listResponse;\n}\n\nexport function ConvertInternalResponseOfListHandles(\n internalResponse: ListHandlesResponseInternal,\n): ListHandlesResponse {\n const wrappedResponse: ListHandlesResponse = {\n ...internalResponse,\n handleList: internalResponse.handleList\n ? internalResponse.handleList.map((handleItemInternal) => {\n const handleItem: HandleItem = {\n ...handleItemInternal,\n path: StringEncodedToString(handleItemInternal.path),\n };\n return handleItem;\n })\n : undefined,\n };\n\n return wrappedResponse;\n}\n\n/**\n * A small helper to handle converting an empty string \"\" into undefined\n * This is used in the case of query parameters (like continuation token) where\n * we don't want to send an empty query parameter to the service since the signing\n * policy for shared key will fail.\n * @internal\n */\nexport function removeEmptyString(value: string | undefined): string | undefined {\n return value ? value : undefined;\n}\n\nexport function asSharePermission(value: string | SharePermission): SharePermission {\n const castSharePermission = value as SharePermission;\n if (castSharePermission[\"permission\"] !== undefined) {\n return {\n permission: castSharePermission.permission,\n format: castSharePermission.format,\n };\n }\n\n return {\n permission: value as string,\n };\n}\n\n/**\n * Parse 4-digit octal string representation of a File Mode to a {@link NfsFileMode} structure.\n */\nexport function parseOctalFileMode(input?: string): NfsFileMode | undefined {\n if (input === undefined) {\n return undefined;\n }\n\n if (input?.length !== 4) {\n throw new Error(\"Invalid format of input string\");\n }\n\n const nfsFileMode: NfsFileMode = {\n owner: parseOctalRolePermissions(input[1]),\n group: parseOctalRolePermissions(input[2]),\n other: parseOctalRolePermissions(input[3]),\n effectiveUserIdentity: false,\n effectiveGroupIdentity: false,\n stickyBit: false,\n };\n\n const value: number = Number.parseInt(input[0]);\n\n if ((value & 4) > 0) {\n nfsFileMode.effectiveUserIdentity = true;\n }\n\n if ((value & 2) > 0) {\n nfsFileMode.effectiveGroupIdentity = true;\n }\n\n if ((value & 1) > 0) {\n nfsFileMode.stickyBit = true;\n }\n\n return nfsFileMode;\n}\n\n/**\n * Convert {@link NfsFileMode} structure to a 4-digit octal string represenation.\n */\nexport function toOctalFileMode(input?: NfsFileMode): string | undefined {\n if (input === undefined) return undefined;\n\n let higherOrderDigit = 0;\n if (input?.effectiveUserIdentity) {\n higherOrderDigit |= 4;\n }\n\n if (input?.effectiveGroupIdentity) {\n higherOrderDigit |= 2;\n }\n\n if (input?.stickyBit) {\n higherOrderDigit |= 1;\n }\n\n let stringFileMode = higherOrderDigit.toString();\n stringFileMode += toOctalRolePermissions(input!.owner);\n stringFileMode += toOctalRolePermissions(input!.group);\n stringFileMode += toOctalRolePermissions(input!.other);\n\n return stringFileMode;\n}\n\n/**\n * Convert a {@link NfsFileMode} to a string in symbolic notation.\n */\nexport function toSymbolicFileMode(input?: NfsFileMode): string | undefined {\n if (input === undefined) return undefined;\n let ownerPermissions = toSymbolicRolePermissions(input.owner);\n let groupPermissions = toSymbolicRolePermissions(input.group);\n let otherPermissions = toSymbolicRolePermissions(input.other);\n\n if (input.effectiveUserIdentity) {\n if (ownerPermissions[2] === \"x\") {\n ownerPermissions = ownerPermissions.substring(0, 2) + \"s\";\n } else {\n ownerPermissions = ownerPermissions.substring(0, 2) + \"S\";\n }\n }\n\n if (input.effectiveGroupIdentity) {\n if (groupPermissions[2] === \"x\") {\n groupPermissions = groupPermissions.substring(0, 2) + \"s\";\n } else {\n groupPermissions = groupPermissions.substring(0, 2) + \"S\";\n }\n }\n\n if (input.stickyBit) {\n if (otherPermissions[2] === \"x\") {\n otherPermissions = otherPermissions.substring(0, 2) + \"t\";\n } else {\n otherPermissions = otherPermissions.substring(0, 2) + \"T\";\n }\n }\n return ownerPermissions + groupPermissions + otherPermissions;\n}\n\n/**\n * Parse a 9-character symbolic string representation of a File Mode to a {@link NfsFileMode} structure.\n */\nexport function parseSymbolicFileMode(input?: string): NfsFileMode | undefined {\n if (input === undefined) return undefined;\n\n if (input?.length !== 9) {\n throw new Error(\"Invalid format of input string\");\n }\n const ownerPermissions = parseSymbolicRolePermissions(input.substring(0, 3));\n const groupPermissions = parseSymbolicRolePermissions(input.substring(3, 6));\n const otherPermissions = parseSymbolicRolePermissions(input.substring(6, 9));\n const nfsFileMode: NfsFileMode = {\n owner: ownerPermissions.rolePermissions,\n group: groupPermissions.rolePermissions,\n other: otherPermissions.rolePermissions,\n effectiveUserIdentity: ownerPermissions.setSticky,\n effectiveGroupIdentity: groupPermissions.setSticky,\n stickyBit: otherPermissions.setSticky,\n };\n\n return nfsFileMode;\n}\n\nexport function parseOctalRolePermissions(c: string): PosixRolePermissions {\n const rolePermissions: PosixRolePermissions = {\n read: false,\n write: false,\n execute: false,\n };\n\n const value = Number.parseInt(c);\n\n if (value < 0 || value > 7) {\n throw new Error(\"MustBeBetweenInclusive\");\n }\n\n if ((value & 4) > 0) {\n rolePermissions.read = true;\n }\n\n if ((value & 2) > 0) {\n rolePermissions.write = true;\n }\n\n if ((value & 1) > 0) {\n rolePermissions.execute = true;\n }\n\n return rolePermissions;\n}\n\nexport function toOctalRolePermissions(rolePermissions: PosixRolePermissions): string {\n let result = 0;\n if (rolePermissions.read === true) {\n result |= 4;\n }\n\n if (rolePermissions.write === true) {\n result |= 2;\n }\n\n if (rolePermissions.execute === true) {\n result |= 1;\n }\n\n return result.toString();\n}\n\nexport function toSymbolicRolePermissions(rolePermissions: PosixRolePermissions): string {\n let symbolicRolePermissions = \"\";\n\n if (rolePermissions.read === true) {\n symbolicRolePermissions += \"r\";\n } else {\n symbolicRolePermissions += \"-\";\n }\n\n if (rolePermissions.write === true) {\n symbolicRolePermissions += \"w\";\n } else {\n symbolicRolePermissions += \"-\";\n }\n\n if (rolePermissions.execute === true) {\n symbolicRolePermissions += \"x\";\n } else {\n symbolicRolePermissions += \"-\";\n }\n return symbolicRolePermissions;\n}\n\nexport function parseSymbolicRolePermissions(input: string): {\n rolePermissions: PosixRolePermissions;\n setSticky: boolean;\n} {\n if (input.length !== 3) {\n throw new Error(\"input must be 3 characters long\");\n }\n\n const rolePermissions: PosixRolePermissions = {\n read: false,\n write: false,\n execute: false,\n };\n\n let setSticky = false;\n\n // Read character\n if (input[0] === \"r\") {\n rolePermissions.read = true;\n } else if (input[0] !== \"-\") {\n throw new Error(`Invalid character in symbolic role permission: ${input[0]}`);\n }\n\n // Write character\n if (input[1] === \"w\") {\n rolePermissions.write = true;\n } else if (input[1] !== \"-\") {\n throw new Error(`Invalid character in symbolic role permission: ${input[1]}`);\n }\n\n // Execute character\n if (input[2] === \"x\" || input[2] === \"s\" || input[2] === \"t\") {\n rolePermissions.execute = true;\n if (input[2] === \"s\" || input[2] === \"t\") {\n setSticky = true;\n }\n }\n\n if (input[2] === \"S\" || input[2] === \"T\") {\n setSticky = true;\n }\n\n if (\n input[2] !== \"x\" &&\n input[2] !== \"s\" &&\n input[2] !== \"S\" &&\n input[2] !== \"t\" &&\n input[2] !== \"T\" &&\n input[2] !== \"-\"\n ) {\n throw new Error(`Invalid character in symbolic role permission: ${input[2]}`);\n }\n\n return {\n rolePermissions,\n setSticky,\n };\n}\n\ninterface UploadChecksumParametersLike {\n contentMD5?: Uint8Array;\n transactionalContentCrc64?: Uint8Array;\n contentChecksumAlgorithm?: StorageChecksumAlgorithm;\n structuredBodyType?: string;\n structuredContentLength?: number;\n}\n\ninterface UploadCheckSumBody {\n contentChecksumAlgorithm?: StorageChecksumAlgorithm;\n body: HttpRequestBody;\n contentLength: number;\n}\n\nexport async function setUploadChecksumParameters(\n body: HttpRequestBody,\n contentLength: number,\n parameters: UploadChecksumParametersLike,\n uploadOptions: UploadChecksumParametersLike,\n configContentChecksumAlgorithm?: StorageChecksumAlgorithm,\n): Promise<UploadCheckSumBody> {\n let contentChecksumAlgorithm =\n uploadOptions.contentChecksumAlgorithm ?? configContentChecksumAlgorithm;\n if (contentChecksumAlgorithm === undefined) {\n contentChecksumAlgorithm = \"Customized\";\n }\n\n if (contentChecksumAlgorithm === \"Auto\") {\n contentChecksumAlgorithm = \"StorageCrc64\";\n }\n\n let bodyInfo = undefined;\n if (contentChecksumAlgorithm === \"Customized\") {\n parameters.contentMD5 = uploadOptions.contentMD5;\n parameters.transactionalContentCrc64 = uploadOptions.transactionalContentCrc64;\n } else if (contentChecksumAlgorithm === \"StorageCrc64\") {\n await StorageCRC64Calculator.init();\n bodyInfo = await structuredMessageEncoding(body, contentLength);\n parameters.structuredBodyType = \"XSM/1.0; properties=crc64\";\n parameters.structuredContentLength = contentLength;\n }\n\n return {\n body: contentChecksumAlgorithm === \"StorageCrc64\" ? bodyInfo!.body : body,\n contentLength:\n contentChecksumAlgorithm === \"StorageCrc64\" ? bodyInfo!.encodedContentLength : contentLength,\n contentChecksumAlgorithm: contentChecksumAlgorithm,\n };\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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,MAAM,CAAC,MAAM,KACb;AACA,UAAM,IAAI,MAAM,kDAAkD,MAAM,CAAC,CAAC,EAAE;AAAA,EAC9E;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;AAgBA,eAAsB,4BACpB,MACA,eACA,YACA,eACA,gCAC6B;AAC7B,MAAI,2BACF,cAAc,4BAA4B;AAC5C,MAAI,6BAA6B,QAAW;AAC1C,+BAA2B;AAAA,EAC7B;AAEA,MAAI,6BAA6B,QAAQ;AACvC,+BAA2B;AAAA,EAC7B;AAEA,MAAI,WAAW;AACf,MAAI,6BAA6B,cAAc;AAC7C,eAAW,aAAa,cAAc;AACtC,eAAW,4BAA4B,cAAc;AAAA,EACvD,WAAW,6BAA6B,gBAAgB;AACtD,UAAM,6CAAuB,KAAK;AAClC,eAAW,UAAM,iDAA0B,MAAM,aAAa;AAC9D,eAAW,qBAAqB;AAChC,eAAW,0BAA0B;AAAA,EACvC;AAEA,SAAO;AAAA,IACL,MAAM,6BAA6B,iBAAiB,SAAU,OAAO;AAAA,IACrE,eACE,6BAA6B,iBAAiB,SAAU,uBAAuB;AAAA,IACjF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\nimport type { HttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { createHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport type {\n ListFilesAndDirectoriesSegmentResponse as ListFilesAndDirectoriesSegmentResponseInternal,\n ListHandlesResponse as ListHandlesResponseInternal,\n SharePermission,\n StringEncoded,\n} from \"../generated/src/models/index.js\";\nimport type {\n DirectoryItem,\n FileItem,\n HandleItem,\n ListFilesAndDirectoriesSegmentResponse,\n ListHandlesResponse,\n} from \"../generatedModels.js\";\nimport {\n HttpAuthorization,\n NfsFileMode,\n PosixRolePermissions,\n StorageChecksumAlgorithm,\n} from \"../models.js\";\nimport { HeaderConstants, PathStylePorts, URLConstants } from \"./constants.js\";\nimport { isNodeLike } from \"@azure/core-util\";\nimport type { HttpHeadersLike, WebResourceLike } from \"@azure/core-http-compat\";\nimport { HttpRequestBody } from \"../Pipeline.js\";\nimport { StorageCRC64Calculator, structuredMessageEncoding } from \"@azure/storage-common\";\n\n/**\n * Reserved URL characters must be properly escaped for Storage services like Blob or File.\n *\n * ## URL encode and escape strategy for JS SDKs\n *\n * When customers pass a URL string into XXXClient classes constructor, the URL string may already be URL encoded or not.\n * But before sending to Azure Storage server, the URL must be encoded. However, it's hard for a SDK to guess whether the URL\n * string has been encoded or not. We have 2 potential strategies, and chose strategy two for the XXXClient constructors.\n *\n * ### Strategy One: Assume the customer URL string is not encoded, and always encode URL string in SDK.\n *\n * This is what legacy V2 SDK does, simple and works for most of the cases.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * SDK will encode it to \"http://account.blob.core.windows.net/con/b%253A\" and send to server. A blob named \"b%3A\" will be created.\n *\n * But this strategy will make it not possible to create a blob with \"?\" in it's name. Because when customer URL string is\n * \"http://account.blob.core.windows.net/con/blob?name\", the \"?name\" will be treated as URL paramter instead of blob name.\n * If customer URL string is \"http://account.blob.core.windows.net/con/blob%3Fname\", a blob named \"blob%3Fname\" will be created.\n * V2 SDK doesn't have this issue because it doesn't allow customer pass in a full URL, it accepts a separate blob name and encodeURIComponent for it.\n * We cannot accept a SDK cannot create a blob name with \"?\". So we implement strategy two:\n *\n * ### Strategy Two: SDK doesn't assume the URL has been encoded or not. It will just escape the special characters.\n *\n * This is what V10 Blob Go SDK does. It accepts a URL type in Go, and call url.EscapedPath() to escape the special chars unescaped.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b:\",\n * SDK will escape \":\" like \"http://account.blob.core.windows.net/con/b%3A\" and send to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%3A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%3A\" to server. A blob named \"b:\" will be created.\n * - When customer URL string is \"http://account.blob.core.windows.net/con/b%253A\",\n * There is no special characters, so send \"http://account.blob.core.windows.net/con/b%253A\" to server. A blob named \"b%3A\" will be created.\n *\n * This strategy gives us flexibility to create with any special characters. But \"%\" will be treated as a special characters, if the URL string\n * is not encoded, there shouldn't a \"%\" in the URL string, otherwise the URL is not a valid URL.\n * If customer needs to create a blob with \"%\" in it's blob name, use \"%25\" insead of \"%\". Just like above 3rd sample.\n * And following URL strings are invalid:\n * - \"http://account.blob.core.windows.net/con/b%\"\n * - \"http://account.blob.core.windows.net/con/b%2\"\n * - \"http://account.blob.core.windows.net/con/b%G\"\n *\n * Another special character is \"?\", use \"%2F\" to represent a blob name with \"?\" in a URL string.\n *\n * ### Strategy for containerName, blobName or other specific XXXName parameters in methods such as `ContainerClient.getBlobClient(blobName)`\n *\n * We will apply strategy one, and call encodeURIComponent for these parameters like blobName. Because what customers passes in is a plain name instead of a URL.\n *\n * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata\n * @see https://learn.microsoft.com/rest/api/storageservices/naming-and-referencing-shares--directories--files--and-metadata\n *\n * @param url -\n */\nexport function escapeURLPath(url: string): string {\n const urlParsed = new URL(url);\n\n let path = urlParsed.pathname;\n path = path || \"/\";\n\n path = escape(path);\n urlParsed.pathname = path;\n\n return urlParsed.toString();\n}\n\nexport interface ConnectionString {\n kind: \"AccountConnString\" | \"SASConnString\";\n url: string;\n accountName: string;\n accountKey?: any;\n accountSas?: string;\n}\n\nfunction getValueInConnString(\n connectionString: string,\n argument:\n | \"FileEndpoint\"\n | \"AccountName\"\n | \"AccountKey\"\n | \"DefaultEndpointsProtocol\"\n | \"EndpointSuffix\"\n | \"SharedAccessSignature\",\n): string {\n const elements = connectionString.split(\";\");\n for (const element of elements) {\n if (element.trim().startsWith(argument)) {\n return element.trim().match(argument + \"=(.*)\")![1];\n }\n }\n return \"\";\n}\n\n/**\n * Extracts the parts of an Azure Storage account connection string.\n *\n * @param connectionString - Connection string.\n * @returns String key value pairs of the storage account's url and credentials.\n */\nexport function extractConnectionStringParts(connectionString: string): ConnectionString {\n // Matching FileEndpoint in the Account connection string\n let fileEndpoint = getValueInConnString(connectionString, \"FileEndpoint\");\n // Slicing off '/' at the end if exists\n // (The methods that use `extractConnectionStringParts` expect the url to not have `/` at the end)\n fileEndpoint = fileEndpoint.endsWith(\"/\") ? fileEndpoint.slice(0, -1) : fileEndpoint;\n\n if (\n connectionString.search(\"DefaultEndpointsProtocol=\") !== -1 &&\n connectionString.search(\"AccountKey=\") !== -1\n ) {\n // Account connection string\n\n let defaultEndpointsProtocol = \"\";\n let accountName = \"\";\n let accountKey = Buffer.from(\"accountKey\", \"base64\");\n let endpointSuffix = \"\";\n\n // Get account name and key\n accountName = getValueInConnString(connectionString, \"AccountName\");\n accountKey = Buffer.from(getValueInConnString(connectionString, \"AccountKey\"), \"base64\");\n\n if (!fileEndpoint) {\n // FileEndpoint is not present in the Account connection string\n // Can be obtained from `${defaultEndpointsProtocol}://${accountName}.file.${endpointSuffix}`\n\n defaultEndpointsProtocol = getValueInConnString(connectionString, \"DefaultEndpointsProtocol\");\n const protocol = defaultEndpointsProtocol!.toLowerCase();\n if (protocol !== \"https\" && protocol !== \"http\") {\n throw new Error(\n \"Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'\",\n );\n }\n\n endpointSuffix = getValueInConnString(connectionString, \"EndpointSuffix\");\n if (!endpointSuffix) {\n throw new Error(\"Invalid EndpointSuffix in the provided Connection String\");\n }\n fileEndpoint = `${defaultEndpointsProtocol}://${accountName}.file.${endpointSuffix}`;\n }\n\n if (!accountName) {\n throw new Error(\"Invalid AccountName in the provided Connection String\");\n } else if (accountKey.length === 0) {\n throw new Error(\"Invalid AccountKey in the provided Connection String\");\n }\n\n return {\n kind: \"AccountConnString\",\n url: fileEndpoint,\n accountName,\n accountKey,\n };\n } else {\n // SAS connection string\n const accountSas = getValueInConnString(connectionString, \"SharedAccessSignature\");\n let accountName = getValueInConnString(connectionString, \"AccountName\");\n // if accountName is empty, try to read it from BlobEndpoint\n if (!accountName) {\n accountName = getAccountNameFromUrl(fileEndpoint);\n }\n if (!fileEndpoint) {\n throw new Error(\"Invalid FileEndpoint in the provided SAS Connection String\");\n } else if (!accountSas) {\n throw new Error(\"Invalid SharedAccessSignature in the provided SAS Connection String\");\n }\n\n return { kind: \"SASConnString\", url: fileEndpoint, accountName, accountSas };\n }\n}\n\n/**\n * Internal escape method implemented Strategy Two mentioned in escapeURL() description.\n *\n * @param text -\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nfunction escape(text: string): string {\n return encodeURIComponent(text)\n .replace(/%2F/g, \"/\") // Don't escape for \"/\"\n .replace(/'/g, \"%27\") // Escape for \"'\"\n .replace(/\\+/g, \"%20\")\n .replace(/%25/g, \"%\"); // Revert encoded \"%\"\n}\n\n/**\n * Append a string to URL path. Will remove duplicated \"/\" in front of the string\n * when URL path ends with a \"/\".\n *\n * @param url - Source URL string\n * @param name - String to be appended to URL\n * @returns An updated URL string\n */\nexport function appendToURLPath(url: string, name: string): string {\n const urlParsed = new URL(url);\n\n let path = urlParsed.pathname;\n path = path ? (path.endsWith(\"/\") ? `${path}${name}` : `${path}/${name}`) : name;\n urlParsed.pathname = path;\n\n return urlParsed.toString();\n}\n\n/**\n * Append a string to URL query.\n *\n * @param url - Source URL string.\n * @param queryParts - String to be appended to the URL query.\n * @returns An updated URL string.\n */\nexport function appendToURLQuery(url: string, queryParts: string): string {\n const urlParsed = new URL(url);\n\n let query = urlParsed.search;\n if (query) {\n query += \"&\" + queryParts;\n } else {\n query = queryParts;\n }\n\n urlParsed.search = query;\n return urlParsed.toString();\n}\n\n/**\n * Set URL parameter name and value. If name exists in URL parameters, old value\n * will be replaced by name key. If not provide value, the parameter will be deleted.\n *\n * @param url - Source URL string\n * @param name - Parameter name\n * @param value - Parameter value\n * @returns An updated URL string\n */\nexport function setURLParameter(url: string, name: string, value?: string): string {\n const urlParsed = new URL(url);\n const encodedName = encodeURIComponent(name);\n const encodedValue = value ? encodeURIComponent(value) : undefined;\n // mutating searchParams will change the encoding, so we have to do this ourselves\n const searchString = urlParsed.search === \"\" ? \"?\" : urlParsed.search;\n\n const searchPieces: string[] = [];\n\n for (const pair of searchString.slice(1).split(\"&\")) {\n if (pair) {\n const [key] = pair.split(\"=\", 2);\n if (key !== encodedName) {\n searchPieces.push(pair);\n }\n }\n }\n if (encodedValue) {\n searchPieces.push(`${encodedName}=${encodedValue}`);\n }\n\n urlParsed.search = searchPieces.length ? `?${searchPieces.join(\"&\")}` : \"\";\n\n return urlParsed.toString();\n}\n\n/**\n * Get URL parameter by name.\n *\n * @param url -\n * @param name -\n */\nexport function getURLParameter(url: string, name: string): string | string[] | undefined {\n const urlParsed = new URL(url);\n return urlParsed.searchParams.get(name) ?? undefined;\n}\n\n/**\n * Set URL host.\n *\n * @param url - Source URL string\n * @param host - New host string\n * @returns An updated URL string\n */\nexport function setURLHost(url: string, host: string): string {\n const urlParsed = new URL(url);\n urlParsed.hostname = host;\n return urlParsed.toString();\n}\n\n/**\n * Get URL path from an URL string.\n *\n * @param url - Source URL string\n */\nexport function getURLPath(url: string): string | undefined {\n try {\n const urlParsed = new URL(url);\n return urlParsed.pathname;\n } catch (e) {\n return undefined;\n }\n}\n\n/**\n * Get URL query key value pairs from an URL string.\n *\n * @param url -\n */\nexport function getURLQueries(url: string): { [key: string]: string } {\n let queryString = new URL(url).search;\n if (!queryString) {\n return {};\n }\n\n queryString = queryString.trim();\n queryString = queryString.startsWith(\"?\") ? queryString.substring(1) : queryString;\n\n let querySubStrings: string[] = queryString.split(\"&\");\n querySubStrings = querySubStrings.filter((value: string) => {\n const indexOfEqual = value.indexOf(\"=\");\n const lastIndexOfEqual = value.lastIndexOf(\"=\");\n return (\n indexOfEqual > 0 && indexOfEqual === lastIndexOfEqual && lastIndexOfEqual < value.length - 1\n );\n });\n\n const queries: { [key: string]: string } = {};\n for (const querySubString of querySubStrings) {\n const splitResults = querySubString.split(\"=\");\n const key: string = splitResults[0];\n const value: string = splitResults[1];\n queries[key] = value;\n }\n\n return queries;\n}\n\n/**\n * Rounds a date off to seconds.\n *\n * @param date -\n * @param withMilliseconds - If true, YYYY-MM-DDThh:mm:ss.fffffffZ will be returned;\n * If false, YYYY-MM-DDThh:mm:ssZ will be returned.\n * @returns Date string in ISO8061 format, with or without 7 milliseconds component\n */\nexport function truncatedISO8061Date(date: Date, withMilliseconds: boolean = true): string {\n // Date.toISOString() will return like \"2018-10-29T06:34:36.139Z\"\n const dateString = date.toISOString();\n\n return withMilliseconds\n ? dateString.substring(0, dateString.length - 1) + \"0000\" + \"Z\"\n : dateString.substring(0, dateString.length - 5) + \"Z\";\n}\n\n/**\n * Base64 encode.\n *\n * @param content -\n */\nexport function base64encode(content: string): string {\n return !isNodeLike ? btoa(content) : Buffer.from(content).toString(\"base64\");\n}\n\n/**\n * Base64 decode.\n *\n * @param encodedString -\n */\nexport function base64decode(encodedString: string): string {\n return !isNodeLike ? atob(encodedString) : Buffer.from(encodedString, \"base64\").toString();\n}\n\n/**\n * Delay specified time interval.\n *\n * @param timeInMs -\n * @param aborter -\n * @param abortError -\n */\nexport async function delay(\n timeInMs: number,\n aborter?: AbortSignalLike,\n abortError?: Error,\n): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n /* eslint-disable-next-line prefer-const */\n let timeout: any;\n\n const abortHandler = (): void => {\n if (timeout !== undefined) {\n clearTimeout(timeout);\n }\n reject(abortError);\n };\n\n const resolveHandler = (): void => {\n if (aborter !== undefined) {\n aborter.removeEventListener(\"abort\", abortHandler);\n }\n resolve();\n };\n\n timeout = setTimeout(resolveHandler, timeInMs);\n if (aborter !== undefined) {\n aborter.addEventListener(\"abort\", abortHandler);\n }\n });\n}\n\nexport function sanitizeURL(url: string): string {\n let safeURL: string = url;\n if (getURLParameter(safeURL, URLConstants.Parameters.SIGNATURE)) {\n safeURL = setURLParameter(safeURL, URLConstants.Parameters.SIGNATURE, \"*****\");\n }\n\n return safeURL;\n}\n\nexport function sanitizeHeaders(originalHeader: HttpHeaders): HttpHeaders {\n const headers: HttpHeaders = createHttpHeaders();\n for (const [name, value] of originalHeader) {\n if (name.toLowerCase() === HeaderConstants.AUTHORIZATION.toLowerCase()) {\n headers.set(name, \"*****\");\n } else if (name.toLowerCase() === HeaderConstants.X_MS_COPY_SOURCE) {\n headers.set(name, sanitizeURL(value));\n } else {\n headers.set(name, value);\n }\n }\n\n return headers;\n}\n\nconst accountNameSuffixes = [\n \"-secondary-ipv6\",\n \"-secondary-dualstack\",\n \"-ipv6\",\n \"-dualstack\",\n \"-secondary\",\n];\n\n/**\n * Extracts account name from the url\n * @param url - url to extract the account name from\n * @returns with the account name\n */\nexport function getAccountNameFromUrl(url: string): string {\n const parsedUrl = new URL(url);\n let accountName;\n try {\n if (parsedUrl.hostname.split(\".\")[1] === \"file\") {\n // `${defaultEndpointsProtocol}://${accountName}.file.${endpointSuffix}`;\n // `${defaultEndpointsProtocol}://${accountName}-suffix.file.${endpointSuffix}`;\n // Slicing off '/' at the end if exists\n url = url.endsWith(\"/\") ? url.slice(0, -1) : url;\n\n accountName = parsedUrl.hostname.split(\".\")[0];\n for (let i = 0; i < accountNameSuffixes.length; ++i) {\n const suffix = accountNameSuffixes[i];\n if (accountName.endsWith(suffix)) {\n accountName = accountName.substring(0, accountName.length - suffix.length);\n }\n }\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://192.0.0.10:10001/devstoreaccount1/\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:10001/devstoreaccount1/\n // .getPath() -> /devstoreaccount1/\n accountName = parsedUrl.pathname.split(\"/\")[1];\n } else {\n // Custom domain case: \"https://customdomain.com/containername/blob\".\n accountName = \"\";\n }\n return accountName;\n } catch (error: any) {\n throw new Error(\"Unable to extract accountName with provided information.\");\n }\n}\n\nexport function isIpEndpointStyle(parsedUrl: URL): boolean {\n const host = parsedUrl.host;\n\n // Case 1: Ipv6, use a broad regex to find out candidates whose host contains two ':'.\n // Case 2: localhost(:port) or host.docker.internal, use broad regex to match port part.\n // Case 3: Ipv4, use broad regex which just check if host contains Ipv4.\n // For valid host please refer to https://man7.org/linux/man-pages/man7/hostname.7.html.\n return (\n /^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])){3}(:[0-9]+)?$/.test(\n host,\n ) ||\n (Boolean(parsedUrl.port) && PathStylePorts.includes(parsedUrl.port))\n );\n}\n\nexport function getShareNameAndPathFromUrl(url: string): {\n baseName: string;\n shareName: string;\n path: string;\n} {\n // URL may look like the following\n // \"https://myaccount.file.core.windows.net/myshare/mydirectory/file?sasString\";\n // \"https://myaccount.file.core.windows.net/myshare/mydirectory/file\";\n // \"https://myaccount.file.core.windows.net/myshare/mydirectory?sasString\";\n // \"https://myaccount.file.core.windows.net/myshare/mydirectory\";\n // \"https://myaccount.file.core.windows.net/myshare?sasString\";\n // \"https://myaccount.file.core.windows.net/myshare\";\n // IPv4/IPv6 address hosts, Endpoints - `http://187.24.0.1:1000/devstoreaccount1/mydirectory/file`\n // http://localhost:1000/devstoreaccount1/mydirectory/file\n // mydirectory can consist of multiple directories - dir1/dir2/dir3\n\n let shareName;\n let path;\n let baseName;\n\n try {\n const parsedUrl = new URL(url);\n if (parsedUrl.hostname.split(\".\")[1] === \"file\") {\n // \"https://myaccount.file.core.windows.net/myshare/mydirectory/file\";\n // .getPath() -> /myshare/mydirectory/file\n const pathComponents = parsedUrl.pathname.match(\"/([^/]*)(/(.*))?\");\n shareName = pathComponents![1];\n path = pathComponents![3];\n } else if (isIpEndpointStyle(parsedUrl)) {\n // IPv4/IPv6 address hosts... Example - http://187.24.0.1:1000/devstoreaccount1/mydirectory/file\n // Single word domain without a [dot] in the endpoint... Example - http://localhost:1000/devstoreaccount1/mydirectory/file\n // .getPath() -> /devstoreaccount1/mydirectory/file\n const pathComponents = parsedUrl.pathname.match(\"/([^/]*)/([^/]*)(/(.*))?\");\n shareName = pathComponents![2];\n path = pathComponents![4];\n } else {\n // \"https://customdomain.com/myshare/mydirectory/file\";\n // .getPath() -> /myshare/mydirectory/file\n const pathComponents = parsedUrl.pathname.match(\"/([^/]*)(/(.*))?\");\n shareName = pathComponents![1];\n path = pathComponents![3];\n }\n\n // decode the encoded shareName and filePath - to get all the special characters that might be present in it\n shareName = decodeURIComponent(shareName);\n path = decodeURIComponent(path);\n\n // Cast to string is required as TypeScript cannot infer that split() always returns\n // an array with length >= 1\n baseName = path.split(\"/\").pop() as string;\n\n if (!shareName) {\n throw new Error(\"Provided shareName is invalid.\");\n } else {\n return { baseName, shareName, path };\n }\n } catch (error: any) {\n throw new Error(\n \"Unable to extract shareName and filePath/directoryPath with provided information.\",\n );\n }\n}\n\nexport function httpAuthorizationToString(\n httpAuthorization?: HttpAuthorization,\n): string | undefined {\n return httpAuthorization ? httpAuthorization.scheme + \" \" + httpAuthorization.value : undefined;\n}\n\n/**\n * Set URL path.\n *\n * @param url - URL to change path to.\n * @param path - Path to set into the URL.\n */\nexport function setURLPath(url: string, path: string): string {\n const urlParsed = new URL(url);\n urlParsed.pathname = path;\n return urlParsed.toString();\n}\n\n/**\n * Set URL query string.\n *\n * @param url - URL to set query string to.\n * @param queryString - Query string to set to the URL.\n */\nexport function setURLQueries(url: string, queryString: string): string {\n const urlParsed = new URL(url);\n urlParsed.search = queryString;\n return urlParsed.toString();\n}\n\n/**\n * Escape the file or directory name but keep path separator ('/').\n */\nexport function EscapePath(pathName: string): string {\n const split = pathName.split(\"/\");\n for (let i = 0; i < split.length; i++) {\n split[i] = encodeURIComponent(split[i]);\n }\n return split.join(\"/\");\n}\n\n/**\n * A representation of an HTTP response that\n * includes a reference to the request that\n * originated it.\n */\nexport interface HttpResponse {\n /**\n * The headers from the response.\n */\n headers: HttpHeadersLike;\n /**\n * The original request that resulted in this response.\n */\n request: WebResourceLike;\n /**\n * The HTTP status code returned from the service.\n */\n status: number;\n}\n\n/**\n * An object with a _response property that has\n * headers already parsed into a typed object.\n */\nexport interface ResponseWithHeaders<Headers> {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: Headers;\n };\n}\n\n/**\n * An object with a _response property that has body\n * and headers already parsed into known types.\n */\nexport interface ResponseWithBody<Headers, Body> {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse & {\n /**\n * The parsed HTTP response headers.\n */\n parsedHeaders: Headers;\n /**\n * The response body as text (string format)\n */\n bodyAsText: string;\n /**\n * The response body as parsed JSON or XML\n */\n parsedBody: Body;\n };\n}\n\n/**\n * An object with a simple _response property.\n */\nexport interface ResponseLike {\n /**\n * The underlying HTTP response.\n */\n _response: HttpResponse;\n}\n\n/**\n * A type that represents an operation result with a known _response property.\n */\nexport type WithResponse<T, Headers = undefined, Body = undefined> = T &\n (Body extends object\n ? ResponseWithBody<Headers, Body>\n : Headers extends object\n ? ResponseWithHeaders<Headers>\n : ResponseLike);\n\n/**\n * A typesafe helper for ensuring that a given response object has\n * the original _response attached.\n * @param response - A response object from calling a client operation\n * @returns The same object, but with known _response property\n */\nexport function assertResponse<T extends object, Headers = undefined, Body = undefined>(\n response: T,\n): WithResponse<T, Headers, Body> {\n if (`_response` in response) {\n return response as WithResponse<T, Headers, Body>;\n }\n\n throw new TypeError(`Unexpected response object ${response}`);\n}\n\nexport function StringEncodedToString(name: StringEncoded): string {\n if (name.encoded) {\n return decodeURIComponent(name.content!);\n } else {\n return name.content!;\n }\n}\n\nexport function ConvertInternalResponseOfListFiles(\n internalResponse: ListFilesAndDirectoriesSegmentResponseInternal,\n): ListFilesAndDirectoriesSegmentResponse {\n const wrappedResponse = {\n ...internalResponse,\n prefix: undefined,\n directoryPath: StringEncodedToString({\n encoded: internalResponse.encoded,\n content: internalResponse.directoryPath,\n }),\n segment: {\n fileItems: internalResponse.segment.fileItems.map((fileItemInternal) => {\n const fileItem: FileItem = {\n ...fileItemInternal,\n name: StringEncodedToString(fileItemInternal.name),\n };\n return fileItem;\n }),\n directoryItems: internalResponse.segment.directoryItems.map((directoryItemInternal) => {\n const directoryItem: DirectoryItem = {\n ...directoryItemInternal,\n name: StringEncodedToString(directoryItemInternal.name),\n };\n return directoryItem;\n }),\n },\n };\n\n delete wrappedResponse.encoded;\n\n const listResponse: ListFilesAndDirectoriesSegmentResponse = wrappedResponse as any;\n\n if (internalResponse.prefix) {\n listResponse.prefix = StringEncodedToString(internalResponse.prefix);\n }\n\n return listResponse;\n}\n\nexport function ConvertInternalResponseOfListHandles(\n internalResponse: ListHandlesResponseInternal,\n): ListHandlesResponse {\n const wrappedResponse: ListHandlesResponse = {\n ...internalResponse,\n handleList: internalResponse.handleList\n ? internalResponse.handleList.map((handleItemInternal) => {\n const handleItem: HandleItem = {\n ...handleItemInternal,\n path: StringEncodedToString(handleItemInternal.path),\n };\n return handleItem;\n })\n : undefined,\n };\n\n return wrappedResponse;\n}\n\n/**\n * A small helper to handle converting an empty string \"\" into undefined\n * This is used in the case of query parameters (like continuation token) where\n * we don't want to send an empty query parameter to the service since the signing\n * policy for shared key will fail.\n * @internal\n */\nexport function removeEmptyString(value: string | undefined): string | undefined {\n return value ? value : undefined;\n}\n\nexport function asSharePermission(value: string | SharePermission): SharePermission {\n const castSharePermission = value as SharePermission;\n if (castSharePermission[\"permission\"] !== undefined) {\n return {\n permission: castSharePermission.permission,\n format: castSharePermission.format,\n };\n }\n\n return {\n permission: value as string,\n };\n}\n\n/**\n * Parse 4-digit octal string representation of a File Mode to a {@link NfsFileMode} structure.\n */\nexport function parseOctalFileMode(input?: string): NfsFileMode | undefined {\n if (input === undefined) {\n return undefined;\n }\n\n if (input?.length !== 4) {\n throw new Error(\"Invalid format of input string\");\n }\n\n const nfsFileMode: NfsFileMode = {\n owner: parseOctalRolePermissions(input[1]),\n group: parseOctalRolePermissions(input[2]),\n other: parseOctalRolePermissions(input[3]),\n effectiveUserIdentity: false,\n effectiveGroupIdentity: false,\n stickyBit: false,\n };\n\n const value: number = Number.parseInt(input[0]);\n\n if ((value & 4) > 0) {\n nfsFileMode.effectiveUserIdentity = true;\n }\n\n if ((value & 2) > 0) {\n nfsFileMode.effectiveGroupIdentity = true;\n }\n\n if ((value & 1) > 0) {\n nfsFileMode.stickyBit = true;\n }\n\n return nfsFileMode;\n}\n\n/**\n * Convert {@link NfsFileMode} structure to a 4-digit octal string represenation.\n */\nexport function toOctalFileMode(input?: NfsFileMode): string | undefined {\n if (input === undefined) return undefined;\n\n let higherOrderDigit = 0;\n if (input?.effectiveUserIdentity) {\n higherOrderDigit |= 4;\n }\n\n if (input?.effectiveGroupIdentity) {\n higherOrderDigit |= 2;\n }\n\n if (input?.stickyBit) {\n higherOrderDigit |= 1;\n }\n\n let stringFileMode = higherOrderDigit.toString();\n stringFileMode += toOctalRolePermissions(input!.owner);\n stringFileMode += toOctalRolePermissions(input!.group);\n stringFileMode += toOctalRolePermissions(input!.other);\n\n return stringFileMode;\n}\n\n/**\n * Convert a {@link NfsFileMode} to a string in symbolic notation.\n */\nexport function toSymbolicFileMode(input?: NfsFileMode): string | undefined {\n if (input === undefined) return undefined;\n let ownerPermissions = toSymbolicRolePermissions(input.owner);\n let groupPermissions = toSymbolicRolePermissions(input.group);\n let otherPermissions = toSymbolicRolePermissions(input.other);\n\n if (input.effectiveUserIdentity) {\n if (ownerPermissions[2] === \"x\") {\n ownerPermissions = ownerPermissions.substring(0, 2) + \"s\";\n } else {\n ownerPermissions = ownerPermissions.substring(0, 2) + \"S\";\n }\n }\n\n if (input.effectiveGroupIdentity) {\n if (groupPermissions[2] === \"x\") {\n groupPermissions = groupPermissions.substring(0, 2) + \"s\";\n } else {\n groupPermissions = groupPermissions.substring(0, 2) + \"S\";\n }\n }\n\n if (input.stickyBit) {\n if (otherPermissions[2] === \"x\") {\n otherPermissions = otherPermissions.substring(0, 2) + \"t\";\n } else {\n otherPermissions = otherPermissions.substring(0, 2) + \"T\";\n }\n }\n return ownerPermissions + groupPermissions + otherPermissions;\n}\n\n/**\n * Parse a 9-character symbolic string representation of a File Mode to a {@link NfsFileMode} structure.\n */\nexport function parseSymbolicFileMode(input?: string): NfsFileMode | undefined {\n if (input === undefined) return undefined;\n\n if (input?.length !== 9) {\n throw new Error(\"Invalid format of input string\");\n }\n const ownerPermissions = parseSymbolicRolePermissions(input.substring(0, 3));\n const groupPermissions = parseSymbolicRolePermissions(input.substring(3, 6));\n const otherPermissions = parseSymbolicRolePermissions(input.substring(6, 9));\n const nfsFileMode: NfsFileMode = {\n owner: ownerPermissions.rolePermissions,\n group: groupPermissions.rolePermissions,\n other: otherPermissions.rolePermissions,\n effectiveUserIdentity: ownerPermissions.setSticky,\n effectiveGroupIdentity: groupPermissions.setSticky,\n stickyBit: otherPermissions.setSticky,\n };\n\n return nfsFileMode;\n}\n\nexport function parseOctalRolePermissions(c: string): PosixRolePermissions {\n const rolePermissions: PosixRolePermissions = {\n read: false,\n write: false,\n execute: false,\n };\n\n const value = Number.parseInt(c);\n\n if (value < 0 || value > 7) {\n throw new Error(\"MustBeBetweenInclusive\");\n }\n\n if ((value & 4) > 0) {\n rolePermissions.read = true;\n }\n\n if ((value & 2) > 0) {\n rolePermissions.write = true;\n }\n\n if ((value & 1) > 0) {\n rolePermissions.execute = true;\n }\n\n return rolePermissions;\n}\n\nexport function toOctalRolePermissions(rolePermissions: PosixRolePermissions): string {\n let result = 0;\n if (rolePermissions.read === true) {\n result |= 4;\n }\n\n if (rolePermissions.write === true) {\n result |= 2;\n }\n\n if (rolePermissions.execute === true) {\n result |= 1;\n }\n\n return result.toString();\n}\n\nexport function toSymbolicRolePermissions(rolePermissions: PosixRolePermissions): string {\n let symbolicRolePermissions = \"\";\n\n if (rolePermissions.read === true) {\n symbolicRolePermissions += \"r\";\n } else {\n symbolicRolePermissions += \"-\";\n }\n\n if (rolePermissions.write === true) {\n symbolicRolePermissions += \"w\";\n } else {\n symbolicRolePermissions += \"-\";\n }\n\n if (rolePermissions.execute === true) {\n symbolicRolePermissions += \"x\";\n } else {\n symbolicRolePermissions += \"-\";\n }\n return symbolicRolePermissions;\n}\n\nexport function parseSymbolicRolePermissions(input: string): {\n rolePermissions: PosixRolePermissions;\n setSticky: boolean;\n} {\n if (input.length !== 3) {\n throw new Error(\"input must be 3 characters long\");\n }\n\n const rolePermissions: PosixRolePermissions = {\n read: false,\n write: false,\n execute: false,\n };\n\n let setSticky = false;\n\n // Read character\n if (input[0] === \"r\") {\n rolePermissions.read = true;\n } else if (input[0] !== \"-\") {\n throw new Error(`Invalid character in symbolic role permission: ${input[0]}`);\n }\n\n // Write character\n if (input[1] === \"w\") {\n rolePermissions.write = true;\n } else if (input[1] !== \"-\") {\n throw new Error(`Invalid character in symbolic role permission: ${input[1]}`);\n }\n\n // Execute character\n if (input[2] === \"x\" || input[2] === \"s\" || input[2] === \"t\") {\n rolePermissions.execute = true;\n if (input[2] === \"s\" || input[2] === \"t\") {\n setSticky = true;\n }\n }\n\n if (input[2] === \"S\" || input[2] === \"T\") {\n setSticky = true;\n }\n\n if (\n input[2] !== \"x\" &&\n input[2] !== \"s\" &&\n input[2] !== \"S\" &&\n input[2] !== \"t\" &&\n input[2] !== \"T\" &&\n input[2] !== \"-\"\n ) {\n throw new Error(`Invalid character in symbolic role permission: ${input[2]}`);\n }\n\n return {\n rolePermissions,\n setSticky,\n };\n}\n\ninterface UploadChecksumParametersLike {\n contentMD5?: Uint8Array;\n transactionalContentCrc64?: Uint8Array;\n contentChecksumAlgorithm?: StorageChecksumAlgorithm;\n structuredBodyType?: string;\n structuredContentLength?: number;\n}\n\ninterface UploadCheckSumBody {\n contentChecksumAlgorithm?: StorageChecksumAlgorithm;\n body: HttpRequestBody;\n contentLength: number;\n}\n\nexport async function setUploadChecksumParameters(\n body: HttpRequestBody,\n contentLength: number,\n parameters: UploadChecksumParametersLike,\n uploadOptions: UploadChecksumParametersLike,\n configContentChecksumAlgorithm?: StorageChecksumAlgorithm,\n): Promise<UploadCheckSumBody> {\n let contentChecksumAlgorithm =\n uploadOptions.contentChecksumAlgorithm ?? configContentChecksumAlgorithm;\n if (contentChecksumAlgorithm === undefined) {\n contentChecksumAlgorithm = \"Customized\";\n }\n\n if (contentChecksumAlgorithm === \"Auto\") {\n contentChecksumAlgorithm = \"StorageCrc64\";\n }\n\n let bodyInfo = undefined;\n if (contentChecksumAlgorithm === \"Customized\") {\n parameters.contentMD5 = uploadOptions.contentMD5;\n parameters.transactionalContentCrc64 = uploadOptions.transactionalContentCrc64;\n } else if (contentChecksumAlgorithm === \"StorageCrc64\") {\n await StorageCRC64Calculator.init();\n bodyInfo = await structuredMessageEncoding(body, contentLength);\n parameters.structuredBodyType = \"XSM/1.0; properties=crc64\";\n parameters.structuredContentLength = contentLength;\n }\n\n return {\n body: contentChecksumAlgorithm === \"StorageCrc64\" ? bodyInfo!.body : body,\n contentLength:\n contentChecksumAlgorithm === \"StorageCrc64\" ? bodyInfo!.encodedContentLength : contentLength,\n contentChecksumAlgorithm: contentChecksumAlgorithm,\n };\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,gCAAkC;AAoBlC,uBAA8D;AAC9D,uBAA2B;AAG3B,4BAAkE;AAsD3D,SAAS,cAAc,KAAqB;AACjD,QAAM,YAAY,IAAI,IAAI,GAAG;AAE7B,MAAI,OAAO,UAAU;AACrB,SAAO,QAAQ;AAEf,SAAO,OA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AC,MAAM,OACb,MAAM,CAAC,MAAM,OACb,MAAM,CAAC,MAAM,OACb,MAAM,CAAC,MAAM,KACb;AACA,UAAM,IAAI,MAAM,kDAAkD,MAAM,CAAC,CAAC,EAAE;AAAA,EAC9E;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,EACF;AACF;AAgBA,eAAsB,4BACpB,MACA,eACA,YACA,eACA,gCAC6B;AAC7B,MAAI,2BACF,cAAc,4BAA4B;AAC5C,MAAI,6BAA6B,QAAW;AAC1C,+BAA2B;AAAA,EAC7B;AAEA,MAAI,6BAA6B,QAAQ;AACvC,+BAA2B;AAAA,EAC7B;AAEA,MAAI,WAAW;AACf,MAAI,6BAA6B,cAAc;AAC7C,eAAW,aAAa,cAAc;AACtC,eAAW,4BAA4B,cAAc;AAAA,EACvD,WAAW,6BAA6B,gBAAgB;AACtD,UAAM,6CAAuB,KAAK;AAClC,eAAW,UAAM,iDAA0B,MAAM,aAAa;AAC9D,eAAW,qBAAqB;AAChC,eAAW,0BAA0B;AAAA,EACvC;AAEA,SAAO;AAAA,IACL,MAAM,6BAA6B,iBAAiB,SAAU,OAAO;AAAA,IACrE,eACE,6BAA6B,iBAAiB,SAAU,uBAAuB;AAAA,IACjF;AAAA,EACF;AACF;",
6
6
  "names": []
7
7
  }
@@ -1618,6 +1618,26 @@ export interface FileCreateOptions extends FileAndDirectoryCreateCommonOptions,
1618
1618
  * Lease access conditions.
1619
1619
  */
1620
1620
  leaseAccessConditions?: LeaseAccessConditions;
1621
+ /**
1622
+ * Options to indication which algorithm to use for content validation in uploading.
1623
+ */
1624
+ contentChecksumAlgorithm?: StorageChecksumAlgorithm;
1625
+ /**
1626
+ * An MD5 hash of the content. This hash is used to verify the integrity of the data during transport. When the Content-MD5 header is specified, the File service compares the hash of the content that has arrived with the header value that was sent. If the two hashes do not match, the operation will fail with error code 400 (Bad Request).
1627
+ */
1628
+ contentMD5?: Uint8Array;
1629
+ /**
1630
+ * Specifies the number of bytes being transmitted in the request body. When the content is set to NULL, the value of this header must be set to zero.
1631
+ */
1632
+ contentLength?: number;
1633
+ /**
1634
+ * Initial data.
1635
+ */
1636
+ content?: HttpRequestBody;
1637
+ /**
1638
+ * Progress updating event handler.
1639
+ */
1640
+ onProgress?: (progress: TransferProgressEvent) => void;
1621
1641
  }
1622
1642
  export interface FileProperties extends FileAndDirectorySetPropertiesCommonOptions, CommonOptions {
1623
1643
  /**
@@ -2492,6 +2512,7 @@ export declare class ShareFileClient extends StorageClient {
2492
2512
  *
2493
2513
  * ```ts snippet:ReadmeSampleDownloadFileAndConvertToString_Node
2494
2514
  * import { StorageSharedKeyCredential, ShareServiceClient } from "@azure/storage-file-share";
2515
+ * import { buffer } from "node:stream/consumers";
2495
2516
  *
2496
2517
  * const account = "<account>";
2497
2518
  * const accountKey = "<accountkey>";
@@ -2512,22 +2533,10 @@ export declare class ShareFileClient extends StorageClient {
2512
2533
  * // In Node.js, get downloaded data by accessing downloadFileResponse.readableStreamBody
2513
2534
  * const downloadFileResponse = await fileClient.download();
2514
2535
  * if (downloadFileResponse.readableStreamBody) {
2515
- * const buffer = await streamToBuffer(downloadFileResponse.readableStreamBody);
2516
- * console.log(`Downloaded file content: ${buffer.toString()}`);
2517
- * }
2518
- *
2519
- * // [Node.js only] A helper method used to read a Node.js readable stream into a Buffer
2520
- * async function streamToBuffer(readableStream: NodeJS.ReadableStream): Promise<Buffer> {
2521
- * return new Promise((resolve, reject) => {
2522
- * const chunks: Buffer[] = [];
2523
- * readableStream.on("data", (data) => {
2524
- * chunks.push(data instanceof Buffer ? data : Buffer.from(data));
2525
- * });
2526
- * readableStream.on("end", () => {
2527
- * resolve(Buffer.concat(chunks));
2528
- * });
2529
- * readableStream.on("error", reject);
2530
- * });
2536
+ * // Download the raw bytes of the file. Use `text` from "node:stream/consumers"
2537
+ * // instead if you want to read the content as a string directly.
2538
+ * const downloaded = await buffer(downloadFileResponse.readableStreamBody);
2539
+ * console.log(`Downloaded file content: ${downloaded.toString()}`);
2531
2540
  * }
2532
2541
  * ```
2533
2542
  *