Skip to content

Commit fbf3499

Browse files
authored
feat(product_catalog): add reasoning and badges fields to generative_api (#2583)
1 parent 0c323fa commit fbf3499

File tree

4 files changed

+117
-201
lines changed

4 files changed

+117
-201
lines changed

packages_generated/product_catalog/src/v2alpha1/api.gen.ts

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ import {
66
resolveOneOf,
77
urlParams,
88
} from '@scaleway/sdk-client'
9-
import type { Region as ScwRegion, Zone as ScwZone } from '@scaleway/sdk-client'
10-
import { unmarshalListPublicCatalogProductsResponse } from './marshalling.gen.js'
9+
import type { Zone as ScwZone, Region as ScwRegion, } from '@scaleway/sdk-client'
10+
import {
11+
unmarshalListPublicCatalogProductsResponse,
12+
} from './marshalling.gen.js'
1113
import type {
1214
ListPublicCatalogProductsResponse,
1315
PublicCatalogApiListPublicCatalogProductsRequest,
@@ -17,54 +19,44 @@ import type {
1719
* Product Catalog API.
1820
*/
1921
export class PublicCatalogAPI extends ParentAPI {
20-
protected pageOfListPublicCatalogProducts = (
21-
request: Readonly<PublicCatalogApiListPublicCatalogProductsRequest> = {},
22-
) =>
22+
protected pageOfListPublicCatalogProducts = (request: Readonly<PublicCatalogApiListPublicCatalogProductsRequest> = {}) =>
2323
this.client.fetch<ListPublicCatalogProductsResponse>(
2424
{
2525
method: 'GET',
2626
path: `/product-catalog/v2alpha1/public-catalog/products`,
2727
urlParams: urlParams(
2828
['page', request.page],
29-
[
30-
'page_size',
31-
request.pageSize ?? this.client.settings.defaultPageSize,
32-
],
29+
['page_size', request.pageSize ?? this.client.settings.defaultPageSize],
3330
['product_types', request.productTypes],
34-
['status', request.status],
35-
...Object.entries(
36-
resolveOneOf<boolean | ScwRegion | ScwZone | string>([
37-
{ param: 'global', value: request.global },
38-
{
39-
default: this.client.settings.defaultRegion,
40-
param: 'region',
41-
value: request.region,
42-
},
43-
{
44-
default: this.client.settings.defaultZone,
45-
param: 'zone',
46-
value: request.zone,
47-
},
48-
{ param: 'datacenter', value: request.datacenter },
49-
]),
50-
),
31+
['status', request.status],
32+
...Object.entries(resolveOneOf<boolean | ScwRegion | ScwZone | string>([
33+
{param: 'global',
34+
value: request.global,
35+
},
36+
{default: this.client.settings.defaultRegion,param: 'region',
37+
value: request.region,
38+
},
39+
{default: this.client.settings.defaultZone,param: 'zone',
40+
value: request.zone,
41+
},
42+
{param: 'datacenter',
43+
value: request.datacenter,
44+
},
45+
])),
5146
),
5247
},
5348
unmarshalListPublicCatalogProductsResponse,
5449
)
55-
50+
5651
/**
5752
* 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.
5853
*
5954
* @param request - The request {@link PublicCatalogApiListPublicCatalogProductsRequest}
6055
* @returns A Promise of ListPublicCatalogProductsResponse
6156
*/
62-
listPublicCatalogProducts = (
63-
request: Readonly<PublicCatalogApiListPublicCatalogProductsRequest> = {},
64-
) =>
65-
enrichForPagination(
66-
'products',
67-
this.pageOfListPublicCatalogProducts,
68-
request,
69-
)
57+
listPublicCatalogProducts = (request: Readonly<PublicCatalogApiListPublicCatalogProductsRequest> = {}) =>
58+
enrichForPagination('products', this.pageOfListPublicCatalogProducts, request)
59+
60+
7061
}
62+

packages_generated/product_catalog/src/v2alpha1/index.gen.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
3-
export { PublicCatalogAPI } from './api.gen.js'
3+
export {
4+
PublicCatalogAPI,
5+
} from './api.gen.js'
46
export * from './marshalling.gen.js'
57
export type {
68
ListPublicCatalogProductsRequestProductType,

0 commit comments

Comments
 (0)