@daocloud-proto/kangaroo 0.2.1 → 0.2.2-10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,8 +7,6 @@
7
7
  import * as fm from "../../../../fetch.pb"
8
8
  import * as GoogleProtobufEmpty from "../../../../google/protobuf/empty.pb"
9
9
  import * as KangarooIoApiHarborV1alpha1Harbor from "./harbor.pb"
10
- import * as KangarooIoApiHarborV1alpha1Project from "./project.pb"
11
- import * as KangarooIoApiHarborV1alpha1Repository from "./repository.pb"
12
10
  export class Harbor {
13
11
  static GetHarborParams(req: KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsResponse> {
14
12
  return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsRequest, KangarooIoApiHarborV1alpha1Harbor.GetHarborParamsResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/harbors/default-params?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
@@ -34,23 +32,4 @@ export class Harbor {
34
32
  static GetStorageStatistic(req: KangarooIoApiHarborV1alpha1Harbor.GetStorageStatisticRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Harbor.GetStorageStatisticResponse> {
35
33
  return fm.fetchReq<KangarooIoApiHarborV1alpha1Harbor.GetStorageStatisticRequest, KangarooIoApiHarborV1alpha1Harbor.GetStorageStatisticResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["name"]}/storage_statistic?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
36
34
  }
37
- }
38
- export class HarborProject {
39
- static ListProject(req: KangarooIoApiHarborV1alpha1Project.ListProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Project.ListProjectResponse> {
40
- return fm.fetchReq<KangarooIoApiHarborV1alpha1Project.ListProjectRequest, KangarooIoApiHarborV1alpha1Project.ListProjectResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/projects?${fm.renderURLSearchParams(req, ["cluster", "namespace", "harbor"])}`, {...initReq, method: "GET"})
41
- }
42
- static DeleteProject(req: KangarooIoApiHarborV1alpha1Project.DeleteProjectRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
43
- return fm.fetchReq<KangarooIoApiHarborV1alpha1Project.DeleteProjectRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/projects/${req["name"]}`, {...initReq, method: "DELETE"})
44
- }
45
- static CreateProject(req: KangarooIoApiHarborV1alpha1Project.CreateProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Project.Project> {
46
- return fm.fetchReq<KangarooIoApiHarborV1alpha1Project.CreateProjectRequest, KangarooIoApiHarborV1alpha1Project.Project>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/project`, {...initReq, method: "POST", body: JSON.stringify(req)})
47
- }
48
- }
49
- export class HarborRepository {
50
- static ListRepositories(req: KangarooIoApiHarborV1alpha1Repository.ListRepositoriesRequest, initReq?: fm.InitReq): Promise<KangarooIoApiHarborV1alpha1Repository.ListRepositoriesResponse> {
51
- return fm.fetchReq<KangarooIoApiHarborV1alpha1Repository.ListRepositoriesRequest, KangarooIoApiHarborV1alpha1Repository.ListRepositoriesResponse>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/projects/${req["project"]}/repositories?${fm.renderURLSearchParams(req, ["cluster", "namespace", "harbor", "project"])}`, {...initReq, method: "GET"})
52
- }
53
- static DeleteRepository(req: KangarooIoApiHarborV1alpha1Repository.DeleteRepositoryRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
54
- return fm.fetchReq<KangarooIoApiHarborV1alpha1Repository.DeleteRepositoryRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/harbors/${req["harbor"]}/projects/${req["project"]}/repositories/${req["name"]}`, {...initReq, method: "DELETE"})
55
- }
56
35
  }
@@ -0,0 +1,270 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as KangarooIoApiTypesPage from "../../types/page.pb"
8
+
9
+ export enum ListArtifactsRequestSortBy {
10
+ SORT_BY_UNSPECIFIED = "SORT_BY_UNSPECIFIED",
11
+ }
12
+
13
+ export type ListRegistryRequest = {
14
+ workspace?: string
15
+ page?: number
16
+ pageSize?: number
17
+ }
18
+
19
+ export type RegistrySecret = {
20
+ alias?: string
21
+ host?: string
22
+ name?: string
23
+ }
24
+
25
+ export type ListRegistryResponse = {
26
+ items?: RegistrySecret[]
27
+ pagination?: KangarooIoApiTypesPage.Page
28
+ }
29
+
30
+ export type ListProjectRequest = {
31
+ workspace?: string
32
+ registry?: string
33
+ page?: number
34
+ pageSize?: number
35
+ }
36
+
37
+ export type ListProjectResponse = {
38
+ items?: string[]
39
+ pagination?: KangarooIoApiTypesPage.Page
40
+ }
41
+
42
+ export type Repository = {
43
+ name?: string
44
+ public?: boolean
45
+ tagCount?: string
46
+ pullCount?: string
47
+ updateTime?: string
48
+ }
49
+
50
+ export type ListRepositoriesRequest = {
51
+ workspace?: string
52
+ registry?: string
53
+ project?: string
54
+ page?: number
55
+ pageSize?: number
56
+ }
57
+
58
+ export type ListRepositoriesResponse = {
59
+ items?: Repository[]
60
+ pagination?: KangarooIoApiTypesPage.Page
61
+ }
62
+
63
+ export type ScanOverview = {
64
+ scanStatus?: string
65
+ severity?: string
66
+ duration?: string
67
+ endTime?: string
68
+ startTime?: string
69
+ reportId?: string
70
+ scanner?: Scanner
71
+ summary?: ScanSummary
72
+ }
73
+
74
+ export type Scanner = {
75
+ name?: string
76
+ vendor?: string
77
+ version?: string
78
+ }
79
+
80
+ export type ScanSummary = {
81
+ fixable?: string
82
+ summary?: VulnerabilitySummary
83
+ total?: string
84
+ }
85
+
86
+ export type VulnerabilitySummary = {
87
+ critical?: string
88
+ high?: string
89
+ low?: string
90
+ medium?: string
91
+ }
92
+
93
+ export type Artifacts = {
94
+ digest?: string
95
+ tags?: Tag[]
96
+ scanOverview?: ScanOverview
97
+ imageSize?: string
98
+ pushTime?: string
99
+ pullTime?: string
100
+ }
101
+
102
+ export type ListArtifactsRequest = {
103
+ workspace?: string
104
+ registry?: string
105
+ project?: string
106
+ repository?: string
107
+ sortBy?: ListArtifactsRequestSortBy
108
+ orderBy?: KangarooIoApiTypesPage.OrderBy
109
+ page?: number
110
+ pageSize?: number
111
+ }
112
+
113
+ export type ListArtifactsResponse = {
114
+ items?: Artifacts[]
115
+ pagination?: KangarooIoApiTypesPage.Page
116
+ }
117
+
118
+ export type TagInfoRequest = {
119
+ workspace?: string
120
+ registry?: string
121
+ project?: string
122
+ repository?: string
123
+ digest?: string
124
+ }
125
+
126
+ export type TagInfoResponse = {
127
+ extraAttrs?: ExtraAttrs
128
+ buildHistory?: BuildHistory[]
129
+ }
130
+
131
+ export type ExtraAttrs = {
132
+ architecture?: string
133
+ author?: string
134
+ digest?: string
135
+ imageSize?: string
136
+ createdTime?: string
137
+ pushTime?: string
138
+ tags?: Tag[]
139
+ repoName?: string
140
+ os?: string
141
+ imagePullUrl?: string
142
+ }
143
+
144
+ export type BuildHistory = {
145
+ created?: string
146
+ createdBy?: string
147
+ }
148
+
149
+ export type DeleteRepositoriesRequest = {
150
+ workspace?: string
151
+ registry?: string
152
+ project?: string
153
+ repository?: string
154
+ }
155
+
156
+ export type DeleteArtifactsRequest = {
157
+ workspace?: string
158
+ registry?: string
159
+ project?: string
160
+ repository?: string
161
+ digest?: string
162
+ }
163
+
164
+ export type ListRegistryProjectRequest = {
165
+ filter?: string
166
+ registry?: string
167
+ page?: number
168
+ pageSize?: number
169
+ }
170
+
171
+ export type RegistryProjectResponse = {
172
+ project?: string
173
+ public?: boolean
174
+ bindingWorkspace?: string[]
175
+ repositoriesCount?: string
176
+ createTime?: string
177
+ }
178
+
179
+ export type ListRegistryProjectResponse = {
180
+ items?: RegistryProjectResponse[]
181
+ pagination?: KangarooIoApiTypesPage.Page
182
+ }
183
+
184
+ export type ProjectBindingRequest = {
185
+ registry?: string
186
+ project?: string
187
+ bindingWorkspace?: string[]
188
+ }
189
+
190
+ export type DeleteRegistryProject = {
191
+ registry?: string
192
+ project?: string
193
+ }
194
+
195
+ export type CreateRegistryProject = {
196
+ registry?: string
197
+ project?: string
198
+ public?: boolean
199
+ }
200
+
201
+ export type StatisticRequest = {
202
+ registry?: string
203
+ }
204
+
205
+ export type StatisticResponse = {
206
+ privateProjectCount?: string
207
+ privateRepoCount?: string
208
+ publicProjectCount?: string
209
+ publicRepoCount?: string
210
+ totalProjectCount?: string
211
+ totalRepoCount?: string
212
+ totalStorageConsumption?: string
213
+ }
214
+
215
+ export type Tag = {
216
+ name?: string
217
+ pushTime?: string
218
+ }
219
+
220
+ export type APIListRegistryRequest = {
221
+ workspace?: string
222
+ global?: boolean
223
+ page?: number
224
+ pageSize?: number
225
+ }
226
+
227
+ export type APIListRegistryResponse = {
228
+ items?: RegistrySecret[]
229
+ pagination?: KangarooIoApiTypesPage.Page
230
+ }
231
+
232
+ export type APIListProjectRequest = {
233
+ workspace?: string
234
+ registry?: string
235
+ public?: boolean
236
+ page?: number
237
+ pageSize?: number
238
+ }
239
+
240
+ export type APIListProjectResponse = {
241
+ items?: string[]
242
+ pagination?: KangarooIoApiTypesPage.Page
243
+ }
244
+
245
+ export type APIListRepositoriesRequest = {
246
+ workspace?: string
247
+ registry?: string
248
+ project?: string
249
+ page?: number
250
+ pageSize?: number
251
+ }
252
+
253
+ export type APIListRepositoriesResponse = {
254
+ items?: Repository[]
255
+ pagination?: KangarooIoApiTypesPage.Page
256
+ }
257
+
258
+ export type APIListArtifactsRequest = {
259
+ workspace?: string
260
+ registry?: string
261
+ project?: string
262
+ repository?: string
263
+ page?: number
264
+ pageSize?: number
265
+ }
266
+
267
+ export type APIListArtifactsResponse = {
268
+ items?: Artifacts[]
269
+ pagination?: KangarooIoApiTypesPage.Page
270
+ }
@@ -0,0 +1,59 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../../../../fetch.pb"
8
+ import * as GoogleProtobufEmpty from "../../../../google/protobuf/empty.pb"
9
+ import * as KangarooIoApiImageV1alpha1Image from "./image.pb"
10
+ export class Image {
11
+ static ListRegistry(req: KangarooIoApiImageV1alpha1Image.ListRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.ListRegistryResponse> {
12
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ListRegistryRequest, KangarooIoApiImageV1alpha1Image.ListRegistryResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/summary?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
13
+ }
14
+ static ListProject(req: KangarooIoApiImageV1alpha1Image.ListProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.ListProjectResponse> {
15
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ListProjectRequest, KangarooIoApiImageV1alpha1Image.ListProjectResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects?${fm.renderURLSearchParams(req, ["workspace", "registry"])}`, {...initReq, method: "GET"})
16
+ }
17
+ static ListRepositories(req: KangarooIoApiImageV1alpha1Image.ListRepositoriesRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.ListRepositoriesResponse> {
18
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ListRepositoriesRequest, KangarooIoApiImageV1alpha1Image.ListRepositoriesResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories?${fm.renderURLSearchParams(req, ["workspace", "registry", "project"])}`, {...initReq, method: "GET"})
19
+ }
20
+ static ListArtifacts(req: KangarooIoApiImageV1alpha1Image.ListArtifactsRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.ListArtifactsResponse> {
21
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ListArtifactsRequest, KangarooIoApiImageV1alpha1Image.ListArtifactsResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}/artifacts?${fm.renderURLSearchParams(req, ["workspace", "registry", "project", "repository"])}`, {...initReq, method: "GET"})
22
+ }
23
+ static GetArtifactsInfo(req: KangarooIoApiImageV1alpha1Image.TagInfoRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.TagInfoResponse> {
24
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.TagInfoRequest, KangarooIoApiImageV1alpha1Image.TagInfoResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}/artifacts/${req["digest"]}?${fm.renderURLSearchParams(req, ["workspace", "registry", "project", "repository", "digest"])}`, {...initReq, method: "GET"})
25
+ }
26
+ static DeleteRepositories(req: KangarooIoApiImageV1alpha1Image.DeleteRepositoriesRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
27
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.DeleteRepositoriesRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}`, {...initReq, method: "DELETE"})
28
+ }
29
+ static DeleteArtifacts(req: KangarooIoApiImageV1alpha1Image.DeleteArtifactsRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
30
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.DeleteArtifactsRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}/artifacts/${req["digest"]}`, {...initReq, method: "DELETE"})
31
+ }
32
+ static ListRegistryProject(req: KangarooIoApiImageV1alpha1Image.ListRegistryProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.ListRegistryProjectResponse> {
33
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ListRegistryProjectRequest, KangarooIoApiImageV1alpha1Image.ListRegistryProjectResponse>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects?${fm.renderURLSearchParams(req, ["registry"])}`, {...initReq, method: "GET"})
34
+ }
35
+ static UpdateRegistryProjectBinding(req: KangarooIoApiImageV1alpha1Image.ProjectBindingRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
36
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ProjectBindingRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects/${req["project"]}/binding`, {...initReq, method: "PUT", body: JSON.stringify(req)})
37
+ }
38
+ static DeleteRegistryProject(req: KangarooIoApiImageV1alpha1Image.DeleteRegistryProject, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
39
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.DeleteRegistryProject, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects/${req["project"]}`, {...initReq, method: "DELETE"})
40
+ }
41
+ static CreateRegistryProject(req: KangarooIoApiImageV1alpha1Image.CreateRegistryProject, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
42
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.CreateRegistryProject, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects`, {...initReq, method: "POST", body: JSON.stringify(req)})
43
+ }
44
+ static GetRegistryStatistic(req: KangarooIoApiImageV1alpha1Image.StatisticRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.StatisticResponse> {
45
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.StatisticRequest, KangarooIoApiImageV1alpha1Image.StatisticResponse>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/statistic?${fm.renderURLSearchParams(req, ["registry"])}`, {...initReq, method: "GET"})
46
+ }
47
+ static APIListRegistry(req: KangarooIoApiImageV1alpha1Image.APIListRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.APIListRegistryResponse> {
48
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.APIListRegistryRequest, KangarooIoApiImageV1alpha1Image.APIListRegistryResponse>(`/apis/kangaroo.io/v1alpha1/select/registries/summary?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
49
+ }
50
+ static APIListProject(req: KangarooIoApiImageV1alpha1Image.APIListProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.APIListProjectResponse> {
51
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.APIListProjectRequest, KangarooIoApiImageV1alpha1Image.APIListProjectResponse>(`/apis/kangaroo.io/v1alpha1/select/registries/${req["registry"]}/projects?${fm.renderURLSearchParams(req, ["registry"])}`, {...initReq, method: "GET"})
52
+ }
53
+ static APIListRepositories(req: KangarooIoApiImageV1alpha1Image.APIListRepositoriesRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.APIListRepositoriesResponse> {
54
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.APIListRepositoriesRequest, KangarooIoApiImageV1alpha1Image.APIListRepositoriesResponse>(`/apis/kangaroo.io/v1alpha1/select/registries/${req["registry"]}/projects/${req["project"]}/repositories?${fm.renderURLSearchParams(req, ["registry", "project"])}`, {...initReq, method: "GET"})
55
+ }
56
+ static APIListArtifacts(req: KangarooIoApiImageV1alpha1Image.APIListArtifactsRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.APIListArtifactsResponse> {
57
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.APIListArtifactsRequest, KangarooIoApiImageV1alpha1Image.APIListArtifactsResponse>(`/apis/kangaroo.io/v1alpha1/select/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}/artifacts?${fm.renderURLSearchParams(req, ["registry", "project", "repository"])}`, {...initReq, method: "GET"})
58
+ }
59
+ }
@@ -0,0 +1,111 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as KangarooIoApiTypesPage from "../../types/page.pb"
8
+
9
+ export enum RegistryType {
10
+ RegistryType_UNSPECIFIED = "RegistryType_UNSPECIFIED",
11
+ DOCKER_REGISTRY = "DOCKER_REGISTRY",
12
+ HARBOR = "HARBOR",
13
+ JFROG = "JFROG",
14
+ }
15
+
16
+ export enum IntegratedType {
17
+ IntegratedType_UNSPECIFIED = "IntegratedType_UNSPECIFIED",
18
+ Automatic = "Automatic",
19
+ Manual = "Manual",
20
+ }
21
+
22
+ export enum RegistryStatusClusterStatus {
23
+ CLUSTER_STATUS_UNSPECIFIED = "CLUSTER_STATUS_UNSPECIFIED",
24
+ HEALTHY = "HEALTHY",
25
+ UNHEALTHY = "UNHEALTHY",
26
+ }
27
+
28
+ export type Registry = {
29
+ alias?: string
30
+ type?: RegistryType
31
+ url?: string
32
+ credential?: RegistryAdminCredential
33
+ integratedType?: IntegratedType
34
+ status?: RegistryStatus
35
+ name?: string
36
+ createAt?: string
37
+ }
38
+
39
+ export type RegistryStatus = {
40
+ status?: RegistryStatusClusterStatus
41
+ }
42
+
43
+ export type CreateRegistryRequest = {
44
+ alias?: string
45
+ type?: RegistryType
46
+ url?: string
47
+ credential?: RegistryAdminCredential
48
+ }
49
+
50
+ export type DeleteRegistryRequest = {
51
+ registry?: string
52
+ }
53
+
54
+ export type GetRegistryRequest = {
55
+ registry?: string
56
+ }
57
+
58
+ export type UpdateRegistryRequest = {
59
+ registry?: string
60
+ credential?: RegistryAdminCredential
61
+ }
62
+
63
+ export type ListRegistryRequest = {
64
+ page?: number
65
+ pageSize?: number
66
+ }
67
+
68
+ export type ListRegistryResponse = {
69
+ items?: Registry[]
70
+ pagination?: KangarooIoApiTypesPage.Page
71
+ }
72
+
73
+ export type RegistryAdminCredential = {
74
+ username?: string
75
+ password?: string
76
+ }
77
+
78
+ export type CreateWorkspaceRegistryRequest = {
79
+ workspace?: string
80
+ alias?: string
81
+ type?: RegistryType
82
+ url?: string
83
+ credential?: RegistryAdminCredential
84
+ }
85
+
86
+ export type UpdateWorkspaceRegistryRequest = {
87
+ workspace?: string
88
+ registry?: string
89
+ credential?: RegistryAdminCredential
90
+ }
91
+
92
+ export type DeleteWorkspaceRegistryRequest = {
93
+ workspace?: string
94
+ registry?: string
95
+ }
96
+
97
+ export type GetWorkspaceRegistryRequest = {
98
+ workspace?: string
99
+ registry?: string
100
+ }
101
+
102
+ export type ListWorkspaceRegistryRequest = {
103
+ workspace?: string
104
+ page?: number
105
+ pageSize?: number
106
+ }
107
+
108
+ export type ListWorkspaceRegistryResponse = {
109
+ items?: Registry[]
110
+ pagination?: KangarooIoApiTypesPage.Page
111
+ }
@@ -0,0 +1,41 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+
7
+ import * as fm from "../../../../fetch.pb"
8
+ import * as GoogleProtobufEmpty from "../../../../google/protobuf/empty.pb"
9
+ import * as KangarooIoApiRegistryV1alpha1Registry from "./registry.pb"
10
+ export class Registries {
11
+ static CreateRegistry(req: KangarooIoApiRegistryV1alpha1Registry.CreateRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.Registry> {
12
+ return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.CreateRegistryRequest, KangarooIoApiRegistryV1alpha1Registry.Registry>(`/apis/kangaroo.io/v1alpha1/registries`, {...initReq, method: "POST", body: JSON.stringify(req)})
13
+ }
14
+ static DeleteRegistry(req: KangarooIoApiRegistryV1alpha1Registry.DeleteRegistryRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
15
+ return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.DeleteRegistryRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}`, {...initReq, method: "DELETE"})
16
+ }
17
+ static GetRegistry(req: KangarooIoApiRegistryV1alpha1Registry.GetRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.Registry> {
18
+ return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.GetRegistryRequest, KangarooIoApiRegistryV1alpha1Registry.Registry>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}?${fm.renderURLSearchParams(req, ["registry"])}`, {...initReq, method: "GET"})
19
+ }
20
+ static UpdateRegistry(req: KangarooIoApiRegistryV1alpha1Registry.UpdateRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.Registry> {
21
+ return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.UpdateRegistryRequest, KangarooIoApiRegistryV1alpha1Registry.Registry>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
22
+ }
23
+ static ListRegistry(req: KangarooIoApiRegistryV1alpha1Registry.ListRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.ListRegistryResponse> {
24
+ return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.ListRegistryRequest, KangarooIoApiRegistryV1alpha1Registry.ListRegistryResponse>(`/apis/kangaroo.io/v1alpha1/registries?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
25
+ }
26
+ static CreateWorkspaceRegistry(req: KangarooIoApiRegistryV1alpha1Registry.CreateWorkspaceRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.Registry> {
27
+ return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.CreateWorkspaceRegistryRequest, KangarooIoApiRegistryV1alpha1Registry.Registry>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries`, {...initReq, method: "POST", body: JSON.stringify(req)})
28
+ }
29
+ static DeleteWorkspaceRegistry(req: KangarooIoApiRegistryV1alpha1Registry.DeleteWorkspaceRegistryRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
30
+ return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.DeleteWorkspaceRegistryRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}`, {...initReq, method: "DELETE"})
31
+ }
32
+ static GetWorkspaceRegistry(req: KangarooIoApiRegistryV1alpha1Registry.GetWorkspaceRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.Registry> {
33
+ return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.GetWorkspaceRegistryRequest, KangarooIoApiRegistryV1alpha1Registry.Registry>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}?${fm.renderURLSearchParams(req, ["workspace", "registry"])}`, {...initReq, method: "GET"})
34
+ }
35
+ static UpdateWorkspaceRegistry(req: KangarooIoApiRegistryV1alpha1Registry.UpdateWorkspaceRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.Registry> {
36
+ return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.UpdateWorkspaceRegistryRequest, KangarooIoApiRegistryV1alpha1Registry.Registry>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
37
+ }
38
+ static ListWorkspaceRegistry(req: KangarooIoApiRegistryV1alpha1Registry.ListWorkspaceRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.ListWorkspaceRegistryResponse> {
39
+ return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.ListWorkspaceRegistryRequest, KangarooIoApiRegistryV1alpha1Registry.ListWorkspaceRegistryResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries?${fm.renderURLSearchParams(req, ["workspace"])}`, {...initReq, method: "GET"})
40
+ }
41
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/kangaroo",
3
- "version":"0.2.1",
3
+ "version":"0.2.2-10",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,85 +0,0 @@
1
- /* eslint-disable */
2
- // @ts-nocheck
3
- /*
4
- * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
- */
6
-
7
- import * as KangarooIoApiTypesPage from "../../types/page.pb"
8
-
9
- export enum ListProjectRequestSortBy {
10
- SORT_BY_UNSPECIFIED = "SORT_BY_UNSPECIFIED",
11
- field_name = "field_name",
12
- creation_time = "creation_time",
13
- }
14
-
15
- export type Project = {
16
- chartCount?: string
17
- creationTime?: string
18
- currentUserRoleID?: string
19
- currentUserRoleIds?: number[]
20
- cVEAllowList?: CVEAllowList
21
- deleted?: boolean
22
- metadata?: ProjectMetadata
23
- name?: string
24
- ownerID?: number
25
- ownerName?: string
26
- projectID?: number
27
- registryID?: string
28
- repoCount?: string
29
- togglable?: boolean
30
- updateTime?: string
31
- }
32
-
33
- export type CVEAllowList = {
34
- creationTime?: string
35
- expiresAt?: string
36
- id?: string
37
- items?: CVEAllowListItem[]
38
- projectID?: string
39
- updateTime?: string
40
- }
41
-
42
- export type CVEAllowListItem = {
43
- cVEID?: string
44
- }
45
-
46
- export type ProjectMetadata = {
47
- autoScan?: string
48
- enableContentTrust?: string
49
- enableContentTrustCosign?: string
50
- preventVul?: string
51
- public?: string
52
- retentionID?: string
53
- reuseSysCVEAllowList?: string
54
- severity?: string
55
- }
56
-
57
- export type ListProjectRequest = {
58
- cluster?: string
59
- namespace?: string
60
- harbor?: string
61
- page?: number
62
- pageSize?: number
63
- sortBy?: ListProjectRequestSortBy
64
- orderBy?: KangarooIoApiTypesPage.OrderBy
65
- }
66
-
67
- export type ListProjectResponse = {
68
- items?: Project[]
69
- pagination?: KangarooIoApiTypesPage.Page
70
- }
71
-
72
- export type DeleteProjectRequest = {
73
- cluster?: string
74
- namespace?: string
75
- harbor?: string
76
- name?: string
77
- }
78
-
79
- export type CreateProjectRequest = {
80
- cluster?: string
81
- namespace?: string
82
- harbor?: string
83
- name?: string
84
- public?: boolean
85
- }
@@ -1,48 +0,0 @@
1
- /* eslint-disable */
2
- // @ts-nocheck
3
- /*
4
- * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
- */
6
-
7
- import * as KangarooIoApiTypesPage from "../../types/page.pb"
8
-
9
- export enum ListRepositoriesRequestSortBy {
10
- SORT_BY_UNSPECIFIED = "SORT_BY_UNSPECIFIED",
11
- name = "name",
12
- creation_time = "creation_time",
13
- }
14
-
15
- export type Repository = {
16
- artifactCount?: string
17
- creationTime?: string
18
- description?: string
19
- id?: string
20
- name?: string
21
- projectId?: string
22
- pullCount?: string
23
- updateTime?: string
24
- }
25
-
26
- export type ListRepositoriesRequest = {
27
- cluster?: string
28
- namespace?: string
29
- harbor?: string
30
- project?: string
31
- page?: number
32
- pageSize?: number
33
- sortBy?: ListRepositoriesRequestSortBy
34
- orderBy?: KangarooIoApiTypesPage.OrderBy
35
- }
36
-
37
- export type ListRepositoriesResponse = {
38
- items?: Repository[]
39
- pagination?: KangarooIoApiTypesPage.Page
40
- }
41
-
42
- export type DeleteRepositoryRequest = {
43
- cluster?: string
44
- namespace?: string
45
- harbor?: string
46
- project?: string
47
- name?: string
48
- }
@@ -1,56 +0,0 @@
1
- /* eslint-disable */
2
- // @ts-nocheck
3
- /*
4
- * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
- */
6
-
7
- import * as KangarooIoApiTypesPage from "../../types/page.pb"
8
-
9
- export enum RegistryType {
10
- REGISTRY_UNSPECIFIED = "REGISTRY_UNSPECIFIED",
11
- REGISTRY_TYPE_DOCKER_REGISTRY = "REGISTRY_TYPE_DOCKER_REGISTRY",
12
- REGISTRY_TYPE_HARBOR = "REGISTRY_TYPE_HARBOR",
13
- REGISTRY_TYPE_JFROG = "REGISTRY_TYPE_JFROG",
14
- }
15
-
16
- export type RegistryIntegrated = {
17
- name?: string
18
- registryType?: RegistryType
19
- registryUrl?: string
20
- registryAdminCredential?: RegistryAdminCredential
21
- }
22
-
23
- export type RegistryAdminCredential = {
24
- username?: string
25
- password?: string
26
- }
27
-
28
- export type CreateRegistryIntegratedRequest = {
29
- name?: string
30
- registryType?: RegistryType
31
- registryUrl?: string
32
- registryAdminCredential?: RegistryAdminCredential
33
- }
34
-
35
- export type DeleteRegistryIntegratedRequest = {
36
- name?: string
37
- }
38
-
39
- export type GetRegistryIntegratedRequest = {
40
- name?: string
41
- }
42
-
43
- export type UpdateRegistryIntegratedRequest = {
44
- name?: string
45
- registryAdminCredential?: RegistryAdminCredential
46
- }
47
-
48
- export type ListRegistryIntegratedRequest = {
49
- page?: number
50
- pageSize?: number
51
- }
52
-
53
- export type ListRegistryIntegratedResponse = {
54
- items?: RegistryIntegrated[]
55
- pagination?: KangarooIoApiTypesPage.Page
56
- }
@@ -1,26 +0,0 @@
1
- /* eslint-disable */
2
- // @ts-nocheck
3
- /*
4
- * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
- */
6
-
7
- import * as fm from "../../../../fetch.pb"
8
- import * as GoogleProtobufEmpty from "../../../../google/protobuf/empty.pb"
9
- import * as KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated from "./registryIntegrated.pb"
10
- export class RegistryIntegrateds {
11
- static CreateRegistryIntegrated(req: KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.CreateRegistryIntegratedRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.RegistryIntegrated> {
12
- return fm.fetchReq<KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.CreateRegistryIntegratedRequest, KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.RegistryIntegrated>(`/apis/kangaroo.io/v1alpha1/registry_integrated`, {...initReq, method: "POST", body: JSON.stringify(req)})
13
- }
14
- static DeleteRegistryIntegrated(req: KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.DeleteRegistryIntegratedRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
15
- return fm.fetchReq<KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.DeleteRegistryIntegratedRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/registry_integrated/${req["name"]}`, {...initReq, method: "DELETE"})
16
- }
17
- static GetRegistryIntegrated(req: KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.GetRegistryIntegratedRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.RegistryIntegrated> {
18
- return fm.fetchReq<KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.GetRegistryIntegratedRequest, KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.RegistryIntegrated>(`/apis/kangaroo.io/v1alpha1/registry_integrated/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
19
- }
20
- static UpdateRegistryIntegrated(req: KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.UpdateRegistryIntegratedRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.RegistryIntegrated> {
21
- return fm.fetchReq<KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.UpdateRegistryIntegratedRequest, KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.RegistryIntegrated>(`/apis/kangaroo.io/v1alpha1/registry_integrated/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
22
- }
23
- static ListRegistryIntegrated(req: KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.ListRegistryIntegratedRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.ListRegistryIntegratedResponse> {
24
- return fm.fetchReq<KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.ListRegistryIntegratedRequest, KangarooIoApiRegistryIntegratedV1alpha1RegistryIntegrated.ListRegistryIntegratedResponse>(`/apis/kangaroo.io/v1alpha1/registry_integrated?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
25
- }
26
- }