@azure/arm-storageimportexport 0.1.0 → 2.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 (160) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +75 -73
  4. package/dist/index.js +1999 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/models/index.d.ts +504 -0
  13. package/dist-esm/src/models/index.d.ts.map +1 -0
  14. package/dist-esm/src/models/index.js +40 -0
  15. package/dist-esm/src/models/index.js.map +1 -0
  16. package/dist-esm/src/models/mappers.d.ts +25 -0
  17. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  18. package/{esm → dist-esm/src}/models/mappers.js +570 -422
  19. package/dist-esm/src/models/mappers.js.map +1 -0
  20. package/dist-esm/src/models/parameters.d.ts +17 -0
  21. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/parameters.js +79 -49
  23. package/dist-esm/src/models/parameters.js.map +1 -0
  24. package/dist-esm/src/operations/bitLockerKeys.d.ts +32 -0
  25. package/dist-esm/src/operations/bitLockerKeys.d.ts.map +1 -0
  26. package/dist-esm/src/operations/bitLockerKeys.js +101 -0
  27. package/dist-esm/src/operations/bitLockerKeys.js.map +1 -0
  28. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  29. package/dist-esm/src/operations/index.d.ts.map +1 -0
  30. package/{esm → dist-esm/src}/operations/index.js +3 -5
  31. package/dist-esm/src/operations/index.js.map +1 -0
  32. package/dist-esm/src/operations/jobs.d.ts +92 -0
  33. package/dist-esm/src/operations/jobs.d.ts.map +1 -0
  34. package/dist-esm/src/operations/jobs.js +376 -0
  35. package/dist-esm/src/operations/jobs.js.map +1 -0
  36. package/dist-esm/src/operations/locations.d.ts +35 -0
  37. package/dist-esm/src/operations/locations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/locations.js +117 -0
  39. package/dist-esm/src/operations/locations.js.map +1 -0
  40. package/dist-esm/src/operations/operations.d.ts +26 -0
  41. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/operations.js +90 -0
  43. package/dist-esm/src/operations/operations.js.map +1 -0
  44. package/dist-esm/src/operationsInterfaces/bitLockerKeys.d.ts +14 -0
  45. package/dist-esm/src/operationsInterfaces/bitLockerKeys.d.ts.map +1 -0
  46. package/dist-esm/src/operationsInterfaces/bitLockerKeys.js +9 -0
  47. package/dist-esm/src/operationsInterfaces/bitLockerKeys.js.map +1 -0
  48. package/dist-esm/src/operationsInterfaces/index.d.ts +5 -0
  49. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  50. package/dist-esm/src/operationsInterfaces/index.js +12 -0
  51. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  52. package/dist-esm/src/operationsInterfaces/jobs.d.ts +54 -0
  53. package/dist-esm/src/operationsInterfaces/jobs.d.ts.map +1 -0
  54. package/dist-esm/src/operationsInterfaces/jobs.js +9 -0
  55. package/dist-esm/src/operationsInterfaces/jobs.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/locations.d.ts +19 -0
  57. package/dist-esm/src/operationsInterfaces/locations.d.ts.map +1 -0
  58. package/dist-esm/src/operationsInterfaces/locations.js +9 -0
  59. package/dist-esm/src/operationsInterfaces/locations.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  61. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  63. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  64. package/dist-esm/src/storageImportExport.d.ts +22 -0
  65. package/dist-esm/src/storageImportExport.d.ts.map +1 -0
  66. package/dist-esm/src/storageImportExport.js +54 -0
  67. package/dist-esm/src/storageImportExport.js.map +1 -0
  68. package/dist-esm/test/sampleTest.d.ts +2 -0
  69. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  70. package/dist-esm/test/sampleTest.js +40 -0
  71. package/dist-esm/test/sampleTest.js.map +1 -0
  72. package/package.json +87 -26
  73. package/review/arm-storageimportexport.api.md +438 -0
  74. package/rollup.config.js +184 -27
  75. package/src/index.ts +12 -0
  76. package/src/models/index.ts +568 -0
  77. package/{lib → src}/models/mappers.ts +575 -424
  78. package/src/models/parameters.ts +171 -0
  79. package/src/operations/bitLockerKeys.ts +125 -0
  80. package/{lib → src}/operations/index.ts +3 -5
  81. package/src/operations/jobs.ts +467 -0
  82. package/src/operations/locations.ts +134 -0
  83. package/src/operations/operations.ts +98 -0
  84. package/src/operationsInterfaces/bitLockerKeys.ts +27 -0
  85. package/src/operationsInterfaces/index.ts +12 -0
  86. package/src/operationsInterfaces/jobs.ts +99 -0
  87. package/src/operationsInterfaces/locations.ts +38 -0
  88. package/src/operationsInterfaces/operations.ts +22 -0
  89. package/src/storageImportExport.ts +92 -0
  90. package/tsconfig.json +20 -7
  91. package/types/arm-storageimportexport.d.ts +671 -0
  92. package/types/tsdoc-metadata.json +11 -0
  93. package/dist/arm-storageimportexport.js +0 -1754
  94. package/dist/arm-storageimportexport.js.map +0 -1
  95. package/dist/arm-storageimportexport.min.js +0 -1
  96. package/dist/arm-storageimportexport.min.js.map +0 -1
  97. package/esm/models/bitLockerKeysMappers.d.ts +0 -2
  98. package/esm/models/bitLockerKeysMappers.d.ts.map +0 -1
  99. package/esm/models/bitLockerKeysMappers.js +0 -11
  100. package/esm/models/bitLockerKeysMappers.js.map +0 -1
  101. package/esm/models/index.d.ts +0 -928
  102. package/esm/models/index.d.ts.map +0 -1
  103. package/esm/models/index.js +0 -10
  104. package/esm/models/index.js.map +0 -1
  105. package/esm/models/jobsMappers.d.ts +0 -2
  106. package/esm/models/jobsMappers.d.ts.map +0 -1
  107. package/esm/models/jobsMappers.js +0 -11
  108. package/esm/models/jobsMappers.js.map +0 -1
  109. package/esm/models/locationsMappers.d.ts +0 -2
  110. package/esm/models/locationsMappers.d.ts.map +0 -1
  111. package/esm/models/locationsMappers.js +0 -11
  112. package/esm/models/locationsMappers.js.map +0 -1
  113. package/esm/models/mappers.d.ts +0 -23
  114. package/esm/models/mappers.d.ts.map +0 -1
  115. package/esm/models/mappers.js.map +0 -1
  116. package/esm/models/operationsMappers.d.ts +0 -2
  117. package/esm/models/operationsMappers.d.ts.map +0 -1
  118. package/esm/models/operationsMappers.js +0 -11
  119. package/esm/models/operationsMappers.js.map +0 -1
  120. package/esm/models/parameters.d.ts +0 -12
  121. package/esm/models/parameters.d.ts.map +0 -1
  122. package/esm/models/parameters.js.map +0 -1
  123. package/esm/operations/bitLockerKeys.d.ts +0 -37
  124. package/esm/operations/bitLockerKeys.d.ts.map +0 -1
  125. package/esm/operations/bitLockerKeys.js +0 -58
  126. package/esm/operations/bitLockerKeys.js.map +0 -1
  127. package/esm/operations/index.d.ts.map +0 -1
  128. package/esm/operations/index.js.map +0 -1
  129. package/esm/operations/jobs.d.ts +0 -189
  130. package/esm/operations/jobs.d.ts.map +0 -1
  131. package/esm/operations/jobs.js +0 -276
  132. package/esm/operations/jobs.js.map +0 -1
  133. package/esm/operations/locations.d.ts +0 -48
  134. package/esm/operations/locations.d.ts.map +0 -1
  135. package/esm/operations/locations.js +0 -79
  136. package/esm/operations/locations.js.map +0 -1
  137. package/esm/operations/operations.d.ts +0 -28
  138. package/esm/operations/operations.d.ts.map +0 -1
  139. package/esm/operations/operations.js +0 -51
  140. package/esm/operations/operations.js.map +0 -1
  141. package/esm/storageImportExportManagementClient.d.ts +0 -21
  142. package/esm/storageImportExportManagementClient.d.ts.map +0 -1
  143. package/esm/storageImportExportManagementClient.js +0 -36
  144. package/esm/storageImportExportManagementClient.js.map +0 -1
  145. package/esm/storageImportExportManagementClientContext.d.ts +0 -16
  146. package/esm/storageImportExportManagementClientContext.d.ts.map +0 -1
  147. package/esm/storageImportExportManagementClientContext.js +0 -55
  148. package/esm/storageImportExportManagementClientContext.js.map +0 -1
  149. package/lib/models/bitLockerKeysMappers.ts +0 -17
  150. package/lib/models/index.ts +0 -975
  151. package/lib/models/jobsMappers.ts +0 -27
  152. package/lib/models/locationsMappers.ts +0 -17
  153. package/lib/models/operationsMappers.ts +0 -17
  154. package/lib/models/parameters.ts +0 -120
  155. package/lib/operations/bitLockerKeys.ts +0 -90
  156. package/lib/operations/jobs.ts +0 -500
  157. package/lib/operations/locations.ts +0 -127
  158. package/lib/operations/operations.ts +0 -74
  159. package/lib/storageImportExportManagementClient.ts +0 -48
  160. package/lib/storageImportExportManagementClientContext.ts +0 -61
