@daocloud-proto/insight 0.8.9 → 0.8.10-2
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.
|
@@ -70,7 +70,7 @@ export class Insight {
|
|
|
70
70
|
return fm.fetchReq<empty, userinfo>(`/apis/insight.io/v1alpha1/userinfo?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
71
71
|
}
|
|
72
72
|
static GetHelmInstallConfig(req: helmInstallConfigRequest, initReq?: fm.InitReq): Promise<helmInstallConfigResponse> {
|
|
73
|
-
return fm.fetchReq<helmInstallConfigRequest, helmInstallConfigResponse>(`/apis/insight.io/v1alpha1/agentinstallparam
|
|
73
|
+
return fm.fetchReq<helmInstallConfigRequest, helmInstallConfigResponse>(`/apis/insight.io/v1alpha1/agentinstallparam`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
export class FeatureGatesService {
|
|
@@ -109,8 +109,8 @@ export class Alert {
|
|
|
109
109
|
static ListReceivers(req: InsightIoApiInsightV1alpha1Notify.ListReceiversRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Notify.ListReceiverResponse> {
|
|
110
110
|
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.ListReceiversRequest, InsightIoApiInsightV1alpha1Notify.ListReceiverResponse>(`/apis/insight.io/v1alpha1/alert/receivers?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
111
111
|
}
|
|
112
|
-
static GetReceiver(req: InsightIoApiInsightV1alpha1Notify.
|
|
113
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.
|
|
112
|
+
static GetReceiver(req: InsightIoApiInsightV1alpha1Notify.GetReceiversRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse> {
|
|
113
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.GetReceiversRequest, InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
|
|
114
114
|
}
|
|
115
115
|
static TestReceiver(req: InsightIoApiInsightV1alpha1Notify.Receiver, initReq?: fm.InitReq): Promise<empty> {
|
|
116
116
|
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.Receiver, empty>(`/apis/insight.io/v1alpha1/alert/receivers/test`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
@@ -119,10 +119,10 @@ export class Alert {
|
|
|
119
119
|
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.Receiver, InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
120
120
|
}
|
|
121
121
|
static UpdateReceiver(req: InsightIoApiInsightV1alpha1Notify.Receiver, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse> {
|
|
122
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.Receiver, InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["
|
|
122
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.Receiver, InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
|
|
123
123
|
}
|
|
124
|
-
static DeleteReceiver(req: InsightIoApiInsightV1alpha1Notify.
|
|
125
|
-
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.
|
|
124
|
+
static DeleteReceiver(req: InsightIoApiInsightV1alpha1Notify.DeleteReceiversRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse> {
|
|
125
|
+
return fm.fetchReq<InsightIoApiInsightV1alpha1Notify.DeleteReceiversRequest, InsightIoApiInsightV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["name"]}`, {...initReq, method: "DELETE"})
|
|
126
126
|
}
|
|
127
127
|
static ListTemplates(req: InsightIoApiInsightV1alpha1Alert.ListTemplatesRequest, initReq?: fm.InitReq): Promise<InsightIoApiInsightV1alpha1Alert.ListTemplatesResponse> {
|
|
128
128
|
return fm.fetchReq<InsightIoApiInsightV1alpha1Alert.ListTemplatesRequest, InsightIoApiInsightV1alpha1Alert.ListTemplatesResponse>(`/apis/insight.io/v1alpha1/alert/templates?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -25,7 +25,6 @@ export enum ReceiverType {
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
type BaseReceiver = {
|
|
28
|
-
id?: string
|
|
29
28
|
name?: string
|
|
30
29
|
type?: ReceiverType
|
|
31
30
|
createAt?: string
|
|
@@ -33,7 +32,7 @@ type BaseReceiver = {
|
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
export type Receiver = BaseReceiver
|
|
36
|
-
& OneOf<{ webhook: WebhookConfig; wecom: WecomConfig; dingtalk: DingtalkConfig }>
|
|
35
|
+
& OneOf<{ webhook: WebhookConfig; email: EmailConfig; wecom: WecomConfig; dingtalk: DingtalkConfig }>
|
|
37
36
|
|
|
38
37
|
export type WebhookConfig = {
|
|
39
38
|
url?: string
|
|
@@ -48,6 +47,10 @@ export type DingtalkConfig = {
|
|
|
48
47
|
webhook?: string
|
|
49
48
|
}
|
|
50
49
|
|
|
50
|
+
export type EmailConfig = {
|
|
51
|
+
to?: string[]
|
|
52
|
+
}
|
|
53
|
+
|
|
51
54
|
export type ListReceiversRequest = {
|
|
52
55
|
type?: ReceiverType
|
|
53
56
|
page?: number
|
|
@@ -55,8 +58,12 @@ export type ListReceiversRequest = {
|
|
|
55
58
|
sorts?: string[]
|
|
56
59
|
}
|
|
57
60
|
|
|
58
|
-
export type
|
|
59
|
-
|
|
61
|
+
export type GetReceiversRequest = {
|
|
62
|
+
name?: string
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export type DeleteReceiversRequest = {
|
|
66
|
+
name?: string
|
|
60
67
|
}
|
|
61
68
|
|
|
62
69
|
export type ReceiverDataResponse = {
|
package/package.json
CHANGED