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
11 changes: 11 additions & 0 deletions packages/clients/src/api/marketplace/v2/api.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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([
{
Expand All @@ -142,13 +143,23 @@ export class API extends ParentAPI {
param: 'version_id',
value: request.versionId,
},
{
param: 'image_label',
value: request.imageLabel,
},
]),
),
),
},
unmarshalListLocalImagesResponse,
)

/**
* List local images from a specific image or version
*
* @param request - The request {@link ListLocalImagesRequest}
* @returns A Promise of ListLocalImagesResponse
*/
listLocalImages = (request: Readonly<ListLocalImagesRequest> = {}) =>
enrichForPagination('localImages', this.pageOfListLocalImages, request)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
18 changes: 16 additions & 2 deletions packages/clients/src/api/marketplace/v2/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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 = {
Expand Down