@@ -39,12 +39,9 @@ namespace OpenAPI2 {
39
39
provisioning ?: string ;
40
40
base_url ?: string ;
41
41
sso_url ?: string ;
42
- version ?: UpdateProductBodyIntegrationVersion ;
42
+ version ?: 'v1' ;
43
43
features ?: ProductIntegrationFeatures ;
44
44
}
45
- export enum UpdateProductBodyIntegrationVersion {
46
- V1 = 'v1'
47
- }
48
45
export interface UpdateProduct {
49
46
id : string ;
50
47
body : UpdateProductBody ;
@@ -79,16 +76,10 @@ namespace OpenAPI2 {
79
76
}
80
77
export interface Region {
81
78
id : string ;
82
- type : RegionType ;
83
- version : RegionVersion ;
79
+ type : 'region' ;
80
+ version : 1 ;
84
81
body : RegionBody ;
85
82
}
86
- export enum RegionVersion {
87
- Version1 = 1
88
- }
89
- export enum RegionType {
90
- Region = 'region'
91
- }
92
83
export interface ProviderBody {
93
84
team_id : string ;
94
85
label : string ;
@@ -99,16 +90,10 @@ namespace OpenAPI2 {
99
90
}
100
91
export interface Provider {
101
92
id : string ;
102
- version : ProviderVersion ;
103
- type : ProviderType ;
93
+ version : 1 ;
94
+ type : 'provider' ;
104
95
body : ProviderBody ;
105
96
}
106
- export enum ProviderType {
107
- Provider = 'provider'
108
- }
109
- export enum ProviderVersion {
110
- Version1 = 1
111
- }
112
97
export interface ProductTags { }
113
98
export interface ProductListing {
114
99
// When true, everyone can see the product when requested. When false it will
@@ -153,11 +138,7 @@ namespace OpenAPI2 {
153
138
// Describes how the region for a resource is specified, if
154
139
// unspecified, then regions have no impact on this
155
140
// resource.
156
- region ?: ProductIntegrationFeaturesRegion ;
157
- }
158
- export enum ProductIntegrationFeaturesRegion {
159
- UserSpecified = 'user-specified' ,
160
- Unspecified = 'unspecified'
141
+ region ?: 'user-specified' | 'unspecified' ;
161
142
}
162
143
export interface ProductBody {
163
144
provider_id : string ;
@@ -186,40 +167,23 @@ namespace OpenAPI2 {
186
167
provisioning : string ;
187
168
base_url : string ;
188
169
sso_url ?: string ;
189
- version : ProductBodyIntegrationVersion ;
170
+ version : 'v1' ;
190
171
features : ProductIntegrationFeatures ;
191
172
}
192
- export enum ProductBodyIntegrationVersion {
193
- V1 = 'v1'
194
- }
195
173
export interface ProductBodyBilling {
196
- type : ProductBodyBillingType ;
197
- currency : ProductBodyBillingCurrency ;
198
- }
199
- export enum ProductBodyBillingCurrency {
200
- Usd = 'usd'
201
- }
202
- export enum ProductBodyBillingType {
203
- MonthlyProrated = 'monthly-prorated' ,
204
- MonthlyAnniversary = 'monthly-anniversary' ,
205
- AnnualAnniversary = 'annual-anniversary'
174
+ type : 'monthly-prorated' | 'monthly-anniversary' | 'annual-anniversary' ;
175
+ currency : 'usd' ;
206
176
}
207
177
export interface ProductBodyTerms {
208
178
url ?: string ;
209
179
provided : boolean ;
210
180
}
211
181
export interface Product {
212
182
id : string ;
213
- version : ProductVersion ;
214
- type : ProductType ;
183
+ version : 1 ;
184
+ type : 'product' ;
215
185
body : ProductBody ;
216
186
}
217
- export enum ProductType {
218
- Product = 'product'
219
- }
220
- export enum ProductVersion {
221
- Version1 = 1
222
- }
223
187
export interface PlanResizeList { }
224
188
export interface PlanBody {
225
189
provider_id : string ;
@@ -241,16 +205,10 @@ namespace OpenAPI2 {
241
205
}
242
206
export interface Plan {
243
207
id : string ;
244
- version : PlanVersion ;
245
- type : PlanType ;
208
+ version : 1 ;
209
+ type : 'plan' ;
246
210
body : PlanBody ;
247
211
}
248
- export enum PlanType {
249
- Plan = 'plan'
250
- }
251
- export enum PlanVersion {
252
- Version1 = 1
253
- }
254
212
export interface FeatureValuesList { }
255
213
export interface FeatureValueDetails {
256
214
label : string ;
@@ -285,7 +243,7 @@ namespace OpenAPI2 {
285
243
export interface FeatureType {
286
244
label : string ;
287
245
name : string ;
288
- type : FeatureTypeType ;
246
+ type : 'boolean' | 'string' | 'number' ;
289
247
// This sets whether or not the feature can be customized by a consumer.
290
248
customizable ?: boolean ;
291
249
// This sets whether or not the feature can be upgraded by the consumer after the
@@ -301,11 +259,6 @@ namespace OpenAPI2 {
301
259
measurable ?: boolean ;
302
260
values ?: FeatureValueDetails [ ] ;
303
261
}
304
- export enum FeatureTypeType {
305
- Boolean = 'boolean' ,
306
- String = 'string' ,
307
- Number = 'number'
308
- }
309
262
export interface FeatureNumericRange {
310
263
// Defines the end of the range ( inclusive ), from the previous, or 0;
311
264
// where the cost_multiple starts taking effect. If set to -1 this defines the
@@ -337,18 +290,12 @@ namespace OpenAPI2 {
337
290
}
338
291
export interface ExpandedProduct {
339
292
id : string ;
340
- version : ExpandedProductVersion ;
341
- type : ExpandedProductType ;
293
+ version : 1 ;
294
+ type : 'product' ;
342
295
body : ProductBody ;
343
296
plans ?: ExpandedPlan [ ] ;
344
297
provider : Provider ;
345
298
}
346
- export enum ExpandedProductType {
347
- Product = 'product'
348
- }
349
- export enum ExpandedProductVersion {
350
- Version1 = 1
351
- }
352
299
export interface ExpandedPlanBody extends PlanBody {
353
300
// An array of feature definitions for the plan, as defined on the Product.
354
301
expanded_features ?: ExpandedFeature [ ] ;
@@ -361,16 +308,10 @@ namespace OpenAPI2 {
361
308
}
362
309
export interface ExpandedPlan {
363
310
id : string ;
364
- version : ExpandedPlanVersion ;
365
- type : ExpandedPlanType ;
311
+ version : 1 ;
312
+ type : 'plan' ;
366
313
body : ExpandedPlanBody ;
367
314
}
368
- export enum ExpandedPlanType {
369
- Plan = 'plan'
370
- }
371
- export enum ExpandedPlanVersion {
372
- Version1 = 1
373
- }
374
315
export interface ExpandedFeature extends FeatureType {
375
316
// The string value set for the feature on the plan, this should only be used if the value property is null.
376
317
value_string ?: string ;
0 commit comments