@azure/arm-commitmentplans 1.3.1 → 2.0.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.
Files changed (164) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +69 -80
  4. package/dist/index.js +1794 -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/azureMLCommitmentPlansManagementClient.d.ts +22 -0
  9. package/dist-esm/src/azureMLCommitmentPlansManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/azureMLCommitmentPlansManagementClient.js +55 -0
  11. package/dist-esm/src/azureMLCommitmentPlansManagementClient.js.map +1 -0
  12. package/dist-esm/src/index.d.ts +5 -0
  13. package/dist-esm/src/index.d.ts.map +1 -0
  14. package/dist-esm/src/index.js +12 -0
  15. package/dist-esm/src/index.js.map +1 -0
  16. package/dist-esm/src/models/index.d.ts +522 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +27 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +24 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/mappers.js +352 -337
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +15 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/dist-esm/src/models/parameters.js +125 -0
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operations/commitmentAssociations.d.ts +55 -0
  29. package/dist-esm/src/operations/commitmentAssociations.d.ts.map +1 -0
  30. package/dist-esm/src/operations/commitmentAssociations.js +203 -0
  31. package/dist-esm/src/operations/commitmentAssociations.js.map +1 -0
  32. package/dist-esm/src/operations/commitmentPlans.d.ts +84 -0
  33. package/dist-esm/src/operations/commitmentPlans.d.ts.map +1 -0
  34. package/dist-esm/src/operations/commitmentPlans.js +332 -0
  35. package/dist-esm/src/operations/commitmentPlans.js.map +1 -0
  36. package/{esm → dist-esm/src}/operations/index.d.ts +1 -0
  37. package/dist-esm/src/operations/index.d.ts.map +1 -0
  38. package/{esm → dist-esm/src}/operations/index.js +4 -5
  39. package/dist-esm/src/operations/index.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 +87 -0
  43. package/dist-esm/src/operations/operations.js.map +1 -0
  44. package/dist-esm/src/operations/skus.d.ts +26 -0
  45. package/dist-esm/src/operations/skus.d.ts.map +1 -0
  46. package/dist-esm/src/operations/skus.js +87 -0
  47. package/dist-esm/src/operations/skus.js.map +1 -0
  48. package/dist-esm/src/operations/usageHistory.d.ts +38 -0
  49. package/dist-esm/src/operations/usageHistory.d.ts.map +1 -0
  50. package/dist-esm/src/operations/usageHistory.js +131 -0
  51. package/dist-esm/src/operations/usageHistory.js.map +1 -0
  52. package/dist-esm/src/operationsInterfaces/commitmentAssociations.d.ts +30 -0
  53. package/dist-esm/src/operationsInterfaces/commitmentAssociations.d.ts.map +1 -0
  54. package/dist-esm/src/operationsInterfaces/commitmentAssociations.js +9 -0
  55. package/dist-esm/src/operationsInterfaces/commitmentAssociations.js.map +1 -0
  56. package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts +48 -0
  57. package/dist-esm/src/operationsInterfaces/commitmentPlans.d.ts.map +1 -0
  58. package/dist-esm/src/operationsInterfaces/commitmentPlans.js +9 -0
  59. package/dist-esm/src/operationsInterfaces/commitmentPlans.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
  61. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/index.js +13 -0
  63. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  65. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  67. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/skus.d.ts +11 -0
  69. package/dist-esm/src/operationsInterfaces/skus.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/skus.js +9 -0
  71. package/dist-esm/src/operationsInterfaces/skus.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/usageHistory.d.ts +13 -0
  73. package/dist-esm/src/operationsInterfaces/usageHistory.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/usageHistory.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/usageHistory.js.map +1 -0
  76. package/dist-esm/test/sampleTest.d.ts +2 -0
  77. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  78. package/dist-esm/test/sampleTest.js +40 -0
  79. package/dist-esm/test/sampleTest.js.map +1 -0
  80. package/package.json +74 -33
  81. package/review/arm-commitmentplans.api.md +405 -0
  82. package/rollup.config.js +184 -27
  83. package/src/azureMLCommitmentPlansManagementClient.ts +82 -41
  84. package/src/index.ts +12 -0
  85. package/src/models/index.ts +388 -745
  86. package/src/models/mappers.ts +354 -336
  87. package/src/models/parameters.ts +87 -35
  88. package/src/operations/commitmentAssociations.ts +183 -174
  89. package/src/operations/commitmentPlans.ts +277 -340
  90. package/src/operations/index.ts +4 -5
  91. package/src/operations/operations.ts +95 -0
  92. package/src/operations/skus.ts +65 -48
  93. package/src/operations/usageHistory.ts +135 -89
  94. package/src/operationsInterfaces/commitmentAssociations.ts +62 -0
  95. package/src/operationsInterfaces/commitmentPlans.ts +92 -0
  96. package/src/operationsInterfaces/index.ts +13 -0
  97. package/src/operationsInterfaces/operations.ts +22 -0
  98. package/src/operationsInterfaces/skus.ts +22 -0
  99. package/src/operationsInterfaces/usageHistory.ts +26 -0
  100. package/tsconfig.json +6 -5
  101. package/types/arm-commitmentplans.d.ts +706 -0
  102. package/types/tsdoc-metadata.json +11 -0
  103. package/dist/arm-commitmentplans.js +0 -1659
  104. package/dist/arm-commitmentplans.js.map +0 -1
  105. package/dist/arm-commitmentplans.min.js +0 -1
  106. package/dist/arm-commitmentplans.min.js.map +0 -1
  107. package/esm/azureMLCommitmentPlansManagementClient.d.ts +0 -27
  108. package/esm/azureMLCommitmentPlansManagementClient.d.ts.map +0 -1
  109. package/esm/azureMLCommitmentPlansManagementClient.js +0 -41
  110. package/esm/azureMLCommitmentPlansManagementClient.js.map +0 -1
  111. package/esm/azureMLCommitmentPlansManagementClientContext.d.ts +0 -22
  112. package/esm/azureMLCommitmentPlansManagementClientContext.d.ts.map +0 -1
  113. package/esm/azureMLCommitmentPlansManagementClientContext.js +0 -61
  114. package/esm/azureMLCommitmentPlansManagementClientContext.js.map +0 -1
  115. package/esm/models/commitmentAssociationsMappers.d.ts +0 -2
  116. package/esm/models/commitmentAssociationsMappers.d.ts.map +0 -1
  117. package/esm/models/commitmentAssociationsMappers.js +0 -11
  118. package/esm/models/commitmentAssociationsMappers.js.map +0 -1
  119. package/esm/models/commitmentPlansMappers.d.ts +0 -2
  120. package/esm/models/commitmentPlansMappers.d.ts.map +0 -1
  121. package/esm/models/commitmentPlansMappers.js +0 -11
  122. package/esm/models/commitmentPlansMappers.js.map +0 -1
  123. package/esm/models/index.d.ts +0 -901
  124. package/esm/models/index.d.ts.map +0 -1
  125. package/esm/models/index.js +0 -10
  126. package/esm/models/index.js.map +0 -1
  127. package/esm/models/mappers.d.ts +0 -23
  128. package/esm/models/mappers.d.ts.map +0 -1
  129. package/esm/models/mappers.js.map +0 -1
  130. package/esm/models/parameters.d.ts +0 -10
  131. package/esm/models/parameters.d.ts.map +0 -1
  132. package/esm/models/parameters.js +0 -93
  133. package/esm/models/parameters.js.map +0 -1
  134. package/esm/models/skusMappers.d.ts +0 -2
  135. package/esm/models/skusMappers.d.ts.map +0 -1
  136. package/esm/models/skusMappers.js +0 -11
  137. package/esm/models/skusMappers.js.map +0 -1
  138. package/esm/models/usageHistoryMappers.d.ts +0 -2
  139. package/esm/models/usageHistoryMappers.d.ts.map +0 -1
  140. package/esm/models/usageHistoryMappers.js +0 -11
  141. package/esm/models/usageHistoryMappers.js.map +0 -1
  142. package/esm/operations/commitmentAssociations.d.ts +0 -103
  143. package/esm/operations/commitmentAssociations.d.ts.map +0 -1
  144. package/esm/operations/commitmentAssociations.js +0 -157
  145. package/esm/operations/commitmentAssociations.js.map +0 -1
  146. package/esm/operations/commitmentPlans.d.ts +0 -175
  147. package/esm/operations/commitmentPlans.d.ts.map +0 -1
  148. package/esm/operations/commitmentPlans.js +0 -273
  149. package/esm/operations/commitmentPlans.js.map +0 -1
  150. package/esm/operations/index.d.ts.map +0 -1
  151. package/esm/operations/index.js.map +0 -1
  152. package/esm/operations/skus.d.ts +0 -28
  153. package/esm/operations/skus.d.ts.map +0 -1
  154. package/esm/operations/skus.js +0 -54
  155. package/esm/operations/skus.js.map +0 -1
  156. package/esm/operations/usageHistory.d.ts +0 -52
  157. package/esm/operations/usageHistory.d.ts.map +0 -1
  158. package/esm/operations/usageHistory.js +0 -85
  159. package/esm/operations/usageHistory.js.map +0 -1
  160. package/src/azureMLCommitmentPlansManagementClientContext.ts +0 -68
  161. package/src/models/commitmentAssociationsMappers.ts +0 -24
  162. package/src/models/commitmentPlansMappers.ts +0 -24
  163. package/src/models/skusMappers.ts +0 -20
  164. package/src/models/usageHistoryMappers.ts +0 -16
@@ -0,0 +1,405 @@
1
+ ## API Report File for "@azure/arm-commitmentplans"
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 (undocumented)
12
+ export class AzureMLCommitmentPlansManagementClient extends coreClient.ServiceClient {
13
+ // (undocumented)
14
+ $host: string;
15
+ constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureMLCommitmentPlansManagementClientOptionalParams);
16
+ // (undocumented)
17
+ apiVersion: string;
18
+ // (undocumented)
19
+ commitmentAssociations: CommitmentAssociations;
20
+ // (undocumented)
21
+ commitmentPlans: CommitmentPlans;
22
+ // (undocumented)
23
+ operations: Operations;
24
+ // (undocumented)
25
+ skus: Skus;
26
+ // (undocumented)
27
+ subscriptionId: string;
28
+ // (undocumented)
29
+ usageHistory: UsageHistory;
30
+ }
31
+
32
+ // @public
33
+ export interface AzureMLCommitmentPlansManagementClientOptionalParams extends coreClient.ServiceClientOptions {
34
+ $host?: string;
35
+ apiVersion?: string;
36
+ endpoint?: string;
37
+ }
38
+
39
+ // @public
40
+ export interface CatalogSku {
41
+ readonly capabilities?: SkuCapability[];
42
+ readonly capacity?: SkuCapacity;
43
+ readonly costs?: SkuCost[];
44
+ readonly locations?: string[];
45
+ readonly name?: string;
46
+ readonly resourceType?: string;
47
+ readonly restrictions?: SkuRestrictions[];
48
+ readonly tier?: string;
49
+ }
50
+
51
+ // @public
52
+ export type CommitmentAssociation = Resource & {
53
+ etag?: string;
54
+ properties?: CommitmentAssociationProperties;
55
+ };
56
+
57
+ // @public
58
+ export interface CommitmentAssociationListResult {
59
+ nextLink?: string;
60
+ value?: CommitmentAssociation[];
61
+ }
62
+
63
+ // @public
64
+ export interface CommitmentAssociationProperties {
65
+ readonly associatedResourceId?: string;
66
+ readonly commitmentPlanId?: string;
67
+ readonly creationDate?: Date;
68
+ }
69
+
70
+ // @public
71
+ export interface CommitmentAssociations {
72
+ get(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, options?: CommitmentAssociationsGetOptionalParams): Promise<CommitmentAssociationsGetResponse>;
73
+ list(resourceGroupName: string, commitmentPlanName: string, options?: CommitmentAssociationsListOptionalParams): PagedAsyncIterableIterator<CommitmentAssociation>;
74
+ move(resourceGroupName: string, commitmentPlanName: string, commitmentAssociationName: string, movePayload: MoveCommitmentAssociationRequest, options?: CommitmentAssociationsMoveOptionalParams): Promise<CommitmentAssociationsMoveResponse>;
75
+ }
76
+
77
+ // @public
78
+ export interface CommitmentAssociationsGetOptionalParams extends coreClient.OperationOptions {
79
+ }
80
+
81
+ // @public
82
+ export type CommitmentAssociationsGetResponse = CommitmentAssociation;
83
+
84
+ // @public
85
+ export interface CommitmentAssociationsListNextOptionalParams extends coreClient.OperationOptions {
86
+ skipToken?: string;
87
+ }
88
+
89
+ // @public
90
+ export type CommitmentAssociationsListNextResponse = CommitmentAssociationListResult;
91
+
92
+ // @public
93
+ export interface CommitmentAssociationsListOptionalParams extends coreClient.OperationOptions {
94
+ skipToken?: string;
95
+ }
96
+
97
+ // @public
98
+ export type CommitmentAssociationsListResponse = CommitmentAssociationListResult;
99
+
100
+ // @public
101
+ export interface CommitmentAssociationsMoveOptionalParams extends coreClient.OperationOptions {
102
+ }
103
+
104
+ // @public
105
+ export type CommitmentAssociationsMoveResponse = CommitmentAssociation;
106
+
107
+ // @public
108
+ export type CommitmentPlan = Resource & {
109
+ etag?: string;
110
+ readonly properties?: CommitmentPlanProperties;
111
+ sku?: ResourceSku;
112
+ };
113
+
114
+ // @public
115
+ export interface CommitmentPlanListResult {
116
+ nextLink?: string;
117
+ value?: CommitmentPlan[];
118
+ }
119
+
120
+ // @public
121
+ export interface CommitmentPlanPatchPayload {
122
+ sku?: ResourceSku;
123
+ tags?: {
124
+ [propertyName: string]: string;
125
+ };
126
+ }
127
+
128
+ // @public
129
+ export interface CommitmentPlanProperties {
130
+ readonly chargeForOverage?: boolean;
131
+ readonly chargeForPlan?: boolean;
132
+ readonly creationDate?: Date;
133
+ readonly includedQuantities?: {
134
+ [propertyName: string]: PlanQuantity;
135
+ };
136
+ readonly maxAssociationLimit?: number;
137
+ readonly maxCapacityLimit?: number;
138
+ readonly minCapacityLimit?: number;
139
+ readonly planMeter?: string;
140
+ readonly refillFrequencyInDays?: number;
141
+ readonly suspendPlanOnOverage?: boolean;
142
+ }
143
+
144
+ // @public
145
+ export interface CommitmentPlans {
146
+ createOrUpdate(resourceGroupName: string, commitmentPlanName: string, createOrUpdatePayload: CommitmentPlan, options?: CommitmentPlansCreateOrUpdateOptionalParams): Promise<CommitmentPlansCreateOrUpdateResponse>;
147
+ get(resourceGroupName: string, commitmentPlanName: string, options?: CommitmentPlansGetOptionalParams): Promise<CommitmentPlansGetResponse>;
148
+ list(options?: CommitmentPlansListOptionalParams): PagedAsyncIterableIterator<CommitmentPlan>;
149
+ listInResourceGroup(resourceGroupName: string, options?: CommitmentPlansListInResourceGroupOptionalParams): PagedAsyncIterableIterator<CommitmentPlan>;
150
+ patch(resourceGroupName: string, commitmentPlanName: string, patchPayload: CommitmentPlanPatchPayload, options?: CommitmentPlansPatchOptionalParams): Promise<CommitmentPlansPatchResponse>;
151
+ remove(resourceGroupName: string, commitmentPlanName: string, options?: CommitmentPlansRemoveOptionalParams): Promise<void>;
152
+ }
153
+
154
+ // @public
155
+ export interface CommitmentPlansCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
156
+ }
157
+
158
+ // @public
159
+ export type CommitmentPlansCreateOrUpdateResponse = CommitmentPlan;
160
+
161
+ // @public
162
+ export interface CommitmentPlansGetOptionalParams extends coreClient.OperationOptions {
163
+ }
164
+
165
+ // @public
166
+ export type CommitmentPlansGetResponse = CommitmentPlan;
167
+
168
+ // @public
169
+ export interface CommitmentPlansListInResourceGroupNextOptionalParams extends coreClient.OperationOptions {
170
+ skipToken?: string;
171
+ }
172
+
173
+ // @public
174
+ export type CommitmentPlansListInResourceGroupNextResponse = CommitmentPlanListResult;
175
+
176
+ // @public
177
+ export interface CommitmentPlansListInResourceGroupOptionalParams extends coreClient.OperationOptions {
178
+ skipToken?: string;
179
+ }
180
+
181
+ // @public
182
+ export type CommitmentPlansListInResourceGroupResponse = CommitmentPlanListResult;
183
+
184
+ // @public
185
+ export interface CommitmentPlansListNextOptionalParams extends coreClient.OperationOptions {
186
+ skipToken?: string;
187
+ }
188
+
189
+ // @public
190
+ export type CommitmentPlansListNextResponse = CommitmentPlanListResult;
191
+
192
+ // @public
193
+ export interface CommitmentPlansListOptionalParams extends coreClient.OperationOptions {
194
+ skipToken?: string;
195
+ }
196
+
197
+ // @public
198
+ export type CommitmentPlansListResponse = CommitmentPlanListResult;
199
+
200
+ // @public
201
+ export interface CommitmentPlansPatchOptionalParams extends coreClient.OperationOptions {
202
+ }
203
+
204
+ // @public
205
+ export type CommitmentPlansPatchResponse = CommitmentPlan;
206
+
207
+ // @public
208
+ export interface CommitmentPlansRemoveOptionalParams extends coreClient.OperationOptions {
209
+ }
210
+
211
+ // @public
212
+ export enum KnownResourceSkuRestrictionsReasonCode {
213
+ // (undocumented)
214
+ NotAvailableForSubscription = "NotAvailableForSubscription",
215
+ // (undocumented)
216
+ QuotaId = "QuotaId"
217
+ }
218
+
219
+ // @public
220
+ export enum KnownResourceSkuRestrictionsType {
221
+ // (undocumented)
222
+ Location = "location",
223
+ // (undocumented)
224
+ Zone = "zone"
225
+ }
226
+
227
+ // @public
228
+ export enum KnownSkuCapacityScaleType {
229
+ // (undocumented)
230
+ Automatic = "Automatic",
231
+ // (undocumented)
232
+ Manual = "Manual",
233
+ // (undocumented)
234
+ None = "None"
235
+ }
236
+
237
+ // @public
238
+ export interface MoveCommitmentAssociationRequest {
239
+ destinationPlanId?: string;
240
+ }
241
+
242
+ // @public
243
+ export interface OperationDisplayInfo {
244
+ readonly description?: string;
245
+ readonly operation?: string;
246
+ readonly provider?: string;
247
+ readonly resource?: string;
248
+ }
249
+
250
+ // @public
251
+ export interface OperationEntity {
252
+ display?: OperationDisplayInfo;
253
+ readonly name?: string;
254
+ }
255
+
256
+ // @public
257
+ export interface OperationEntityListResult {
258
+ readonly value?: OperationEntity[];
259
+ }
260
+
261
+ // @public
262
+ export interface Operations {
263
+ list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator<OperationEntity>;
264
+ }
265
+
266
+ // @public
267
+ export interface OperationsListOptionalParams extends coreClient.OperationOptions {
268
+ }
269
+
270
+ // @public
271
+ export type OperationsListResponse = OperationEntityListResult;
272
+
273
+ // @public
274
+ export interface PlanQuantity {
275
+ readonly allowance?: number;
276
+ readonly amount?: number;
277
+ readonly includedQuantityMeter?: string;
278
+ readonly overageMeter?: string;
279
+ }
280
+
281
+ // @public
282
+ export interface PlanUsageHistory {
283
+ planDeletionOverage?: {
284
+ [propertyName: string]: number;
285
+ };
286
+ planMigrationOverage?: {
287
+ [propertyName: string]: number;
288
+ };
289
+ planQuantitiesAfterUsage?: {
290
+ [propertyName: string]: number;
291
+ };
292
+ planQuantitiesBeforeUsage?: {
293
+ [propertyName: string]: number;
294
+ };
295
+ planUsageOverage?: {
296
+ [propertyName: string]: number;
297
+ };
298
+ usage?: {
299
+ [propertyName: string]: number;
300
+ };
301
+ usageDate?: Date;
302
+ }
303
+
304
+ // @public
305
+ export interface PlanUsageHistoryListResult {
306
+ nextLink?: string;
307
+ value?: PlanUsageHistory[];
308
+ }
309
+
310
+ // @public
311
+ export interface Resource {
312
+ readonly id?: string;
313
+ location: string;
314
+ readonly name?: string;
315
+ tags?: {
316
+ [propertyName: string]: string;
317
+ };
318
+ readonly type?: string;
319
+ }
320
+
321
+ // @public
322
+ export interface ResourceSku {
323
+ capacity?: number;
324
+ name?: string;
325
+ tier?: string;
326
+ }
327
+
328
+ // @public
329
+ export type ResourceSkuRestrictionsReasonCode = string;
330
+
331
+ // @public
332
+ export type ResourceSkuRestrictionsType = string;
333
+
334
+ // @public
335
+ export interface SkuCapability {
336
+ readonly name?: string;
337
+ readonly value?: string;
338
+ }
339
+
340
+ // @public
341
+ export interface SkuCapacity {
342
+ readonly default?: number;
343
+ readonly maximum?: number;
344
+ readonly minimum?: number;
345
+ readonly scaleType?: SkuCapacityScaleType;
346
+ }
347
+
348
+ // @public
349
+ export type SkuCapacityScaleType = string;
350
+
351
+ // @public
352
+ export interface SkuCost {
353
+ readonly extendedUnit?: string;
354
+ readonly meterID?: string;
355
+ readonly quantity?: number;
356
+ }
357
+
358
+ // @public
359
+ export interface SkuListResult {
360
+ readonly value?: CatalogSku[];
361
+ }
362
+
363
+ // @public
364
+ export interface SkuRestrictions {
365
+ readonly reasonCode?: ResourceSkuRestrictionsReasonCode;
366
+ readonly type?: ResourceSkuRestrictionsType;
367
+ readonly values?: string[];
368
+ }
369
+
370
+ // @public
371
+ export interface Skus {
372
+ list(options?: SkusListOptionalParams): PagedAsyncIterableIterator<CatalogSku>;
373
+ }
374
+
375
+ // @public
376
+ export interface SkusListOptionalParams extends coreClient.OperationOptions {
377
+ }
378
+
379
+ // @public
380
+ export type SkusListResponse = SkuListResult;
381
+
382
+ // @public
383
+ export interface UsageHistory {
384
+ list(resourceGroupName: string, commitmentPlanName: string, options?: UsageHistoryListOptionalParams): PagedAsyncIterableIterator<PlanUsageHistory>;
385
+ }
386
+
387
+ // @public
388
+ export interface UsageHistoryListNextOptionalParams extends coreClient.OperationOptions {
389
+ skipToken?: string;
390
+ }
391
+
392
+ // @public
393
+ export type UsageHistoryListNextResponse = PlanUsageHistoryListResult;
394
+
395
+ // @public
396
+ export interface UsageHistoryListOptionalParams extends coreClient.OperationOptions {
397
+ skipToken?: string;
398
+ }
399
+
400
+ // @public
401
+ export type UsageHistoryListResponse = PlanUsageHistoryListResult;
402
+
403
+ // (No @packageDocumentation comment for this package)
404
+
405
+ ```
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/azureMLCommitmentPlansManagementClient.js',
7
- external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"],
8
- output: {
9
- file: "./dist/arm-commitmentplans.js",
10
- format: "umd",
11
- name: "Azure.ArmCommitmentplans",
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"));