@daocloud-proto/skoala 0.20.0 → 0.21.0

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.
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
8
+ import * as InsightIoApiAlertV1alpha1Notify from "./notify.pb"
8
9
  import * as InsightIoApiAlertV1alpha1Type from "./type.pb"
9
10
  export type ID = {
10
11
  id?: string
@@ -53,7 +54,7 @@ export type CreateGroupRequest = {
53
54
  targets?: string[]
54
55
  rules?: CreateGroupRule[]
55
56
  notificationTemplate?: string
56
- receivers?: receiver[]
57
+ receivers?: groupReceiver[]
57
58
  notifyRepeatConfig?: repeatConfig[]
58
59
  }
59
60
 
@@ -62,8 +63,8 @@ export type repeatConfig = {
62
63
  interval?: number
63
64
  }
64
65
 
65
- export type receiver = {
66
- type?: string
66
+ export type groupReceiver = {
67
+ type?: InsightIoApiAlertV1alpha1Notify.ReceiverType
67
68
  names?: string[]
68
69
  }
69
70
 
@@ -77,7 +78,7 @@ export type Group = {
77
78
  targets?: string[]
78
79
  description?: string
79
80
  notificationTemplate?: string
80
- receivers?: receiver[]
81
+ receivers?: groupReceiver[]
81
82
  notifyRepeatConfig?: repeatConfig[]
82
83
  createAt?: string
83
84
  updateAt?: string
@@ -87,7 +88,7 @@ export type UpdateGroupRequest = {
87
88
  id?: string
88
89
  description?: string
89
90
  notificationTemplate?: string
90
- receivers?: receiver[]
91
+ receivers?: groupReceiver[]
91
92
  notifyRepeatConfig?: repeatConfig[]
92
93
  }
93
94
 
@@ -101,12 +102,12 @@ export type ListGroupRulesRequest = {
101
102
  sorts?: string[]
102
103
  }
103
104
 
104
- export type ListRulesV2Response = {
105
- items?: RuleV2Summary[]
105
+ export type ListRulesResponse = {
106
+ items?: RuleSummary[]
106
107
  pagination?: InsightIoApiTypeV1alpha1Page.Pagination
107
108
  }
108
109
 
109
- export type RuleV2Summary = {
110
+ export type RuleSummary = {
110
111
  id?: string
111
112
  name?: string
112
113
  groupId?: string
@@ -121,7 +122,7 @@ export type RuleV2Summary = {
121
122
  createAt?: string
122
123
  }
123
124
 
124
- export type RuleV2 = {
125
+ export type Rule = {
125
126
  id?: string
126
127
  name?: string
127
128
  groupId?: string
@@ -142,7 +143,7 @@ export type RuleV2 = {
142
143
  }
143
144
 
144
145
  export type AddGroupRuleRequest = {
145
- groupId?: string
146
+ id?: string
146
147
  rule?: CreateGroupRule
147
148
  }
148
149
 
@@ -159,8 +160,8 @@ export type CreateGroupRule = {
159
160
  annotations?: {[key: string]: string}
160
161
  }
161
162
 
162
- export type UpdateRuleV2Request = {
163
- groupId?: string
163
+ export type UpdateRuleRequest = {
164
+ id?: string
164
165
  name?: string
165
166
  description?: string
166
167
  expr?: string
@@ -173,6 +174,105 @@ export type UpdateRuleV2Request = {
173
174
  }
174
175
 
175
176
  export type GroupRule = {
176
- groupId?: string
177
+ id?: string
177
178
  name?: string
179
+ }
180
+
181
+ export type ListAlertsRequest = {
182
+ resolved?: boolean
183
+ groupName?: string
184
+ groupId?: string
185
+ ruleName?: string
186
+ ruleId?: string
187
+ clusterName?: string
188
+ namespace?: string
189
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
190
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
191
+ target?: string
192
+ page?: number
193
+ pageSize?: number
194
+ sorts?: string[]
195
+ }
196
+
197
+ export type ListAlertsResponse = {
198
+ items?: AlertSummary[]
199
+ pagination?: InsightIoApiTypeV1alpha1Page.Pagination
200
+ }
201
+
202
+ export type AlertSummary = {
203
+ id?: string
204
+ groupName?: string
205
+ groupId?: string
206
+ ruleName?: string
207
+ ruleId?: string
208
+ clusterName?: string
209
+ namespace?: string
210
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
211
+ target?: string
212
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
213
+ value?: string
214
+ notifyResponse?: string
215
+ description?: string
216
+ startAt?: string
217
+ updateAt?: string
218
+ lastSent?: string
219
+ }
220
+
221
+ export type CountAlertRequest = {
222
+ resolved?: boolean
223
+ clusterName?: string
224
+ namespace?: string
225
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
226
+ target?: string
227
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
228
+ start?: string
229
+ end?: string
230
+ step?: string
231
+ groupByType?: boolean
232
+ }
233
+
234
+ export type CountAlertResponse = {
235
+ data?: CountAlert[]
236
+ }
237
+
238
+ export type CountAlert = {
239
+ start?: string
240
+ end?: string
241
+ items?: countInfo[]
242
+ }
243
+
244
+ export type countInfo = {
245
+ target?: string
246
+ sum?: {[key: string]: string}
247
+ }
248
+
249
+ export type AMHookRequest = {
250
+ version?: string
251
+ groupKey?: string
252
+ status?: string
253
+ receiver?: string
254
+ groupLabels?: {[key: string]: string}
255
+ commonLabels?: {[key: string]: string}
256
+ commonAnnotations?: {[key: string]: string}
257
+ externalURL?: string
258
+ alerts?: AmAlert[]
259
+ truncatedAlerts?: string
260
+ }
261
+
262
+ export type AmAlert = {
263
+ status?: string
264
+ labels?: {[key: string]: string}
265
+ annotations?: {[key: string]: string}
266
+ startsAt?: string
267
+ endsAt?: string
268
+ generatorURL?: string
269
+ fingerprint?: string
270
+ }
271
+
272
+ export type AlertHistoryRetentionPeriod = {
273
+ retentionTime?: number
274
+ }
275
+
276
+ export type CleanAlertHistoryResponse = {
277
+ num?: string
178
278
  }
@@ -91,4 +91,50 @@ export type BasicAuth = {
91
91
 
92
92
  export type SafeTLSConfig = {
93
93
  insecureSkipVerify?: boolean
94
+ }
95
+
96
+ export type ListTemplatesRequest = {
97
+ name?: string
98
+ page?: number
99
+ pageSize?: number
100
+ sorts?: string[]
101
+ exactSearch?: boolean
102
+ }
103
+
104
+ export type ListTemplatesResponse = {
105
+ items?: TemplateSummary[]
106
+ pagination?: InsightIoApiTypeV1alpha1Page.Pagination
107
+ }
108
+
109
+ export type TemplateSummary = {
110
+ name?: string
111
+ description?: string
112
+ updateAt?: string
113
+ builtin?: boolean
114
+ }
115
+
116
+ export type Template = {
117
+ name?: string
118
+ description?: string
119
+ body?: TemplateBody
120
+ builtin?: boolean
121
+ createAt?: string
122
+ updateAt?: string
123
+ }
124
+
125
+ export type TemplateName = {
126
+ name?: string
127
+ }
128
+
129
+ export type CreateTemplateRequest = {
130
+ name?: string
131
+ description?: string
132
+ body?: TemplateBody
133
+ }
134
+
135
+ export type TemplateBody = {
136
+ email?: string
137
+ wecom?: string
138
+ dingtalk?: string
139
+ webhook?: string
94
140
  }
@@ -4,7 +4,7 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
- import * as InsightIoApiInsightV1alpha1Alert from "./alert.pb"
7
+ import * as InsightIoApiAlertV1alpha1Alert from "./alert.pb"
8
8
 
9
9
  export enum matchType {
10
10
  MATCH_TYPE_UNSPECIFIED = "MATCH_TYPE_UNSPECIFIED",
@@ -27,18 +27,20 @@ export type CreateSilenceRequest = {
27
27
  }
28
28
 
29
29
  export type Silence = {
30
+ id?: string
30
31
  name?: string
31
32
  clusterName?: string
32
33
  namespace?: string
33
34
  description?: string
34
35
  matches?: match[]
35
36
  activeTimeInterval?: timeInterval
37
+ expired?: boolean
36
38
  createAt?: string
37
39
  updateAt?: string
38
40
  }
39
41
 
40
42
  export type UpdateSilenceRequest = {
41
- name?: string
43
+ id?: string
42
44
  description?: string
43
45
  matches?: match[]
44
46
  activeTimeInterval?: timeInterval
@@ -65,14 +67,19 @@ export type PreviewSilenceRequest = {
65
67
  clusterName?: string
66
68
  namespace?: string
67
69
  matches?: match[]
70
+ size?: string
68
71
  }
69
72
 
70
73
  export type PreviewSilenceResponse = {
71
- items?: InsightIoApiInsightV1alpha1Alert.AlertSummary[]
74
+ items?: InsightIoApiAlertV1alpha1Alert.AlertSummary[]
72
75
  }
73
76
 
74
- export type timeInterval = {
77
+ export type timeIntervaltimeRange = {
75
78
  start?: string
76
79
  end?: string
80
+ }
81
+
82
+ export type timeInterval = {
83
+ timeRanges?: timeIntervaltimeRange[]
77
84
  weekdayRange?: number[]
78
85
  }
@@ -20,7 +20,6 @@ export enum TargetType {
20
20
  DEPLOYMENT = "DEPLOYMENT",
21
21
  STATEFULSET = "STATEFULSET",
22
22
  DAEMONSET = "DAEMONSET",
23
- CRONJOB = "CRONJOB",
24
23
  POD = "POD",
25
24
  }
26
25
 
@@ -94,6 +94,15 @@ export enum ExternalTrafficPolicy {
94
94
  TrafficPolicyLocal = "TrafficPolicyLocal",
95
95
  }
96
96
 
97
+ export enum WorkloadState {
98
+ WORKLOAD_STATE_UNSPECIFIED = "WORKLOAD_STATE_UNSPECIFIED",
99
+ WorkloadStateRunning = "WorkloadStateRunning",
100
+ WorkloadStateDeleting = "WorkloadStateDeleting",
101
+ WorkloadStateNotReady = "WorkloadStateNotReady",
102
+ WorkloadStateStopped = "WorkloadStateStopped",
103
+ WorkloadStateWaiting = "WorkloadStateWaiting",
104
+ }
105
+
97
106
  export type Cluster = {
98
107
  id?: string
99
108
  name?: string
@@ -4,6 +4,7 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ import * as InsightIoApiAlertV1alpha1Type from "../../../alert/v1alpha1/type.pb"
7
8
  import * as InsightIoApiMetricV1alpha1Metric from "../../../metric/v1alpha1/metric.pb"
8
9
  export type InsightBrief = {
9
10
  enabled?: boolean
@@ -64,4 +65,13 @@ export type NacosInsightMetrics = {
64
65
  failedPush?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
65
66
  configCount?: number
66
67
  longPolling?: number
68
+ }
69
+
70
+ export type Alter = {
71
+ ruleName?: string
72
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
73
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
74
+ targetName?: string
75
+ description?: string
76
+ startAt?: string
67
77
  }
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import * as SkoalaApiGeneralV1alpha1Common from "./common.pb"
8
+ import * as SkoalaApiGeneralV1alpha1Insight from "./insight.pb"
8
9
 
9
10
  export enum ListNamespaceReqGatewayStatus {
10
11
  NoFilter = "NoFilter",
@@ -275,4 +276,14 @@ export type CheckMidModuleReq = {
275
276
  export type CheckMidModuleRes = {
276
277
  mysql?: boolean
277
278
  redis?: boolean
279
+ }
280
+
281
+ export type ListAlertsReq = {
282
+ workspaceId?: string
283
+ clusterName?: string
284
+ namespaceName?: string
285
+ }
286
+
287
+ export type ListAlertsRes = {
288
+ alters?: SkoalaApiGeneralV1alpha1Insight.Alter[]
278
289
  }
@@ -108,6 +108,7 @@ export enum ListGatewayPodContainerReqComponentType {
108
108
  export type Node = {
109
109
  total?: number
110
110
  online?: number
111
+ workloadState?: SkoalaApiGeneralV1alpha1Common.WorkloadState
111
112
  }
112
113
 
113
114
  export type GatewayCondition = {
@@ -124,7 +125,8 @@ export type Gateway = {
124
125
  createdAt?: string
125
126
  updatedAt?: string
126
127
  condition?: GatewayCondition
127
- endpoints?: string[]
128
+ externalEndpoints?: string[]
129
+ internalEndpoints?: string[]
128
130
  contour?: Node
129
131
  envoy?: Node
130
132
  apiCount?: number
@@ -268,6 +270,17 @@ export type GatewayConfig = {
268
270
  component?: SkoalaApiGeneralV1alpha1Common.Component
269
271
  normal?: NormalConfig
270
272
  advanced?: AdvancedConfig
273
+ plugin?: PluginConfig
274
+ }
275
+
276
+ export type PluginConfig = {
277
+ globalRatelimitConfig?: GlobalRatelimitConfig
278
+ }
279
+
280
+ export type GlobalRatelimitConfig = {
281
+ enabled?: boolean
282
+ ratelimitPluginName?: string
283
+ domain?: string
271
284
  }
272
285
 
273
286
 
@@ -27,6 +27,7 @@ export enum ServiceSource {
27
27
  export enum SesameServiceType {
28
28
  EXTERNAL_SERVICE = "EXTERNAL_SERVICE",
29
29
  MANAGE_SERVICE = "MANAGE_SERVICE",
30
+ PLUGIN_SERVICE = "PLUGIN_SERVICE",
30
31
  }
31
32
 
32
33
  export type CreateExternalServiceReq = {
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import * as GoogleProtobufAny from "../../../google/protobuf/any.pb"
8
+ import * as GoogleProtobufDuration from "../../../google/protobuf/duration.pb"
8
9
  import * as SkoalaApiGeneralV1alpha1Common from "../../general/v1alpha1/common.pb"
9
10
 
10
11
  type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
@@ -53,6 +54,14 @@ export enum ServiceType {
53
54
  DUBBO = "DUBBO",
54
55
  }
55
56
 
57
+ export enum LB {
58
+ UNSPECIFIED = "UNSPECIFIED",
59
+ LEAST_CONN = "LEAST_CONN",
60
+ RANDOM = "RANDOM",
61
+ PASSTHROUGH = "PASSTHROUGH",
62
+ ROUND_ROBIN = "ROUND_ROBIN",
63
+ }
64
+
56
65
 
57
66
  type BaseIstioResource = {
58
67
  type?: ResourceType
@@ -127,7 +136,7 @@ export type GetAnyType = {
127
136
  export type ListService = {
128
137
  name?: string
129
138
  status?: ServiceStatus
130
- type?: ServiceType
139
+ type?: string
131
140
  port?: string
132
141
  namespace?: string
133
142
  versions?: string[]
@@ -211,8 +220,8 @@ export type ListServiceGovernRes = {
211
220
  }
212
221
 
213
222
  export type ListServiceGovern = {
214
- port?: string
215
- lb?: string
223
+ port?: number
224
+ lb?: LB
216
225
  updateTime?: number
217
226
  }
218
227
 
@@ -221,10 +230,42 @@ export type UpdateServiceGovernReq = {
221
230
  meshId?: string
222
231
  namespaceName?: string
223
232
  serviceName?: string
224
- lb?: string
225
- liqun?: string
226
- rongduan?: string
233
+ port?: number
234
+ lb?: LB
235
+ outlierDetection?: OutlierDetection
236
+ connectionPool?: ConnectionPool
237
+ }
238
+
239
+ export type OutlierDetection = {
240
+ consecutiveErrors?: number
241
+ interval?: GoogleProtobufDuration.Duration
242
+ baseEjectionTime?: GoogleProtobufDuration.Duration
243
+ maxEjectionPercent?: number
244
+ minHealthPercent?: number
245
+ }
246
+
247
+ export type ConnectionPool = {
248
+ http1MaxPendingRequests?: number
249
+ http2MaxRequests?: number
250
+ maxRequestsPerConnection?: number
251
+ maxRetries?: number
227
252
  }
228
253
 
229
254
  export type UpdateServiceGovernRes = {
255
+ }
256
+
257
+ export type GetServiceGovernReq = {
258
+ workspaceId?: string
259
+ meshId?: string
260
+ namespaceName?: string
261
+ serviceName?: string
262
+ port?: number
263
+ }
264
+
265
+ export type GetServiceGovernRes = {
266
+ serviceName?: string
267
+ port?: number
268
+ lb?: LB
269
+ outlierDetection?: OutlierDetection
270
+ connectionPool?: ConnectionPool
230
271
  }
@@ -95,7 +95,6 @@ export type Nacos = {
95
95
  serviceType?: SkoalaApiGeneralV1alpha1Service.ServiceType
96
96
  ports?: SkoalaApiGeneralV1alpha1Service.ServicePort[]
97
97
  status?: NacosStatus
98
- clusterPhase?: SkoalaApiGeneralV1alpha1Common.ClusterPhase
99
98
  replicas?: number
100
99
  image?: string
101
100
  version?: string
@@ -110,6 +109,8 @@ export type Nacos = {
110
109
  volume?: Volume
111
110
  createAt?: string
112
111
  insight?: SkoalaApiGeneralV1alpha1Insight.NacosInsightMetrics
112
+ clusterPhase?: SkoalaApiGeneralV1alpha1Common.ClusterPhase
113
+ workloadState?: SkoalaApiGeneralV1alpha1Common.WorkloadState
113
114
  }
114
115
 
115
116
  export type NacosDatabase = {
@@ -78,6 +78,7 @@ export type GetSentinelPluginRes = {
78
78
  type?: SkoalaApiGeneralV1alpha1Service.ServiceType
79
79
  ports?: SkoalaApiGeneralV1alpha1Service.ServicePort[]
80
80
  visitAddress?: string
81
+ workloadState?: SkoalaApiGeneralV1alpha1Common.WorkloadState
81
82
  }
82
83
 
83
84
  export type GetMeshPluginReq = {
@@ -58,6 +58,8 @@ export type GetInsGovernReq = {
58
58
  sentinelName?: string
59
59
  serviceName?: string
60
60
  instanceIp?: string
61
+ nacosNamespace?: string
62
+ nacosGroup?: string
61
63
  }
62
64
 
63
65
  export type GetInsGovernRes = {
@@ -142,9 +142,10 @@ export type WasmPluginConfig = {
142
142
  export type RateLimitPluginConfig = {
143
143
  pluginAddress?: PluginAddress
144
144
  timeout?: IntervalTimeUnit
145
- fileOpen?: boolean
146
- enableXRateLimitHeaders?: boolean
145
+ failOpen?: boolean
146
+ enableRateLimitHeaders?: boolean
147
147
  validation?: TLSValidation
148
+ rlsRuleAddress?: string
148
149
  }
149
150
 
150
151
  export type AuthPluginConfigBufferSettings = {
@@ -156,7 +157,7 @@ export type AuthPluginConfigBufferSettings = {
156
157
  export type AuthPluginConfig = {
157
158
  pluginAddress?: PluginAddress
158
159
  timeout?: IntervalTimeUnit
159
- fileOpen?: boolean
160
+ failOpen?: boolean
160
161
  requestBodyBufferSettings?: AuthPluginConfigBufferSettings
161
162
  validation?: TLSValidation
162
163
  }
@@ -208,4 +209,43 @@ export type ClusterNamespaceService = {
208
209
  export type IntervalTimeUnit = {
209
210
  interval?: number
210
211
  unit?: SkoalaApiGeneralV1alpha1Common.TimeUnit
212
+ }
213
+
214
+ export type GetRLSDomainReq = {
215
+ workspaceId?: string
216
+ pluginName?: string
217
+ }
218
+
219
+ export type GetRLSDomainRes = {
220
+ domain?: string[]
221
+ }
222
+
223
+ export type GetRLSDomainRulesReq = {
224
+ workspaceId?: string
225
+ pluginName?: string
226
+ domain?: string
227
+ }
228
+
229
+ export type GetRLSDomainRulesRes = {
230
+ rules?: PluginRLSRule[]
231
+ }
232
+
233
+ export type PluginRLSRuleRateLimit = {
234
+ unit?: SkoalaApiGeneralV1alpha1Common.TimeUnit
235
+ requestsPerUnit?: number
236
+ }
237
+
238
+ export type PluginRLSRule = {
239
+ name?: string
240
+ key?: string
241
+ value?: string
242
+ unlimited?: boolean
243
+ rateLimit?: PluginRLSRuleRateLimit
244
+ aliasName?: string
245
+ }
246
+
247
+ export type GetRLSRuleReq = {
248
+ workspaceId?: string
249
+ pluginName?: string
250
+ domain?: string
211
251
  }
@@ -51,6 +51,7 @@ export type VirtualhostConfig = {
51
51
  }
52
52
 
53
53
  export type AuthorizationPolicy = {
54
+ authPluginName?: string
54
55
  disabled?: boolean
55
56
  context?: {[key: string]: string}
56
57
  authServer?: string
@@ -62,6 +63,7 @@ export type AuthorizationPolicy = {
62
63
  }
63
64
 
64
65
  export type JwtProvider = {
66
+ jwtPluginName?: string
65
67
  audiences?: string[]
66
68
  default?: boolean
67
69
  forwardJWT?: boolean
@@ -95,6 +95,9 @@ export class Skoala {
95
95
  static CheckMidModule(req: SkoalaApiGeneralV1alpha1Skoala.CheckMidModuleReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.CheckMidModuleRes> {
96
96
  return fm.fetchReq<SkoalaApiGeneralV1alpha1Skoala.CheckMidModuleReq, SkoalaApiGeneralV1alpha1Skoala.CheckMidModuleRes>(`/apis/skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/check_mid_module?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName"])}`, {...initReq, method: "GET"})
97
97
  }
98
+ static ListAlerts(req: SkoalaApiGeneralV1alpha1Skoala.ListAlertsReq, initReq?: fm.InitReq): Promise<SkoalaApiGeneralV1alpha1Skoala.ListAlertsRes> {
99
+ return fm.fetchReq<SkoalaApiGeneralV1alpha1Skoala.ListAlertsReq, SkoalaApiGeneralV1alpha1Skoala.ListAlertsRes>(`/apis/skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/clusters/${req["clusterName"]}/namespaces/${req["namespaceName"]}/alters?${fm.renderURLSearchParams(req, ["workspaceId", "clusterName", "namespaceName"])}`, {...initReq, method: "GET"})
100
+ }
98
101
  }
99
102
  export class Registry {
100
103
  static List(req: SkoalaApiIntegratedV1alpha1Registry.ListRegistryReq, initReq?: fm.InitReq): Promise<SkoalaApiIntegratedV1alpha1Registry.ListRegistryRes> {
@@ -443,7 +446,10 @@ export class Mesh {
443
446
  return fm.fetchReq<SkoalaApiHostedV1alpha1Mesh.ListServiceGovernReq, SkoalaApiHostedV1alpha1Mesh.ListServiceGovernRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes/${req["meshId"]}/namespaces/${req["namespaceName"]}/services/${req["serviceName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "meshId", "namespaceName", "serviceName"])}`, {...initReq, method: "GET"})
444
447
  }
445
448
  static UpdateServiceGovern(req: SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernRes> {
446
- return fm.fetchReq<SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernReq, SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes/${req["meshId"]}/namespaces/${req["namespaceName"]}/services/${req["serviceName"]}`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
449
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernReq, SkoalaApiHostedV1alpha1Mesh.UpdateServiceGovernRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes/${req["meshId"]}/namespaces/${req["namespaceName"]}/services/${req["serviceName"]}/ports/${req["port"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
450
+ }
451
+ static GetServiceGovern(req: SkoalaApiHostedV1alpha1Mesh.GetServiceGovernReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Mesh.GetServiceGovernRes> {
452
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Mesh.GetServiceGovernReq, SkoalaApiHostedV1alpha1Mesh.GetServiceGovernRes>(`/apis/hive.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/meshes/${req["meshId"]}/namespaces/${req["namespaceName"]}/services/${req["serviceName"]}/ports/${req["port"]}?${fm.renderURLSearchParams(req, ["workspaceId", "meshId", "namespaceName", "serviceName", "port"])}`, {...initReq, method: "GET"})
447
453
  }
448
454
  }
449
455
  export class Plugin {
@@ -678,4 +684,10 @@ export class SkoalaPlugin {
678
684
  static DeletePlugin(req: SkoalaApiHostedV1alpha1Skoala_plugins.DeleteSkoalaPluginReq, initReq?: fm.InitReq): Promise<GoogleProtobufEmpty.Empty> {
679
685
  return fm.fetchReq<SkoalaApiHostedV1alpha1Skoala_plugins.DeleteSkoalaPluginReq, GoogleProtobufEmpty.Empty>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/plugins/${req["pluginName"]}`, {...initReq, method: "DELETE"})
680
686
  }
687
+ static GetRLSDomain(req: SkoalaApiHostedV1alpha1Skoala_plugins.GetRLSDomainReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Skoala_plugins.GetRLSDomainRes> {
688
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Skoala_plugins.GetRLSDomainReq, SkoalaApiHostedV1alpha1Skoala_plugins.GetRLSDomainRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/plugins/rls/${req["pluginName"]}?${fm.renderURLSearchParams(req, ["workspaceId", "pluginName"])}`, {...initReq, method: "GET"})
689
+ }
690
+ static GetRLSDomainRules(req: SkoalaApiHostedV1alpha1Skoala_plugins.GetRLSDomainRulesReq, initReq?: fm.InitReq): Promise<SkoalaApiHostedV1alpha1Skoala_plugins.GetRLSDomainRulesRes> {
691
+ return fm.fetchReq<SkoalaApiHostedV1alpha1Skoala_plugins.GetRLSDomainRulesReq, SkoalaApiHostedV1alpha1Skoala_plugins.GetRLSDomainRulesRes>(`/apis/sesame.skoala.io/v1alpha1/workspaces/${req["workspaceId"]}/plugins/rls/${req["pluginName"]}/domain/${req["domain"]}?${fm.renderURLSearchParams(req, ["workspaceId", "pluginName", "domain"])}`, {...initReq, method: "GET"})
692
+ }
681
693
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daocloud-proto/skoala",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -57,7 +57,7 @@ export type Span = {
57
57
  operationName?: string
58
58
  references?: SpanRef[]
59
59
  flags?: number
60
- startTime?: string
60
+ startTime?: GoogleProtobufTimestamp.Timestamp
61
61
  duration?: string
62
62
  tags?: KeyValue[]
63
63
  logs?: Log[]
@@ -72,11 +72,14 @@ export type TraceProcessMapping = {
72
72
  }
73
73
 
74
74
  export type Trace = {
75
- spans?: Span[]
75
+ operationName?: string
76
76
  processMap?: TraceProcessMapping[]
77
77
  warnings?: string[]
78
78
  traceId?: string
79
79
  status?: TraceTraceStatus
80
+ spanCount?: number
81
+ startTime?: GoogleProtobufTimestamp.Timestamp
82
+ duration?: string
80
83
  }
81
84
 
82
85
  export type Batch = {
@@ -1,282 +0,0 @@
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 InsightIoApiAlertV1alpha1Type from "../../alert/v1alpha1/type.pb"
8
- import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
9
-
10
- export enum CleanRuleType {
11
- Clean_All = "Clean_All",
12
- Clean_Unmatched = "Clean_Unmatched",
13
- Clean_Specific = "Clean_Specific",
14
- }
15
-
16
- export type ListRulesRequest = {
17
- builtin?: boolean
18
- name?: string
19
- clusterName?: string
20
- namespace?: string
21
- severity?: InsightIoApiAlertV1alpha1Type.Severity
22
- status?: InsightIoApiAlertV1alpha1Type.RuleStatus
23
- page?: number
24
- pageSize?: number
25
- sorts?: string[]
26
- }
27
-
28
- export type ListRulesResponse = {
29
- items?: RuleSummary[]
30
- pagination?: InsightIoApiTypeV1alpha1Page.Pagination
31
- }
32
-
33
- export type RuleSummary = {
34
- ruleId?: string
35
- ruleName?: string
36
- severity?: InsightIoApiAlertV1alpha1Type.Severity
37
- clusterName?: string
38
- namespace?: string
39
- targetType?: InsightIoApiAlertV1alpha1Type.TargetType
40
- targetNames?: string[]
41
- source?: InsightIoApiAlertV1alpha1Type.RuleSource
42
- expr?: string
43
- thresholdSymbol?: string
44
- thresholdNum?: number
45
- duration?: number
46
- status?: InsightIoApiAlertV1alpha1Type.RuleStatus
47
- builtin?: boolean
48
- createAt?: string
49
- }
50
-
51
- export type RuleID = {
52
- id?: string
53
- }
54
-
55
- export type Rule = {
56
- ruleId?: string
57
- ruleName?: string
58
- builtin?: boolean
59
- clusterName?: string
60
- namespace?: string
61
- source?: InsightIoApiAlertV1alpha1Type.RuleSource
62
- targetType?: InsightIoApiAlertV1alpha1Type.TargetType
63
- targetNames?: string[]
64
- expr?: string
65
- thresholdSymbol?: string
66
- thresholdNum?: number
67
- duration?: number
68
- severity?: InsightIoApiAlertV1alpha1Type.Severity
69
- status?: InsightIoApiAlertV1alpha1Type.RuleStatus
70
- labels?: {[key: string]: string}
71
- description?: string
72
- notificationTemplate?: string
73
- annotation?: Annotation
74
- createAt?: string
75
- updateAt?: string
76
- }
77
-
78
- export type Annotation = {
79
- promql?: string
80
- receivers?: AnnotationReceiver[]
81
- }
82
-
83
- export type AnnotationReceiver = {
84
- type?: string
85
- names?: string[]
86
- }
87
-
88
- export type CreateRuleRequest = {
89
- ruleName?: string
90
- description?: string
91
- clusterName?: string
92
- namespace?: string
93
- source?: InsightIoApiAlertV1alpha1Type.RuleSource
94
- targetType?: InsightIoApiAlertV1alpha1Type.TargetType
95
- targetNames?: string[]
96
- expr?: string
97
- thresholdSymbol?: string
98
- thresholdNum?: number
99
- duration?: number
100
- severity?: InsightIoApiAlertV1alpha1Type.Severity
101
- notificationTemplate?: string
102
- annotation?: Annotation
103
- }
104
-
105
- export type UpdateRuleRequest = {
106
- id?: string
107
- description?: string
108
- expr?: string
109
- thresholdSymbol?: string
110
- thresholdNum?: number
111
- duration?: number
112
- severity?: InsightIoApiAlertV1alpha1Type.Severity
113
- notificationTemplate?: string
114
- annotation?: Annotation
115
- }
116
-
117
- export type CleanRuleRequest = {
118
- cleanType?: CleanRuleType
119
- id?: string[]
120
- }
121
-
122
- export type CleanRuleResponse = {
123
- result?: string
124
- }
125
-
126
- export type ListAlertsRequest = {
127
- resolved?: boolean
128
- name?: string
129
- clusterName?: string
130
- namespace?: string
131
- severity?: InsightIoApiAlertV1alpha1Type.Severity
132
- targetType?: InsightIoApiAlertV1alpha1Type.TargetType
133
- targetName?: string
134
- page?: number
135
- pageSize?: number
136
- sorts?: string[]
137
- }
138
-
139
- export type ListAlertsResponse = {
140
- items?: AlertSummary[]
141
- pagination?: InsightIoApiTypeV1alpha1Page.Pagination
142
- }
143
-
144
- export type AlertSummary = {
145
- alertId?: string
146
- ruleName?: string
147
- severity?: InsightIoApiAlertV1alpha1Type.Severity
148
- clusterName?: string
149
- namespace?: string
150
- targetType?: InsightIoApiAlertV1alpha1Type.TargetType
151
- targetName?: string
152
- status?: InsightIoApiAlertV1alpha1Type.AlertStatus
153
- description?: string
154
- startAt?: string
155
- updateAt?: string
156
- notifyResponse?: string
157
- }
158
-
159
- export type AlertInfo = {
160
- alertId?: string
161
- fingerprint?: string
162
- ruleName?: string
163
- ruleId?: string
164
- clusterName?: string
165
- namespace?: string
166
- targetType?: InsightIoApiAlertV1alpha1Type.TargetType
167
- targetName?: string
168
- severity?: InsightIoApiAlertV1alpha1Type.Severity
169
- labels?: {[key: string]: string}
170
- description?: string
171
- notifyResponse?: string
172
- annotation?: string
173
- source?: InsightIoApiAlertV1alpha1Type.RuleSource
174
- status?: InsightIoApiAlertV1alpha1Type.AlertStatus
175
- startAt?: string
176
- updateAt?: string
177
- }
178
-
179
- export type CountAlertRequest = {
180
- resolved?: boolean
181
- clusterName?: string
182
- namespace?: string
183
- targetType?: InsightIoApiAlertV1alpha1Type.TargetType
184
- targetName?: string
185
- severity?: InsightIoApiAlertV1alpha1Type.Severity
186
- start?: string
187
- end?: string
188
- step?: string
189
- groupByType?: boolean
190
- }
191
-
192
- export type CountAlertResponse = {
193
- data?: CountAlert[]
194
- }
195
-
196
- export type CountAlert = {
197
- start?: string
198
- end?: string
199
- items?: countInfo[]
200
- }
201
-
202
- export type countInfo = {
203
- target?: string
204
- sum?: {[key: string]: string}
205
- }
206
-
207
- export type AMHookRequest = {
208
- version?: string
209
- groupKey?: string
210
- status?: string
211
- receiver?: string
212
- groupLabels?: {[key: string]: string}
213
- commonLabels?: {[key: string]: string}
214
- commonAnnotations?: {[key: string]: string}
215
- externalURL?: string
216
- alerts?: AmAlert[]
217
- truncatedAlerts?: string
218
- }
219
-
220
- export type AmAlert = {
221
- status?: string
222
- labels?: {[key: string]: string}
223
- annotations?: {[key: string]: string}
224
- startsAt?: string
225
- endsAt?: string
226
- generatorURL?: string
227
- fingerprint?: string
228
- }
229
-
230
- export type ListTemplatesRequest = {
231
- name?: string
232
- page?: number
233
- pageSize?: number
234
- sorts?: string[]
235
- exactSearch?: boolean
236
- }
237
-
238
- export type ListTemplatesResponse = {
239
- items?: TemplateSummary[]
240
- pagination?: InsightIoApiTypeV1alpha1Page.Pagination
241
- }
242
-
243
- export type TemplateSummary = {
244
- name?: string
245
- description?: string
246
- updateAt?: string
247
- builtin?: boolean
248
- }
249
-
250
- export type Template = {
251
- name?: string
252
- description?: string
253
- body?: TemplateBody
254
- builtin?: boolean
255
- createAt?: string
256
- updateAt?: string
257
- }
258
-
259
- export type TemplateName = {
260
- name?: string
261
- }
262
-
263
- export type CreateTemplateRequest = {
264
- name?: string
265
- description?: string
266
- body?: TemplateBody
267
- }
268
-
269
- export type TemplateBody = {
270
- email?: string
271
- wecom?: string
272
- dingtalk?: string
273
- webhook?: string
274
- }
275
-
276
- export type AlertHistoryRetentionPeriod = {
277
- retentionTime?: number
278
- }
279
-
280
- export type CleanAlertHistoryResponse = {
281
- num?: string
282
- }