@daocloud-proto/insight 0.7.8-8 → 0.8.0-12

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.
@@ -4,6 +4,9 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ import * as fm from "../../fetch.pb"
8
+ import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
9
+
7
10
  export enum NodeType {
8
11
  NODE_TYPE_UNSPECIFIED = "NODE_TYPE_UNSPECIFIED",
9
12
  CLUSTER = "CLUSTER",
@@ -86,4 +89,30 @@ export type BaseGraphQuery = {
86
89
  start?: string
87
90
  end?: string
88
91
  extensionFilters?: string
92
+ }
93
+
94
+ export type BaseMetricsQuery = {
95
+ clusters?: string
96
+ namespaces?: string
97
+ services?: string
98
+ extensionFilters?: string
99
+ endTime?: string
100
+ lookback?: string
101
+ step?: string
102
+ ratePer?: string
103
+ }
104
+
105
+ export type ServiceREDMetricResponse = {
106
+ reqRateMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
107
+ errorsRateMetrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
108
+ repLatencyMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
109
+ }
110
+
111
+ export class GraphQueryService {
112
+ static GetGraph(req: BaseGraphQuery, initReq?: fm.InitReq): Promise<Graph> {
113
+ return fm.fetchReq<BaseGraphQuery, Graph>(`/apis/insight.io/v1alpha1/service_graph/graph?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
114
+ }
115
+ static GetREDMetrics(req: BaseMetricsQuery, initReq?: fm.InitReq): Promise<ServiceREDMetricResponse> {
116
+ return fm.fetchReq<BaseMetricsQuery, ServiceREDMetricResponse>(`/apis/insight.io/v1alpha1/service_graph/service-RED-metrics?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
117
+ }
89
118
  }
@@ -47,6 +47,8 @@ export enum AlertStatus {
47
47
  export type ListRulesRequest = {
48
48
  builtin?: boolean
49
49
  name?: string
50
+ clusterName?: string
51
+ namespace?: string
50
52
  severity?: Severity
51
53
  status?: RuleStatus
52
54
  page?: number
@@ -139,6 +139,9 @@ export class Log {
139
139
  static QueryLogContext(req: InsightIoApiLogV1alpha1Log.QueryLogContextRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.QueryLogResponse> {
140
140
  return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogContextRequest, InsightIoApiLogV1alpha1Log.QueryLogResponse>(`/apis/insight.io/v1alpha1/log/context`, {...initReq, method: "POST", body: JSON.stringify(req)})
141
141
  }
142
+ static DownloadLog(req: InsightIoApiLogV1alpha1Log.DownloadLogRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.DownloadLogResponse> {
143
+ return fm.fetchReq<InsightIoApiLogV1alpha1Log.DownloadLogRequest, InsightIoApiLogV1alpha1Log.DownloadLogResponse>(`/apis/insight.io/v1alpha1/log/export`, {...initReq, method: "POST", body: JSON.stringify(req)})
144
+ }
142
145
  static ListLogFilePaths(req: empty, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.ListLogFilePathsResponse> {
143
146
  return fm.fetchReq<empty, InsightIoApiLogV1alpha1Log.ListLogFilePathsResponse>(`/apis/insight.io/v1alpha1/log/filepaths?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
144
147
  }
@@ -14,6 +14,13 @@ type OneOf<T> =
14
14
  (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
15
15
  : never)
16
16
  : never);
17
+
18
+ export enum DownloadFileType {
19
+ TEXT = "TEXT",
20
+ CSV = "CSV",
21
+ JSON = "JSON",
22
+ }
23
+
17
24
  export type SearchLogRequest = {
18
25
  index?: string
19
26
  query?: string
@@ -117,6 +124,16 @@ export type LogHistogramResult = {
117
124
  count?: string
118
125
  }
119
126
 
127
+ export type DownloadLogRequest = {
128
+ type?: DownloadFileType
129
+ queryLog?: QueryLogRequest
130
+ queryLogConext?: QueryLogContextRequest
131
+ }
132
+
133
+ export type DownloadLogResponse = {
134
+ url?: string
135
+ }
136
+
120
137
  export type ListLogFilePathsResponse = {
121
138
  paths?: string[]
122
139
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/insight",
3
- "version":"0.7.8-8",
3
+ "version":"0.8.0-12",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -47,7 +47,7 @@ export type Cluster = {
47
47
  export type ListClusterSummaryRequest = {
48
48
  name?: string
49
49
  version?: string
50
- phases?: ClusterPhase[]
50
+ phase?: ClusterPhase
51
51
  page?: number
52
52
  pageSize?: number
53
53
  }