@daocloud-proto/kangaroo 0.3.1-5 → 0.3.1-50

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.
@@ -12,6 +12,25 @@ export enum ListRepositoriesRequestSortBy {
12
12
  update_time = "update_time",
13
13
  }
14
14
 
15
+ export enum ScanOverviewStatus {
16
+ scan_status_unspecified = "scan_status_unspecified",
17
+ pending = "pending",
18
+ running = "running",
19
+ error = "error",
20
+ success = "success",
21
+ stopped = "stopped",
22
+ }
23
+
24
+ export enum ScanOverviewSeverity {
25
+ unspecified = "unspecified",
26
+ unknown = "unknown",
27
+ low = "low",
28
+ medium = "medium",
29
+ high = "high",
30
+ critical = "critical",
31
+ none = "none",
32
+ }
33
+
15
34
  export enum ListArtifactsRequestSortBy {
16
35
  SORT_BY_UNSPECIFIED = "SORT_BY_UNSPECIFIED",
17
36
  }
@@ -70,8 +89,8 @@ export type ListRepositoriesResponse = {
70
89
  }
71
90
 
72
91
  export type ScanOverview = {
73
- scanStatus?: string
74
- severity?: string
92
+ scanStatus?: ScanOverviewStatus
93
+ severity?: ScanOverviewSeverity
75
94
  duration?: string
76
95
  endTime?: string
77
96
  startTime?: string
@@ -87,16 +106,17 @@ export type Scanner = {
87
106
  }
88
107
 
89
108
  export type ScanSummary = {
90
- fixable?: string
109
+ fixable?: number
91
110
  summary?: VulnerabilitySummary
92
- total?: string
111
+ total?: number
93
112
  }
94
113
 
95
114
  export type VulnerabilitySummary = {
96
- critical?: string
97
- high?: string
98
- low?: string
99
- medium?: string
115
+ critical?: number
116
+ high?: number
117
+ low?: number
118
+ medium?: number
119
+ unknown?: number
100
120
  }
101
121
 
102
122
  export type Artifacts = {
@@ -137,6 +157,7 @@ export type TagInfoRequest = {
137
157
  export type TagInfoResponse = {
138
158
  extraAttrs?: ExtraAttrs
139
159
  buildHistory?: BuildHistory[]
160
+ scanOverview?: ScanOverview
140
161
  }
141
162
 
142
163
  export type ExtraAttrs = {
@@ -279,4 +300,33 @@ export type APIListArtifactsRequest = {
279
300
  export type APIListArtifactsResponse = {
280
301
  items?: Artifacts[]
281
302
  pagination?: KangarooIoApiTypesPage.Page
303
+ }
304
+
305
+ export type ScanArtifactRequest = {
306
+ workspace?: string
307
+ registry?: string
308
+ project?: string
309
+ repository?: string
310
+ digest?: string
311
+ }
312
+
313
+ export type GetScanReportRequest = {
314
+ workspace?: string
315
+ registry?: string
316
+ project?: string
317
+ repository?: string
318
+ digest?: string
319
+ report?: string
320
+ }
321
+
322
+ export type GetScanReportResponse = {
323
+ report?: string
324
+ }
325
+
326
+ export type StopScanArtifactRequest = {
327
+ workspace?: string
328
+ registry?: string
329
+ project?: string
330
+ repository?: string
331
+ digest?: string
282
332
  }
@@ -29,6 +29,15 @@ export class Image {
29
29
  static DeleteArtifacts(req: KangarooIoApiImageV1alpha1Image.DeleteArtifactsRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
30
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
31
  }
32
+ static ScanArtifact(req: KangarooIoApiImageV1alpha1Image.ScanArtifactRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
33
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ScanArtifactRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}/artifacts/${req["digest"]}/scan`, {...initReq, method: "POST"})
34
+ }
35
+ static StopScanArtifact(req: KangarooIoApiImageV1alpha1Image.StopScanArtifactRequest, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
36
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.StopScanArtifactRequest, GoogleProtobufEmpty.Empty>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}/artifacts/${req["digest"]}/scan`, {...initReq, method: "PUT"})
37
+ }
38
+ static GetScanReport(req: KangarooIoApiImageV1alpha1Image.GetScanReportRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.GetScanReportResponse> {
39
+ return fm.fetchReq<KangarooIoApiImageV1alpha1Image.GetScanReportRequest, KangarooIoApiImageV1alpha1Image.GetScanReportResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/projects/${req["project"]}/repositories/${req["repository"]}/artifacts/${req["digest"]}/scan/${req["report"]}?${fm.renderURLSearchParams(req, ["workspace", "registry", "project", "repository", "digest", "report"])}`, {...initReq, method: "GET"})
40
+ }
32
41
  static ListRegistryProject(req: KangarooIoApiImageV1alpha1Image.ListRegistryProjectRequest, initReq?: fm.InitReq): Promise<KangarooIoApiImageV1alpha1Image.ListRegistryProjectResponse> {
33
42
  return fm.fetchReq<KangarooIoApiImageV1alpha1Image.ListRegistryProjectRequest, KangarooIoApiImageV1alpha1Image.ListRegistryProjectResponse>(`/apis/kangaroo.io/v1alpha1/registries/${req["registry"]}/projects?${fm.renderURLSearchParams(req, ["registry"])}`, {...initReq, method: "GET"})
34
43
  }
@@ -144,4 +144,14 @@ export type GetStorageStatisticResponse = {
144
144
  export type StorageStatisticItem = {
145
145
  timestamp?: string
146
146
  value?: string
147
+ }
148
+
149
+ export type GetRegistryTypeRequest = {
150
+ workspace?: string
151
+ registry?: string
152
+ }
153
+
154
+ export type GetRegistryTypeResponse = {
155
+ registry?: string
156
+ type?: RegistryType
147
157
  }
@@ -32,6 +32,9 @@ export class Registries {
32
32
  static GetWorkspaceRegistry(req: KangarooIoApiRegistryV1alpha1Registry.GetWorkspaceRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.Registry> {
33
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
34
  }
35
+ static GetRegistryType(req: KangarooIoApiRegistryV1alpha1Registry.GetRegistryTypeRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.GetRegistryTypeResponse> {
36
+ return fm.fetchReq<KangarooIoApiRegistryV1alpha1Registry.GetRegistryTypeRequest, KangarooIoApiRegistryV1alpha1Registry.GetRegistryTypeResponse>(`/apis/kangaroo.io/v1alpha1/workspaces/${req["workspace"]}/registries/${req["registry"]}/type?${fm.renderURLSearchParams(req, ["workspace", "registry"])}`, {...initReq, method: "GET"})
37
+ }
35
38
  static UpdateWorkspaceRegistry(req: KangarooIoApiRegistryV1alpha1Registry.UpdateWorkspaceRegistryRequest, initReq?: fm.InitReq): Promise<KangarooIoApiRegistryV1alpha1Registry.Registry> {
36
39
  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
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/kangaroo",
3
- "version":"0.3.1-5",
3
+ "version":"0.3.1-50",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {