From 761466b55def16b0c5a01f9e6dc8b69f82188014 Mon Sep 17 00:00:00 2001 From: scaleway-bot Date: Wed, 18 Jan 2023 15:22:29 +0000 Subject: [PATCH] feat: update generated APIs --- .../clients/src/api/marketplace/v2/api.gen.ts | 11 +++++++++++ .../src/api/marketplace/v2/marshalling.gen.ts | 1 + .../src/api/marketplace/v2/types.gen.ts | 18 ++++++++++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/packages/clients/src/api/marketplace/v2/api.gen.ts b/packages/clients/src/api/marketplace/v2/api.gen.ts index 2f7a45613..f0bfa3968 100644 --- a/packages/clients/src/api/marketplace/v2/api.gen.ts +++ b/packages/clients/src/api/marketplace/v2/api.gen.ts @@ -132,6 +132,7 @@ export class API extends ParentAPI { 'page_size', request.pageSize ?? this.client.settings.defaultPageSize, ], + ['zone', request.zone ?? this.client.settings.defaultZone], ...Object.entries( resolveOneOf([ { @@ -142,6 +143,10 @@ export class API extends ParentAPI { param: 'version_id', value: request.versionId, }, + { + param: 'image_label', + value: request.imageLabel, + }, ]), ), ), @@ -149,6 +154,12 @@ export class API extends ParentAPI { unmarshalListLocalImagesResponse, ) + /** + * List local images from a specific image or version + * + * @param request - The request {@link ListLocalImagesRequest} + * @returns A Promise of ListLocalImagesResponse + */ listLocalImages = (request: Readonly = {}) => enrichForPagination('localImages', this.pageOfListLocalImages, request) diff --git a/packages/clients/src/api/marketplace/v2/marshalling.gen.ts b/packages/clients/src/api/marketplace/v2/marshalling.gen.ts index 49e118727..5d7d62253 100644 --- a/packages/clients/src/api/marketplace/v2/marshalling.gen.ts +++ b/packages/clients/src/api/marketplace/v2/marshalling.gen.ts @@ -61,6 +61,7 @@ export const unmarshalLocalImage = (data: unknown) => { arch: data.arch, compatibleCommercialTypes: data.compatible_commercial_types, id: data.id, + label: data.label, zone: data.zone, } as LocalImage } diff --git a/packages/clients/src/api/marketplace/v2/types.gen.ts b/packages/clients/src/api/marketplace/v2/types.gen.ts index aff99312d..f0aa659d7 100644 --- a/packages/clients/src/api/marketplace/v2/types.gen.ts +++ b/packages/clients/src/api/marketplace/v2/types.gen.ts @@ -72,6 +72,8 @@ export interface LocalImage { arch: string /** Availability Zone where this local image is available */ zone: Zone + /** Image label this image belongs to */ + label: string } /** Version */ @@ -123,13 +125,25 @@ export type GetVersionRequest = { } export type ListLocalImagesRequest = { - /** One-of ('scope'): at most one of 'imageId', 'versionId' could be set. */ + /** + * One-of ('scope'): at most one of 'imageId', 'versionId', 'imageLabel' could + * be set. + */ imageId?: string - /** One-of ('scope'): at most one of 'imageId', 'versionId' could be set. */ + /** + * One-of ('scope'): at most one of 'imageId', 'versionId', 'imageLabel' could + * be set. + */ versionId?: string pageSize?: number page?: number orderBy?: ListLocalImagesRequestOrderBy + /** + * One-of ('scope'): at most one of 'imageId', 'versionId', 'imageLabel' could + * be set. + */ + imageLabel?: string + zone?: Zone } export type GetLocalImageRequest = {