@daocloud-proto/kangaroo 0.3.1 → 0.3.2-2

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,28 +106,42 @@ 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 = {
103
123
  digest?: string
104
124
  tags?: Tag[]
105
125
  scanOverview?: ScanOverview
126
+ references?: Reference[]
106
127
  imageSize?: string
107
128
  pushTime?: string
108
129
  pullTime?: string
109
130
  imagePullUrl?: string
110
131
  }
111
132
 
133
+ export type Reference = {
134
+ childDigest?: string
135
+ platform?: Platform
136
+ }
137
+
138
+ export type Platform = {
139
+ osVersion?: string
140
+ architecture?: string
141
+ os?: string
142
+ variant?: string
143
+ }
144
+
112
145
  export type ListArtifactsRequest = {
113
146
  workspace?: string
114
147
  registry?: string
@@ -137,6 +170,8 @@ export type TagInfoRequest = {
137
170
  export type TagInfoResponse = {
138
171
  extraAttrs?: ExtraAttrs
139
172
  buildHistory?: BuildHistory[]
173
+ scanOverview?: ScanOverview
174
+ references?: Reference[]
140
175
  }
141
176
 
142
177
  export type ExtraAttrs = {
@@ -279,4 +314,33 @@ export type APIListArtifactsRequest = {
279
314
  export type APIListArtifactsResponse = {
280
315
  items?: Artifacts[]
281
316
  pagination?: KangarooIoApiTypesPage.Page
317
+ }
318
+
319
+ export type ScanArtifactRequest = {
320
+ workspace?: string
321
+ registry?: string
322
+ project?: string
323
+ repository?: string
324
+ digest?: string
325
+ }
326
+
327
+ export type GetScanReportRequest = {
328
+ workspace?: string
329
+ registry?: string
330
+ project?: string
331
+ repository?: string
332
+ digest?: string
333
+ report?: string
334
+ }
335
+
336
+ export type GetScanReportResponse = {
337
+ report?: string
338
+ }
339
+
340
+ export type StopScanArtifactRequest = {
341
+ workspace?: string
342
+ registry?: string
343
+ project?: string
344
+ repository?: string
345
+ digest?: string
282
346
  }
@@ -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",
3
+ "version":"0.3.2-2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {