Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages_generated/product_catalog/src/v2alpha1/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import {
API as ParentAPI,
enrichForPagination,
resolveOneOf,
urlParams,
} from '@scaleway/sdk-client'
import type { Region as ScwRegion, Zone as ScwZone } from '@scaleway/sdk-client'
import { unmarshalListPublicCatalogProductsResponse } from './marshalling.gen'
import type {
ListPublicCatalogProductsResponse,
Expand All @@ -29,6 +31,22 @@ export class PublicCatalogAPI extends ParentAPI {
request.pageSize ?? this.client.settings.defaultPageSize,
],
['product_types', request.productTypes],
...Object.entries(
resolveOneOf<boolean | ScwRegion | ScwZone | string>([
{ param: 'global', value: request.global },
{
default: this.client.settings.defaultRegion,
param: 'region',
value: request.region,
},
{
default: this.client.settings.defaultZone,
param: 'zone',
value: request.zone,
},
{ param: 'datacenter', value: request.datacenter },
]),
),
),
},
unmarshalListPublicCatalogProductsResponse,
Expand Down
24 changes: 24 additions & 0 deletions packages_generated/product_catalog/src/v2alpha1/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,28 @@ export type PublicCatalogApiListPublicCatalogProductsRequest = {
* The list of filtered product categories.
*/
productTypes?: ListPublicCatalogProductsRequestProductType[]
/**
* Filter global products.
*
* One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set.
*/
global?: boolean
/**
* Filter products by region.
*
* One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set.
*/
region?: ScwRegion
/**
* Filter products by zone.
*
* One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set.
*/
zone?: ScwZone
/**
* Filter products by datacenter.
*
* One-of ('locality'): at most one of 'global', 'region', 'zone', 'datacenter' could be set.
*/
datacenter?: string
}
Loading