/
models.ts
1677 lines (1524 loc) · 44.6 KB
/
models.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { AbortSignalLike } from "@azure/abort-controller";
import { HttpResponse, TransferProgressEvent } from "@azure/core-http";
import {
LeaseAccessConditions,
ModifiedAccessConditions as ModifiedAccessConditionsModel,
UserDelegationKeyModel,
BlobQueryArrowConfiguration,
ServiceRenameContainerOptions,
ContainerRenameResponse,
ContainerUndeleteResponse
} from "@azure/storage-blob";
export type ModifiedAccessConditions = Omit<ModifiedAccessConditionsModel, "ifTags">;
/**
* Options to query file with Apache Arrow format. Only valid for {@link FileQueryOptions.outputTextConfiguration}.
*
* @export
* @interface FileQueryArrowConfiguration
*/
export type FileQueryArrowConfiguration = BlobQueryArrowConfiguration;
/**
* Options to configure {@link DataLakeServiceClient.renameFileSystem}.
*
* @export
* @interface ServiceRenameFileSystemOptions
*/
export type ServiceRenameFileSystemOptions = ServiceRenameContainerOptions;
/**
* Contains response data for the {@link DataLakeServiceClient.renameFileSystem} operation.
* @export
* @interface FileSystemRenameResponse
*/
export type FileSystemRenameResponse = ContainerRenameResponse;
/**
* Contains response data for the {@link DataLakeServiceClient.undeleteFileSystem} operation.
* @export
* @interface FileSystemUndeleteResponse
*/
export type FileSystemUndeleteResponse = ContainerUndeleteResponse;
import {
FileSystemListPathsHeaders,
PathCreateResponse,
PathDeleteResponse,
PathGetPropertiesHeaders as PathGetPropertiesHeadersModel,
PathList as PathListModel
} from "./generated/src/models";
import { DataLakeSASPermissions } from "./sas/DataLakeSASPermissions";
import { DirectorySASPermissions } from "./sas/DirectorySASPermissions";
import { FileSystemSASPermissions } from "./sas/FileSystemSASPermissions";
import { SasIPRange } from "./sas/SasIPRange";
import { SASProtocol } from "./sas/SASQueryParameters";
import { CommonOptions } from "./StorageClient";
export {
LeaseAccessConditions,
UserDelegationKeyModel,
ServiceListContainersSegmentResponse,
Lease,
LeaseOperationOptions,
LeaseOperationResponse
} from "@azure/storage-blob";
export {
FileSystemListPathsHeaders,
PathGetPropertiesHeaders as PathGetPropertiesHeadersModel,
FileSystemListPathsResponse as ListPathsSegmentResponse,
Path as PathModel,
PathList as PathListModel,
PathCreateHeaders,
PathDeleteHeaders,
PathDeleteResponse,
PathSetAccessControlHeaders,
PathSetAccessControlResponse,
PathSetAccessControlResponse as PathSetPermissionsResponse,
PathResourceType as PathResourceTypeModel,
PathUpdateHeaders,
PathAppendDataHeaders,
PathFlushDataHeaders,
PathAppendDataResponse as FileAppendResponse,
PathFlushDataResponse as FileFlushResponse,
PathFlushDataResponse as FileUploadResponse,
PathGetPropertiesAction as PathGetPropertiesActionModel,
PathRenameMode as PathRenameModeModel,
PathExpiryOptions as FileExpiryMode,
PathSetExpiryResponse as FileSetExpiryResponse,
PathSetExpiryHeaders as FileSetExpiryHeaders
} from "./generated/src/models";
export { PathCreateResponse };
/**
* Common options of the {@link FileSystemGenerateSasUrlOptions}, {@link DirectoryGenerateSasUrlOptions}
* and {@link FileGenerateSasUrlOptions}.
*
* @export
* @interface CommonGenerateSasUrlOptions
*/
export interface CommonGenerateSasUrlOptions {
/**
* The version of the service this SAS will target. If not specified, it will default to the version targeted by the
* library.
*
* @type {string}
* @memberof CommonGenerateSasUrlOptions
*/
version?: string;
/**
* Optional. SAS protocols, HTTPS only or HTTPSandHTTP
*
* @type {SASProtocol}
* @memberof CommonGenerateSasUrlOptions
*/
protocol?: SASProtocol;
/**
* Optional. When the SAS will take effect.
*
* @type {Date}
* @memberof CommonGenerateSasUrlOptions
*/
startsOn?: Date;
/**
* Optional only when identifier is provided. The time after which the SAS will no longer work.
*
* @type {Date}
* @memberof CommonGenerateSasUrlOptions
*/
expiresOn?: Date;
/**
* Optional. IP ranges allowed in this SAS.
*
* @type {SasIPRange}
* @memberof CommonGenerateSasUrlOptions
*/
ipRange?: SasIPRange;
/**
* Optional. The name of the access policy on the container this SAS references if any.
*
* @see https://docs.microsoft.com/en-us/rest/api/storageservices/establishing-a-stored-access-policy
*
* @type {string}
* @memberof CommonGenerateSasUrlOptions
*/
identifier?: string;
/**
* Optional. The cache-control header for the SAS.
*
* @type {string}
* @memberof CommonGenerateSasUrlOptions
*/
cacheControl?: string;
/**
* Optional. The content-disposition header for the SAS.
*
* @type {string}
* @memberof CommonGenerateSasUrlOptions
*/
contentDisposition?: string;
/**
* Optional. The content-encoding header for the SAS.
*
* @type {string}
* @memberof CommonGenerateSasUrlOptions
*/
contentEncoding?: string;
/**
* Optional. The content-language header for the SAS.
*
* @type {string}
* @memberof CommonGenerateSasUrlOptions
*/
contentLanguage?: string;
/**
* Optional. The content-type header for the SAS.
*
* @type {string}
* @memberof CommonGenerateSasUrlOptions
*/
contentType?: string;
}
/*************************************************************/
/** DataLakeServiceClient option and response related models */
/*************************************************************/
export interface ServiceGetUserDelegationKeyOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
}
// TODO: Leverage interface definitions from blob package directly, or duplicate create a copy here which will not have generation benefits
export interface ServiceGetUserDelegationKeyHeaders {
clientRequestId?: string;
requestId?: string;
version?: string;
date?: Date;
}
export interface UserDelegationKey {
signedObjectId: string;
signedTenantId: string;
signedStartsOn: Date;
signedExpiresOn: Date;
signedService: string;
signedVersion: string;
value: string;
}
export type ServiceGetUserDelegationKeyResponse = UserDelegationKey &
ServiceGetUserDelegationKeyHeaders & {
_response: HttpResponse & {
parsedHeaders: ServiceGetUserDelegationKeyHeaders;
bodyAsText: string;
parsedBody: UserDelegationKeyModel;
};
};
export interface ServiceListFileSystemsOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
prefix?: string;
includeMetadata?: boolean;
/**
* Specifies whether soft deleted File System should be included in the response.
*
* @type {boolean}
* @memberof ServiceListFileSystemsOptions
*/
includeDeleted?: boolean;
}
export type LeaseStatusType = "locked" | "unlocked";
export type LeaseStateType = "available" | "leased" | "expired" | "breaking" | "broken";
export type LeaseDurationType = "infinite" | "fixed";
export type PublicAccessType = "filesystem" | "file";
export interface FileSystemProperties {
lastModified: Date;
etag: string;
leaseStatus?: LeaseStatusType;
leaseState?: LeaseStateType;
leaseDuration?: LeaseDurationType;
publicAccess?: PublicAccessType;
hasImmutabilityPolicy?: boolean;
hasLegalHold?: boolean;
deletedOn?: Date;
remainingRetentionDays?: number;
}
export interface FileSystemItem {
name: string;
properties: FileSystemProperties;
metadata?: Metadata;
deleted?: boolean;
versionId?: string;
}
export interface ListFileSystemsSegmentResponse {
serviceEndpoint: string;
prefix?: string;
marker?: string;
maxPageSize?: number;
fileSystemItems: FileSystemItem[];
continuationToken?: string;
}
export interface ServiceListFileSystemsSegmentHeaders {
clientRequestId?: string;
requestId?: string;
version?: string;
}
export type ServiceListFileSystemsSegmentResponse = ListFileSystemsSegmentResponse &
ServiceListFileSystemsSegmentHeaders & {
_response: HttpResponse & {
parsedHeaders: ServiceListFileSystemsSegmentHeaders;
bodyAsText: string;
parsedBody: ListFileSystemsSegmentResponse;
};
};
/**
* Options to configure {@link DataLakeServiceClient.generateAccountSasUrl} operation.
*
* @export
* @interface ServiceGenerateAccountSasUrlOptions
*/
export interface ServiceGenerateAccountSasUrlOptions {
/**
* The version of the service this SAS will target. If not specified, it will default to the version targeted by the
* library.
*
* @type {string}
* @memberof ServiceGenerateAccountSasUrlOptions
*/
version?: string;
/**
* Optional. SAS protocols allowed.
*
* @type {SASProtocol}
* @memberof ServiceGenerateAccountSasUrlOptions
*/
protocol?: SASProtocol;
/**
* Optional. When the SAS will take effect.
*
* @type {Date}
* @memberof ServiceGenerateAccountSasUrlOptions
*/
startsOn?: Date;
/**
* Optional. IP range allowed.
*
* @type {SasIPRange}
* @memberof ServiceGenerateAccountSasUrlOptions
*/
ipRange?: SasIPRange;
}
/**
* Options to configure {@link DataLakeServiceClient.undeleteFileSystem}.
*
* @export
* @interface ServiceUndeleteFileSystemOptions
*/
export interface ServiceUndeleteFileSystemOptions extends CommonOptions {
/**
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
* For example, use the @azure/abort-controller to create an `AbortSignal`.
*
* @type {AbortSignalLike}
* @memberof ServiceUndeleteFileSystemOptions
*/
abortSignal?: AbortSignalLike;
/**
* Optional. Specifies the new name of the restored File System.
* Will use its original name if this is not specified.
*
* @type {string}
* @memberof ServiceUndeleteFileSystemOptions
*/
destinationFileSystemName?: string;
}
/****************************************************************/
/** DataLakeFileSystemClient option and response related models */
/****************************************************************/
export interface FileSystemCreateOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
metadata?: Metadata;
access?: PublicAccessType;
}
export interface FileSystemCreateHeaders {
etag?: string;
lastModified?: Date;
clientRequestId?: string;
requestId?: string;
version?: string;
date?: Date;
}
export type FileSystemCreateResponse = FileSystemCreateHeaders & {
_response: HttpResponse & {
parsedHeaders: FileSystemCreateHeaders;
};
};
export interface FileSystemDeleteOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
conditions?: DataLakeRequestConditions;
}
export interface FileSystemDeleteHeaders {
clientRequestId?: string;
requestId?: string;
version?: string;
date?: Date;
}
export type FileSystemDeleteResponse = FileSystemDeleteHeaders & {
_response: HttpResponse & {
parsedHeaders: FileSystemDeleteHeaders;
};
};
export interface FileSystemGetPropertiesOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
conditions?: LeaseAccessConditions;
}
export interface FileSystemGetPropertiesHeaders {
metadata?: Metadata;
etag?: string;
lastModified?: Date;
leaseDuration?: LeaseDurationType;
leaseState?: LeaseStateType;
leaseStatus?: LeaseStatusType;
clientRequestId?: string;
requestId?: string;
version?: string;
date?: Date;
publicAccess?: PublicAccessType;
hasImmutabilityPolicy?: boolean;
hasLegalHold?: boolean;
}
export type FileSystemGetPropertiesResponse = FileSystemGetPropertiesHeaders & {
_response: HttpResponse & {
parsedHeaders: FileSystemGetPropertiesHeaders;
};
};
export interface FileSystemSetMetadataOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
conditions?: DataLakeRequestConditions;
}
export interface FileSystemSetMetadataHeaders {
etag?: string;
lastModified?: Date;
clientRequestId?: string;
requestId?: string;
version?: string;
date?: Date;
}
export type FileSystemSetMetadataResponse = FileSystemSetMetadataHeaders & {
_response: HttpResponse & {
parsedHeaders: FileSystemSetMetadataHeaders;
};
};
export interface FileSystemGetAccessPolicyOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
conditions?: LeaseAccessConditions;
}
export interface FileSystemGetAccessPolicyHeaders {
publicAccess?: PublicAccessType;
etag?: string;
lastModified?: Date;
clientRequestId?: string;
requestId?: string;
version?: string;
date?: Date;
}
export interface RawAccessPolicy {
startsOn?: string;
expiresOn?: string;
permissions: string;
}
export interface AccessPolicy {
startsOn?: Date;
expiresOn?: Date;
permissions: string;
}
export interface SignedIdentifier<T> {
id: string;
accessPolicy: T;
}
export type FileSystemGetAccessPolicyResponse = {
signedIdentifiers: SignedIdentifier<AccessPolicy>[];
} & FileSystemGetAccessPolicyHeaders & {
_response: HttpResponse & {
parsedHeaders: FileSystemGetAccessPolicyHeaders;
bodyAsText: string;
parsedBody: SignedIdentifier<RawAccessPolicy>[];
};
};
export interface FileSystemSetAccessPolicyOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
conditions?: DataLakeRequestConditions;
}
export interface FileSystemSetAccessPolicyHeaders {
etag?: string;
lastModified?: Date;
clientRequestId?: string;
requestId?: string;
version?: string;
date?: Date;
}
export type FileSystemSetAccessPolicyResponse = FileSystemSetAccessPolicyHeaders & {
_response: HttpResponse & {
parsedHeaders: FileSystemSetAccessPolicyHeaders;
};
};
export interface ListPathsOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
recursive?: boolean;
path?: string;
userPrincipalName?: boolean;
}
export interface ListPathsSegmentOptions extends ListPathsOptions {
maxResults?: number;
}
export interface Path {
name?: string;
isDirectory?: boolean;
lastModified?: Date;
etag?: string;
contentLength?: number;
owner?: string;
group?: string;
permissions?: PathPermissions;
}
export interface PathList {
pathItems?: Path[];
}
export type FileSystemListPathsResponse = PathList &
FileSystemListPathsHeaders & {
_response: HttpResponse & {
parsedHeaders: FileSystemListPathsHeaders;
bodyAsText: string;
parsedBody: PathListModel;
};
};
/**
* Option interface for Data Lake file system exists operations
*
* See:
* - {@link DataLakeFileSystemClient.exists}
*
* @export
* @interface FileSystemExistsOptions
*/
export interface FileSystemExistsOptions extends CommonOptions {
/**
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
* For example, use the @azure/abort-controller to create an `AbortSignal`.
*
* @type {AbortSignalLike}
* @memberof FileSystemExistsOptions
*/
abortSignal?: AbortSignalLike;
}
/**
* Contains response data for the {@link DataLakeFileSystemClient.createIfNotExists} operation.
*
* @export
* @interface FileSystemCreateIfNotExistsResponse
*/
export interface FileSystemCreateIfNotExistsResponse extends FileSystemCreateResponse {
/**
* Indicate whether the file system is successfully created. Is false when the file system is not changed as it already exists.
*
* @type {boolean}
* @memberof FileSystemCreateIfNotExistsResponse
*/
succeeded: boolean;
}
/**
* Contains response data for the {@link DataLakeFileSystemClient.deleteIfExists} operation.
*
* @export
* @interface FileSystemDeleteIfExistsResponse
*/
export interface FileSystemDeleteIfExistsResponse extends FileSystemDeleteResponse {
/**
* Indicate whether the file system is successfully deleted. Is false if the file system doesn't exist in the first place.
*
* @type {boolean}
* @memberof FileSystemDeleteIfExistsResponse
*/
succeeded: boolean;
}
/**
* Options to configure {@link DataLakeFileSystemClient.generateSasUrl} operation.
*
* @export
* @interface FileSystemGenerateSasUrlOptions
*/
export interface FileSystemGenerateSasUrlOptions extends CommonGenerateSasUrlOptions {
/**
* Optional only when identifier is provided. Specifies the list of permissions to be associated with the SAS.
*
* @type {FileSystemSASPermissions}
* @memberof FileSystemGenerateSasUrlOptions
*/
permissions?: FileSystemSASPermissions;
}
/**********************************************************/
/** DataLakePathClient option and response related models */
/**********************************************************/
export interface Metadata {
[propertyName: string]: string;
}
export interface DataLakeRequestConditions
extends ModifiedAccessConditions,
LeaseAccessConditions {}
export interface RolePermissions {
read: boolean;
write: boolean;
execute: boolean;
}
export interface PathPermissions {
owner: RolePermissions;
group: RolePermissions;
other: RolePermissions;
stickyBit: boolean;
extendedAcls: boolean;
}
export type AccessControlType = "user" | "group" | "mask" | "other";
export interface RemovePathAccessControlItem {
/**
* Indicates whether this is the default entry for the ACL.
*
* @type {boolean}
* @memberof RemovePathAccessControlItem
*/
defaultScope: boolean;
/**
* Specifies which role this entry targets.
*
* @type {AccessControlType}
* @memberof RemovePathAccessControlItem
*/
accessControlType: AccessControlType;
/**
* Specifies the entity for which this entry applies.
* Must be omitted for types mask or other. It must also be omitted when the user or group is the owner.
*
* @type {string}
* @memberof RemovePathAccessControlItem
*/
entityId?: string;
}
export interface PathAccessControlItem {
/**
* Indicates whether this is the default entry for the ACL.
*
* @type {boolean}
* @memberof PathAccessControlItem
*/
defaultScope: boolean;
/**
* Specifies which role this entry targets.
*
* @type {AccessControlType}
* @memberof PathAccessControlItem
*/
accessControlType: AccessControlType;
/**
* Specifies the entity for which this entry applies.
*
* @type {string}
* @memberof PathAccessControlItem
*/
entityId: string;
/**
* Access control permissions.
*
* @type {RolePermissions}
* @memberof PathAccessControlItem
*/
permissions: RolePermissions;
}
export interface PathCreateHttpHeaders {
cacheControl?: string;
contentEncoding?: string;
contentLanguage?: string;
contentDisposition?: string;
contentType?: string;
}
export interface PathCreateOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
metadata?: Metadata;
permissions?: string; // TODO: model or string?
umask?: string; // TODO: model or string?
conditions?: DataLakeRequestConditions;
pathHttpHeaders?: PathCreateHttpHeaders;
}
export interface PathCreateIfNotExistsOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
metadata?: Metadata;
permissions?: string;
umask?: string;
pathHttpHeaders?: PathCreateHttpHeaders;
}
export interface PathDeleteOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
conditions?: DataLakeRequestConditions;
}
export interface PathGetAccessControlOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
conditions?: DataLakeRequestConditions;
userPrincipalName?: boolean;
}
export interface PathGetAccessControlHeaders {
date?: Date;
etag?: string;
lastModified?: Date;
owner?: string;
group?: string;
requestId?: string;
version?: string;
}
export interface PathAccessControl {
owner?: string;
group?: string;
permissions?: PathPermissions;
acl: PathAccessControlItem[];
}
export type PathGetAccessControlResponse = PathAccessControl &
PathGetAccessControlHeaders & {
_response: HttpResponse & {
parsedHeaders: PathGetPropertiesHeadersModel;
};
};
export interface PathSetAccessControlOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
conditions?: DataLakeRequestConditions;
owner?: string;
group?: string;
}
/**
* Options type for `setAccessControlRecursive`, `updateAccessControlRecursive` and `removeAccessControlRecursive`.
*
* @export
* @interface PathChangeAccessControlRecursiveOptions
* @extends {CommonOptions}
*/
export interface PathChangeAccessControlRecursiveOptions extends CommonOptions {
/**
* An implementation of the `AbortSignalLike` interface to signal the request to cancel the operation.
* For example, use the @azure/abort-controller to create an `AbortSignal`.
*
* @type {AbortSignalLike}
* @memberof PathChangeAccessControlRecursiveOptions
*/
abortSignal?: AbortSignalLike;
/**
* Optional. If data set size exceeds batch size then operation will be split into multiple requests so that progress can be tracked.
* Batch size should be between 1 and 2000. The default when unspecified is 2000.
*
* @type {number}
* @memberof PathChangeAccessControlRecursiveOptions
*/
batchSize?: number;
/**
* Optional. Defines maximum number of batches that single change Access Control operation can execute.
* If maximum is reached before all subpaths are processed then continuation token can be used to resume operation.
* Empty value indicates that maximum number of batches in unbound and operation continues till end.
*
* @type {number}
* @memberof PathChangeAccessControlRecursiveOptions
*/
maxBatches?: number;
/**
* Optional. Default false. If set to false, the operation will terminate quickly on encountering user failures.
* If true, the operation will ignore user failures and proceed with the operation on other sub-entities of the directory.
*
* @type {boolean}
* @memberof PathChangeAccessControlRecursiveOptions
*/
continueOnFailure?: boolean;
/**
* Continuation token to continue next batch of operations.
*
* @type {string}
* @memberof PathChangeAccessControlRecursiveOptions
*/
continuationToken?: string;
/**
* Callback where caller can track progress of the operation
* as well as collect paths that failed to change Access Control.
*
* @memberof PathChangeAccessControlRecursiveOptions
*/
onProgress?: (progress: AccessControlChanges) => void;
}
/**
* Represents an entry that failed to update Access Control List during `setAccessControlRecursive`, `updateAccessControlRecursive` and `removeAccessControlRecursive`.
*
* @export
* @interface AccessControlChangeFailure
*/
export interface AccessControlChangeError {
/**
* Returns name of an entry.
*
* @type {string}
* @memberof AccessControlChangeFailure
*/
name: string;
/**
* Returns whether entry is a directory.
*
* @type {boolean}
* @memberof AccessControlChangeFailure
*/
isDirectory: boolean;
/**
* Returns error message that is the reason why entry failed to update.
*
* @type {string}
* @memberof AccessControlChangeFailure
*/
message: string;
}
/**
* AccessControlChanges contains batch and cumulative counts of operations that change Access Control Lists recursively.
* Additionally it exposes path entries that failed to update while these operations progress.
*
* @export
* @interface AccessControlChanges
*/
export interface AccessControlChanges {
/**
* Path entries that failed to update Access Control List within single batch.
*
* @type {AccessControlChangeError[]}
* @memberof AccessControlChanges
*/
batchFailures: AccessControlChangeError[];
/**
* Counts of paths changed within single batch.
*
* @type {AccessControlChangeCounters}
* @memberof AccessControlChanges
*/
batchCounters: AccessControlChangeCounters;
/**
* Counts of paths changed from start of the operation.
*
* @type {AccessControlChangeCounters}
* @memberof AccessControlChanges
*/
aggregateCounters: AccessControlChangeCounters;
/**
* Optional. Value is present when operation is split into multiple batches and can be used to resume progress.
*
* @type {string}
* @memberof AccessControlChanges
*/
continuationToken?: string;
}
/**
* AccessControlChangeCounters contains counts of operations that change Access Control Lists recursively.
*
* @export
* @interface AccessControlChangeCounters
*/
export interface AccessControlChangeCounters {
/**
* Returns number of directories where Access Control List has been updated successfully.
*
* @type {number}
* @memberof AccessControlChangeCounters
*/
changedDirectoriesCount: number;
/**
* Returns number of files where Access Control List has been updated successfully.
*
* @type {number}
* @memberof AccessControlChangeCounters
*/
changedFilesCount: number;
/**
* Returns number of paths where Access Control List update has failed.
*
* @type {number}
* @memberof AccessControlChangeCounters
*/
failedChangesCount: number;
}
/**
* Response type for `setAccessControlRecursive`, `updateAccessControlRecursive` and `removeAccessControlRecursive`.
*
* @export
* @interface PathChangeAccessControlRecursiveResponse
*/
export interface PathChangeAccessControlRecursiveResponse {
/**
* Contains counts of paths changed from start of the operation.
*/
counters: AccessControlChangeCounters;
/**
* Optional. Value is present when operation is split into multiple batches and can be used to resume progress.
*
* @type {string}
* @memberof PathChangeAccessControlRecursiveResponse
*/
continuationToken?: string;
}
export interface PathSetPermissionsOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
conditions?: DataLakeRequestConditions;
owner?: string;
group?: string;
}
export interface PathGetPropertiesOptions extends CommonOptions {
abortSignal?: AbortSignalLike;
conditions?: DataLakeRequestConditions;
}
export type CopyStatusType = "pending" | "success" | "aborted" | "failed";
export interface PathGetPropertiesHeaders {
lastModified?: Date;
createdOn?: Date;
metadata?: Metadata;
copyCompletedOn?: Date;
copyStatusDescription?: string;
copyId?: string;
copyProgress?: string;
copySource?: string;
copyStatus?: CopyStatusType;
isIncrementalCopy?: boolean;
destinationSnapshot?: string;
leaseDuration?: LeaseDurationType;
leaseState?: LeaseStateType;
leaseStatus?: LeaseStatusType;
contentLength?: number;
contentType?: string;
etag?: string;
contentMD5?: Uint8Array;
contentEncoding?: string;
contentDisposition?: string;
contentLanguage?: string;
cacheControl?: string;
// blobSequenceNumber?: number;
clientRequestId?: string;
requestId?: string;
version?: string;
date?: Date;
acceptRanges?: string;
// blobCommittedBlockCount?: number;
isServerEncrypted?: boolean;
encryptionKeySha256?: string;
accessTier?: string;
accessTierInferred?: boolean;
archiveStatus?: string;
accessTierChangedOn?: Date;
/**
* The time the file will expire.
*/
expiresOn?: Date;
}