@azure/storage-file-share 12.13.0-beta.1 → 12.14.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +201 -70
- package/dist/index.js.map +1 -1
- package/dist-esm/src/Clients.js +52 -46
- package/dist-esm/src/Clients.js.map +1 -1
- package/dist-esm/src/Pipeline.js +7 -4
- package/dist-esm/src/Pipeline.js.map +1 -1
- package/dist-esm/src/ShareServiceClient.js +7 -5
- package/dist-esm/src/ShareServiceClient.js.map +1 -1
- package/dist-esm/src/generated/src/models/index.js.map +1 -1
- package/dist-esm/src/generated/src/models/parameters.js +31 -1
- package/dist-esm/src/generated/src/models/parameters.js.map +1 -1
- package/dist-esm/src/generated/src/operations/directory.js +29 -4
- package/dist-esm/src/generated/src/operations/directory.js.map +1 -1
- package/dist-esm/src/generated/src/operations/file.js +49 -8
- package/dist-esm/src/generated/src/operations/file.js.map +1 -1
- package/dist-esm/src/generated/src/operations/share.js +3 -1
- package/dist-esm/src/generated/src/operations/share.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 +5 -1
- package/dist-esm/src/generatedModels.js.map +1 -1
- package/dist-esm/src/models.js.map +1 -1
- package/dist-esm/src/utils/constants.js +6 -2
- package/dist-esm/src/utils/constants.js.map +1 -1
- package/dist-esm/src/utils/utils.common.js +12 -1
- package/dist-esm/src/utils/utils.common.js.map +1 -1
- package/package.json +3 -2
- package/types/3.1/storage-file-share.d.ts +61 -12
- package/types/latest/storage-file-share.d.ts +65 -12
@@ -19,6 +19,7 @@ import { RequestPolicyFactory } from '@azure/core-http';
|
|
19
19
|
import { RequestPolicyOptions } from '@azure/core-http';
|
20
20
|
import { RestError } from '@azure/core-http';
|
21
21
|
import { ServiceClientOptions } from '@azure/core-http';
|
22
|
+
import { TokenCredential } from '@azure/core-http';
|
22
23
|
import { TransferProgressEvent } from '@azure/core-http';
|
23
24
|
import { UserAgentOptions } from '@azure/core-http';
|
24
25
|
import { WebResource } from '@azure/core-http';
|
@@ -1276,6 +1277,10 @@ export declare interface FileDownloadOptionalParams extends coreHttp.OperationOp
|
|
1276
1277
|
leaseAccessConditions?: LeaseAccessConditions;
|
1277
1278
|
/** 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> */
|
1278
1279
|
timeoutInSeconds?: number;
|
1280
|
+
/** Valid value is backup */
|
1281
|
+
fileRequestIntent?: ShareTokenIntent;
|
1282
|
+
/** If true, the trailing dot will not be trimmed from the target URI. */
|
1283
|
+
allowTrailingDot?: boolean;
|
1279
1284
|
/** Return file data only from the specified byte range. */
|
1280
1285
|
range?: string;
|
1281
1286
|
/** When this header is set to true and specified together with the Range header, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size. */
|
@@ -2272,6 +2277,10 @@ export declare interface FileUploadRangeFromURLOptionalParams extends coreHttp.O
|
|
2272
2277
|
sourceModifiedAccessConditions?: SourceModifiedAccessConditions;
|
2273
2278
|
/** 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> */
|
2274
2279
|
timeoutInSeconds?: number;
|
2280
|
+
/** If true, the trailing dot will not be trimmed from the target URI. */
|
2281
|
+
allowTrailingDot?: boolean;
|
2282
|
+
/** If true, the trailing dot will not be trimmed from the source URI. */
|
2283
|
+
allowSourceTrailingDot?: boolean;
|
2275
2284
|
/** If the file last write time should be preserved or overwritten */
|
2276
2285
|
fileLastWrittenMode?: FileLastWrittenMode;
|
2277
2286
|
/** Bytes of source data in the specified range. */
|
@@ -2481,6 +2490,10 @@ export { HttpHeaders };
|
|
2481
2490
|
export { HttpOperationResponse };
|
2482
2491
|
export { HttpRequestBody };
|
2483
2492
|
export { IHttpClient };
|
2493
|
+
/** Known values of {@link ShareTokenIntent} that the service accepts. */
|
2494
|
+
export declare enum KnownShareTokenIntent {
|
2495
|
+
Backup = "backup"
|
2496
|
+
}
|
2484
2497
|
/** Parameter group */
|
2485
2498
|
export declare interface LeaseAccessConditions {
|
2486
2499
|
/** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */
|
@@ -2624,7 +2637,7 @@ export declare interface Metrics {
|
|
2624
2637
|
* @param pipelineOptions - Optional. Options.
|
2625
2638
|
* @returns A new Pipeline object.
|
2626
2639
|
*/
|
2627
|
-
export declare function newPipeline(credential?: Credential_2, pipelineOptions?: StoragePipelineOptions): Pipeline;
|
2640
|
+
export declare function newPipeline(credential?: Credential_2 | TokenCredential, pipelineOptions?: StoragePipelineOptions): Pipeline;
|
2628
2641
|
/** Defines values for PermissionCopyModeType. */
|
2629
2642
|
export declare type PermissionCopyModeType = "source" | "override";
|
2630
2643
|
/**
|
@@ -2667,6 +2680,10 @@ export declare interface PipelineOptions {
|
|
2667
2680
|
* Optional. Configures the HTTP client to send requests and receive responses.
|
2668
2681
|
*/
|
2669
2682
|
httpClient?: IHttpClient;
|
2683
|
+
/**
|
2684
|
+
* Intent of using TokenCredential in file requests.
|
2685
|
+
*/
|
2686
|
+
shareTokenIntent?: ShareTokenIntent;
|
2670
2687
|
}
|
2671
2688
|
/**
|
2672
2689
|
* Range for Service Operations.
|
@@ -3012,6 +3029,7 @@ export declare class ShareClient extends StorageClient {
|
|
3012
3029
|
*/
|
3013
3030
|
private context;
|
3014
3031
|
private _name;
|
3032
|
+
private shareClientConfig?;
|
3015
3033
|
/*
|
3016
3034
|
* The name of the share
|
3017
3035
|
*/
|
@@ -3038,7 +3056,7 @@ export declare class ShareClient extends StorageClient {
|
|
3038
3056
|
* If not specified, AnonymousCredential is used.
|
3039
3057
|
* @param options - Optional. Options to configure the HTTP pipeline.
|
3040
3058
|
*/
|
3041
|
-
constructor(url: string, credential?: Credential_2, options?:
|
3059
|
+
constructor(url: string, credential?: Credential_2 | TokenCredential, options?: ShareClientOptions);
|
3042
3060
|
/**
|
3043
3061
|
* Creates an instance of ShareClient.
|
3044
3062
|
*
|
@@ -3049,7 +3067,7 @@ export declare class ShareClient extends StorageClient {
|
|
3049
3067
|
* @param pipeline - Call newPipeline() to create a default
|
3050
3068
|
* pipeline, or provide a customized pipeline.
|
3051
3069
|
*/
|
3052
|
-
constructor(url: string, pipeline: Pipeline);
|
3070
|
+
constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);
|
3053
3071
|
/**
|
3054
3072
|
* Creates a new ShareClient object identical to the source but with the specified snapshot timestamp.
|
3055
3073
|
* Provide "" will remove the snapshot and return a URL to the base share.
|
@@ -3291,6 +3309,24 @@ export declare class ShareClient extends StorageClient {
|
|
3291
3309
|
*/
|
3292
3310
|
generateSasUrl(options: ShareGenerateSasUrlOptions): string;
|
3293
3311
|
}
|
3312
|
+
export declare interface ShareClientConfig {
|
3313
|
+
/**
|
3314
|
+
* The Files OAuth over REST feature requires special permissions to be included in the role definition to use
|
3315
|
+
* These special permissions will give privileged access to file share data -
|
3316
|
+
* It will allow users to bypass file/directory level ACL/NTFS permissions and get read/write access to file share data
|
3317
|
+
* Since this additional permission can be unintended and to prevent unintended and over privileged access,
|
3318
|
+
* additional checks has been implemented that requires users to explicitly indicate their intent to use these additional permissions.
|
3319
|
+
* This is done using the fileRequestIntent option.
|
3320
|
+
* Currently, the only value that the header supports is 'backup'
|
3321
|
+
* Any user who wishes to use Files OAuth over REST feature has to call the API with the intent header. If the API is not called with the intent header, any subsequent data operation requests will be denied.
|
3322
|
+
*/
|
3323
|
+
fileRequestIntent?: ShareTokenIntent;
|
3324
|
+
/** If true, the trailing dot will not be trimmed from the target URI. */
|
3325
|
+
allowTrailingDot?: boolean;
|
3326
|
+
/** If true, the trailing dot will not be trimmed from the source URI. */
|
3327
|
+
allowSourceTrailingDot?: boolean;
|
3328
|
+
}
|
3329
|
+
export declare type ShareClientOptions = StoragePipelineOptions & ShareClientConfig;
|
3294
3330
|
/** Defines headers for Share_create operation. */
|
3295
3331
|
export declare interface ShareCreateHeaders {
|
3296
3332
|
/** The ETag contains a value which represents the version of the share, in quotes. */
|
@@ -3489,6 +3525,7 @@ export declare class ShareDirectoryClient extends StorageClient {
|
|
3489
3525
|
private _shareName;
|
3490
3526
|
private _path;
|
3491
3527
|
private _name;
|
3528
|
+
private shareClientConfig?;
|
3492
3529
|
/*
|
3493
3530
|
* The share name corresponding to this directory client
|
3494
3531
|
*/
|
@@ -3516,7 +3553,7 @@ export declare class ShareDirectoryClient extends StorageClient {
|
|
3516
3553
|
* If not specified, AnonymousCredential is used.
|
3517
3554
|
* @param options - Optional. Options to configure the HTTP pipeline.
|
3518
3555
|
*/
|
3519
|
-
constructor(url: string, credential?: Credential_2, options?:
|
3556
|
+
constructor(url: string, credential?: Credential_2 | TokenCredential, options?: ShareClientOptions);
|
3520
3557
|
/**
|
3521
3558
|
* Creates an instance of DirectoryClient.
|
3522
3559
|
*
|
@@ -3531,7 +3568,7 @@ export declare class ShareDirectoryClient extends StorageClient {
|
|
3531
3568
|
* @param pipeline - Call newPipeline() to create a default
|
3532
3569
|
* pipeline, or provide a customized pipeline.
|
3533
3570
|
*/
|
3534
|
-
constructor(url: string, pipeline: Pipeline);
|
3571
|
+
constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);
|
3535
3572
|
/**
|
3536
3573
|
* Creates a new directory under the specified share or parent directory.
|
3537
3574
|
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-directory
|
@@ -3999,6 +4036,7 @@ export declare class ShareFileClient extends StorageClient {
|
|
3999
4036
|
private _shareName;
|
4000
4037
|
private _path;
|
4001
4038
|
private _name;
|
4039
|
+
private shareClientConfig?;
|
4002
4040
|
/*
|
4003
4041
|
* The share name corresponding to this file client
|
4004
4042
|
*/
|
@@ -4022,11 +4060,11 @@ export declare class ShareFileClient extends StorageClient {
|
|
4022
4060
|
* Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
|
4023
4061
|
* However, if a file or directory name includes %, file or directory name must be encoded in the URL.
|
4024
4062
|
* Such as a file named "myfile%", the URL should be "https://myaccount.file.core.windows.net/myshare/mydirectory/myfile%25".
|
4025
|
-
* @param credential - Such as AnonymousCredential or
|
4063
|
+
* @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or TokenCredential,
|
4026
4064
|
* If not specified, AnonymousCredential is used.
|
4027
4065
|
* @param options - Optional. Options to configure the HTTP pipeline.
|
4028
4066
|
*/
|
4029
|
-
constructor(url: string, credential?: Credential_2, options?:
|
4067
|
+
constructor(url: string, credential?: Credential_2 | TokenCredential, options?: ShareClientOptions);
|
4030
4068
|
/**
|
4031
4069
|
* Creates an instance of ShareFileClient.
|
4032
4070
|
*
|
@@ -4041,7 +4079,7 @@ export declare class ShareFileClient extends StorageClient {
|
|
4041
4079
|
* @param pipeline - Call newPipeline() to create a default
|
4042
4080
|
* pipeline, or provide a customized pipeline.
|
4043
4081
|
*/
|
4044
|
-
constructor(url: string, pipeline: Pipeline);
|
4082
|
+
constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);
|
4045
4083
|
/**
|
4046
4084
|
* Creates a new ShareFileClient object identical to the source but with the specified share snapshot timestamp.
|
4047
4085
|
* Provide "" will remove the snapshot and return a URL to the base ShareFileClient.
|
@@ -4984,6 +5022,7 @@ export declare class ShareServiceClient extends StorageClient {
|
|
4984
5022
|
* serviceContext provided by protocol layer.
|
4985
5023
|
*/
|
4986
5024
|
private serviceContext;
|
5025
|
+
private shareClientConfig?;
|
4987
5026
|
/**
|
4988
5027
|
*
|
4989
5028
|
* Creates an instance of ShareServiceClient from connection string.
|
@@ -4997,18 +5036,18 @@ export declare class ShareServiceClient extends StorageClient {
|
|
4997
5036
|
* @param options - Options to configure the HTTP pipeline.
|
4998
5037
|
* @returns A new ShareServiceClient from the given connection string.
|
4999
5038
|
*/
|
5000
|
-
static fromConnectionString(connectionString: string, options?:
|
5039
|
+
static fromConnectionString(connectionString: string, options?: ShareClientOptions): ShareServiceClient;
|
5001
5040
|
/**
|
5002
5041
|
* Creates an instance of ShareServiceClient.
|
5003
5042
|
*
|
5004
5043
|
* @param url - A URL string pointing to Azure Storage file service, such as
|
5005
5044
|
* "https://myaccount.file.core.windows.net". You can Append a SAS
|
5006
5045
|
* if using AnonymousCredential, such as "https://myaccount.file.core.windows.net?sasString".
|
5007
|
-
* @param credential - Such as AnonymousCredential or
|
5046
|
+
* @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or TokenCredential.
|
5008
5047
|
* If not specified, AnonymousCredential is used.
|
5009
5048
|
* @param options - Optional. Options to configure the HTTP pipeline.
|
5010
5049
|
*/
|
5011
|
-
constructor(url: string, credential?: Credential_2, options?:
|
5050
|
+
constructor(url: string, credential?: Credential_2 | TokenCredential, options?: ShareClientOptions);
|
5012
5051
|
/**
|
5013
5052
|
* Creates an instance of ShareServiceClient.
|
5014
5053
|
*
|
@@ -5017,8 +5056,10 @@ export declare class ShareServiceClient extends StorageClient {
|
|
5017
5056
|
* if using AnonymousCredential, such as "https://myaccount.file.core.windows.net?sasString".
|
5018
5057
|
* @param pipeline - Call newPipeline() to create a default
|
5019
5058
|
* pipeline, or provide a customized pipeline.
|
5059
|
+
* @param options - Optional. Options to configure the HTTP pipeline.
|
5060
|
+
* @param fileRequestIntent - Optional. File request intent.
|
5020
5061
|
*/
|
5021
|
-
constructor(url: string, pipeline: Pipeline);
|
5062
|
+
constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);
|
5022
5063
|
/**
|
5023
5064
|
* Creates a ShareClient object.
|
5024
5065
|
*
|
@@ -5364,6 +5405,14 @@ export declare interface ShareStats {
|
|
5364
5405
|
/** The approximate size of the data stored in bytes. Note that this value may not include all recently created or recently resized files. */
|
5365
5406
|
shareUsageBytes: number;
|
5366
5407
|
}
|
5408
|
+
/**
|
5409
|
+
* Defines values for ShareTokenIntent. \
|
5410
|
+
* {@link KnownShareTokenIntent} can be used interchangeably with ShareTokenIntent,
|
5411
|
+
* this enum contains the known values that the service supports.
|
5412
|
+
* ### Know values supported by the service
|
5413
|
+
* **backup**
|
5414
|
+
*/
|
5415
|
+
export declare type ShareTokenIntent = string;
|
5367
5416
|
/**
|
5368
5417
|
* Signed Identifier
|
5369
5418
|
*/
|
@@ -20,6 +20,7 @@ import { RequestPolicyFactory } from '@azure/core-http';
|
|
20
20
|
import { RequestPolicyOptions } from '@azure/core-http';
|
21
21
|
import { RestError } from '@azure/core-http';
|
22
22
|
import { ServiceClientOptions } from '@azure/core-http';
|
23
|
+
import { TokenCredential } from '@azure/core-http';
|
23
24
|
import { TransferProgressEvent } from '@azure/core-http';
|
24
25
|
import { UserAgentOptions } from '@azure/core-http';
|
25
26
|
import { WebResource } from '@azure/core-http';
|
@@ -1348,6 +1349,10 @@ export declare interface FileDownloadOptionalParams extends coreHttp.OperationOp
|
|
1348
1349
|
leaseAccessConditions?: LeaseAccessConditions;
|
1349
1350
|
/** 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> */
|
1350
1351
|
timeoutInSeconds?: number;
|
1352
|
+
/** Valid value is backup */
|
1353
|
+
fileRequestIntent?: ShareTokenIntent;
|
1354
|
+
/** If true, the trailing dot will not be trimmed from the target URI. */
|
1355
|
+
allowTrailingDot?: boolean;
|
1351
1356
|
/** Return file data only from the specified byte range. */
|
1352
1357
|
range?: string;
|
1353
1358
|
/** When this header is set to true and specified together with the Range header, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size. */
|
@@ -2391,6 +2396,10 @@ export declare interface FileUploadRangeFromURLOptionalParams extends coreHttp.O
|
|
2391
2396
|
sourceModifiedAccessConditions?: SourceModifiedAccessConditions;
|
2392
2397
|
/** 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> */
|
2393
2398
|
timeoutInSeconds?: number;
|
2399
|
+
/** If true, the trailing dot will not be trimmed from the target URI. */
|
2400
|
+
allowTrailingDot?: boolean;
|
2401
|
+
/** If true, the trailing dot will not be trimmed from the source URI. */
|
2402
|
+
allowSourceTrailingDot?: boolean;
|
2394
2403
|
/** If the file last write time should be preserved or overwritten */
|
2395
2404
|
fileLastWrittenMode?: FileLastWrittenMode;
|
2396
2405
|
/** Bytes of source data in the specified range. */
|
@@ -2615,6 +2624,11 @@ export { HttpRequestBody }
|
|
2615
2624
|
|
2616
2625
|
export { IHttpClient }
|
2617
2626
|
|
2627
|
+
/** Known values of {@link ShareTokenIntent} that the service accepts. */
|
2628
|
+
export declare enum KnownShareTokenIntent {
|
2629
|
+
Backup = "backup"
|
2630
|
+
}
|
2631
|
+
|
2618
2632
|
/** Parameter group */
|
2619
2633
|
export declare interface LeaseAccessConditions {
|
2620
2634
|
/** If specified, the operation only succeeds if the resource's lease is active and matches this ID. */
|
@@ -2773,7 +2787,7 @@ export declare interface Metrics {
|
|
2773
2787
|
* @param pipelineOptions - Optional. Options.
|
2774
2788
|
* @returns A new Pipeline object.
|
2775
2789
|
*/
|
2776
|
-
export declare function newPipeline(credential?: Credential_2, pipelineOptions?: StoragePipelineOptions): Pipeline;
|
2790
|
+
export declare function newPipeline(credential?: Credential_2 | TokenCredential, pipelineOptions?: StoragePipelineOptions): Pipeline;
|
2777
2791
|
|
2778
2792
|
/** Defines values for PermissionCopyModeType. */
|
2779
2793
|
export declare type PermissionCopyModeType = "source" | "override";
|
@@ -2819,6 +2833,10 @@ export declare interface PipelineOptions {
|
|
2819
2833
|
* Optional. Configures the HTTP client to send requests and receive responses.
|
2820
2834
|
*/
|
2821
2835
|
httpClient?: IHttpClient;
|
2836
|
+
/**
|
2837
|
+
* Intent of using TokenCredential in file requests.
|
2838
|
+
*/
|
2839
|
+
shareTokenIntent?: ShareTokenIntent;
|
2822
2840
|
}
|
2823
2841
|
|
2824
2842
|
/**
|
@@ -3188,6 +3206,7 @@ export declare class ShareClient extends StorageClient {
|
|
3188
3206
|
*/
|
3189
3207
|
private context;
|
3190
3208
|
private _name;
|
3209
|
+
private shareClientConfig?;
|
3191
3210
|
/**
|
3192
3211
|
* The name of the share
|
3193
3212
|
*/
|
@@ -3214,7 +3233,7 @@ export declare class ShareClient extends StorageClient {
|
|
3214
3233
|
* If not specified, AnonymousCredential is used.
|
3215
3234
|
* @param options - Optional. Options to configure the HTTP pipeline.
|
3216
3235
|
*/
|
3217
|
-
constructor(url: string, credential?: Credential_2, options?:
|
3236
|
+
constructor(url: string, credential?: Credential_2 | TokenCredential, options?: ShareClientOptions);
|
3218
3237
|
/**
|
3219
3238
|
* Creates an instance of ShareClient.
|
3220
3239
|
*
|
@@ -3225,7 +3244,7 @@ export declare class ShareClient extends StorageClient {
|
|
3225
3244
|
* @param pipeline - Call newPipeline() to create a default
|
3226
3245
|
* pipeline, or provide a customized pipeline.
|
3227
3246
|
*/
|
3228
|
-
constructor(url: string, pipeline: Pipeline);
|
3247
|
+
constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);
|
3229
3248
|
/**
|
3230
3249
|
* Creates a new ShareClient object identical to the source but with the specified snapshot timestamp.
|
3231
3250
|
* Provide "" will remove the snapshot and return a URL to the base share.
|
@@ -3468,6 +3487,26 @@ export declare class ShareClient extends StorageClient {
|
|
3468
3487
|
generateSasUrl(options: ShareGenerateSasUrlOptions): string;
|
3469
3488
|
}
|
3470
3489
|
|
3490
|
+
export declare interface ShareClientConfig {
|
3491
|
+
/**
|
3492
|
+
* The Files OAuth over REST feature requires special permissions to be included in the role definition to use
|
3493
|
+
* These special permissions will give privileged access to file share data -
|
3494
|
+
* It will allow users to bypass file/directory level ACL/NTFS permissions and get read/write access to file share data
|
3495
|
+
* Since this additional permission can be unintended and to prevent unintended and over privileged access,
|
3496
|
+
* additional checks has been implemented that requires users to explicitly indicate their intent to use these additional permissions.
|
3497
|
+
* This is done using the fileRequestIntent option.
|
3498
|
+
* Currently, the only value that the header supports is 'backup'
|
3499
|
+
* Any user who wishes to use Files OAuth over REST feature has to call the API with the intent header. If the API is not called with the intent header, any subsequent data operation requests will be denied.
|
3500
|
+
*/
|
3501
|
+
fileRequestIntent?: ShareTokenIntent;
|
3502
|
+
/** If true, the trailing dot will not be trimmed from the target URI. */
|
3503
|
+
allowTrailingDot?: boolean;
|
3504
|
+
/** If true, the trailing dot will not be trimmed from the source URI. */
|
3505
|
+
allowSourceTrailingDot?: boolean;
|
3506
|
+
}
|
3507
|
+
|
3508
|
+
export declare type ShareClientOptions = StoragePipelineOptions & ShareClientConfig;
|
3509
|
+
|
3471
3510
|
/** Defines headers for Share_create operation. */
|
3472
3511
|
export declare interface ShareCreateHeaders {
|
3473
3512
|
/** The ETag contains a value which represents the version of the share, in quotes. */
|
@@ -3680,6 +3719,7 @@ export declare class ShareDirectoryClient extends StorageClient {
|
|
3680
3719
|
private _shareName;
|
3681
3720
|
private _path;
|
3682
3721
|
private _name;
|
3722
|
+
private shareClientConfig?;
|
3683
3723
|
/**
|
3684
3724
|
* The share name corresponding to this directory client
|
3685
3725
|
*/
|
@@ -3707,7 +3747,7 @@ export declare class ShareDirectoryClient extends StorageClient {
|
|
3707
3747
|
* If not specified, AnonymousCredential is used.
|
3708
3748
|
* @param options - Optional. Options to configure the HTTP pipeline.
|
3709
3749
|
*/
|
3710
|
-
constructor(url: string, credential?: Credential_2, options?:
|
3750
|
+
constructor(url: string, credential?: Credential_2 | TokenCredential, options?: ShareClientOptions);
|
3711
3751
|
/**
|
3712
3752
|
* Creates an instance of DirectoryClient.
|
3713
3753
|
*
|
@@ -3722,7 +3762,7 @@ export declare class ShareDirectoryClient extends StorageClient {
|
|
3722
3762
|
* @param pipeline - Call newPipeline() to create a default
|
3723
3763
|
* pipeline, or provide a customized pipeline.
|
3724
3764
|
*/
|
3725
|
-
constructor(url: string, pipeline: Pipeline);
|
3765
|
+
constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);
|
3726
3766
|
/**
|
3727
3767
|
* Creates a new directory under the specified share or parent directory.
|
3728
3768
|
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/create-directory
|
@@ -4192,6 +4232,7 @@ export declare class ShareFileClient extends StorageClient {
|
|
4192
4232
|
private _shareName;
|
4193
4233
|
private _path;
|
4194
4234
|
private _name;
|
4235
|
+
private shareClientConfig?;
|
4195
4236
|
/**
|
4196
4237
|
* The share name corresponding to this file client
|
4197
4238
|
*/
|
@@ -4215,11 +4256,11 @@ export declare class ShareFileClient extends StorageClient {
|
|
4215
4256
|
* Encoded URL string will NOT be escaped twice, only special characters in URL path will be escaped.
|
4216
4257
|
* However, if a file or directory name includes %, file or directory name must be encoded in the URL.
|
4217
4258
|
* Such as a file named "myfile%", the URL should be "https://myaccount.file.core.windows.net/myshare/mydirectory/myfile%25".
|
4218
|
-
* @param credential - Such as AnonymousCredential or
|
4259
|
+
* @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or TokenCredential,
|
4219
4260
|
* If not specified, AnonymousCredential is used.
|
4220
4261
|
* @param options - Optional. Options to configure the HTTP pipeline.
|
4221
4262
|
*/
|
4222
|
-
constructor(url: string, credential?: Credential_2, options?:
|
4263
|
+
constructor(url: string, credential?: Credential_2 | TokenCredential, options?: ShareClientOptions);
|
4223
4264
|
/**
|
4224
4265
|
* Creates an instance of ShareFileClient.
|
4225
4266
|
*
|
@@ -4234,7 +4275,7 @@ export declare class ShareFileClient extends StorageClient {
|
|
4234
4275
|
* @param pipeline - Call newPipeline() to create a default
|
4235
4276
|
* pipeline, or provide a customized pipeline.
|
4236
4277
|
*/
|
4237
|
-
constructor(url: string, pipeline: Pipeline);
|
4278
|
+
constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);
|
4238
4279
|
/**
|
4239
4280
|
* Creates a new ShareFileClient object identical to the source but with the specified share snapshot timestamp.
|
4240
4281
|
* Provide "" will remove the snapshot and return a URL to the base ShareFileClient.
|
@@ -5204,6 +5245,7 @@ export declare class ShareServiceClient extends StorageClient {
|
|
5204
5245
|
* serviceContext provided by protocol layer.
|
5205
5246
|
*/
|
5206
5247
|
private serviceContext;
|
5248
|
+
private shareClientConfig?;
|
5207
5249
|
/**
|
5208
5250
|
*
|
5209
5251
|
* Creates an instance of ShareServiceClient from connection string.
|
@@ -5217,18 +5259,18 @@ export declare class ShareServiceClient extends StorageClient {
|
|
5217
5259
|
* @param options - Options to configure the HTTP pipeline.
|
5218
5260
|
* @returns A new ShareServiceClient from the given connection string.
|
5219
5261
|
*/
|
5220
|
-
static fromConnectionString(connectionString: string, options?:
|
5262
|
+
static fromConnectionString(connectionString: string, options?: ShareClientOptions): ShareServiceClient;
|
5221
5263
|
/**
|
5222
5264
|
* Creates an instance of ShareServiceClient.
|
5223
5265
|
*
|
5224
5266
|
* @param url - A URL string pointing to Azure Storage file service, such as
|
5225
5267
|
* "https://myaccount.file.core.windows.net". You can Append a SAS
|
5226
5268
|
* if using AnonymousCredential, such as "https://myaccount.file.core.windows.net?sasString".
|
5227
|
-
* @param credential - Such as AnonymousCredential or
|
5269
|
+
* @param credential - Such as AnonymousCredential, StorageSharedKeyCredential or TokenCredential.
|
5228
5270
|
* If not specified, AnonymousCredential is used.
|
5229
5271
|
* @param options - Optional. Options to configure the HTTP pipeline.
|
5230
5272
|
*/
|
5231
|
-
constructor(url: string, credential?: Credential_2, options?:
|
5273
|
+
constructor(url: string, credential?: Credential_2 | TokenCredential, options?: ShareClientOptions);
|
5232
5274
|
/**
|
5233
5275
|
* Creates an instance of ShareServiceClient.
|
5234
5276
|
*
|
@@ -5237,8 +5279,10 @@ export declare class ShareServiceClient extends StorageClient {
|
|
5237
5279
|
* if using AnonymousCredential, such as "https://myaccount.file.core.windows.net?sasString".
|
5238
5280
|
* @param pipeline - Call newPipeline() to create a default
|
5239
5281
|
* pipeline, or provide a customized pipeline.
|
5282
|
+
* @param options - Optional. Options to configure the HTTP pipeline.
|
5283
|
+
* @param fileRequestIntent - Optional. File request intent.
|
5240
5284
|
*/
|
5241
|
-
constructor(url: string, pipeline: Pipeline);
|
5285
|
+
constructor(url: string, pipeline: Pipeline, options?: ShareClientConfig);
|
5242
5286
|
/**
|
5243
5287
|
* Creates a ShareClient object.
|
5244
5288
|
*
|
@@ -5599,6 +5643,15 @@ export declare interface ShareStats {
|
|
5599
5643
|
shareUsageBytes: number;
|
5600
5644
|
}
|
5601
5645
|
|
5646
|
+
/**
|
5647
|
+
* Defines values for ShareTokenIntent. \
|
5648
|
+
* {@link KnownShareTokenIntent} can be used interchangeably with ShareTokenIntent,
|
5649
|
+
* this enum contains the known values that the service supports.
|
5650
|
+
* ### Know values supported by the service
|
5651
|
+
* **backup**
|
5652
|
+
*/
|
5653
|
+
export declare type ShareTokenIntent = string;
|
5654
|
+
|
5602
5655
|
/**
|
5603
5656
|
* Signed Identifier
|
5604
5657
|
*/
|