@@ -0,0 +1,438 @@
1
+ ## API Report File for "@azure/arm-storageimportexport"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import * as coreAuth from '@azure/core-auth';
8
+ import * as coreClient from '@azure/core-client';
9
+ import { PagedAsyncIterableIterator } from '@azure/core-paging';
10
+
11
+ // @public
12
+ export interface BitLockerKeys {
13
+ list(jobName: string, resourceGroupName: string, options?: BitLockerKeysListOptionalParams): PagedAsyncIterableIterator<DriveBitLockerKey>;
14
+ }
15
+
16
+ // @public
17
+ export interface BitLockerKeysListOptionalParams extends coreClient.OperationOptions {
18
+ }
19
+
20
+ // @public
21
+ export type BitLockerKeysListResponse = GetBitLockerKeysResponse;
22
+
23
+ // @public
24
+ export type CreatedByType = string;
25
+
26
+ // @public
27
+ export interface DeliveryPackageInformation {
28
+ carrierName: string;
29
+ driveCount?: number;
30
+ shipDate?: string;
31
+ trackingNumber: string;
32
+ }
33
+
34
+ // @public
35
+ export interface DriveBitLockerKey {
36
+ bitLockerKey?: string;
37
+ driveId?: string;
38
+ }
39
+
40
+ // @public
41
+ export type DriveState = string;
42
+
43
+ // @public
44
+ export interface DriveStatus {
45
+ bitLockerKey?: string;
46
+ bytesSucceeded?: number;
47
+ copyStatus?: string;
48
+ driveHeaderHash?: string;
49
+ driveId?: string;
50
+ errorLogUri?: string;
51
+ manifestFile?: string;
52
+ manifestHash?: string;
53
+ manifestUri?: string;
54
+ percentComplete?: number;
55
+ state?: DriveState;
56
+ verboseLogUri?: string;
57
+ }
58
+
59
+ // @public
60
+ export type EncryptionKekType = string;
61
+
62
+ // @public
63
+ export interface EncryptionKeyDetails {
64
+ kekType?: EncryptionKekType;
65
+ kekUrl?: string;
66
+ kekVaultResourceID?: string;
67
+ }
68
+
69
+ // @public
70
+ export interface ErrorResponse {
71
+ code?: string;
72
+ details?: ErrorResponseErrorDetailsItem[];
73
+ innererror?: Record<string, unknown>;
74
+ message?: string;
75
+ target?: string;
76
+ }
77
+
78
+ // @public (undocumented)
79
+ export interface ErrorResponseErrorDetailsItem {
80
+ code?: string;
81
+ message?: string;
82
+ target?: string;
83
+ }
84
+
85
+ // @public
86
+ export interface Export {
87
+ blobListBlobPath?: string;
88
+ blobPath?: string[];
89
+ blobPathPrefix?: string[];
90
+ }
91
+
92
+ // @public
93
+ export interface GetBitLockerKeysResponse {
94
+ value?: DriveBitLockerKey[];
95
+ }
96
+
97
+ // @public
98
+ export interface IdentityDetails {
99
+ readonly principalId?: string;
100
+ readonly tenantId?: string;
101
+ type?: IdentityType;
102
+ }
103
+
104
+ // @public
105
+ export type IdentityType = string;
106
+
107
+ // @public
108
+ export interface JobDetails {
109
+ backupDriveManifest?: boolean;
110
+ cancelRequested?: boolean;
111
+ deliveryPackage?: DeliveryPackageInformation;
112
+ diagnosticsPath?: string;
113
+ driveList?: DriveStatus[];
114
+ encryptionKey?: EncryptionKeyDetails;
115
+ export?: Export;
116
+ incompleteBlobListUri?: string;
117
+ jobType?: string;
118
+ logLevel?: string;
119
+ percentComplete?: number;
120
+ provisioningState?: string;
121
+ returnAddress?: ReturnAddress;
122
+ returnPackage?: PackageInformation;
123
+ returnShipping?: ReturnShipping;
124
+ shippingInformation?: ShippingInformation;
125
+ state?: string;
126
+ storageAccountId?: string;
127
+ }
128
+
129
+ // @public
130
+ export interface JobResponse {
131
+ readonly id?: string;
132
+ identity?: IdentityDetails;
133
+ location?: string;
134
+ readonly name?: string;
135
+ properties?: JobDetails;
136
+ readonly systemData?: SystemData;
137
+ tags?: Record<string, unknown>;
138
+ readonly type?: string;
139
+ }
140
+
141
+ // @public
142
+ export interface Jobs {
143
+ create(jobName: string, resourceGroupName: string, body: PutJobParameters, options?: JobsCreateOptionalParams): Promise<JobsCreateResponse>;
144
+ delete(jobName: string, resourceGroupName: string, options?: JobsDeleteOptionalParams): Promise<void>;
145
+ get(jobName: string, resourceGroupName: string, options?: JobsGetOptionalParams): Promise<JobsGetResponse>;
146
+ listByResourceGroup(resourceGroupName: string, options?: JobsListByResourceGroupOptionalParams): PagedAsyncIterableIterator<JobResponse>;
147
+ listBySubscription(options?: JobsListBySubscriptionOptionalParams): PagedAsyncIterableIterator<JobResponse>;
148
+ update(jobName: string, resourceGroupName: string, body: UpdateJobParameters, options?: JobsUpdateOptionalParams): Promise<JobsUpdateResponse>;
149
+ }
150
+
151
+ // @public
152
+ export interface JobsCreateOptionalParams extends coreClient.OperationOptions {
153
+ clientTenantId?: string;
154
+ }
155
+
156
+ // @public
157
+ export type JobsCreateResponse = JobResponse;
158
+
159
+ // @public
160
+ export interface JobsDeleteOptionalParams extends coreClient.OperationOptions {
161
+ }
162
+
163
+ // @public
164
+ export interface JobsGetOptionalParams extends coreClient.OperationOptions {
165
+ }
166
+
167
+ // @public
168
+ export type JobsGetResponse = JobResponse;
169
+
170
+ // @public
171
+ export interface JobsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
172
+ filter?: string;
173
+ top?: number;
174
+ }
175
+
176
+ // @public
177
+ export type JobsListByResourceGroupNextResponse = ListJobsResponse;
178
+
179
+ // @public
180
+ export interface JobsListByResourceGroupOptionalParams extends coreClient.OperationOptions {
181
+ filter?: string;
182
+ top?: number;
183
+ }
184
+
185
+ // @public
186
+ export type JobsListByResourceGroupResponse = ListJobsResponse;
187
+
188
+ // @public
189
+ export interface JobsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
190
+ filter?: string;
191
+ top?: number;
192
+ }
193
+
194
+ // @public
195
+ export type JobsListBySubscriptionNextResponse = ListJobsResponse;
196
+
197
+ // @public
198
+ export interface JobsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
199
+ filter?: string;
200
+ top?: number;
201
+ }
202
+
203
+ // @public
204
+ export type JobsListBySubscriptionResponse = ListJobsResponse;
205
+
206
+ // @public
207
+ export interface JobsUpdateOptionalParams extends coreClient.OperationOptions {
208
+ }
209
+
210
+ // @public
211
+ export type JobsUpdateResponse = JobResponse;
212
+
213
+ // @public
214
+ export enum KnownCreatedByType {
215
+ // (undocumented)
216
+ Application = "Application",
217
+ // (undocumented)
218
+ Key = "Key",
219
+ // (undocumented)
220
+ ManagedIdentity = "ManagedIdentity",
221
+ // (undocumented)
222
+ User = "User"
223
+ }
224
+
225
+ // @public
226
+ export enum KnownDriveState {
227
+ // (undocumented)
228
+ Completed = "Completed",
229
+ // (undocumented)
230
+ CompletedMoreInfo = "CompletedMoreInfo",
231
+ // (undocumented)
232
+ NeverReceived = "NeverReceived",
233
+ // (undocumented)
234
+ Received = "Received",
235
+ // (undocumented)
236
+ ShippedBack = "ShippedBack",
237
+ // (undocumented)
238
+ Specified = "Specified",
239
+ // (undocumented)
240
+ Transferring = "Transferring"
241
+ }
242
+
243
+ // @public
244
+ export enum KnownEncryptionKekType {
245
+ // (undocumented)
246
+ CustomerManaged = "CustomerManaged",
247
+ // (undocumented)
248
+ MicrosoftManaged = "MicrosoftManaged"
249
+ }
250
+
251
+ // @public
252
+ export enum KnownIdentityType {
253
+ // (undocumented)
254
+ None = "None",
255
+ // (undocumented)
256
+ SystemAssigned = "SystemAssigned",
257
+ // (undocumented)
258
+ UserAssigned = "UserAssigned"
259
+ }
260
+
261
+ // @public
262
+ export interface ListJobsResponse {
263
+ nextLink?: string;
264
+ value?: JobResponse[];
265
+ }
266
+
267
+ // @public
268
+ export interface ListOperationsResponse {
269
+ value?: Operation[];
270
+ }
271
+
272
+ // @public
273
+ interface Location_2 {
274
+ additionalShippingInformation?: string;
275
+ alternateLocations?: string[];
276
+ city?: string;
277
+ countryOrRegion?: string;
278
+ id?: string;
279
+ name?: string;
280
+ phone?: string;
281
+ postalCode?: string;
282
+ recipientName?: string;
283
+ stateOrProvince?: string;
284
+ streetAddress1?: string;
285
+ streetAddress2?: string;
286
+ supportedCarriers?: string[];
287
+ type?: string;
288
+ }
289
+ export { Location_2 as Location }
290
+
291
+ // @public
292
+ export interface Locations {
293
+ get(locationName: string, options?: LocationsGetOptionalParams): Promise<LocationsGetResponse>;
294
+ list(options?: LocationsListOptionalParams): PagedAsyncIterableIterator<Location_2>;
295
+ }
296
+
297
+ // @public
298
+ export interface LocationsGetOptionalParams extends coreClient.OperationOptions {
299
+ }
300
+
301
+ // @public
302
+ export type LocationsGetResponse = Location_2;
303
+
304
+ // @public
305
+ export interface LocationsListOptionalParams extends coreClient.OperationOptions {
306
+ }
307
+
308
+ // @public
309
+ export type LocationsListResponse = LocationsResponse;
310
+
311
+ // @public
312
+ export interface LocationsResponse {
313
+ value?: Location_2[];
314
+ }
315
+
316
+ // @public
317
+ export interface Operation {
318
+ description?: string;
319
+ name: string;
320
+ operation?: string;
321
+ provider?: string;
322
+ resource?: string;
323
+ }
324
+
325
+ // @public
326
+ export interface Operations {
327
+ list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;
328
+ }
329
+
330
+ // @public
331
+ export interface OperationsListOptionalParams extends coreClient.OperationOptions {
332
+ }
333
+
334
+ // @public
335
+ export type OperationsListResponse = ListOperationsResponse;
336
+
337
+ // @public
338
+ export interface PackageInformation {
339
+ carrierName: string;
340
+ driveCount: number;
341
+ shipDate: string;
342
+ trackingNumber: string;
343
+ }
344
+
345
+ // @public
346
+ export interface PutJobParameters {
347
+ location?: string;
348
+ properties?: JobDetails;
349
+ tags?: Record<string, unknown>;
350
+ }
351
+
352
+ // @public
353
+ export interface ReturnAddress {
354
+ city: string;
355
+ countryOrRegion: string;
356
+ email: string;
357
+ phone: string;
358
+ postalCode: string;
359
+ recipientName: string;
360
+ stateOrProvince?: string;
361
+ streetAddress1: string;
362
+ streetAddress2?: string;
363
+ }
364
+
365
+ // @public
366
+ export interface ReturnShipping {
367
+ carrierAccountNumber: string;
368
+ carrierName: string;
369
+ }
370
+
371
+ // @public
372
+ export interface ShippingInformation {
373
+ readonly additionalInformation?: string;
374
+ city?: string;
375
+ countryOrRegion?: string;
376
+ phone?: string;
377
+ postalCode?: string;
378
+ recipientName?: string;
379
+ stateOrProvince?: string;
380
+ streetAddress1?: string;
381
+ streetAddress2?: string;
382
+ }
383
+
384
+ // @public (undocumented)
385
+ export class StorageImportExport extends coreClient.ServiceClient {
386
+ // (undocumented)
387
+ $host: string;
388
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: StorageImportExportOptionalParams);
389
+ // (undocumented)
390
+ acceptLanguage?: string;
391
+ // (undocumented)
392
+ apiVersion: string;
393
+ // (undocumented)
394
+ bitLockerKeys: BitLockerKeys;
395
+ // (undocumented)
396
+ jobs: Jobs;
397
+ // (undocumented)
398
+ locations: Locations;
399
+ // (undocumented)
400
+ operations: Operations;
401
+ // (undocumented)
402
+ subscriptionId: string;
403
+ }
404
+
405
+ // @public
406
+ export interface StorageImportExportOptionalParams extends coreClient.ServiceClientOptions {
407
+ $host?: string;
408
+ acceptLanguage?: string;
409
+ apiVersion?: string;
410
+ endpoint?: string;
411
+ }
412
+
413
+ // @public
414
+ export interface SystemData {
415
+ createdAt?: Date;
416
+ createdBy?: string;
417
+ createdByType?: CreatedByType;
418
+ lastModifiedAt?: Date;
419
+ lastModifiedBy?: string;
420
+ lastModifiedByType?: CreatedByType;
421
+ }
422
+
423
+ // @public
424
+ export interface UpdateJobParameters {
425
+ backupDriveManifest?: boolean;
426
+ cancelRequested?: boolean;
427
+ deliveryPackage?: DeliveryPackageInformation;
428
+ driveList?: DriveStatus[];
429
+ logLevel?: string;
430
+ returnAddress?: ReturnAddress;
431
+ returnShipping?: ReturnShipping;
432
+ state?: string;
433
+ tags?: Record<string, unknown>;
434
+ }
435
+
436
+ // (No @packageDocumentation comment for this package)
437
+
438
+ ```
package/rollup.config.js CHANGED
@@ -1,31 +1,188 @@
1
- import nodeResolve from "rollup-plugin-node-resolve";
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import nodeResolve from "@rollup/plugin-node-resolve";
10
+ import cjs from "@rollup/plugin-commonjs";
11
+ import sourcemaps from "rollup-plugin-sourcemaps";
12
+ import multiEntry from "@rollup/plugin-multi-entry";
13
+ import json from "@rollup/plugin-json";
14
+
15
+ import nodeBuiltins from "builtin-modules";
16
+
17
+ /**
18
+ * Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
19
+ *
20
+ * NOTE: this manual configuration is only needed because OpenTelemetry uses an
21
+ * __exportStar downleveled helper function to declare its exports which confuses
22
+ * rollup's automatic discovery mechanism.
23
+ *
24
+ * @returns an object reference that can be `...`'d into your cjs() configuration.
25
+ */
26
+ export function openTelemetryCommonJs() {
27
+ const namedExports = {};
28
+
29
+ for (const key of [
30
+ "@opentelemetry/api",
31
+ "@azure/core-tracing/node_modules/@opentelemetry/api"
32
+ ]) {
33
+ namedExports[key] = [
34
+ "SpanKind",
35
+ "TraceFlags",
36
+ "getSpan",
37
+ "setSpan",
38
+ "SpanStatusCode",
39
+ "getSpanContext",
40
+ "setSpanContext"
41
+ ];
42
+ }
43
+
44
+ const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
45
+
46
+ for (const version of releasedOpenTelemetryVersions) {
47
+ namedExports[
48
+ // working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
49
+ `../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
50
+ ] = [
51
+ "SpanKind",
52
+ "TraceFlags",
53
+ "getSpan",
54
+ "setSpan",
55
+ "StatusCode",
56
+ "CanonicalCode",
57
+ "getSpanContext",
58
+ "setSpanContext"
59
+ ];
60
+ }
61
+
62
+ return namedExports;
63
+ }
64
+
65
+ // #region Warning Handler
66
+
67
+ /**
68
+ * A function that can determine whether a rollupwarning should be ignored. If
69
+ * the function returns `true`, then the warning will not be displayed.
70
+ */
71
+
72
+ function ignoreNiseSinonEvalWarnings(warning) {
73
+ return (
74
+ warning.code === "EVAL" &&
75
+ warning.id &&
76
+ (warning.id.includes("node_modules/nise") ||
77
+ warning.id.includes("node_modules/sinon")) === true
78
+ );
79
+ }
80
+
81
+ function ignoreChaiCircularDependencyWarnings(warning) {
82
+ return (
83
+ warning.code === "CIRCULAR_DEPENDENCY" &&
84
+ warning.importer && warning.importer.includes("node_modules/chai") === true
85
+ );
86
+ }
87
+
88
+ const warningInhibitors = [
89
+ ignoreChaiCircularDependencyWarnings,
90
+ ignoreNiseSinonEvalWarnings
91
+ ];
92
+
2
93
  /**
3
- * @type {import('rollup').RollupFileOptions}
94
+ * Construct a warning handler for the shared rollup configuration
95
+ * that ignores certain warnings that are not relevant to testing.
4
96
  */
5
- const config = {
6
- input: './esm/storageImportExportManagementClient.js',
7
- external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"],
8
- output: {
9
- file: "./dist/arm-storageimportexport.js",
10
- format: "umd",
11
- name: "Azure.ArmStorageimportexport",
12
- sourcemap: true,
13
- globals: {
14
- "@azure/ms-rest-js": "msRest",
15
- "@azure/ms-rest-azure-js": "msRestAzure"
97
+ function makeOnWarnForTesting() {
98
+ return (warning, warn) => {
99
+ // If every inhibitor returns false (i.e. no inhibitors), then show the warning
100
+ if (warningInhibitors.every((inhib) => !inhib(warning))) {
101
+ warn(warning);
102
+ }
103
+ };
104
+ }
105
+
106
+ // #endregion
107
+
108
+ function makeBrowserTestConfig() {
109
+ const config = {
110
+ input: {
111
+ include: ["dist-esm/test/**/*.spec.js"],
112
+ exclude: ["dist-esm/test/**/node/**"]
16
113
  },
17
- banner: `/*
18
- * Copyright (c) Microsoft Corporation. All rights reserved.
19
- * Licensed under the MIT License. See License.txt in the project root for
20
- * license information.
21
- *
22
- * Code generated by Microsoft (R) AutoRest Code Generator.
23
- * Changes may cause incorrect behavior and will be lost if the code is
24
- * regenerated.
25
- */`
26
- },
27
- plugins: [
28
- nodeResolve({ module: true })
29
- ]
114
+ output: {
115
+ file: `dist-test/index.browser.js`,
116
+ format: "umd",
117
+ sourcemap: true
118
+ },
119
+ preserveSymlinks: false,
120
+ plugins: [
121
+ multiEntry({ exports: false }),
122
+ nodeResolve({
123
+ mainFields: ["module", "browser"]
124
+ }),
125
+ cjs({
126
+ namedExports: {
127
+ // Chai's strange internal architecture makes it impossible to statically
128
+ // analyze its exports.
129
+ chai: [
130
+ "version",
131
+ "use",
132
+ "util",
133
+ "config",
134
+ "expect",
135
+ "should",
136
+ "assert"
137
+ ],
138
+ ...openTelemetryCommonJs()
139
+ }
140
+ }),
141
+ json(),
142
+ sourcemaps()
143
+ //viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
144
+ ],
145
+ onwarn: makeOnWarnForTesting(),
146
+ // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0,
147
+ // rollup started respecting the "sideEffects" field in package.json. Since
148
+ // our package.json sets "sideEffects=false", this also applies to test
149
+ // code, which causes all tests to be removed by tree-shaking.
150
+ treeshake: false
151
+ };
152
+
153
+ return config;
154
+ }
155
+
156
+ const defaultConfigurationOptions = {
157
+ disableBrowserBundle: false
30
158
  };
31
- export default config;
159
+
160
+ export function makeConfig(pkg, options) {
161
+ options = {
162
+ ...defaultConfigurationOptions,
163
+ ...(options || {})
164
+ };
165
+
166
+ const baseConfig = {
167
+ // Use the package's module field if it has one
168
+ input: pkg["module"] || "dist-esm/src/index.js",
169
+ external: [
170
+ ...nodeBuiltins,
171
+ ...Object.keys(pkg.dependencies),
172
+ ...Object.keys(pkg.devDependencies)
173
+ ],
174
+ output: { file: "dist/index.js", format: "cjs", sourcemap: true },
175
+ preserveSymlinks: false,
176
+ plugins: [sourcemaps(), nodeResolve(), cjs()]
177
+ };
178
+
179
+ const config = [baseConfig];
180
+
181
+ if (!options.disableBrowserBundle) {
182
+ config.push(makeBrowserTestConfig());
183
+ }
184
+
185
+ return config;
186
+ }
187
+
188
+ export default makeConfig(require("./package.json"));
package/src/index.ts ADDED
@@ -0,0 +1,12 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ /// <reference lib="esnext.asynciterable" />
10
+ export * from "./models";
11
+ export { StorageImportExport } from "./storageImportExport";
12
+ export * from "./operationsInterfaces";