Skip to content

Commit 77b70ef

Browse files
authored
fix(marketplace/v1): remove version methods (#1043)
1 parent 9d61742 commit 77b70ef

File tree

4 files changed

+0
-83
lines changed

4 files changed

+0
-83
lines changed

packages/clients/src/api/marketplace/v1/api.gen.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,13 @@ import {
88
} from '../../../bridge'
99
import {
1010
unmarshalGetImageResponse,
11-
unmarshalGetVersionResponse,
1211
unmarshalListImagesResponse,
13-
unmarshalListVersionsResponse,
1412
} from './marshalling.gen'
1513
import type {
1614
GetImageRequest,
1715
GetImageResponse,
18-
GetVersionRequest,
19-
GetVersionResponse,
2016
ListImagesRequest,
2117
ListImagesResponse,
22-
ListVersionsRequest,
23-
ListVersionsResponse,
2418
} from './types.gen'
2519

2620
/** Marketplace API. */
@@ -64,28 +58,4 @@ export class API extends ParentAPI {
6458
},
6559
unmarshalGetImageResponse,
6660
)
67-
68-
listVersions = (request: Readonly<ListVersionsRequest>) =>
69-
this.client.fetch<ListVersionsResponse>(
70-
{
71-
method: 'GET',
72-
path: `/marketplace/v1/images/${validatePathParam(
73-
'imageId',
74-
request.imageId,
75-
)}/versions`,
76-
},
77-
unmarshalListVersionsResponse,
78-
)
79-
80-
getVersion = (request: Readonly<GetVersionRequest>) =>
81-
this.client.fetch<GetVersionResponse>(
82-
{
83-
method: 'GET',
84-
path: `/marketplace/v1/images/${validatePathParam(
85-
'imageId',
86-
request.imageId,
87-
)}/versions/${validatePathParam('versionId', request.versionId)}`,
88-
},
89-
unmarshalGetVersionResponse,
90-
)
9161
}

packages/clients/src/api/marketplace/v1/index.gen.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@ export { API } from './api.gen'
44
export type {
55
GetImageRequest,
66
GetImageResponse,
7-
GetVersionRequest,
8-
GetVersionResponse,
97
Image,
108
ListImagesRequest,
119
ListImagesResponse,
12-
ListVersionsRequest,
13-
ListVersionsResponse,
1410
LocalImage,
1511
Organization,
1612
Version,

packages/clients/src/api/marketplace/v1/marshalling.gen.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import {
77
} from '../../../bridge'
88
import type {
99
GetImageResponse,
10-
GetVersionResponse,
1110
Image,
1211
ListImagesResponse,
13-
ListVersionsResponse,
1412
LocalImage,
1513
Organization,
1614
Version,
@@ -97,20 +95,6 @@ export const unmarshalGetImageResponse = (data: unknown): GetImageResponse => {
9795
} as GetImageResponse
9896
}
9997

100-
export const unmarshalGetVersionResponse = (
101-
data: unknown,
102-
): GetVersionResponse => {
103-
if (!isJSONObject(data)) {
104-
throw new TypeError(
105-
`Unmarshalling the type 'GetVersionResponse' failed as data isn't a dictionary.`,
106-
)
107-
}
108-
109-
return {
110-
version: data.version ? unmarshalVersion(data.version) : undefined,
111-
} as GetVersionResponse
112-
}
113-
11498
export const unmarshalListImagesResponse = (
11599
data: unknown,
116100
): ListImagesResponse => {
@@ -125,18 +109,3 @@ export const unmarshalListImagesResponse = (
125109
totalCount: data.total_count,
126110
} as ListImagesResponse
127111
}
128-
129-
export const unmarshalListVersionsResponse = (
130-
data: unknown,
131-
): ListVersionsResponse => {
132-
if (!isJSONObject(data)) {
133-
throw new TypeError(
134-
`Unmarshalling the type 'ListVersionsResponse' failed as data isn't a dictionary.`,
135-
)
136-
}
137-
138-
return {
139-
totalCount: data.total_count,
140-
versions: unmarshalArrayOfObject(data.versions, unmarshalVersion),
141-
} as ListVersionsResponse
142-
}

packages/clients/src/api/marketplace/v1/types.gen.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,6 @@ export interface GetImageResponse {
6666
image?: Image
6767
}
6868

69-
export type GetVersionRequest = {
70-
imageId: string
71-
versionId: string
72-
}
73-
74-
export interface GetVersionResponse {
75-
version?: Version
76-
}
77-
7869
export type ListImagesRequest = {
7970
/**
8071
* A positive integer lower or equal to 100 to select the number of items to
@@ -89,12 +80,3 @@ export interface ListImagesResponse {
8980
images: Image[]
9081
totalCount: number
9182
}
92-
93-
export type ListVersionsRequest = {
94-
imageId: string
95-
}
96-
97-
export interface ListVersionsResponse {
98-
versions: Version[]
99-
totalCount: number
100-
}

0 commit comments

Comments
 (0)