@azure/arm-databox 5.0.0-beta.3 → 5.0.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 (93) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/LICENSE +1 -1
  3. package/README.md +1 -1
  4. package/dist/index.js +791 -161
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/jobsBookShipmentPickUpSample.js +12 -5
  9. package/dist-esm/samples-dev/jobsBookShipmentPickUpSample.js.map +1 -1
  10. package/dist-esm/samples-dev/jobsCancelSample.js +12 -5
  11. package/dist-esm/samples-dev/jobsCancelSample.js.map +1 -1
  12. package/dist-esm/samples-dev/jobsCreateSample.js +93 -86
  13. package/dist-esm/samples-dev/jobsCreateSample.js.map +1 -1
  14. package/dist-esm/samples-dev/jobsDeleteSample.js +12 -5
  15. package/dist-esm/samples-dev/jobsDeleteSample.js.map +1 -1
  16. package/dist-esm/samples-dev/jobsGetSample.js +32 -25
  17. package/dist-esm/samples-dev/jobsGetSample.js.map +1 -1
  18. package/dist-esm/samples-dev/jobsListByResourceGroupSample.js +23 -9
  19. package/dist-esm/samples-dev/jobsListByResourceGroupSample.js.map +1 -1
  20. package/dist-esm/samples-dev/jobsListCredentialsSample.js +24 -10
  21. package/dist-esm/samples-dev/jobsListCredentialsSample.js.map +1 -1
  22. package/dist-esm/samples-dev/jobsListSample.js +22 -8
  23. package/dist-esm/samples-dev/jobsListSample.js.map +1 -1
  24. package/dist-esm/samples-dev/jobsMarkDevicesShippedSample.js +16 -6
  25. package/dist-esm/samples-dev/jobsMarkDevicesShippedSample.js.map +1 -1
  26. package/dist-esm/samples-dev/jobsUpdateSample.js +39 -32
  27. package/dist-esm/samples-dev/jobsUpdateSample.js.map +1 -1
  28. package/dist-esm/samples-dev/mitigateSample.js +16 -6
  29. package/dist-esm/samples-dev/mitigateSample.js.map +1 -1
  30. package/dist-esm/samples-dev/operationsListSample.js +23 -8
  31. package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
  32. package/dist-esm/samples-dev/serviceListAvailableSkusByResourceGroupSample.js +24 -10
  33. package/dist-esm/samples-dev/serviceListAvailableSkusByResourceGroupSample.js.map +1 -1
  34. package/dist-esm/samples-dev/serviceRegionConfigurationByResourceGroupSample.js +11 -4
  35. package/dist-esm/samples-dev/serviceRegionConfigurationByResourceGroupSample.js.map +1 -1
  36. package/dist-esm/samples-dev/serviceRegionConfigurationSample.js +10 -3
  37. package/dist-esm/samples-dev/serviceRegionConfigurationSample.js.map +1 -1
  38. package/dist-esm/samples-dev/serviceValidateAddressSample.js +17 -10
  39. package/dist-esm/samples-dev/serviceValidateAddressSample.js.map +1 -1
  40. package/dist-esm/samples-dev/serviceValidateInputsByResourceGroupSample.js +20 -13
  41. package/dist-esm/samples-dev/serviceValidateInputsByResourceGroupSample.js.map +1 -1
  42. package/dist-esm/samples-dev/serviceValidateInputsSample.js +19 -12
  43. package/dist-esm/samples-dev/serviceValidateInputsSample.js.map +1 -1
  44. package/dist-esm/src/dataBoxManagementClient.js +2 -2
  45. package/dist-esm/src/dataBoxManagementClient.js.map +1 -1
  46. package/dist-esm/src/lroImpl.d.ts +6 -11
  47. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  48. package/dist-esm/src/lroImpl.js +12 -20
  49. package/dist-esm/src/lroImpl.js.map +1 -1
  50. package/dist-esm/src/models/index.d.ts +361 -77
  51. package/dist-esm/src/models/index.d.ts.map +1 -1
  52. package/dist-esm/src/models/index.js +19 -1
  53. package/dist-esm/src/models/index.js.map +1 -1
  54. package/dist-esm/src/models/mappers.d.ts +11 -0
  55. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  56. package/dist-esm/src/models/mappers.js +614 -46
  57. package/dist-esm/src/models/mappers.js.map +1 -1
  58. package/dist-esm/src/models/parameters.js +1 -1
  59. package/dist-esm/src/models/parameters.js.map +1 -1
  60. package/dist-esm/src/operations/jobs.d.ts +4 -4
  61. package/dist-esm/src/operations/jobs.d.ts.map +1 -1
  62. package/dist-esm/src/operations/jobs.js +62 -31
  63. package/dist-esm/src/operations/jobs.js.map +1 -1
  64. package/dist-esm/src/operations/operations.js +12 -6
  65. package/dist-esm/src/operations/operations.js.map +1 -1
  66. package/dist-esm/src/operations/service.js +12 -6
  67. package/dist-esm/src/operations/service.js.map +1 -1
  68. package/dist-esm/src/operationsInterfaces/jobs.d.ts +4 -4
  69. package/dist-esm/src/operationsInterfaces/jobs.d.ts.map +1 -1
  70. package/dist-esm/src/pagingHelper.d.ts +4 -4
  71. package/dist-esm/src/pagingHelper.js +4 -4
  72. package/dist-esm/test/databox_operations_test.spec.d.ts +4 -0
  73. package/dist-esm/test/databox_operations_test.spec.d.ts.map +1 -0
  74. package/dist-esm/test/databox_operations_test.spec.js +78 -0
  75. package/dist-esm/test/databox_operations_test.spec.js.map +1 -0
  76. package/package.json +11 -10
  77. package/review/arm-databox.api.md +123 -10
  78. package/src/dataBoxManagementClient.ts +2 -2
  79. package/src/lroImpl.ts +31 -23
  80. package/src/models/index.ts +336 -30
  81. package/src/models/mappers.ts +634 -42
  82. package/src/models/parameters.ts +1 -1
  83. package/src/operations/jobs.ts +39 -31
  84. package/src/operations/operations.ts +0 -1
  85. package/src/operations/service.ts +0 -1
  86. package/src/operationsInterfaces/jobs.ts +4 -4
  87. package/src/pagingHelper.ts +4 -4
  88. package/types/arm-databox.d.ts +332 -35
  89. package/types/tsdoc-metadata.json +1 -1
  90. package/dist-esm/test/sampleTest.d.ts +0 -2
  91. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  92. package/dist-esm/test/sampleTest.js +0 -38
  93. package/dist-esm/test/sampleTest.js.map +0 -1
@@ -6,9 +6,9 @@
6
6
 
7
7
  import * as coreAuth from '@azure/core-auth';
8
8
  import * as coreClient from '@azure/core-client';
9
+ import { OperationState } from '@azure/core-lro';
9
10
  import { PagedAsyncIterableIterator } from '@azure/core-paging';
10
- import { PollerLike } from '@azure/core-lro';
11
- import { PollOperationState } from '@azure/core-lro';
11
+ import { SimplePollerLike } from '@azure/core-lro';
12
12
 
13
13
  // @public
14
14
  export type AccessProtocol = "SMB" | "NFS";
@@ -122,6 +122,14 @@ export interface ContactDetails {
122
122
  phoneExtension?: string;
123
123
  }
124
124
 
125
+ // @public
126
+ export interface ContactInfo {
127
+ contactName: string;
128
+ mobile?: string;
129
+ phone: string;
130
+ phoneExtension?: string;
131
+ }
132
+
125
133
  // @public
126
134
  export interface CopyLogDetails {
127
135
  copyLogDetailsType: "DataBox" | "DataBoxCustomerDisk" | "DataBoxDisk" | "DataBoxHeavy";
@@ -133,9 +141,11 @@ export type CopyLogDetailsUnion = CopyLogDetails | DataBoxAccountCopyLogDetails
133
141
  // @public
134
142
  export interface CopyProgress {
135
143
  readonly accountId?: string;
144
+ readonly actions?: CustomerResolutionCode[];
136
145
  readonly bytesProcessed?: number;
137
146
  readonly dataAccountType?: DataAccountType;
138
147
  readonly directoriesErroredOut?: number;
148
+ readonly error?: CloudError;
139
149
  readonly filesErroredOut?: number;
140
150
  readonly filesProcessed?: number;
141
151
  readonly invalidDirectoriesProcessed?: number;
@@ -177,7 +187,7 @@ export interface CustomerDiskJobSecrets extends JobSecrets {
177
187
  }
178
188
 
179
189
  // @public
180
- export type CustomerResolutionCode = "None" | "MoveToCleanUpDevice" | "Resume";
190
+ export type CustomerResolutionCode = "None" | "MoveToCleanUpDevice" | "Resume" | "Restart" | "ReachOutToOperation";
181
191
 
182
192
  // @public
183
193
  export interface DataAccountDetails {
@@ -238,18 +248,37 @@ export interface DataBoxDiskCopyLogDetails extends CopyLogDetails {
238
248
 
239
249
  // @public
240
250
  export interface DataBoxDiskCopyProgress {
251
+ readonly actions?: CustomerResolutionCode[];
241
252
  readonly bytesCopied?: number;
253
+ readonly error?: CloudError;
242
254
  readonly percentComplete?: number;
243
255
  readonly serialNumber?: string;
244
256
  readonly status?: CopyStatus;
245
257
  }
246
258
 
259
+ // @public
260
+ export interface DataBoxDiskGranularCopyLogDetails extends GranularCopyLogDetails {
261
+ readonly accountId?: string;
262
+ copyLogDetailsType: "DataBoxCustomerDisk";
263
+ readonly errorLogLink?: string;
264
+ readonly serialNumber?: string;
265
+ readonly verboseLogLink?: string;
266
+ }
267
+
268
+ // @public
269
+ export interface DataBoxDiskGranularCopyProgress extends GranularCopyProgress {
270
+ readonly copyStatus?: CopyStatus;
271
+ readonly serialNumber?: string;
272
+ }
273
+
247
274
  // @public
248
275
  export interface DataBoxDiskJobDetails extends JobDetails {
249
276
  readonly copyProgress?: DataBoxDiskCopyProgress[];
250
277
  readonly disksAndSizeDetails?: {
251
278
  [propertyName: string]: number;
252
279
  };
280
+ readonly granularCopyLogDetails?: DataBoxDiskGranularCopyLogDetails[];
281
+ readonly granularCopyProgress?: DataBoxDiskGranularCopyProgress[];
253
282
  jobDetailsType: "DataBoxDisk";
254
283
  passkey?: string;
255
284
  preferredDisks?: {
@@ -441,6 +470,12 @@ export interface Details {
441
470
  message: string;
442
471
  }
443
472
 
473
+ // @public
474
+ export interface DeviceErasureDetails {
475
+ readonly deviceErasureStatus?: StageStatus;
476
+ readonly erasureOrDestructionCertificateSasKey?: string;
477
+ }
478
+
444
479
  // @public
445
480
  export interface DiskScheduleAvailabilityRequest extends ScheduleAvailabilityRequest {
446
481
  expectedDataSizeInTeraBytes: number;
@@ -459,6 +494,7 @@ export type DoubleEncryption = "Enabled" | "Disabled";
459
494
  // @public
460
495
  export interface EncryptionPreferences {
461
496
  doubleEncryption?: DoubleEncryption;
497
+ hardwareEncryption?: HardwareEncryption;
462
498
  }
463
499
 
464
500
  // @public (undocumented)
@@ -492,6 +528,38 @@ export type FilterFileType = "AzureBlob" | "AzureFile";
492
528
  // @public
493
529
  export function getContinuationToken(page: unknown): string | undefined;
494
530
 
531
+ // @public
532
+ export interface GranularCopyLogDetails {
533
+ copyLogDetailsType: "DataBoxCustomerDisk";
534
+ }
535
+
536
+ // @public (undocumented)
537
+ export type GranularCopyLogDetailsUnion = GranularCopyLogDetails | DataBoxDiskGranularCopyLogDetails;
538
+
539
+ // @public
540
+ export interface GranularCopyProgress {
541
+ readonly accountId?: string;
542
+ readonly actions?: CustomerResolutionCode[];
543
+ readonly bytesProcessed?: number;
544
+ readonly dataAccountType?: DataAccountType;
545
+ readonly directoriesErroredOut?: number;
546
+ readonly error?: CloudError;
547
+ readonly filesErroredOut?: number;
548
+ readonly filesProcessed?: number;
549
+ readonly invalidDirectoriesProcessed?: number;
550
+ readonly invalidFileBytesUploaded?: number;
551
+ readonly invalidFilesProcessed?: number;
552
+ readonly isEnumerationInProgress?: boolean;
553
+ readonly renamedContainerCount?: number;
554
+ readonly storageAccountName?: string;
555
+ readonly totalBytesToProcess?: number;
556
+ readonly totalFilesToProcess?: number;
557
+ readonly transferType?: TransferType;
558
+ }
559
+
560
+ // @public
561
+ export type HardwareEncryption = "Enabled" | "Disabled";
562
+
495
563
  // @public
496
564
  export interface HeavyScheduleAvailabilityRequest extends ScheduleAvailabilityRequest {
497
565
  skuName: "DataBoxHeavy";
@@ -530,6 +598,7 @@ export interface JobDetails {
530
598
  dataExportDetails?: DataExportDetails[];
531
599
  dataImportDetails?: DataImportDetails[];
532
600
  readonly deliveryPackage?: PackageShippingDetails;
601
+ readonly deviceErasureDetails?: DeviceErasureDetails;
533
602
  expectedDataSizeInTeraBytes?: number;
534
603
  jobDetailsType: "DataBoxCustomerDisk" | "DataBoxDisk" | "DataBoxHeavy" | "DataBox";
535
604
  readonly jobStages?: JobStages[];
@@ -538,6 +607,7 @@ export interface JobDetails {
538
607
  preferences?: Preferences;
539
608
  readonly returnPackage?: PackageShippingDetails;
540
609
  readonly reverseShipmentLabelSasKey?: string;
610
+ reverseShippingDetails?: ReverseShippingDetails;
541
611
  shippingAddress?: ShippingAddress;
542
612
  }
543
613
 
@@ -558,6 +628,8 @@ export interface JobResource extends Resource {
558
628
  readonly isPrepareToShipEnabled?: boolean;
559
629
  readonly isShippingAddressEditable?: boolean;
560
630
  readonly name?: string;
631
+ readonly reverseShippingDetailsUpdate?: ReverseShippingDetailsEditStatus;
632
+ readonly reverseTransportPreferenceUpdate?: ReverseTransportPreferenceEditStatus;
561
633
  readonly startTime?: Date;
562
634
  readonly status?: StageName;
563
635
  readonly systemData?: SystemData;
@@ -582,11 +654,11 @@ export interface JobResourceUpdateParameter {
582
654
 
583
655
  // @public
584
656
  export interface Jobs {
585
- beginCreate(resourceGroupName: string, jobName: string, jobResource: JobResource, options?: JobsCreateOptionalParams): Promise<PollerLike<PollOperationState<JobsCreateResponse>, JobsCreateResponse>>;
657
+ beginCreate(resourceGroupName: string, jobName: string, jobResource: JobResource, options?: JobsCreateOptionalParams): Promise<SimplePollerLike<OperationState<JobsCreateResponse>, JobsCreateResponse>>;
586
658
  beginCreateAndWait(resourceGroupName: string, jobName: string, jobResource: JobResource, options?: JobsCreateOptionalParams): Promise<JobsCreateResponse>;
587
- beginDelete(resourceGroupName: string, jobName: string, options?: JobsDeleteOptionalParams): Promise<PollerLike<PollOperationState<void>, void>>;
659
+ beginDelete(resourceGroupName: string, jobName: string, options?: JobsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
588
660
  beginDeleteAndWait(resourceGroupName: string, jobName: string, options?: JobsDeleteOptionalParams): Promise<void>;
589
- beginUpdate(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: JobResourceUpdateParameter, options?: JobsUpdateOptionalParams): Promise<PollerLike<PollOperationState<JobsUpdateResponse>, JobsUpdateResponse>>;
661
+ beginUpdate(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: JobResourceUpdateParameter, options?: JobsUpdateOptionalParams): Promise<SimplePollerLike<OperationState<JobsUpdateResponse>, JobsUpdateResponse>>;
590
662
  beginUpdateAndWait(resourceGroupName: string, jobName: string, jobResourceUpdateParameter: JobResourceUpdateParameter, options?: JobsUpdateOptionalParams): Promise<JobsUpdateResponse>;
591
663
  bookShipmentPickUp(resourceGroupName: string, jobName: string, shipmentPickUpRequest: ShipmentPickUpRequest, options?: JobsBookShipmentPickUpOptionalParams): Promise<JobsBookShipmentPickUpResponse>;
592
664
  cancel(resourceGroupName: string, jobName: string, cancellationReason: CancellationReason, options?: JobsCancelOptionalParams): Promise<void>;
@@ -617,6 +689,11 @@ export interface JobsCreateOptionalParams extends coreClient.OperationOptions {
617
689
  // @public
618
690
  export type JobsCreateResponse = JobResource;
619
691
 
692
+ // @public
693
+ export interface JobsDeleteHeaders {
694
+ location?: string;
695
+ }
696
+
620
697
  // @public
621
698
  export interface JobsDeleteOptionalParams extends coreClient.OperationOptions {
622
699
  resumeFrom?: string;
@@ -643,7 +720,6 @@ export type JobsGetResponse = JobResource;
643
720
 
644
721
  // @public
645
722
  export interface JobsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
646
- skipToken?: string;
647
723
  }
648
724
 
649
725
  // @public
@@ -666,7 +742,6 @@ export type JobsListCredentialsResponse = UnencryptedCredentialsList;
666
742
 
667
743
  // @public
668
744
  export interface JobsListNextOptionalParams extends coreClient.OperationOptions {
669
- skipToken?: string;
670
745
  }
671
746
 
672
747
  // @public
@@ -693,6 +768,11 @@ export interface JobStages {
693
768
  readonly stageTime?: Date;
694
769
  }
695
770
 
771
+ // @public
772
+ export interface JobsUpdateHeaders {
773
+ location?: string;
774
+ }
775
+
696
776
  // @public
697
777
  export interface JobsUpdateOptionalParams extends coreClient.OperationOptions {
698
778
  ifMatch?: string;
@@ -744,9 +824,11 @@ export enum KnownDataCenterCode {
744
824
  AMS20 = "AMS20",
745
825
  AUH20 = "AUH20",
746
826
  BJB = "BJB",
827
+ BJS20 = "BJS20",
747
828
  BL20 = "BL20",
748
829
  BL7 = "BL7",
749
830
  BN1 = "BN1",
831
+ BN7 = "BN7",
750
832
  BOM01 = "BOM01",
751
833
  BY1 = "BY1",
752
834
  BY2 = "BY2",
@@ -759,6 +841,7 @@ export enum KnownDataCenterCode {
759
841
  CWL20 = "CWL20",
760
842
  CYS04 = "CYS04",
761
843
  DSM05 = "DSM05",
844
+ DUB07 = "DUB07",
762
845
  FRA22 = "FRA22",
763
846
  HKG20 = "HKG20",
764
847
  Invalid = "Invalid",
@@ -770,7 +853,11 @@ export enum KnownDataCenterCode {
770
853
  MNZ21 = "MNZ21",
771
854
  MWH01 = "MWH01",
772
855
  ORK70 = "ORK70",
856
+ OSA02 = "OSA02",
773
857
  OSA20 = "OSA20",
858
+ OSA22 = "OSA22",
859
+ PAR22 = "PAR22",
860
+ PNQ01 = "PNQ01",
774
861
  PUS20 = "PUS20",
775
862
  SEL20 = "SEL20",
776
863
  SEL21 = "SEL21",
@@ -778,8 +865,10 @@ export enum KnownDataCenterCode {
778
865
  SHA03 = "SHA03",
779
866
  SIN20 = "SIN20",
780
867
  SN5 = "SN5",
868
+ SN6 = "SN6",
781
869
  SN8 = "SN8",
782
870
  SSE90 = "SSE90",
871
+ SVG20 = "SVG20",
783
872
  SYD03 = "SYD03",
784
873
  SYD23 = "SYD23",
785
874
  TYO01 = "TYO01",
@@ -851,7 +940,10 @@ export interface MarkDevicesShippedRequest {
851
940
 
852
941
  // @public
853
942
  export interface MitigateJobRequest {
854
- customerResolutionCode: CustomerResolutionCode;
943
+ customerResolutionCode?: CustomerResolutionCode;
944
+ serialNumberCustomerResolutionMap?: {
945
+ [propertyName: string]: CustomerResolutionCode;
946
+ };
855
947
  }
856
948
 
857
949
  // @public
@@ -936,6 +1028,8 @@ export interface PackageShippingDetails {
936
1028
  export interface Preferences {
937
1029
  encryptionPreferences?: EncryptionPreferences;
938
1030
  preferredDataCenterRegion?: string[];
1031
+ reverseTransportPreferences?: TransportPreferences;
1032
+ storageAccountAccessTierPreferences?: string[];
939
1033
  transportPreferences?: TransportPreferences;
940
1034
  }
941
1035
 
@@ -986,6 +1080,19 @@ export interface ResourceIdentity {
986
1080
  };
987
1081
  }
988
1082
 
1083
+ // @public
1084
+ export interface ReverseShippingDetails {
1085
+ contactDetails?: ContactInfo;
1086
+ readonly isUpdated?: boolean;
1087
+ shippingAddress?: ShippingAddress;
1088
+ }
1089
+
1090
+ // @public
1091
+ export type ReverseShippingDetailsEditStatus = "Enabled" | "Disabled" | "NotSupported";
1092
+
1093
+ // @public
1094
+ export type ReverseTransportPreferenceEditStatus = "Enabled" | "Disabled" | "NotSupported";
1095
+
989
1096
  // @public
990
1097
  export interface ScheduleAvailabilityRequest {
991
1098
  country?: string;
@@ -1092,10 +1199,12 @@ export interface ShippingAddress {
1092
1199
  companyName?: string;
1093
1200
  country: string;
1094
1201
  postalCode?: string;
1202
+ skipAddressValidation?: boolean;
1095
1203
  stateOrProvince?: string;
1096
1204
  streetAddress1: string;
1097
1205
  streetAddress2?: string;
1098
1206
  streetAddress3?: string;
1207
+ taxIdentificationNumber?: string;
1099
1208
  zipExtendedCode?: string;
1100
1209
  }
1101
1210
 
@@ -1142,6 +1251,7 @@ export interface SkuInformation {
1142
1251
  readonly apiVersions?: string[];
1143
1252
  readonly capacity?: SkuCapacity;
1144
1253
  readonly costs?: SkuCost[];
1254
+ readonly countriesWithinCommerceBoundary?: string[];
1145
1255
  readonly dataLocationToServiceLocationMap?: DataLocationToServiceLocationMap[];
1146
1256
  readonly disabledReason?: SkuDisabledReason;
1147
1257
  readonly disabledReasonMessage?: string;
@@ -1157,7 +1267,7 @@ export type SkuName = "DataBox" | "DataBoxDisk" | "DataBoxHeavy" | "DataBoxCusto
1157
1267
  export type StageName = string;
1158
1268
 
1159
1269
  // @public
1160
- export type StageStatus = "None" | "InProgress" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "SucceededWithErrors" | "WaitingForCustomerAction" | "SucceededWithWarnings" | "WaitingForCustomerActionForKek" | "WaitingForCustomerActionForCleanUp" | "CustomerActionPerformedForCleanUp";
1270
+ export type StageStatus = "None" | "InProgress" | "Succeeded" | "Failed" | "Cancelled" | "Cancelling" | "SucceededWithErrors" | "WaitingForCustomerAction" | "SucceededWithWarnings" | "WaitingForCustomerActionForKek" | "WaitingForCustomerActionForCleanUp" | "CustomerActionPerformedForCleanUp" | "CustomerActionPerformed";
1161
1271
 
1162
1272
  // @public
1163
1273
  export interface StorageAccountDetails extends DataAccountDetails {
@@ -1241,6 +1351,7 @@ export interface TransportAvailabilityResponse {
1241
1351
 
1242
1352
  // @public
1243
1353
  export interface TransportPreferences {
1354
+ readonly isUpdated?: boolean;
1244
1355
  preferredShipmentType: TransportShipmentTypes;
1245
1356
  }
1246
1357
 
@@ -1263,7 +1374,9 @@ export interface UnencryptedCredentialsList {
1263
1374
  export interface UpdateJobDetails {
1264
1375
  contactDetails?: ContactDetails;
1265
1376
  keyEncryptionKey?: KeyEncryptionKey;
1377
+ preferences?: Preferences;
1266
1378
  returnToCustomerPackageDetails?: PackageCarrierDetails;
1379
+ reverseShippingDetails?: ReverseShippingDetails;
1267
1380
  shippingAddress?: ShippingAddress;
1268
1381
  }
1269
1382
 
@@ -56,7 +56,7 @@ export class DataBoxManagementClient extends coreClient.ServiceClient {
56
56
  credential: credentials
57
57
  };
58
58
 
59
- const packageDetails = `azsdk-js-arm-databox/5.0.0-beta.3`;
59
+ const packageDetails = `azsdk-js-arm-databox/5.0.0`;
60
60
  const userAgentPrefix =
61
61
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
62
62
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -109,7 +109,7 @@ export class DataBoxManagementClient extends coreClient.ServiceClient {
109
109
 
110
110
  // Assigning values to Constant parameters
111
111
  this.$host = options.$host || "https://management.azure.com";
112
- this.apiVersion = options.apiVersion || "2021-08-01-preview";
112
+ this.apiVersion = options.apiVersion || "2022-12-01";
113
113
  this.operations = new OperationsImpl(this);
114
114
  this.jobs = new JobsImpl(this);
115
115
  this.service = new ServiceImpl(this);
package/src/lroImpl.ts CHANGED
@@ -6,29 +6,37 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
+ // Copyright (c) Microsoft Corporation.
10
+ // Licensed under the MIT license.
11
+
12
+ import { AbortSignalLike } from "@azure/abort-controller";
9
13
  import { LongRunningOperation, LroResponse } from "@azure/core-lro";
10
14
 
11
- export class LroImpl<T> implements LongRunningOperation<T> {
12
- constructor(
13
- private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
14
- private args: Record<string, unknown>,
15
- private spec: {
16
- readonly requestBody?: unknown;
17
- readonly path?: string;
18
- readonly httpMethod: string;
19
- } & Record<string, any>,
20
- public requestPath: string = spec.path!,
21
- public requestMethod: string = spec.httpMethod
22
- ) {}
23
- public async sendInitialRequest(): Promise<LroResponse<T>> {
24
- return this.sendOperationFn(this.args, this.spec);
25
- }
26
- public async sendPollRequest(path: string): Promise<LroResponse<T>> {
27
- const { requestBody, ...restSpec } = this.spec;
28
- return this.sendOperationFn(this.args, {
29
- ...restSpec,
30
- path,
31
- httpMethod: "GET"
32
- });
33
- }
15
+ export function createLroSpec<T>(inputs: {
16
+ sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;
17
+ args: Record<string, unknown>;
18
+ spec: {
19
+ readonly requestBody?: unknown;
20
+ readonly path?: string;
21
+ readonly httpMethod: string;
22
+ } & Record<string, any>;
23
+ }): LongRunningOperation<T> {
24
+ const { args, spec, sendOperationFn } = inputs;
25
+ return {
26
+ requestMethod: spec.httpMethod,
27
+ requestPath: spec.path!,
28
+ sendInitialRequest: () => sendOperationFn(args, spec),
29
+ sendPollRequest: (
30
+ path: string,
31
+ options?: { abortSignal?: AbortSignalLike }
32
+ ) => {
33
+ const { requestBody, ...restSpec } = spec;
34
+ return sendOperationFn(args, {
35
+ ...restSpec,
36
+ httpMethod: "GET",
37
+ path,
38
+ abortSignal: options?.abortSignal
39
+ });
40
+ }
41
+ };
34
42
  }