@daocloud-proto/insight 0.19.2 → 0.20.0-rc1

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.
@@ -226,6 +226,7 @@ export type AlertSummary = {
226
226
  startAt?: string
227
227
  updateAt?: string
228
228
  lastSent?: string
229
+ builtin?: boolean
229
230
  }
230
231
 
231
232
  export type GetAlertRequest = {
@@ -102,6 +102,8 @@ export type Event = {
102
102
  involveObject?: EventInvolvedObject
103
103
  clusterUuid?: string
104
104
  timestamp?: string
105
+ action?: string
106
+ eventTime?: string
105
107
  }
106
108
 
107
109
  export type QueryEventCountRequest = {
@@ -15,6 +15,7 @@ import * as InsightIoApiLogV1alpha1Log from "../../log/v1alpha1/log.pb"
15
15
  import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
16
16
  import * as InsightIoApiResourceV1alpha1Cluster from "../../resource/v1alpha1/cluster.pb"
17
17
  import * as InsightIoApiResourceV1alpha1Job from "../../resource/v1alpha1/job.pb"
18
+ import * as InsightIoApiResourceV1alpha1Namespace from "../../resource/v1alpha1/namespace.pb"
18
19
  import * as InsightIoApiResourceV1alpha1Node from "../../resource/v1alpha1/node.pb"
19
20
  import * as InsightIoApiResourceV1alpha1Pod from "../../resource/v1alpha1/pod.pb"
20
21
  import * as InsightIoApiResourceV1alpha1Service from "../../resource/v1alpha1/service.pb"
@@ -65,8 +66,8 @@ export type GlobalConfig = {
65
66
  export type userinfo = {
66
67
  name?: string
67
68
  isAdmin?: boolean
68
- isClusterAdmin?: boolean
69
- canView?: boolean
69
+ canViewCluster?: boolean
70
+ canViewNs?: boolean
70
71
  resourceTypes?: resourceType[]
71
72
  }
72
73
 
@@ -271,8 +272,11 @@ export class Resource {
271
272
  static GetCluster(req: InsightIoApiResourceV1alpha1Cluster.GetClusterRequest, initReq?: fm.InitReq): Promise<InsightIoApiResourceV1alpha1Cluster.ClusterDetail> {
272
273
  return fm.fetchReq<InsightIoApiResourceV1alpha1Cluster.GetClusterRequest, InsightIoApiResourceV1alpha1Cluster.ClusterDetail>(`/apis/insight.io/v1alpha1/clusters/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
273
274
  }
274
- static ListNamespaces(req: InsightIoApiResourceV1alpha1Cluster.ListNamespacesRequest, initReq?: fm.InitReq): Promise<InsightIoApiResourceV1alpha1Cluster.ListNamespacesResponse> {
275
- return fm.fetchReq<InsightIoApiResourceV1alpha1Cluster.ListNamespacesRequest, InsightIoApiResourceV1alpha1Cluster.ListNamespacesResponse>(`/apis/insight.io/v1alpha1/clusters/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
275
+ static ListNamespaces(req: InsightIoApiResourceV1alpha1Namespace.ListNamespacesRequest, initReq?: fm.InitReq): Promise<InsightIoApiResourceV1alpha1Namespace.ListNamespacesResponse> {
276
+ return fm.fetchReq<InsightIoApiResourceV1alpha1Namespace.ListNamespacesRequest, InsightIoApiResourceV1alpha1Namespace.ListNamespacesResponse>(`/apis/insight.io/v1alpha1/clusters/${req["cluster"]}/namespaces?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
277
+ }
278
+ static GetNamespace(req: InsightIoApiResourceV1alpha1Namespace.GetNamespaceRequest, initReq?: fm.InitReq): Promise<InsightIoApiResourceV1alpha1Namespace.NamespaceDetail> {
279
+ return fm.fetchReq<InsightIoApiResourceV1alpha1Namespace.GetNamespaceRequest, InsightIoApiResourceV1alpha1Namespace.NamespaceDetail>(`/apis/insight.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "name"])}`, {...initReq, method: "GET"})
276
280
  }
277
281
  static ListNodes(req: InsightIoApiResourceV1alpha1Node.ListNodesRequest, initReq?: fm.InitReq): Promise<InsightIoApiResourceV1alpha1Node.ListNodesResponse> {
278
282
  return fm.fetchReq<InsightIoApiResourceV1alpha1Node.ListNodesRequest, InsightIoApiResourceV1alpha1Node.ListNodesResponse>(`/apis/insight.io/v1alpha1/clusters/${req["cluster"]}/nodes?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
@@ -60,6 +60,7 @@ export type LogQuerySystemFilter = {
60
60
  clusterFilter?: string[]
61
61
  nodeFilter?: string[]
62
62
  fileFilter?: string[]
63
+ luceneFilter?: string
63
64
  }
64
65
 
65
66
  export type LogQueryEventFilter = {
@@ -149,10 +150,14 @@ export type DownloadLogResponse = {
149
150
  url?: string
150
151
  }
151
152
 
152
- export type ListLogFilePathsRequest = {
153
- cluster?: string
153
+
154
+ type BaseListLogFilePathsRequest = {
155
+ node?: string
154
156
  }
155
157
 
158
+ export type ListLogFilePathsRequest = BaseListLogFilePathsRequest
159
+ & OneOf<{ cluster: string; clusterName: string }>
160
+
156
161
  export type ListLogFilePathsResponse = {
157
162
  paths?: string[]
158
163
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/insight",
3
- "version":"0.19.2",
3
+ "version":"0.20.0-rc1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -124,19 +124,6 @@ export type insightAgentState = {
124
124
  traceStatus?: InsightAgentStatus
125
125
  }
126
126
 
127
- export type ListNamespacesRequest = {
128
- cluster?: string
129
- }
130
-
131
- export type ListNamespacesResponse = {
132
- namespaces?: Namespace[]
133
- }
134
-
135
- export type Namespace = {
136
- name?: string
137
- role?: Role
138
- }
139
-
140
127
  export type GetAgentSummaryRequest = {
141
128
  cluster?: string
142
129
  }
@@ -0,0 +1,43 @@
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 InsightIoApiResourceV1alpha1Cluster from "./cluster.pb"
8
+ import * as InsightIoApiResourceV1alpha1Type from "./type.pb"
9
+
10
+ export enum NamespacePhase {
11
+ NAMESPACE_PHASE_UNSPECIFIED = "NAMESPACE_PHASE_UNSPECIFIED",
12
+ Active = "Active",
13
+ Terminating = "Terminating",
14
+ }
15
+
16
+ export type ListNamespacesRequest = {
17
+ cluster?: string
18
+ }
19
+
20
+ export type ListNamespacesResponse = {
21
+ namespaces?: Namespace[]
22
+ }
23
+
24
+ export type Namespace = {
25
+ name?: string
26
+ role?: InsightIoApiResourceV1alpha1Cluster.Role
27
+ }
28
+
29
+ export type GetNamespaceRequest = {
30
+ cluster?: string
31
+ name?: string
32
+ }
33
+
34
+ export type NamespaceDetail = {
35
+ name?: string
36
+ cluster?: string
37
+ phase?: NamespacePhase
38
+ creationTimestamp?: string
39
+ deploymentNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
40
+ statefulsetNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
41
+ daemonsetNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
42
+ podNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
43
+ }