@scaleway/sdk-product-catalog 1.2.0 → 1.4.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { PublicCatalogAPI } from './api.gen';
|
|
2
2
|
export * from './marshalling.gen';
|
|
3
|
-
export type { ListPublicCatalogProductsResponse, PublicCatalogApiListPublicCatalogProductsRequest, PublicCatalogProduct, PublicCatalogProductEnvironmentalImpactEstimation, PublicCatalogProductLocality, PublicCatalogProductPrice, PublicCatalogProductProperties, PublicCatalogProductPropertiesAppleSilicon, PublicCatalogProductPropertiesDedibox, PublicCatalogProductPropertiesElasticMetal, PublicCatalogProductPropertiesHardware, PublicCatalogProductPropertiesHardwareCPU, PublicCatalogProductPropertiesHardwareCPUArch, PublicCatalogProductPropertiesHardwareCPUPhysical, PublicCatalogProductPropertiesHardwareCPUVirtual, PublicCatalogProductPropertiesHardwareGPU, PublicCatalogProductPropertiesHardwareNetwork, PublicCatalogProductPropertiesHardwareRAM, PublicCatalogProductPropertiesHardwareStorage, PublicCatalogProductPropertiesInstance, PublicCatalogProductUnitOfMeasure, PublicCatalogProductUnitOfMeasureCountableUnit, } from './types.gen';
|
|
3
|
+
export type { ListPublicCatalogProductsResponse, PublicCatalogApiListPublicCatalogProductsRequest, PublicCatalogProduct, PublicCatalogProductEnvironmentalImpactEstimation, PublicCatalogProductLocality, PublicCatalogProductPrice, PublicCatalogProductProperties, PublicCatalogProductPropertiesAppleSilicon, PublicCatalogProductPropertiesDedibox, PublicCatalogProductPropertiesElasticMetal, PublicCatalogProductPropertiesHardware, PublicCatalogProductPropertiesHardwareCPU, PublicCatalogProductPropertiesHardwareCPUArch, PublicCatalogProductPropertiesHardwareCPUPhysical, PublicCatalogProductPropertiesHardwareCPUVirtual, PublicCatalogProductPropertiesHardwareGPU, PublicCatalogProductPropertiesHardwareNetwork, PublicCatalogProductPropertiesHardwareRAM, PublicCatalogProductPropertiesHardwareStorage, PublicCatalogProductPropertiesInstance, PublicCatalogProductStatus, PublicCatalogProductUnitOfMeasure, PublicCatalogProductUnitOfMeasureCountableUnit, } from './types.gen';
|
|
4
4
|
export * as ValidationRules from './validation-rules.gen';
|
|
@@ -141,7 +141,9 @@ const unmarshalPublicCatalogProductPropertiesInstance = (data) => {
|
|
|
141
141
|
);
|
|
142
142
|
}
|
|
143
143
|
return {
|
|
144
|
-
|
|
144
|
+
offerId: data.offer_id,
|
|
145
|
+
range: data.range,
|
|
146
|
+
recommendedReplacementOfferIds: data.recommended_replacement_offer_ids
|
|
145
147
|
};
|
|
146
148
|
};
|
|
147
149
|
const unmarshalPublicCatalogProductEnvironmentalImpactEstimation = (data) => {
|
|
@@ -211,6 +213,7 @@ const unmarshalPublicCatalogProduct = (data) => {
|
|
|
211
213
|
}
|
|
212
214
|
return {
|
|
213
215
|
description: data.description,
|
|
216
|
+
endOfLifeAt: sdkClient.unmarshalDate(data.end_of_life_at),
|
|
214
217
|
environmentalImpactEstimation: data.environmental_impact_estimation ? unmarshalPublicCatalogProductEnvironmentalImpactEstimation(
|
|
215
218
|
data.environmental_impact_estimation
|
|
216
219
|
) : void 0,
|
|
@@ -220,6 +223,7 @@ const unmarshalPublicCatalogProduct = (data) => {
|
|
|
220
223
|
properties: data.properties ? unmarshalPublicCatalogProductProperties(data.properties) : void 0,
|
|
221
224
|
serviceCategory: data.service_category,
|
|
222
225
|
sku: data.sku,
|
|
226
|
+
status: data.status,
|
|
223
227
|
unitOfMeasure: data.unit_of_measure ? unmarshalPublicCatalogProductUnitOfMeasure(data.unit_of_measure) : void 0,
|
|
224
228
|
variant: data.variant
|
|
225
229
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isJSONObject, unmarshalArrayOfObject, unmarshalMoney } from "@scaleway/sdk-client";
|
|
1
|
+
import { isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
|
|
2
2
|
const unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical = (data) => {
|
|
3
3
|
if (!isJSONObject(data)) {
|
|
4
4
|
throw new TypeError(
|
|
@@ -139,7 +139,9 @@ const unmarshalPublicCatalogProductPropertiesInstance = (data) => {
|
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
141
|
return {
|
|
142
|
-
|
|
142
|
+
offerId: data.offer_id,
|
|
143
|
+
range: data.range,
|
|
144
|
+
recommendedReplacementOfferIds: data.recommended_replacement_offer_ids
|
|
143
145
|
};
|
|
144
146
|
};
|
|
145
147
|
const unmarshalPublicCatalogProductEnvironmentalImpactEstimation = (data) => {
|
|
@@ -209,6 +211,7 @@ const unmarshalPublicCatalogProduct = (data) => {
|
|
|
209
211
|
}
|
|
210
212
|
return {
|
|
211
213
|
description: data.description,
|
|
214
|
+
endOfLifeAt: unmarshalDate(data.end_of_life_at),
|
|
212
215
|
environmentalImpactEstimation: data.environmental_impact_estimation ? unmarshalPublicCatalogProductEnvironmentalImpactEstimation(
|
|
213
216
|
data.environmental_impact_estimation
|
|
214
217
|
) : void 0,
|
|
@@ -218,6 +221,7 @@ const unmarshalPublicCatalogProduct = (data) => {
|
|
|
218
221
|
properties: data.properties ? unmarshalPublicCatalogProductProperties(data.properties) : void 0,
|
|
219
222
|
serviceCategory: data.service_category,
|
|
220
223
|
sku: data.sku,
|
|
224
|
+
status: data.status,
|
|
221
225
|
unitOfMeasure: data.unit_of_measure ? unmarshalPublicCatalogProductUnitOfMeasure(data.unit_of_measure) : void 0,
|
|
222
226
|
variant: data.variant
|
|
223
227
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Money, Region as ScwRegion, Zone as ScwZone } from '@scaleway/sdk-client';
|
|
2
2
|
export type PublicCatalogProductPropertiesHardwareCPUArch = 'unknown_arch' | 'x64' | 'arm64' | 'riscv' | 'apple_silicon';
|
|
3
|
+
export type PublicCatalogProductStatus = 'unknown_status' | 'public_beta' | 'preview' | 'general_availability' | 'end_of_deployment' | 'end_of_support';
|
|
3
4
|
export type PublicCatalogProductUnitOfMeasureCountableUnit = 'unknown_countable_unit' | 'chunk' | 'core' | 'currency' | 'device' | 'domain' | 'email' | 'gb_s' | 'gigabyte' | 'hour' | 'iops_gigabyte' | 'ip' | 'month' | 'node' | 'plan' | 'query' | 'request' | 'session' | 'vcpu_s' | 'version' | 'year' | 'key' | 'token' | 'minute' | 'setup' | 'day';
|
|
4
5
|
export interface PublicCatalogProductPropertiesHardwareCPUPhysical {
|
|
5
6
|
/**
|
|
@@ -160,6 +161,14 @@ export interface PublicCatalogProductPropertiesInstance {
|
|
|
160
161
|
* The range of the Instance server.
|
|
161
162
|
*/
|
|
162
163
|
range: string;
|
|
164
|
+
/**
|
|
165
|
+
* The offer ID of the Instance server.
|
|
166
|
+
*/
|
|
167
|
+
offerId: string;
|
|
168
|
+
/**
|
|
169
|
+
* The recommended replacement offer IDs of the Instance server.
|
|
170
|
+
*/
|
|
171
|
+
recommendedReplacementOfferIds: string[];
|
|
163
172
|
}
|
|
164
173
|
export interface PublicCatalogProductEnvironmentalImpactEstimation {
|
|
165
174
|
kgCo2Equivalent?: number;
|
|
@@ -272,6 +281,14 @@ export interface PublicCatalogProduct {
|
|
|
272
281
|
* The unit of measure of the product.
|
|
273
282
|
*/
|
|
274
283
|
unitOfMeasure?: PublicCatalogProductUnitOfMeasure;
|
|
284
|
+
/**
|
|
285
|
+
* The status of the product.
|
|
286
|
+
*/
|
|
287
|
+
status: PublicCatalogProductStatus;
|
|
288
|
+
/**
|
|
289
|
+
* The end of life date of the product.
|
|
290
|
+
*/
|
|
291
|
+
endOfLifeAt?: Date;
|
|
275
292
|
}
|
|
276
293
|
export interface ListPublicCatalogProductsResponse {
|
|
277
294
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-product-catalog",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Scaleway SDK product-catalog",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -26,21 +26,18 @@
|
|
|
26
26
|
"directory": "packages_generated/product-catalog"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
|
-
"node": ">=20.
|
|
29
|
+
"node": ">=20.19.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@scaleway/random-name": "5.1.1",
|
|
33
|
-
"@scaleway/sdk-std": "1.0.
|
|
33
|
+
"@scaleway/sdk-std": "1.0.3"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@scaleway/sdk-client": "^1.2.
|
|
36
|
+
"@scaleway/sdk-client": "^1.2.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@scaleway/sdk-client": "^1.2.
|
|
39
|
+
"@scaleway/sdk-client": "^1.2.2"
|
|
40
40
|
},
|
|
41
|
-
"bundledDependencies": [
|
|
42
|
-
"@scaleway/random-name"
|
|
43
|
-
],
|
|
44
41
|
"scripts": {
|
|
45
42
|
"package:check": "pnpm publint",
|
|
46
43
|
"typecheck": "tsc --noEmit",
|