@daocloud-proto/insight 0.12.2-80 → 0.12.2-86

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.
@@ -6,6 +6,12 @@
6
6
 
7
7
  import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
8
8
 
9
+ export enum CleanRuleType {
10
+ Clean_All = "Clean_All",
11
+ Clean_Unmatched = "Clean_Unmatched",
12
+ Clean_Specific = "Clean_Specific",
13
+ }
14
+
9
15
  export enum RuleSource {
10
16
  RULE_SOURCE_UNSPECIFIED = "RULE_SOURCE_UNSPECIFIED",
11
17
  METRIC_TPL = "METRIC_TPL",
@@ -146,6 +152,15 @@ export type UpdateRuleRequest = {
146
152
  annotation?: Annotation
147
153
  }
148
154
 
155
+ export type CleanRuleRequest = {
156
+ cleanType?: CleanRuleType
157
+ id?: string[]
158
+ }
159
+
160
+ export type CleanRuleResponse = {
161
+ result?: string
162
+ }
163
+
149
164
  export type ListAlertsRequest = {
150
165
  resolved?: boolean
151
166
  name?: string
@@ -286,4 +301,12 @@ export type TemplateBody = {
286
301
  wecom?: string
287
302
  dingtalk?: string
288
303
  webhook?: string
304
+ }
305
+
306
+ export type AlertHistoryRetentionPeriod = {
307
+ retentionTime?: number
308
+ }
309
+
310
+ export type CleanAlertHistoryResponse = {
311
+ num?: string
289
312
  }
@@ -97,6 +97,9 @@ export class Alert {
97
97
  static DeleteRule(req: InsightIoApiInsightV1alpha1Alert.RuleID, initReq?: fm.InitReq): Promise<empty> {
98
98
  return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.RuleID, empty>(`/apis/insight.io/v1alpha1/alert/rules/${req["id"]}`, {...initReq, method: "DELETE"})
99
99
  }
100
+ static CleanRules(req: InsightIoApiInsightV1alpha1Alert.CleanRuleRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.CleanRuleResponse> {
101
+ return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.CleanRuleRequest, InsightIoApiInsightV1alpha1Alert.CleanRuleResponse>(`/apis/insight.io/v1alpha1/alert/rules/clean`, {...initReq, method: "PUT", body: JSON.stringify(req)})
102
+ }
100
103
  static ListAlerts(req: InsightIoApiInsightV1alpha1Alert.ListAlertsRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.ListAlertsResponse> {
101
104
  return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.ListAlertsRequest, InsightIoApiInsightV1alpha1Alert.ListAlertsResponse>(`/apis/insight.io/v1alpha1/alert/alerts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
102
105
  }
@@ -106,6 +109,15 @@ export class Alert {
106
109
  static AlertHook(req: InsightIoApiInsightV1alpha1Alert.AMHookRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.AMHookRequest> {
107
110
  return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.AMHookRequest, InsightIoApiInsightV1alpha1Alert.AMHookRequest>(`/apis/insight.io/v1alpha1/alert/hook`, {...initReq, method: "POST", body: JSON.stringify(req)})
108
111
  }
112
+ static GetAlertHistoryRetentionPeriod(req: empty, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.AlertHistoryRetentionPeriod> {
113
+ return fm.fetchReq<empty, InsightIoApiInsightV1alpha1Alert.AlertHistoryRetentionPeriod>(`/apis/insight.io/v1alpha1/alert/history/retentionperiod?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
114
+ }
115
+ static UpdateAlertHistoryRetentionPeriod(req: InsightIoApiInsightV1alpha1Alert.AlertHistoryRetentionPeriod, initReq?: fm.InitReq): Promise<empty> {
116
+ return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.AlertHistoryRetentionPeriod, empty>(`/apis/insight.io/v1alpha1/alert/history/retentionperiod`, {...initReq, method: "PUT", body: JSON.stringify(req)})
117
+ }
118
+ static CleanAlertHistory(req: empty, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.CleanAlertHistoryResponse> {
119
+ return fm.fetchReq<empty, InsightIoApiInsightV1alpha1Alert.CleanAlertHistoryResponse>(`/apis/insight.io/v1alpha1/alert/history/clean`, {...initReq, method: "PUT"})
120
+ }
109
121
  static ListReceivers(req: InsightIoApiInsightV1alpha1Notify.ListReceiversRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Notify.ListReceiverResponse> {
110
122
  return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.ListReceiversRequest, InsightIoApiInsightV1alpha1Notify.ListReceiverResponse>(`/apis/insight.io/v1alpha1/alert/receivers?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
111
123
  }
@@ -253,6 +265,9 @@ export class Resource {
253
265
  static GetService(req: InsightIoApiResourceV1alpha1Service.GetServiceRequest, initReq?: fm.InitReq): Promise<InsightIoApiResourceV1alpha1Service.Service> {
254
266
  return fm.fetchReq<InsightIoApiResourceV1alpha1Service.GetServiceRequest, InsightIoApiResourceV1alpha1Service.Service>(`/apis/insight.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["namespace"]}/services/${req["name"]}?${fm.renderURLSearchParams(req, ["cluster", "namespace", "name"])}`, {...initReq, method: "GET"})
255
267
  }
268
+ static GetAgentSummary(req: InsightIoApiResourceV1alpha1Cluster.GetAgentSummaryRequest, initReq?: fm.InitReq): Promise<InsightIoApiResourceV1alpha1Cluster.AgentSummary> {
269
+ return fm.fetchReq<InsightIoApiResourceV1alpha1Cluster.GetAgentSummaryRequest, InsightIoApiResourceV1alpha1Cluster.AgentSummary>(`/apis/insight.io/v1alpha1/clusters/${req["cluster"]}/agent?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
270
+ }
256
271
  }
257
272
  export class Tracing {
258
273
  static ListServices(req: InsightIoApiTracingV1alpha1Tracing.ListServicesRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Query.GetServicesResponse> {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/insight",
3
- "version":"0.12.2-80",
3
+ "version":"0.12.2-86",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
8
+ import * as InsightIoApiResourceV1alpha1Pod from "./pod.pb"
8
9
  import * as InsightIoApiResourceV1alpha1Type from "./type.pb"
9
10
 
10
11
  export enum ClusterPhase {
@@ -113,4 +114,17 @@ export type ListNamespacesResponse = {
113
114
  export type Namespace = {
114
115
  name?: string
115
116
  role?: Role
117
+ }
118
+
119
+ export type GetAgentSummaryRequest = {
120
+ cluster?: string
121
+ }
122
+
123
+ export type AgentSummary = {
124
+ insightAgentState?: insightAgentState
125
+ agentModuleStatus?: agentModuleStatus
126
+ }
127
+
128
+ export type agentModuleStatus = {
129
+ pods?: InsightIoApiResourceV1alpha1Pod.Pod[]
116
130
  }