@daocloud-proto/insight 0.14.0-dev-a8c4603f → 0.14.0-dev-184ce4b5

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.
@@ -0,0 +1,9 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ /*
4
+ * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
+ */
6
+ export type Duration = {
7
+ seconds?: string
8
+ nanos?: number
9
+ }
@@ -4,9 +4,19 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ import * as GoogleProtobufDuration from "../../google/protobuf/duration.pb"
7
8
  import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
8
9
  import * as InsightIoApiSpan_metricV1alpha1Otelspankind from "../../span_metric/v1alpha1/otelspankind.pb"
9
10
 
11
+ type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
12
+ type OneOf<T> =
13
+ | { [k in keyof T]?: undefined }
14
+ | (
15
+ keyof T extends infer K ?
16
+ (K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
17
+ : never)
18
+ : never);
19
+
10
20
  export enum NodeType {
11
21
  NODE_TYPE_UNSPECIFIED = "NODE_TYPE_UNSPECIFIED",
12
22
  CLUSTER = "CLUSTER",
@@ -38,6 +48,37 @@ export enum GraphType {
38
48
  MIXED = "MIXED",
39
49
  }
40
50
 
51
+ export enum FilterFiled {
52
+ SERVICE_NAME = "SERVICE_NAME",
53
+ STATUS_ERROR_RATE = "STATUS_ERROR_RATE",
54
+ STATUS_LATENCY = "STATUS_LATENCY",
55
+ CUSTOM_LABEL = "CUSTOM_LABEL",
56
+ }
57
+
58
+ export enum FilterOperator {
59
+ EQ = "EQ",
60
+ NE = "NE",
61
+ LT = "LT",
62
+ LE = "LE",
63
+ GT = "GT",
64
+ GE = "GE",
65
+ CONTAIN = "CONTAIN",
66
+ NOT_CONTAIN = "NOT_CONTAIN",
67
+ EQUAL = "EQUAL",
68
+ NOT_EQUAL = "NOT_EQUAL",
69
+ REGEX_PATTERN = "REGEX_PATTERN",
70
+ }
71
+
72
+ export enum AggType {
73
+ INTERSECTION = "INTERSECTION",
74
+ UNION = "UNION",
75
+ }
76
+
77
+ export enum FilterDataType {
78
+ NODE_DATE = "NODE_DATE",
79
+ EDGE_DATE = "EDGE_DATE",
80
+ }
81
+
41
82
  export type Status = {
42
83
  name?: string
43
84
  value?: number
@@ -83,6 +124,22 @@ export type Graph = {
83
124
  graphType?: GraphType
84
125
  }
85
126
 
127
+
128
+ type BaseOperatorClause = {
129
+ dataType?: FilterDataType
130
+ filed?: FilterFiled
131
+ operation?: FilterOperator
132
+ }
133
+
134
+ export type OperatorClause = BaseOperatorClause
135
+ & OneOf<{ stringValue: string; floatValue: number; durationValue: GoogleProtobufDuration.Duration }>
136
+
137
+ export type Filter = {
138
+ clause?: OperatorClause[]
139
+ aggType?: AggType
140
+ dependencyMaxDepth?: string
141
+ }
142
+
86
143
  export type BaseGraphQuery = {
87
144
  clusters?: string[]
88
145
  namespaces?: string[]
@@ -90,9 +147,10 @@ export type BaseGraphQuery = {
90
147
  layer?: Layer
91
148
  start?: string
92
149
  end?: string
93
- extensionFilters?: string
150
+ extensionLabels?: string
94
151
  graphType?: GraphType
95
152
  clusterNames?: string[]
153
+ filters?: Filter
96
154
  }
97
155
 
98
156
  export type BaseMetricsQuery = {
@@ -300,7 +300,7 @@ export class Tracing {
300
300
  }
301
301
  export class ServiceGraph {
302
302
  static GetGraph(req: InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, initReq?: fm.InitReq): Promise<InsightIoApiGraphV1alpha1Graph.Graph> {
303
- return fm.fetchReq<InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, InsightIoApiGraphV1alpha1Graph.Graph>(`/apis/insight.io/v1alpha1/service-graph/graph?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
303
+ return fm.fetchReq<InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, InsightIoApiGraphV1alpha1Graph.Graph>(`/apis/insight.io/v1alpha1/service-graph/graph`, {...initReq, method: "POST", body: JSON.stringify(req)})
304
304
  }
305
305
  static GetNodeMetrics(req: InsightIoApiGraphV1alpha1Graph.BaseMetricsQuery, initReq?: fm.InitReq): Promise<InsightIoApiGraphV1alpha1Graph.NodeMetricResponse> {
306
306
  return fm.fetchReq<InsightIoApiGraphV1alpha1Graph.BaseMetricsQuery, InsightIoApiGraphV1alpha1Graph.NodeMetricResponse>(`/apis/insight.io/v1alpha1/service-graph/node-metrics?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/insight",
3
- "version":"0.14.0-dev-a8c4603f",
3
+ "version":"0.14.0-dev-184ce4b5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {