@azure/storage-file-share 12.9.0-beta.1 → 12.9.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -4
- package/README.md +6 -5
- package/dist/index.js +955 -370
- package/dist/index.js.map +1 -1
- package/dist-esm/src/AccountSASSignatureValues.js +2 -2
- package/dist-esm/src/AccountSASSignatureValues.js.map +1 -1
- package/dist-esm/src/Clients.js +236 -112
- package/dist-esm/src/Clients.js.map +1 -1
- package/dist-esm/src/FileDownloadResponse.js +1 -1
- package/dist-esm/src/FileDownloadResponse.js.map +1 -1
- package/dist-esm/src/FileSASSignatureValues.js +1 -1
- package/dist-esm/src/FileSASSignatureValues.js.map +1 -1
- package/dist-esm/src/Pipeline.js +6 -6
- package/dist-esm/src/Pipeline.js.map +1 -1
- package/dist-esm/src/SASQueryParameters.js +2 -2
- package/dist-esm/src/SASQueryParameters.js.map +1 -1
- package/dist-esm/src/ShareServiceClient.js +8 -8
- package/dist-esm/src/ShareServiceClient.js.map +1 -1
- package/dist-esm/src/StorageClient.js.map +1 -1
- package/dist-esm/src/TelemetryPolicyFactory.js +1 -1
- package/dist-esm/src/TelemetryPolicyFactory.js.map +1 -1
- package/dist-esm/src/credentials/StorageSharedKeyCredential.js +1 -3
- package/dist-esm/src/credentials/StorageSharedKeyCredential.js.map +1 -1
- package/dist-esm/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/src/generated/src/models/mappers.js +246 -0
- package/dist-esm/src/generated/src/models/mappers.js.map +1 -1
- package/dist-esm/src/generated/src/models/parameters.js +103 -37
- package/dist-esm/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/src/operations/directory.js +48 -0
- package/dist-esm/src/generated/src/operations/directory.js.map +1 -1
- package/dist-esm/src/generated/src/operations/file.js +51 -7
- package/dist-esm/src/generated/src/operations/file.js.map +1 -1
- package/dist-esm/src/generated/src/storageClientContext.js +2 -2
- package/dist-esm/src/generated/src/storageClientContext.js.map +1 -1
- package/dist-esm/src/generatedModels.js.map +1 -1
- package/dist-esm/src/index.browser.js.map +1 -1
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/policies/StorageBrowserPolicy.js +1 -1
- package/dist-esm/src/policies/StorageBrowserPolicy.js.map +1 -1
- package/dist-esm/src/policies/StorageRetryPolicy.js +5 -5
- package/dist-esm/src/policies/StorageRetryPolicy.js.map +1 -1
- package/dist-esm/src/policies/StorageSharedKeyCredentialPolicy.js +4 -2
- package/dist-esm/src/policies/StorageSharedKeyCredentialPolicy.js.map +1 -1
- package/dist-esm/src/policies/TelemetryPolicy.js +1 -1
- package/dist-esm/src/policies/TelemetryPolicy.js.map +1 -1
- package/dist-esm/src/utils/Batch.js.map +1 -1
- package/dist-esm/src/utils/RetriableReadableStream.js +1 -2
- package/dist-esm/src/utils/RetriableReadableStream.js.map +1 -1
- package/dist-esm/src/utils/constants.js +8 -8
- package/dist-esm/src/utils/constants.js.map +1 -1
- package/dist-esm/src/utils/tracing.js +2 -2
- package/dist-esm/src/utils/tracing.js.map +1 -1
- package/dist-esm/src/utils/utils.common.js +23 -1
- package/dist-esm/src/utils/utils.common.js.map +1 -1
- package/package.json +41 -43
- package/{typings → types}/3.1/storage-file-share.d.ts +271 -12
- package/{typings → types}/latest/storage-file-share.d.ts +235 -13
@@ -335,16 +335,16 @@ export declare interface CommonOptions {
|
|
335
335
|
|
336
336
|
/** Parameter group */
|
337
337
|
export declare interface CopyFileSmbInfo {
|
338
|
-
/** Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key. */
|
339
|
-
filePermissionCopyMode?: PermissionCopyModeType;
|
340
|
-
/** Specifies the option to overwrite the target file if it already exists and has read-only attribute set. */
|
341
|
-
ignoreReadOnly?: boolean;
|
342
338
|
/** Specifies either the option to copy file attributes from a source file(source) to a target file or a list of attributes to set on a target file. */
|
343
339
|
fileAttributes?: string;
|
344
340
|
/** Specifies either the option to copy file creation time from a source file(source) to a target file or a time value in ISO 8601 format to set as creation time on a target file. */
|
345
341
|
fileCreationTime?: string;
|
346
342
|
/** Specifies either the option to copy file last write time from a source file(source) to a target file or a time value in ISO 8601 format to set as last write time on a target file. */
|
347
343
|
fileLastWriteTime?: string;
|
344
|
+
/** Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key. */
|
345
|
+
filePermissionCopyMode?: PermissionCopyModeType;
|
346
|
+
/** Specifies the option to overwrite the target file if it already exists and has read-only attribute set. */
|
347
|
+
ignoreReadOnly?: boolean;
|
348
348
|
/** Specifies the option to set archive attribute on a target file. True means archive attribute will be set on a target file despite attribute overrides or a source file state. */
|
349
349
|
setArchiveAttribute?: boolean;
|
350
350
|
}
|
@@ -815,6 +815,99 @@ export declare interface DirectoryProperties extends FileAndDirectorySetProperti
|
|
815
815
|
abortSignal?: AbortSignalLike;
|
816
816
|
}
|
817
817
|
|
818
|
+
/** Defines headers for Directory_rename operation. */
|
819
|
+
export declare interface DirectoryRenameHeaders {
|
820
|
+
/** The ETag contains a value which represents the version of the file, in quotes. */
|
821
|
+
etag?: string;
|
822
|
+
/** 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. */
|
823
|
+
lastModified?: Date;
|
824
|
+
/** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
|
825
|
+
requestId?: string;
|
826
|
+
/** Indicates the version of the File service used to execute the request. */
|
827
|
+
version?: string;
|
828
|
+
/** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */
|
829
|
+
date?: Date;
|
830
|
+
/** 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. */
|
831
|
+
isServerEncrypted?: boolean;
|
832
|
+
/** Key of the permission set for the file. */
|
833
|
+
filePermissionKey?: string;
|
834
|
+
/** Attributes set for the file. */
|
835
|
+
fileAttributes?: string;
|
836
|
+
/** Creation time for the file. */
|
837
|
+
fileCreationTime?: Date;
|
838
|
+
/** Last write time for the file. */
|
839
|
+
fileLastWriteTime?: Date;
|
840
|
+
/** Change time for the file. */
|
841
|
+
fileChangeTime?: Date;
|
842
|
+
/** The fileId of the file. */
|
843
|
+
fileId?: string;
|
844
|
+
/** The parent fileId of the directory. */
|
845
|
+
fileParentId?: string;
|
846
|
+
}
|
847
|
+
|
848
|
+
/**
|
849
|
+
* Options to configure the {@link ShareDirectoryClient.rename} operation.
|
850
|
+
*/
|
851
|
+
export declare interface DirectoryRenameOptions extends CommonOptions {
|
852
|
+
/**
|
853
|
+
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
|
854
|
+
* For example, use the @azure/abort-controller to create an `AbortSignal`.
|
855
|
+
*/
|
856
|
+
abortSignal?: AbortSignalLike;
|
857
|
+
/**
|
858
|
+
* Lease access condition for source file. Required if the source file has an active infinite lease.
|
859
|
+
*/
|
860
|
+
sourceLeaseAccessConditions?: LeaseAccessConditions;
|
861
|
+
/**
|
862
|
+
* Lease access condition for destination file. Required if the destination file has an active infinite lease.
|
863
|
+
*/
|
864
|
+
destinationLeaseAccessConditions?: LeaseAccessConditions;
|
865
|
+
/**
|
866
|
+
* Optional.
|
867
|
+
* Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key.
|
868
|
+
*/
|
869
|
+
copyFileSmbInfo?: CopyFileSmbInfo;
|
870
|
+
/**
|
871
|
+
* Optional.
|
872
|
+
* The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>
|
873
|
+
*/
|
874
|
+
timeoutInSeconds?: number;
|
875
|
+
/**
|
876
|
+
* Optional.
|
877
|
+
* A name-value pair to associate with a file storage object.
|
878
|
+
*/
|
879
|
+
metadata?: Metadata;
|
880
|
+
/**
|
881
|
+
* Optional.
|
882
|
+
* If specified the permission (security descriptor) shall be set for the directory/file.
|
883
|
+
*/
|
884
|
+
filePermission?: string;
|
885
|
+
/**
|
886
|
+
* Optional.
|
887
|
+
* Key of the permission to be set for the directory/file. Note: Only one of the filePermission or filePermissionKey should be specified.
|
888
|
+
*/
|
889
|
+
filePermissionKey?: string;
|
890
|
+
/**
|
891
|
+
* Optional.
|
892
|
+
* A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value.
|
893
|
+
*/
|
894
|
+
replaceIfExists?: boolean;
|
895
|
+
/**
|
896
|
+
* Optional.
|
897
|
+
* A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail.
|
898
|
+
*/
|
899
|
+
ignoreReadOnly?: boolean;
|
900
|
+
}
|
901
|
+
|
902
|
+
/** Contains response data for the rename operation. */
|
903
|
+
export declare type DirectoryRenameResponse = DirectoryRenameHeaders & {
|
904
|
+
/** The underlying HTTP response. */
|
905
|
+
_response: coreHttp.HttpResponse & {
|
906
|
+
/** The parsed HTTP response headers. */
|
907
|
+
parsedHeaders: DirectoryRenameHeaders;
|
908
|
+
};
|
909
|
+
};
|
910
|
+
|
818
911
|
/** Defines headers for Directory_setMetadata operation. */
|
819
912
|
export declare interface DirectorySetMetadataHeaders {
|
820
913
|
/** The ETag contains a value which represents the version of the directory, in quotes. */
|
@@ -1429,7 +1522,7 @@ export declare interface FileGetPropertiesHeaders {
|
|
1429
1522
|
[propertyName: string]: string;
|
1430
1523
|
};
|
1431
1524
|
/** Returns the type File. Reserved for future use. */
|
1432
|
-
fileType?:
|
1525
|
+
fileType?: string;
|
1433
1526
|
/** 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. */
|
1434
1527
|
contentLength?: number;
|
1435
1528
|
/** The content type specified for the file. The default content type is 'application/octet-stream' */
|
@@ -1779,6 +1872,98 @@ export declare interface FileProperty {
|
|
1779
1872
|
etag?: string;
|
1780
1873
|
}
|
1781
1874
|
|
1875
|
+
/** Defines headers for File_rename operation. */
|
1876
|
+
export declare interface FileRenameHeaders {
|
1877
|
+
/** The ETag contains a value which represents the version of the file, in quotes. */
|
1878
|
+
etag?: string;
|
1879
|
+
/** 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. */
|
1880
|
+
lastModified?: Date;
|
1881
|
+
/** This header uniquely identifies the request that was made and can be used for troubleshooting the request. */
|
1882
|
+
requestId?: string;
|
1883
|
+
/** Indicates the version of the File service used to execute the request. */
|
1884
|
+
version?: string;
|
1885
|
+
/** A UTC date/time value generated by the service that indicates the time at which the response was initiated. */
|
1886
|
+
date?: Date;
|
1887
|
+
/** 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. */
|
1888
|
+
isServerEncrypted?: boolean;
|
1889
|
+
/** Key of the permission set for the file. */
|
1890
|
+
filePermissionKey?: string;
|
1891
|
+
/** Attributes set for the file. */
|
1892
|
+
fileAttributes?: string;
|
1893
|
+
/** Creation time for the file. */
|
1894
|
+
fileCreationTime?: Date;
|
1895
|
+
/** Last write time for the file. */
|
1896
|
+
fileLastWriteTime?: Date;
|
1897
|
+
/** Change time for the file. */
|
1898
|
+
fileChangeTime?: Date;
|
1899
|
+
/** The fileId of the file. */
|
1900
|
+
fileId?: string;
|
1901
|
+
/** The parent fileId of the directory. */
|
1902
|
+
fileParentId?: string;
|
1903
|
+
}
|
1904
|
+
|
1905
|
+
/**
|
1906
|
+
* Options to configure the {@link ShareFileClient.rename} operation.
|
1907
|
+
*/
|
1908
|
+
export declare interface FileRenameOptions extends CommonOptions {
|
1909
|
+
/**
|
1910
|
+
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
|
1911
|
+
* For example, use the @azure/abort-controller to create an `AbortSignal`.
|
1912
|
+
*/
|
1913
|
+
abortSignal?: AbortSignalLike;
|
1914
|
+
/**
|
1915
|
+
* Lease access condition for source file. Required if the source file has an active infinite lease.
|
1916
|
+
*/
|
1917
|
+
sourceLeaseAccessConditions?: LeaseAccessConditions;
|
1918
|
+
/**
|
1919
|
+
* Lease access condition for destination file. Required if the destination file has an active infinite lease.
|
1920
|
+
*/
|
1921
|
+
destinationLeaseAccessConditions?: LeaseAccessConditions;
|
1922
|
+
/**
|
1923
|
+
* Optional.
|
1924
|
+
* Specifies the option to copy file security descriptor from source file or to set it using the value which is defined by the header value of x-ms-file-permission or x-ms-file-permission-key.
|
1925
|
+
*/
|
1926
|
+
copyFileSmbInfo?: CopyFileSmbInfo;
|
1927
|
+
/**
|
1928
|
+
* A name-value pair to associate with a file storage object.
|
1929
|
+
*/
|
1930
|
+
metadata?: Metadata;
|
1931
|
+
/**
|
1932
|
+
* Optional.
|
1933
|
+
* The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/Setting-Timeouts-for-File-Service-Operations?redirectedfrom=MSDN">Setting Timeouts for File Service Operations.</a>
|
1934
|
+
*/
|
1935
|
+
timeoutInSeconds?: number;
|
1936
|
+
/**
|
1937
|
+
* Optional.
|
1938
|
+
* If specified the permission (security descriptor) shall be set for the directory/file.
|
1939
|
+
*/
|
1940
|
+
filePermission?: string;
|
1941
|
+
/**
|
1942
|
+
* Optional.
|
1943
|
+
* Key of the permission to be set for the directory/file. Note: Only one of the filePermission or filePermissionKey should be specified.
|
1944
|
+
*/
|
1945
|
+
filePermissionKey?: string;
|
1946
|
+
/**
|
1947
|
+
* Optional.
|
1948
|
+
* A boolean value for if the destination file already exists, whether this request will overwrite the file or not. If true, the rename will succeed and will overwrite the destination file. If not provided or if false and the destination file does exist, the request will not overwrite the destination file. If provided and the destination file doesn’t exist, the rename will succeed. Note: This value does not override the x-ms-file-copy-ignore-read-only header value.
|
1949
|
+
*/
|
1950
|
+
replaceIfExists?: boolean;
|
1951
|
+
/**
|
1952
|
+
* Optional.
|
1953
|
+
* A boolean value that specifies whether the ReadOnly attribute on a preexisting destination file should be respected. If true, the rename will succeed, otherwise, a previous file at the destination with the ReadOnly attribute set will cause the rename to fail.
|
1954
|
+
*/
|
1955
|
+
ignoreReadOnly?: boolean;
|
1956
|
+
}
|
1957
|
+
|
1958
|
+
/** Contains response data for the rename operation. */
|
1959
|
+
export declare type FileRenameResponse = FileRenameHeaders & {
|
1960
|
+
/** The underlying HTTP response. */
|
1961
|
+
_response: coreHttp.HttpResponse & {
|
1962
|
+
/** The parsed HTTP response headers. */
|
1963
|
+
parsedHeaders: FileRenameHeaders;
|
1964
|
+
};
|
1965
|
+
};
|
1966
|
+
|
1782
1967
|
/**
|
1783
1968
|
* Options to configure the {@link ShareFileClient.resize} operation.
|
1784
1969
|
*/
|
@@ -2147,14 +2332,6 @@ export declare class FileSystemAttributes {
|
|
2147
2332
|
toString(): string;
|
2148
2333
|
}
|
2149
2334
|
|
2150
|
-
/**
|
2151
|
-
* Defines values for FileType.
|
2152
|
-
* Possible values include: 'File'
|
2153
|
-
* @readonly
|
2154
|
-
* @enum {string}
|
2155
|
-
*/
|
2156
|
-
export declare type FileType = "File";
|
2157
|
-
|
2158
2335
|
/** Defines headers for File_uploadRangeFromURL operation. */
|
2159
2336
|
export declare interface FileUploadRangeFromURLHeaders {
|
2160
2337
|
/** The ETag contains a value which represents the version of the file, in quotes. */
|
@@ -3917,6 +4094,27 @@ export declare class ShareDirectoryClient extends StorageClient {
|
|
3917
4094
|
* @param options -
|
3918
4095
|
*/
|
3919
4096
|
forceCloseHandle(handleId: string, options?: DirectoryForceCloseHandlesOptions): Promise<DirectoryForceCloseHandlesResponse>;
|
4097
|
+
/**
|
4098
|
+
* Renames a directory.
|
4099
|
+
* This API only supports renaming a directory in the same share.
|
4100
|
+
*
|
4101
|
+
* @param destinationPath - Specifies the destination path to rename to. The path will be encoded to put into a URL to specify the destination.
|
4102
|
+
* @param options - Options for the renaming operation.
|
4103
|
+
* @returns Response data for the file renaming operation.
|
4104
|
+
*
|
4105
|
+
* Example usage:
|
4106
|
+
*
|
4107
|
+
* ```js
|
4108
|
+
*
|
4109
|
+
* // Rename the directory
|
4110
|
+
* await diretoryClient.rename(destinationPath);
|
4111
|
+
* console.log("Renamed directory successfully!");
|
4112
|
+
* ```
|
4113
|
+
*/
|
4114
|
+
rename(destinationPath: string, options?: DirectoryRenameOptions): Promise<{
|
4115
|
+
destinationDirectoryClient: ShareDirectoryClient;
|
4116
|
+
directoryRenameResponse: DirectoryRenameResponse;
|
4117
|
+
}>;
|
3920
4118
|
}
|
3921
4119
|
|
3922
4120
|
/**
|
@@ -4472,6 +4670,27 @@ export declare class ShareFileClient extends StorageClient {
|
|
4472
4670
|
* @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token.
|
4473
4671
|
*/
|
4474
4672
|
generateSasUrl(options: FileGenerateSasUrlOptions): string;
|
4673
|
+
/**
|
4674
|
+
* Renames a file.
|
4675
|
+
* This API only supports renaming a file in the same share.
|
4676
|
+
*
|
4677
|
+
* @param destinationPath - Specifies the destination path to rename to. The path will be encoded to put into a URL to specify the destination.
|
4678
|
+
* @param options - Options for the renaming operation.
|
4679
|
+
* @returns Response data for the file renaming operation.
|
4680
|
+
*
|
4681
|
+
* Example usage:
|
4682
|
+
*
|
4683
|
+
* ```js
|
4684
|
+
*
|
4685
|
+
* // Rename the file
|
4686
|
+
* await fileClient.rename(destinationPath);
|
4687
|
+
* console.log("Renamed file successfully!");
|
4688
|
+
* ```
|
4689
|
+
*/
|
4690
|
+
rename(destinationPath: string, options?: FileRenameOptions): Promise<{
|
4691
|
+
destinationFileClient: ShareFileClient;
|
4692
|
+
fileRenameResponse: FileRenameResponse;
|
4693
|
+
}>;
|
4475
4694
|
}
|
4476
4695
|
|
4477
4696
|
/** The list of file ranges */
|
@@ -4605,6 +4824,8 @@ export declare interface ShareGetPropertiesHeaders {
|
|
4605
4824
|
provisionedEgressMBps?: number;
|
4606
4825
|
/** Returns the current share next allowed quota downgrade time. */
|
4607
4826
|
nextAllowedQuotaDowngradeTime?: Date;
|
4827
|
+
/** Returns the current share provisioned bandwidth in megabits per second. */
|
4828
|
+
provisionedBandwidthMibps?: number;
|
4608
4829
|
/** When a share is leased, specifies whether the lease is of infinite or fixed duration. */
|
4609
4830
|
leaseDuration?: LeaseDurationType;
|
4610
4831
|
/** Lease state of the share. */
|
@@ -4839,6 +5060,7 @@ export declare interface SharePropertiesInternal {
|
|
4839
5060
|
provisionedIops?: number;
|
4840
5061
|
provisionedIngressMBps?: number;
|
4841
5062
|
provisionedEgressMBps?: number;
|
5063
|
+
provisionedBandwidthMiBps?: number;
|
4842
5064
|
nextAllowedQuotaDowngradeTime?: Date;
|
4843
5065
|
deletedTime?: Date;
|
4844
5066
|
remainingRetentionDays?: number;
|