@scaleway/sdk-product-catalog 2.8.0 → 2.10.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.
@@ -0,0 +1,3 @@
1
+ # Licenses
2
+
3
+ The app does not bundle any dependencies with licenses.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is automatically generated
3
+ * PLEASE DO NOT EDIT HERE
4
+ */
5
+ export declare const pkgMetadata: {
6
+ readonly name: "@scaleway/sdk-product-catalog";
7
+ readonly namespace: "product-catalog";
8
+ readonly displayName: "Product Catalog";
9
+ readonly versions: readonly ["v2alpha1"];
10
+ };
11
+ export type Metadata = typeof pkgMetadata;
12
+ export default pkgMetadata;
@@ -0,0 +1,13 @@
1
+ //#region src/metadata.gen.ts
2
+ /**
3
+ * This file is automatically generated
4
+ * PLEASE DO NOT EDIT HERE
5
+ */
6
+ const pkgMetadata = {
7
+ name: "@scaleway/sdk-product-catalog",
8
+ namespace: "product-catalog",
9
+ displayName: "Product Catalog",
10
+ versions: ["v2alpha1"]
11
+ };
12
+ //#endregion
13
+ export { pkgMetadata as default, pkgMetadata };
@@ -5,37 +5,34 @@ import { API, enrichForPagination, resolveOneOf, urlParams } from "@scaleway/sdk
5
5
  * Product Catalog API.
6
6
  */
7
7
  var PublicCatalogAPI = class extends API {
8
- pageOfListPublicCatalogProducts = (request = {}) => this.client.fetch({
9
- method: "GET",
10
- path: `/product-catalog/v2alpha1/public-catalog/products`,
11
- urlParams: urlParams(["api_ids", request.apiIds], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["product_types", request.productTypes], ["status", request.status], ...Object.entries(resolveOneOf([
12
- {
13
- param: "global",
14
- value: request.global
15
- },
16
- {
17
- default: this.client.settings.defaultRegion,
18
- param: "region",
19
- value: request.region
20
- },
21
- {
22
- default: this.client.settings.defaultZone,
23
- param: "zone",
24
- value: request.zone
25
- },
26
- {
27
- param: "datacenter",
28
- value: request.datacenter
29
- }
30
- ])))
31
- }, unmarshalListPublicCatalogProductsResponse);
32
- /**
33
- * List all available products. List all available products in the Scaleway catalog. Returns a complete list of products with their corresponding description, locations, prices and properties. You can define the `page` number and `page_size` for your query in the request.
34
- *
35
- * @param request - The request {@link PublicCatalogApiListPublicCatalogProductsRequest}
36
- * @returns A Promise of ListPublicCatalogProductsResponse
37
- */
38
- listPublicCatalogProducts = (request = {}) => enrichForPagination("products", this.pageOfListPublicCatalogProducts, request);
8
+ constructor(..._args) {
9
+ super(..._args);
10
+ this.pageOfListPublicCatalogProducts = (request = {}) => this.client.fetch({
11
+ method: "GET",
12
+ path: `/product-catalog/v2alpha1/public-catalog/products`,
13
+ urlParams: urlParams(["api_ids", request.apiIds], ["page", request.page], ["page_size", request.pageSize ?? this.client.settings.defaultPageSize], ["product_types", request.productTypes], ["status", request.status], ...Object.entries(resolveOneOf([
14
+ {
15
+ param: "global",
16
+ value: request.global
17
+ },
18
+ {
19
+ default: this.client.settings.defaultRegion,
20
+ param: "region",
21
+ value: request.region
22
+ },
23
+ {
24
+ default: this.client.settings.defaultZone,
25
+ param: "zone",
26
+ value: request.zone
27
+ },
28
+ {
29
+ param: "datacenter",
30
+ value: request.datacenter
31
+ }
32
+ ])))
33
+ }, unmarshalListPublicCatalogProductsResponse);
34
+ this.listPublicCatalogProducts = (request = {}) => enrichForPagination("products", this.pageOfListPublicCatalogProducts, request);
35
+ }
39
36
  };
40
37
  //#endregion
41
38
  export { PublicCatalogAPI };
@@ -1,6 +1,6 @@
1
1
  import { isJSONObject, unmarshalArrayOfObject, unmarshalDate, unmarshalMoney } from "@scaleway/sdk-client";
2
2
  //#region src/v2alpha1/marshalling.gen.ts
3
- var unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical = (data) => {
3
+ const unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical = (data) => {
4
4
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPUPhysical' failed as data isn't a dictionary.`);
5
5
  return {
6
6
  benchmark: data.benchmark,
@@ -10,11 +10,11 @@ var unmarshalPublicCatalogProductPropertiesHardwareCPUPhysical = (data) => {
10
10
  threadsPerCore: data.threads_per_core
11
11
  };
12
12
  };
13
- var unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual = (data) => {
13
+ const unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual = (data) => {
14
14
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPUVirtual' failed as data isn't a dictionary.`);
15
15
  return { count: data.count };
16
16
  };
17
- var unmarshalPublicCatalogProductPropertiesHardwareCPU = (data) => {
17
+ const unmarshalPublicCatalogProductPropertiesHardwareCPU = (data) => {
18
18
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareCPU' failed as data isn't a dictionary.`);
19
19
  return {
20
20
  arch: data.arch,
@@ -25,7 +25,7 @@ var unmarshalPublicCatalogProductPropertiesHardwareCPU = (data) => {
25
25
  virtual: data.virtual ? unmarshalPublicCatalogProductPropertiesHardwareCPUVirtual(data.virtual) : void 0
26
26
  };
27
27
  };
28
- var unmarshalPublicCatalogProductPropertiesHardwareGPU = (data) => {
28
+ const unmarshalPublicCatalogProductPropertiesHardwareGPU = (data) => {
29
29
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareGPU' failed as data isn't a dictionary.`);
30
30
  return {
31
31
  count: data.count,
@@ -33,7 +33,7 @@ var unmarshalPublicCatalogProductPropertiesHardwareGPU = (data) => {
33
33
  type: data.type
34
34
  };
35
35
  };
36
- var unmarshalPublicCatalogProductPropertiesHardwareNetwork = (data) => {
36
+ const unmarshalPublicCatalogProductPropertiesHardwareNetwork = (data) => {
37
37
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareNetwork' failed as data isn't a dictionary.`);
38
38
  return {
39
39
  description: data.description,
@@ -42,7 +42,7 @@ var unmarshalPublicCatalogProductPropertiesHardwareNetwork = (data) => {
42
42
  publicBandwidth: data.public_bandwidth
43
43
  };
44
44
  };
45
- var unmarshalPublicCatalogProductPropertiesHardwareRAM = (data) => {
45
+ const unmarshalPublicCatalogProductPropertiesHardwareRAM = (data) => {
46
46
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareRAM' failed as data isn't a dictionary.`);
47
47
  return {
48
48
  description: data.description,
@@ -50,30 +50,30 @@ var unmarshalPublicCatalogProductPropertiesHardwareRAM = (data) => {
50
50
  type: data.type
51
51
  };
52
52
  };
53
- var unmarshalPublicCatalogProductPropertiesHardwareStorage = (data) => {
53
+ const unmarshalPublicCatalogProductPropertiesHardwareStorage = (data) => {
54
54
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardwareStorage' failed as data isn't a dictionary.`);
55
55
  return {
56
56
  description: data.description,
57
57
  total: data.total
58
58
  };
59
59
  };
60
- var unmarshalPublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType = (data) => {
60
+ const unmarshalPublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType = (data) => {
61
61
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType' failed as data isn't a dictionary.`);
62
62
  return {};
63
63
  };
64
- var unmarshalPublicCatalogProductPropertiesKubernetesKosmosControlPlaneType = (data) => {
64
+ const unmarshalPublicCatalogProductPropertiesKubernetesKosmosControlPlaneType = (data) => {
65
65
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKubernetesKosmosControlPlaneType' failed as data isn't a dictionary.`);
66
66
  return {};
67
67
  };
68
- var unmarshalPublicCatalogProductPropertiesKubernetesKosmosNodeType = (data) => {
68
+ const unmarshalPublicCatalogProductPropertiesKubernetesKosmosNodeType = (data) => {
69
69
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKubernetesKosmosNodeType' failed as data isn't a dictionary.`);
70
70
  return {};
71
71
  };
72
- var unmarshalPublicCatalogProductPropertiesLoadBalancerIPV4Type = (data) => {
72
+ const unmarshalPublicCatalogProductPropertiesLoadBalancerIPV4Type = (data) => {
73
73
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesLoadBalancerIPV4Type' failed as data isn't a dictionary.`);
74
74
  return {};
75
75
  };
76
- var unmarshalPublicCatalogProductPropertiesLoadBalancerNodeType = (data) => {
76
+ const unmarshalPublicCatalogProductPropertiesLoadBalancerNodeType = (data) => {
77
77
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesLoadBalancerNodeType' failed as data isn't a dictionary.`);
78
78
  return {
79
79
  bandwidth: data.bandwidth,
@@ -81,79 +81,79 @@ var unmarshalPublicCatalogProductPropertiesLoadBalancerNodeType = (data) => {
81
81
  offerId: data.offer_id
82
82
  };
83
83
  };
84
- var unmarshalPublicCatalogProductPropertiesManagedMongoDBManagementType = (data) => {
84
+ const unmarshalPublicCatalogProductPropertiesManagedMongoDBManagementType = (data) => {
85
85
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedMongoDBManagementType' failed as data isn't a dictionary.`);
86
86
  return {};
87
87
  };
88
- var unmarshalPublicCatalogProductPropertiesManagedMongoDBNodeType = (data) => {
88
+ const unmarshalPublicCatalogProductPropertiesManagedMongoDBNodeType = (data) => {
89
89
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedMongoDBNodeType' failed as data isn't a dictionary.`);
90
90
  return {};
91
91
  };
92
- var unmarshalPublicCatalogProductPropertiesManagedMongoDBStorageType = (data) => {
92
+ const unmarshalPublicCatalogProductPropertiesManagedMongoDBStorageType = (data) => {
93
93
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedMongoDBStorageType' failed as data isn't a dictionary.`);
94
94
  return { storageClass: data.storage_class };
95
95
  };
96
- var unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseManagementType = (data) => {
96
+ const unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseManagementType = (data) => {
97
97
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabaseManagementType' failed as data isn't a dictionary.`);
98
98
  return {};
99
99
  };
100
- var unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseMultiAzType = (data) => {
100
+ const unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseMultiAzType = (data) => {
101
101
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabaseMultiAzType' failed as data isn't a dictionary.`);
102
102
  return {};
103
103
  };
104
- var unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseNodeType = (data) => {
104
+ const unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseNodeType = (data) => {
105
105
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabaseNodeType' failed as data isn't a dictionary.`);
106
106
  return {};
107
107
  };
108
- var unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseStorageType = (data) => {
108
+ const unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseStorageType = (data) => {
109
109
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabaseStorageType' failed as data isn't a dictionary.`);
110
110
  return { storageClass: data.storage_class };
111
111
  };
112
- var unmarshalPublicCatalogProductPropertiesObjectStorageClassType = (data) => {
112
+ const unmarshalPublicCatalogProductPropertiesObjectStorageClassType = (data) => {
113
113
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageClassType' failed as data isn't a dictionary.`);
114
114
  return { storageClass: data.storage_class };
115
115
  };
116
- var unmarshalPublicCatalogProductPropertiesObjectStorageInternetTrafficType = (data) => {
116
+ const unmarshalPublicCatalogProductPropertiesObjectStorageInternetTrafficType = (data) => {
117
117
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageInternetTrafficType' failed as data isn't a dictionary.`);
118
118
  return { trafficType: data.traffic_type };
119
119
  };
120
- var unmarshalPublicCatalogProductPropertiesObjectStorageRegionTrafficType = (data) => {
120
+ const unmarshalPublicCatalogProductPropertiesObjectStorageRegionTrafficType = (data) => {
121
121
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRegionTrafficType' failed as data isn't a dictionary.`);
122
122
  return { regionDestination: data.region_destination };
123
123
  };
124
- var unmarshalPublicCatalogProductPropertiesObjectStorageRestoreType = (data) => {
124
+ const unmarshalPublicCatalogProductPropertiesObjectStorageRestoreType = (data) => {
125
125
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorageRestoreType' failed as data isn't a dictionary.`);
126
126
  return { restoreType: data.restore_type };
127
127
  };
128
- var unmarshalPublicCatalogProductPropertiesAppleSilicon = (data) => {
128
+ const unmarshalPublicCatalogProductPropertiesAppleSilicon = (data) => {
129
129
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesAppleSilicon' failed as data isn't a dictionary.`);
130
130
  return {
131
131
  range: data.range,
132
132
  serverType: data.server_type
133
133
  };
134
134
  };
135
- var unmarshalPublicCatalogProductPropertiesBlockStorage = (data) => {
135
+ const unmarshalPublicCatalogProductPropertiesBlockStorage = (data) => {
136
136
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesBlockStorage' failed as data isn't a dictionary.`);
137
137
  return {
138
138
  maxVolumeSize: data.max_volume_size,
139
139
  minVolumeSize: data.min_volume_size
140
140
  };
141
141
  };
142
- var unmarshalPublicCatalogProductPropertiesDedibox = (data) => {
142
+ const unmarshalPublicCatalogProductPropertiesDedibox = (data) => {
143
143
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesDedibox' failed as data isn't a dictionary.`);
144
144
  return {
145
145
  offerId: data.offer_id,
146
146
  range: data.range
147
147
  };
148
148
  };
149
- var unmarshalPublicCatalogProductPropertiesElasticMetal = (data) => {
149
+ const unmarshalPublicCatalogProductPropertiesElasticMetal = (data) => {
150
150
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesElasticMetal' failed as data isn't a dictionary.`);
151
151
  return {
152
152
  offerId: data.offer_id,
153
153
  range: data.range
154
154
  };
155
155
  };
156
- var unmarshalPublicCatalogProductPropertiesGenerativeApis = (data) => {
156
+ const unmarshalPublicCatalogProductPropertiesGenerativeApis = (data) => {
157
157
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesGenerativeApis' failed as data isn't a dictionary.`);
158
158
  return {
159
159
  consumptionMode: data.consumption_mode,
@@ -161,7 +161,7 @@ var unmarshalPublicCatalogProductPropertiesGenerativeApis = (data) => {
161
161
  supportedApis: data.supported_apis
162
162
  };
163
163
  };
164
- var unmarshalPublicCatalogProductPropertiesHardware = (data) => {
164
+ const unmarshalPublicCatalogProductPropertiesHardware = (data) => {
165
165
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesHardware' failed as data isn't a dictionary.`);
166
166
  return {
167
167
  cpu: data.cpu ? unmarshalPublicCatalogProductPropertiesHardwareCPU(data.cpu) : void 0,
@@ -171,7 +171,7 @@ var unmarshalPublicCatalogProductPropertiesHardware = (data) => {
171
171
  storage: data.storage ? unmarshalPublicCatalogProductPropertiesHardwareStorage(data.storage) : void 0
172
172
  };
173
173
  };
174
- var unmarshalPublicCatalogProductPropertiesInstance = (data) => {
174
+ const unmarshalPublicCatalogProductPropertiesInstance = (data) => {
175
175
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesInstance' failed as data isn't a dictionary.`);
176
176
  return {
177
177
  offerId: data.offer_id,
@@ -179,11 +179,11 @@ var unmarshalPublicCatalogProductPropertiesInstance = (data) => {
179
179
  recommendedReplacementOfferIds: data.recommended_replacement_offer_ids
180
180
  };
181
181
  };
182
- var unmarshalPublicCatalogProductPropertiesKeyManager = (data) => {
182
+ const unmarshalPublicCatalogProductPropertiesKeyManager = (data) => {
183
183
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKeyManager' failed as data isn't a dictionary.`);
184
184
  return {};
185
185
  };
186
- var unmarshalPublicCatalogProductPropertiesKubernetes = (data) => {
186
+ const unmarshalPublicCatalogProductPropertiesKubernetes = (data) => {
187
187
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesKubernetes' failed as data isn't a dictionary.`);
188
188
  return {
189
189
  kapsuleControlPlane: data.kapsule_control_plane ? unmarshalPublicCatalogProductPropertiesKubernetesKapsuleControlPlaneType(data.kapsule_control_plane) : void 0,
@@ -191,18 +191,18 @@ var unmarshalPublicCatalogProductPropertiesKubernetes = (data) => {
191
191
  kosmosNode: data.kosmos_node ? unmarshalPublicCatalogProductPropertiesKubernetesKosmosNodeType(data.kosmos_node) : void 0
192
192
  };
193
193
  };
194
- var unmarshalPublicCatalogProductPropertiesLoadBalancer = (data) => {
194
+ const unmarshalPublicCatalogProductPropertiesLoadBalancer = (data) => {
195
195
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesLoadBalancer' failed as data isn't a dictionary.`);
196
196
  return {
197
197
  ipv4: data.ipv4 ? unmarshalPublicCatalogProductPropertiesLoadBalancerIPV4Type(data.ipv4) : void 0,
198
198
  node: data.node ? unmarshalPublicCatalogProductPropertiesLoadBalancerNodeType(data.node) : void 0
199
199
  };
200
200
  };
201
- var unmarshalPublicCatalogProductPropertiesManagedInference = (data) => {
201
+ const unmarshalPublicCatalogProductPropertiesManagedInference = (data) => {
202
202
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedInference' failed as data isn't a dictionary.`);
203
203
  return { instanceGpuName: data.instance_gpu_name };
204
204
  };
205
- var unmarshalPublicCatalogProductPropertiesManagedMongoDB = (data) => {
205
+ const unmarshalPublicCatalogProductPropertiesManagedMongoDB = (data) => {
206
206
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedMongoDB' failed as data isn't a dictionary.`);
207
207
  return {
208
208
  management: data.management ? unmarshalPublicCatalogProductPropertiesManagedMongoDBManagementType(data.management) : void 0,
@@ -210,11 +210,11 @@ var unmarshalPublicCatalogProductPropertiesManagedMongoDB = (data) => {
210
210
  storage: data.storage ? unmarshalPublicCatalogProductPropertiesManagedMongoDBStorageType(data.storage) : void 0
211
211
  };
212
212
  };
213
- var unmarshalPublicCatalogProductPropertiesManagedRedisDatabase = (data) => {
213
+ const unmarshalPublicCatalogProductPropertiesManagedRedisDatabase = (data) => {
214
214
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRedisDatabase' failed as data isn't a dictionary.`);
215
215
  return {};
216
216
  };
217
- var unmarshalPublicCatalogProductPropertiesManagedRelationalDatabase = (data) => {
217
+ const unmarshalPublicCatalogProductPropertiesManagedRelationalDatabase = (data) => {
218
218
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesManagedRelationalDatabase' failed as data isn't a dictionary.`);
219
219
  return {
220
220
  management: data.management ? unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseManagementType(data.management) : void 0,
@@ -223,7 +223,7 @@ var unmarshalPublicCatalogProductPropertiesManagedRelationalDatabase = (data) =>
223
223
  storage: data.storage ? unmarshalPublicCatalogProductPropertiesManagedRelationalDatabaseStorageType(data.storage) : void 0
224
224
  };
225
225
  };
226
- var unmarshalPublicCatalogProductPropertiesObjectStorage = (data) => {
226
+ const unmarshalPublicCatalogProductPropertiesObjectStorage = (data) => {
227
227
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesObjectStorage' failed as data isn't a dictionary.`);
228
228
  return {
229
229
  class: data.class ? unmarshalPublicCatalogProductPropertiesObjectStorageClassType(data.class) : void 0,
@@ -232,18 +232,18 @@ var unmarshalPublicCatalogProductPropertiesObjectStorage = (data) => {
232
232
  restore: data.restore ? unmarshalPublicCatalogProductPropertiesObjectStorageRestoreType(data.restore) : void 0
233
233
  };
234
234
  };
235
- var unmarshalPublicCatalogProductPropertiesSecretManager = (data) => {
235
+ const unmarshalPublicCatalogProductPropertiesSecretManager = (data) => {
236
236
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPropertiesSecretManager' failed as data isn't a dictionary.`);
237
237
  return {};
238
238
  };
239
- var unmarshalPublicCatalogProductEnvironmentalImpactEstimation = (data) => {
239
+ const unmarshalPublicCatalogProductEnvironmentalImpactEstimation = (data) => {
240
240
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductEnvironmentalImpactEstimation' failed as data isn't a dictionary.`);
241
241
  return {
242
242
  kgCo2Equivalent: data.kg_co2_equivalent,
243
243
  m3WaterUsage: data.m3_water_usage
244
244
  };
245
245
  };
246
- var unmarshalPublicCatalogProductLocality = (data) => {
246
+ const unmarshalPublicCatalogProductLocality = (data) => {
247
247
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductLocality' failed as data isn't a dictionary.`);
248
248
  return {
249
249
  datacenter: data.datacenter,
@@ -252,11 +252,11 @@ var unmarshalPublicCatalogProductLocality = (data) => {
252
252
  zone: data.zone
253
253
  };
254
254
  };
255
- var unmarshalPublicCatalogProductPrice = (data) => {
255
+ const unmarshalPublicCatalogProductPrice = (data) => {
256
256
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductPrice' failed as data isn't a dictionary.`);
257
257
  return { retailPrice: data.retail_price ? unmarshalMoney(data.retail_price) : void 0 };
258
258
  };
259
- var unmarshalPublicCatalogProductProperties = (data) => {
259
+ const unmarshalPublicCatalogProductProperties = (data) => {
260
260
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductProperties' failed as data isn't a dictionary.`);
261
261
  return {
262
262
  appleSilicon: data.apple_silicon ? unmarshalPublicCatalogProductPropertiesAppleSilicon(data.apple_silicon) : void 0,
@@ -277,14 +277,14 @@ var unmarshalPublicCatalogProductProperties = (data) => {
277
277
  secretManager: data.secret_manager ? unmarshalPublicCatalogProductPropertiesSecretManager(data.secret_manager) : void 0
278
278
  };
279
279
  };
280
- var unmarshalPublicCatalogProductUnitOfMeasure = (data) => {
280
+ const unmarshalPublicCatalogProductUnitOfMeasure = (data) => {
281
281
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProductUnitOfMeasure' failed as data isn't a dictionary.`);
282
282
  return {
283
283
  size: data.size,
284
284
  unit: data.unit
285
285
  };
286
286
  };
287
- var unmarshalPublicCatalogProduct = (data) => {
287
+ const unmarshalPublicCatalogProduct = (data) => {
288
288
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'PublicCatalogProduct' failed as data isn't a dictionary.`);
289
289
  return {
290
290
  badges: data.badges,
@@ -305,7 +305,7 @@ var unmarshalPublicCatalogProduct = (data) => {
305
305
  variant: data.variant
306
306
  };
307
307
  };
308
- var unmarshalListPublicCatalogProductsResponse = (data) => {
308
+ const unmarshalListPublicCatalogProductsResponse = (data) => {
309
309
  if (!isJSONObject(data)) throw new TypeError(`Unmarshalling the type 'ListPublicCatalogProductsResponse' failed as data isn't a dictionary.`);
310
310
  return {
311
311
  products: unmarshalArrayOfObject(data.products, unmarshalPublicCatalogProduct),
@@ -1,5 +1,5 @@
1
1
  //#region src/v2alpha1/metadata.gen.ts
2
- var queriesMetadata = {
2
+ const queriesMetadata = {
3
3
  namespace: "product_catalog",
4
4
  version: "v2alpha1",
5
5
  folderName: "productCatalogv2alpha1",
@@ -1,7 +1,7 @@
1
1
  import { __exportAll } from "../_virtual/_rolldown/runtime.js";
2
2
  //#region src/v2alpha1/validation-rules.gen.ts
3
3
  var validation_rules_gen_exports = /* @__PURE__ */ __exportAll({ PublicCatalogApiListPublicCatalogProductsRequest: () => PublicCatalogApiListPublicCatalogProductsRequest });
4
- var PublicCatalogApiListPublicCatalogProductsRequest = {
4
+ const PublicCatalogApiListPublicCatalogProductsRequest = {
5
5
  page: { greaterThanOrEqual: 1 },
6
6
  pageSize: { greaterThanOrEqual: 1 }
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/sdk-product-catalog",
3
- "version": "2.8.0",
3
+ "version": "2.10.0",
4
4
  "description": "Scaleway SDK product-catalog",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -16,6 +16,14 @@
16
16
  "./*": {
17
17
  "types": "./dist/*/index.gen.d.ts",
18
18
  "default": "./dist/*/index.gen.js"
19
+ },
20
+ "./metadata": {
21
+ "types": "./dist/metadata.gen.d.ts",
22
+ "default": "./dist/metadata.gen.js"
23
+ },
24
+ "./*/metadata": {
25
+ "types": "./dist/*/metadata.gen.d.ts",
26
+ "default": "./dist/*/metadata.gen.js"
19
27
  }
20
28
  },
21
29
  "repository": {
@@ -27,18 +35,20 @@
27
35
  },
28
36
  "dependencies": {
29
37
  "@scaleway/random-name": "5.1.4",
30
- "@scaleway/sdk-std": "2.2.2"
38
+ "@scaleway/sdk-std": "2.4.0"
31
39
  },
32
40
  "peerDependencies": {
33
- "@scaleway/sdk-client": "^2.2.2"
41
+ "@repo/configs": "^0.1.1",
42
+ "@scaleway/sdk-client": "^2.3.0"
34
43
  },
35
44
  "devDependencies": {
36
- "@scaleway/sdk-client": "^2.2.2"
45
+ "@repo/configs": "^0.1.1",
46
+ "@scaleway/sdk-client": "^2.3.0"
37
47
  },
38
48
  "scripts": {
39
49
  "package:check": "pnpm publint",
40
- "typecheck": "tsc --noEmit",
41
- "type:generate": "tsc --declaration -p tsconfig.build.json",
50
+ "typecheck": "tsgo --noEmit",
51
+ "type:generate": "tsgo --declaration -p tsconfig.build.json",
42
52
  "build": "vite build --config vite.config.ts && pnpm run type:generate",
43
53
  "build:profile": "npx vite-bundle-visualizer -c vite.config.ts"
44
54
  }
package/LICENSE DELETED
@@ -1,191 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- https://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- Copyright 2019 Scaleway.
180
-
181
- Licensed under the Apache License, Version 2.0 (the "License");
182
- you may not use this file except in compliance with the License.
183
- You may obtain a copy of the License at
184
-
185
- https://www.apache.org/licenses/LICENSE-2.0
186
-
187
- Unless required by applicable law or agreed to in writing, software
188
- distributed under the License is distributed on an "AS IS" BASIS,
189
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
190
- See the License for the specific language governing permissions and
191
- limitations under the License.