@daocloud-proto/insight 0.15.0 → 0.16.0-alpha1

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.
@@ -142,7 +142,7 @@ export type RuleV2 = {
142
142
  }
143
143
 
144
144
  export type AddGroupRuleRequest = {
145
- groupId?: string
145
+ id?: string
146
146
  rule?: CreateGroupRule
147
147
  }
148
148
 
@@ -160,7 +160,7 @@ export type CreateGroupRule = {
160
160
  }
161
161
 
162
162
  export type UpdateRuleV2Request = {
163
- groupId?: string
163
+ id?: string
164
164
  name?: string
165
165
  description?: string
166
166
  expr?: string
@@ -173,6 +173,6 @@ export type UpdateRuleV2Request = {
173
173
  }
174
174
 
175
175
  export type GroupRule = {
176
- groupId?: string
176
+ id?: string
177
177
  name?: string
178
178
  }
@@ -103,16 +103,16 @@ export class Alert {
103
103
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ListGroupRulesRequest, InsightIoApiAlertV1alpha1Alert.ListRulesV2Response>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}/rules?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
104
104
  }
105
105
  static AddGroupRule(req: InsightIoApiAlertV1alpha1Alert.AddGroupRuleRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.RuleV2> {
106
- return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.AddGroupRuleRequest, InsightIoApiAlertV1alpha1Alert.RuleV2>(`/apis/insight.io/v1alpha1/alert/groups/${req["groupId"]}/rules`, {...initReq, method: "POST", body: JSON.stringify(req)})
106
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.AddGroupRuleRequest, InsightIoApiAlertV1alpha1Alert.RuleV2>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}/rules`, {...initReq, method: "POST", body: JSON.stringify(req)})
107
107
  }
108
108
  static GetGroupRule(req: InsightIoApiAlertV1alpha1Alert.GroupRule, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.RuleV2> {
109
- return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.GroupRule, InsightIoApiAlertV1alpha1Alert.RuleV2>(`/apis/insight.io/v1alpha1/alert/groups/${req["groupId"]}/rules/${req["name"]}?${fm.renderURLSearchParams(req, ["groupId", "name"])}`, {...initReq, method: "GET"})
109
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.GroupRule, InsightIoApiAlertV1alpha1Alert.RuleV2>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}/rules/${req["name"]}?${fm.renderURLSearchParams(req, ["id", "name"])}`, {...initReq, method: "GET"})
110
110
  }
111
111
  static DeleteGroupRule(req: InsightIoApiAlertV1alpha1Alert.GroupRule, initReq?: fm.InitReq): Promise<empty> {
112
- return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.GroupRule, empty>(`/apis/insight.io/v1alpha1/alert/groups/${req["groupId"]}/rules/${req["name"]}`, {...initReq, method: "DELETE"})
112
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.GroupRule, empty>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}/rules/${req["name"]}`, {...initReq, method: "DELETE"})
113
113
  }
114
114
  static UpdateGroupRule(req: InsightIoApiAlertV1alpha1Alert.UpdateRuleV2Request, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.RuleV2> {
115
- return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.UpdateRuleV2Request, InsightIoApiAlertV1alpha1Alert.RuleV2>(`/apis/insight.io/v1alpha1/alert/groups/${req["groupId"]}/rules/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
115
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.UpdateRuleV2Request, InsightIoApiAlertV1alpha1Alert.RuleV2>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}/rules/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
116
116
  }
117
117
  static ListRules(req: InsightIoApiInsightV1alpha1Alert.ListRulesRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.ListRulesResponse> {
118
118
  return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.ListRulesRequest, InsightIoApiInsightV1alpha1Alert.ListRulesResponse>(`/apis/insight.io/v1alpha1/alert/rules?${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.15.0",
3
+ "version":"0.16.0-alpha1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {