@daocloud-proto/insight 0.41.3 → 0.41.4-2-g3f73d56

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.
@@ -269,6 +269,9 @@ export type AlertSummary = {
269
269
  value?: string
270
270
  notifyResponse?: string
271
271
  description?: string
272
+ promQL?: string
273
+ labels?: {[key: string]: string}
274
+ annotations?: {[key: string]: string}
272
275
  startAt?: string
273
276
  updateAt?: string
274
277
  lastSent?: string
@@ -307,6 +310,8 @@ export type Alert = {
307
310
  startAt?: string
308
311
  updateAt?: string
309
312
  lastSent?: string
313
+ builtin?: boolean
314
+ status?: InsightIoApiAlertV1alpha1Type.AlertStatus
310
315
  notifyStatus?: NotifyStatus
311
316
  }
312
317
 
@@ -424,4 +429,37 @@ export type UpdateRuleTemplateRequest = {
424
429
  id?: string
425
430
  description?: string
426
431
  rules?: CreateGroupRule[]
432
+ }
433
+
434
+ export type ListFiringRulesRequest = {
435
+ expandAlerts?: boolean
436
+ groupName?: string
437
+ groupId?: string
438
+ ruleName?: string
439
+ ruleId?: string
440
+ clusterName?: string
441
+ namespace?: string
442
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
443
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
444
+ target?: string
445
+ page?: number
446
+ pageSize?: number
447
+ sorts?: string[]
448
+ }
449
+
450
+ export type ListFiringRulesResponse = {
451
+ items?: FiringRule[]
452
+ pagination?: InsightIoApiTypeV1alpha1Page.Pagination
453
+ }
454
+
455
+ export type FiringRule = {
456
+ groupId?: string
457
+ groupName?: string
458
+ builtin?: boolean
459
+ ruleId?: string
460
+ ruleName?: string
461
+ severity?: InsightIoApiAlertV1alpha1Type.Severity
462
+ alertCount?: number
463
+ latestStartAt?: string
464
+ alerts?: Alert[]
427
465
  }
package/fetch.pb.ts CHANGED
@@ -4,10 +4,119 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ /**
8
+ * base64 encoder and decoder
9
+ * Copied and adapted from https://github.com/protobufjs/protobuf.js/blob/master/lib/base64/index.js
10
+ */
11
+ // Base64 encoding table
12
+ const b64 = new Array(64);
13
+
14
+ // Base64 decoding table
15
+ const s64 = new Array(123);
16
+
17
+ // 65..90, 97..122, 48..57, 43, 47
18
+ for (let i = 0; i < 64;)
19
+ s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
20
+
21
+ export function b64Encode(buffer: Uint8Array, start: number, end: number): string {
22
+ let parts: string[] = null;
23
+ const chunk = [];
24
+ let i = 0, // output index
25
+ j = 0, // goto index
26
+ t; // temporary
27
+ while (start < end) {
28
+ const b = buffer[start++];
29
+ switch (j) {
30
+ case 0:
31
+ chunk[i++] = b64[b >> 2];
32
+ t = (b & 3) << 4;
33
+ j = 1;
34
+ break;
35
+ case 1:
36
+ chunk[i++] = b64[t | b >> 4];
37
+ t = (b & 15) << 2;
38
+ j = 2;
39
+ break;
40
+ case 2:
41
+ chunk[i++] = b64[t | b >> 6];
42
+ chunk[i++] = b64[b & 63];
43
+ j = 0;
44
+ break;
45
+ }
46
+ if (i > 8191) {
47
+ (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
48
+ i = 0;
49
+ }
50
+ }
51
+ if (j) {
52
+ chunk[i++] = b64[t];
53
+ chunk[i++] = 61;
54
+ if (j === 1)
55
+ chunk[i++] = 61;
56
+ }
57
+ if (parts) {
58
+ if (i)
59
+ parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
60
+ return parts.join("");
61
+ }
62
+ return String.fromCharCode.apply(String, chunk.slice(0, i));
63
+ }
64
+
65
+ const invalidEncoding = "invalid encoding";
66
+
67
+ export function b64Decode(s: string): Uint8Array {
68
+ const buffer = [];
69
+ let offset = 0;
70
+ let j = 0, // goto index
71
+ t; // temporary
72
+ for (let i = 0; i < s.length;) {
73
+ let c = s.charCodeAt(i++);
74
+ if (c === 61 && j > 1)
75
+ break;
76
+ if ((c = s64[c]) === undefined)
77
+ throw Error(invalidEncoding);
78
+ switch (j) {
79
+ case 0:
80
+ t = c;
81
+ j = 1;
82
+ break;
83
+ case 1:
84
+ buffer[offset++] = t << 2 | (c & 48) >> 4;
85
+ t = c;
86
+ j = 2;
87
+ break;
88
+ case 2:
89
+ buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
90
+ t = c;
91
+ j = 3;
92
+ break;
93
+ case 3:
94
+ buffer[offset++] = (t & 3) << 6 | c;
95
+ j = 0;
96
+ break;
97
+ }
98
+ }
99
+ if (j === 1)
100
+ throw Error(invalidEncoding);
101
+ return new Uint8Array(buffer);
102
+ }
103
+
104
+ function b64Test(s: string): boolean {
105
+ return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s);
106
+ }
107
+
7
108
  export interface InitReq extends RequestInit {
8
109
  pathPrefix?: string
9
110
  }
10
111
 
112
+ export function replacer(key: any, value: any): any {
113
+ if(value && value.constructor === Uint8Array) {
114
+ return b64Encode(value, 0, value.length);
115
+ }
116
+
117
+ return value;
118
+ }
119
+
11
120
  export function fetchReq<I, O>(path: string, init?: InitReq): Promise<O> {
12
121
  const {pathPrefix, ...req} = init || {}
13
122
 
@@ -96,6 +96,13 @@ export type helmInstallConfigResponse = {
96
96
  values?: string
97
97
  }
98
98
 
99
+ export type PreferenceConfig = {
100
+ traceApdexThreshold?: string
101
+ errorRateThresholds?: number[]
102
+ latencyThresholds?: number[]
103
+ slowSqlThreshold?: number
104
+ }
105
+
99
106
  export class Insight {
100
107
  static GetVersion(req: empty, initReq?: fm.InitReq): Promise<VersionInfo> {
101
108
  return fm.fetchReq<empty, VersionInfo>(`/apis/insight.io/v1alpha1/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -103,14 +110,17 @@ export class Insight {
103
110
  static GetGlobalConfig(req: empty, initReq?: fm.InitReq): Promise<GlobalConfig> {
104
111
  return fm.fetchReq<empty, GlobalConfig>(`/apis/insight.io/v1alpha1/config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
105
112
  }
113
+ static GetPreferenceConfig(req: empty, initReq?: fm.InitReq): Promise<PreferenceConfig> {
114
+ return fm.fetchReq<empty, PreferenceConfig>(`/apis/insight.io/v1alpha1/config/preference?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
115
+ }
106
116
  static UpdateGlobalConfig(req: GlobalConfig, initReq?: fm.InitReq): Promise<GlobalConfig> {
107
- return fm.fetchReq<GlobalConfig, GlobalConfig>(`/apis/insight.io/v1alpha1/config`, {...initReq, method: "PUT", body: JSON.stringify(req)})
117
+ return fm.fetchReq<GlobalConfig, GlobalConfig>(`/apis/insight.io/v1alpha1/config`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
108
118
  }
109
119
  static GetUserinfo(req: empty, initReq?: fm.InitReq): Promise<userinfo> {
110
120
  return fm.fetchReq<empty, userinfo>(`/apis/insight.io/v1alpha1/userinfo?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
111
121
  }
112
122
  static GetHelmInstallConfig(req: helmInstallConfigRequest, initReq?: fm.InitReq): Promise<helmInstallConfigResponse> {
113
- return fm.fetchReq<helmInstallConfigRequest, helmInstallConfigResponse>(`/apis/insight.io/v1alpha1/agentinstallparam`, {...initReq, method: "POST", body: JSON.stringify(req)})
123
+ return fm.fetchReq<helmInstallConfigRequest, helmInstallConfigResponse>(`/apis/insight.io/v1alpha1/agentinstallparam`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
114
124
  }
115
125
  }
116
126
  export class FeatureGate {
@@ -126,19 +136,19 @@ export class Alert {
126
136
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ListGroupsRequest, InsightIoApiAlertV1alpha1Alert.ListGroupsResponse>(`/apis/insight.io/v1alpha1/alert/groups?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
127
137
  }
128
138
  static CreateGroup(req: InsightIoApiAlertV1alpha1Alert.CreateGroupRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.Group> {
129
- return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.CreateGroupRequest, InsightIoApiAlertV1alpha1Alert.Group>(`/apis/insight.io/v1alpha1/alert/groups`, {...initReq, method: "POST", body: JSON.stringify(req)})
139
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.CreateGroupRequest, InsightIoApiAlertV1alpha1Alert.Group>(`/apis/insight.io/v1alpha1/alert/groups`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
130
140
  }
131
141
  static ValidateGroup(req: InsightIoApiAlertV1alpha1Alert.ValidateGroupRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.ValidateGroupResponse> {
132
- return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ValidateGroupRequest, InsightIoApiAlertV1alpha1Alert.ValidateGroupResponse>(`/apis/insight.io/v1alpha1/alert/groups/validate`, {...initReq, method: "POST", body: JSON.stringify(req)})
142
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ValidateGroupRequest, InsightIoApiAlertV1alpha1Alert.ValidateGroupResponse>(`/apis/insight.io/v1alpha1/alert/groups/validate`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
133
143
  }
134
144
  static PreviewRule(req: InsightIoApiAlertV1alpha1Alert.PreviewRuleRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.PreviewRuleResponse> {
135
- return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.PreviewRuleRequest, InsightIoApiAlertV1alpha1Alert.PreviewRuleResponse>(`/apis/insight.io/v1alpha1/alert/rules/preview`, {...initReq, method: "POST", body: JSON.stringify(req)})
145
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.PreviewRuleRequest, InsightIoApiAlertV1alpha1Alert.PreviewRuleResponse>(`/apis/insight.io/v1alpha1/alert/rules/preview`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
136
146
  }
137
147
  static GetGroup(req: InsightIoApiAlertV1alpha1Alert.ID, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.Group> {
138
148
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ID, InsightIoApiAlertV1alpha1Alert.Group>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
139
149
  }
140
150
  static UpdateGroup(req: InsightIoApiAlertV1alpha1Alert.UpdateGroupRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.Group> {
141
- return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.UpdateGroupRequest, InsightIoApiAlertV1alpha1Alert.Group>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
151
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.UpdateGroupRequest, InsightIoApiAlertV1alpha1Alert.Group>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
142
152
  }
143
153
  static DeleteGroup(req: InsightIoApiAlertV1alpha1Alert.ID, initReq?: fm.InitReq): Promise<empty> {
144
154
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ID, empty>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}`, {...initReq, method: "DELETE"})
@@ -147,7 +157,7 @@ export class Alert {
147
157
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ListGroupRulesRequest, InsightIoApiAlertV1alpha1Alert.ListRulesResponse>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}/rules?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
148
158
  }
149
159
  static AddGroupRule(req: InsightIoApiAlertV1alpha1Alert.AddGroupRuleRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.Rule> {
150
- return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.AddGroupRuleRequest, InsightIoApiAlertV1alpha1Alert.Rule>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}/rules`, {...initReq, method: "POST", body: JSON.stringify(req)})
160
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.AddGroupRuleRequest, InsightIoApiAlertV1alpha1Alert.Rule>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}/rules`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
151
161
  }
152
162
  static GetGroupRule(req: InsightIoApiAlertV1alpha1Alert.GroupRule, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.Rule> {
153
163
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.GroupRule, InsightIoApiAlertV1alpha1Alert.Rule>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}/rules/${req["name"]}?${fm.renderURLSearchParams(req, ["id", "name"])}`, {...initReq, method: "GET"})
@@ -156,7 +166,7 @@ export class Alert {
156
166
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.GroupRule, empty>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}/rules/${req["name"]}`, {...initReq, method: "DELETE"})
157
167
  }
158
168
  static UpdateGroupRule(req: InsightIoApiAlertV1alpha1Alert.UpdateRuleRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.Rule> {
159
- return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.UpdateRuleRequest, InsightIoApiAlertV1alpha1Alert.Rule>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}/rules/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
169
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.UpdateRuleRequest, InsightIoApiAlertV1alpha1Alert.Rule>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}/rules/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
160
170
  }
161
171
  static ListAlerts(req: InsightIoApiAlertV1alpha1Alert.ListAlertsRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.ListAlertsResponse> {
162
172
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ListAlertsRequest, InsightIoApiAlertV1alpha1Alert.ListAlertsResponse>(`/apis/insight.io/v1alpha1/alert/alerts?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -167,8 +177,11 @@ export class Alert {
167
177
  static CountAlert(req: InsightIoApiAlertV1alpha1Alert.CountAlertRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.CountAlertResponse> {
168
178
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.CountAlertRequest, InsightIoApiAlertV1alpha1Alert.CountAlertResponse>(`/apis/insight.io/v1alpha1/alert/alertcount?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
169
179
  }
180
+ static ListFiringRules(req: InsightIoApiAlertV1alpha1Alert.ListFiringRulesRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.ListFiringRulesResponse> {
181
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ListFiringRulesRequest, InsightIoApiAlertV1alpha1Alert.ListFiringRulesResponse>(`/apis/insight.io/v1alpha1/alert/alerts/firing-rules?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
182
+ }
170
183
  static AlertHook(req: InsightIoApiAlertV1alpha1Type.AMHookRequest, initReq?: fm.InitReq): Promise<empty> {
171
- return fm.fetchReq<InsightIoApiAlertV1alpha1Type.AMHookRequest, empty>(`/apis/insight.io/v1alpha1/alert/hook`, {...initReq, method: "POST", body: JSON.stringify(req)})
184
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Type.AMHookRequest, empty>(`/apis/insight.io/v1alpha1/alert/hook`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
172
185
  }
173
186
  static CleanAlertHistory(req: empty, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.CleanAlertHistoryResponse> {
174
187
  return fm.fetchReq<empty, InsightIoApiAlertV1alpha1Alert.CleanAlertHistoryResponse>(`/apis/insight.io/v1alpha1/alert/history/clean`, {...initReq, method: "PUT"})
@@ -180,13 +193,13 @@ export class Alert {
180
193
  return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.GetReceiversRequest, InsightIoApiAlertV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
181
194
  }
182
195
  static TestReceiver(req: InsightIoApiAlertV1alpha1Notify.Receiver, initReq?: fm.InitReq): Promise<empty> {
183
- return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.Receiver, empty>(`/apis/insight.io/v1alpha1/alert/receivers/test`, {...initReq, method: "POST", body: JSON.stringify(req)})
196
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.Receiver, empty>(`/apis/insight.io/v1alpha1/alert/receivers/test`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
184
197
  }
185
198
  static CreateReceiver(req: InsightIoApiAlertV1alpha1Notify.Receiver, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Notify.ReceiverDataResponse> {
186
- return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.Receiver, InsightIoApiAlertV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers`, {...initReq, method: "POST", body: JSON.stringify(req)})
199
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.Receiver, InsightIoApiAlertV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
187
200
  }
188
201
  static UpdateReceiver(req: InsightIoApiAlertV1alpha1Notify.Receiver, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Notify.ReceiverDataResponse> {
189
- return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.Receiver, InsightIoApiAlertV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
202
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.Receiver, InsightIoApiAlertV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
190
203
  }
191
204
  static DeleteReceiver(req: InsightIoApiAlertV1alpha1Notify.DeleteReceiversRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Notify.ReceiverDataResponse> {
192
205
  return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.DeleteReceiversRequest, InsightIoApiAlertV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["name"]}`, {...initReq, method: "DELETE"})
@@ -201,10 +214,10 @@ export class Alert {
201
214
  return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.GetProvidersRequest, InsightIoApiAlertV1alpha1Notify.ProviderDataResponse>(`/apis/insight.io/v1alpha1/alert/providers/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
202
215
  }
203
216
  static CreateProvider(req: InsightIoApiAlertV1alpha1Notify.Provider, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Notify.ProviderDataResponse> {
204
- return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.Provider, InsightIoApiAlertV1alpha1Notify.ProviderDataResponse>(`/apis/insight.io/v1alpha1/alert/providers`, {...initReq, method: "POST", body: JSON.stringify(req)})
217
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.Provider, InsightIoApiAlertV1alpha1Notify.ProviderDataResponse>(`/apis/insight.io/v1alpha1/alert/providers`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
205
218
  }
206
219
  static UpdateProvider(req: InsightIoApiAlertV1alpha1Notify.Provider, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Notify.ProviderDataResponse> {
207
- return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.Provider, InsightIoApiAlertV1alpha1Notify.ProviderDataResponse>(`/apis/insight.io/v1alpha1/alert/providers/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
220
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.Provider, InsightIoApiAlertV1alpha1Notify.ProviderDataResponse>(`/apis/insight.io/v1alpha1/alert/providers/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
208
221
  }
209
222
  static DeleteProvider(req: InsightIoApiAlertV1alpha1Notify.DeleteProvidersRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Notify.ProviderDataResponse> {
210
223
  return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.DeleteProvidersRequest, InsightIoApiAlertV1alpha1Notify.ProviderDataResponse>(`/apis/insight.io/v1alpha1/alert/providers/${req["name"]}`, {...initReq, method: "DELETE"})
@@ -219,16 +232,16 @@ export class Alert {
219
232
  return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.TemplateName, InsightIoApiAlertV1alpha1Notify.Template>(`/apis/insight.io/v1alpha1/alert/templates/${req["name"]}?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
220
233
  }
221
234
  static CreateTemplate(req: InsightIoApiAlertV1alpha1Notify.CreateTemplateRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Notify.Template> {
222
- return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.CreateTemplateRequest, InsightIoApiAlertV1alpha1Notify.Template>(`/apis/insight.io/v1alpha1/alert/templates`, {...initReq, method: "POST", body: JSON.stringify(req)})
235
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.CreateTemplateRequest, InsightIoApiAlertV1alpha1Notify.Template>(`/apis/insight.io/v1alpha1/alert/templates`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
223
236
  }
224
237
  static UpdateTemplate(req: InsightIoApiAlertV1alpha1Notify.CreateTemplateRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Notify.Template> {
225
- return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.CreateTemplateRequest, InsightIoApiAlertV1alpha1Notify.Template>(`/apis/insight.io/v1alpha1/alert/templates/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
238
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.CreateTemplateRequest, InsightIoApiAlertV1alpha1Notify.Template>(`/apis/insight.io/v1alpha1/alert/templates/${req["name"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
226
239
  }
227
240
  static DeleteTemplate(req: InsightIoApiAlertV1alpha1Notify.TemplateName, initReq?: fm.InitReq): Promise<empty> {
228
241
  return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.TemplateName, empty>(`/apis/insight.io/v1alpha1/alert/templates/${req["name"]}`, {...initReq, method: "DELETE"})
229
242
  }
230
243
  static PreviewTemplate(req: InsightIoApiAlertV1alpha1Notify.PreviewTemplateRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Notify.PreviewTemplateResponse> {
231
- return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.PreviewTemplateRequest, InsightIoApiAlertV1alpha1Notify.PreviewTemplateResponse>(`/apis/insight.io/v1alpha1/alert/templates/preview`, {...initReq, method: "POST", body: JSON.stringify(req)})
244
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.PreviewTemplateRequest, InsightIoApiAlertV1alpha1Notify.PreviewTemplateResponse>(`/apis/insight.io/v1alpha1/alert/templates/preview`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
232
245
  }
233
246
  static ListSilences(req: InsightIoApiAlertV1alpha1Silence.ListSilencesRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Silence.ListSilencesResponse> {
234
247
  return fm.fetchReq<InsightIoApiAlertV1alpha1Silence.ListSilencesRequest, InsightIoApiAlertV1alpha1Silence.ListSilencesResponse>(`/apis/insight.io/v1alpha1/alert/silences?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -237,13 +250,13 @@ export class Alert {
237
250
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ID, InsightIoApiAlertV1alpha1Silence.Silence>(`/apis/insight.io/v1alpha1/alert/silences/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
238
251
  }
239
252
  static CreateSilence(req: InsightIoApiAlertV1alpha1Silence.CreateSilenceRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Silence.Silence> {
240
- return fm.fetchReq<InsightIoApiAlertV1alpha1Silence.CreateSilenceRequest, InsightIoApiAlertV1alpha1Silence.Silence>(`/apis/insight.io/v1alpha1/alert/silences`, {...initReq, method: "POST", body: JSON.stringify(req)})
253
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Silence.CreateSilenceRequest, InsightIoApiAlertV1alpha1Silence.Silence>(`/apis/insight.io/v1alpha1/alert/silences`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
241
254
  }
242
255
  static PreviewSilence(req: InsightIoApiAlertV1alpha1Silence.PreviewSilenceRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Silence.PreviewSilenceResponse> {
243
- return fm.fetchReq<InsightIoApiAlertV1alpha1Silence.PreviewSilenceRequest, InsightIoApiAlertV1alpha1Silence.PreviewSilenceResponse>(`/apis/insight.io/v1alpha1/alert/silences/preview`, {...initReq, method: "POST", body: JSON.stringify(req)})
256
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Silence.PreviewSilenceRequest, InsightIoApiAlertV1alpha1Silence.PreviewSilenceResponse>(`/apis/insight.io/v1alpha1/alert/silences/preview`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
244
257
  }
245
258
  static UpdateSilence(req: InsightIoApiAlertV1alpha1Silence.UpdateSilenceRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Silence.Silence> {
246
- return fm.fetchReq<InsightIoApiAlertV1alpha1Silence.UpdateSilenceRequest, InsightIoApiAlertV1alpha1Silence.Silence>(`/apis/insight.io/v1alpha1/alert/silences/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
259
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Silence.UpdateSilenceRequest, InsightIoApiAlertV1alpha1Silence.Silence>(`/apis/insight.io/v1alpha1/alert/silences/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
247
260
  }
248
261
  static DeleteSilence(req: InsightIoApiAlertV1alpha1Alert.ID, initReq?: fm.InitReq): Promise<empty> {
249
262
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ID, empty>(`/apis/insight.io/v1alpha1/alert/silences/${req["id"]}`, {...initReq, method: "DELETE"})
@@ -258,10 +271,10 @@ export class Alert {
258
271
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ID, InsightIoApiAlertV1alpha1Alert.RuleTemplate>(`/apis/insight.io/v1alpha1/alert/rule-templates/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
259
272
  }
260
273
  static CreateRuleTemplate(req: InsightIoApiAlertV1alpha1Alert.CreateRuleTemplateRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.RuleTemplate> {
261
- return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.CreateRuleTemplateRequest, InsightIoApiAlertV1alpha1Alert.RuleTemplate>(`/apis/insight.io/v1alpha1/alert/rule-templates`, {...initReq, method: "POST", body: JSON.stringify(req)})
274
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.CreateRuleTemplateRequest, InsightIoApiAlertV1alpha1Alert.RuleTemplate>(`/apis/insight.io/v1alpha1/alert/rule-templates`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
262
275
  }
263
276
  static UpdateRuleTemplate(req: InsightIoApiAlertV1alpha1Alert.UpdateRuleTemplateRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.RuleTemplate> {
264
- return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.UpdateRuleTemplateRequest, InsightIoApiAlertV1alpha1Alert.RuleTemplate>(`/apis/insight.io/v1alpha1/alert/rule-templates/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
277
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.UpdateRuleTemplateRequest, InsightIoApiAlertV1alpha1Alert.RuleTemplate>(`/apis/insight.io/v1alpha1/alert/rule-templates/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
265
278
  }
266
279
  static DeleteRuleTemplate(req: InsightIoApiAlertV1alpha1Alert.ID, initReq?: fm.InitReq): Promise<empty> {
267
280
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ID, empty>(`/apis/insight.io/v1alpha1/alert/rule-templates/${req["id"]}`, {...initReq, method: "DELETE"})
@@ -273,10 +286,10 @@ export class Alert {
273
286
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ID, InsightIoApiAlertV1alpha1Inhibition.Inhibition>(`/apis/insight.io/v1alpha1/alert/inhibitions/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
274
287
  }
275
288
  static CreateInhibition(req: InsightIoApiAlertV1alpha1Inhibition.CreateInhibitionRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Inhibition.Inhibition> {
276
- return fm.fetchReq<InsightIoApiAlertV1alpha1Inhibition.CreateInhibitionRequest, InsightIoApiAlertV1alpha1Inhibition.Inhibition>(`/apis/insight.io/v1alpha1/alert/inhibitions`, {...initReq, method: "POST", body: JSON.stringify(req)})
289
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Inhibition.CreateInhibitionRequest, InsightIoApiAlertV1alpha1Inhibition.Inhibition>(`/apis/insight.io/v1alpha1/alert/inhibitions`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
277
290
  }
278
291
  static UpdateInhibition(req: InsightIoApiAlertV1alpha1Inhibition.UpdateInhibitionRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Inhibition.Inhibition> {
279
- return fm.fetchReq<InsightIoApiAlertV1alpha1Inhibition.UpdateInhibitionRequest, InsightIoApiAlertV1alpha1Inhibition.Inhibition>(`/apis/insight.io/v1alpha1/alert/inhibitions/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
292
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Inhibition.UpdateInhibitionRequest, InsightIoApiAlertV1alpha1Inhibition.Inhibition>(`/apis/insight.io/v1alpha1/alert/inhibitions/${req["id"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
280
293
  }
281
294
  static DeleteInhibition(req: InsightIoApiAlertV1alpha1Alert.ID, initReq?: fm.InitReq): Promise<empty> {
282
295
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ID, empty>(`/apis/insight.io/v1alpha1/alert/inhibitions/${req["id"]}`, {...initReq, method: "DELETE"})
@@ -287,16 +300,16 @@ export class Log {
287
300
  return fm.fetchReq<InsightIoApiLogV1alpha1Log.SearchLogRequest, InsightIoApiLogV1alpha1Log.SearchLogResponse>(`/apis/insight.io/v1alpha1/log/search?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
288
301
  }
289
302
  static QueryLog(req: InsightIoApiLogV1alpha1Log.QueryLogRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.QueryLogResponse> {
290
- return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogRequest, InsightIoApiLogV1alpha1Log.QueryLogResponse>(`/apis/insight.io/v1alpha1/log/query`, {...initReq, method: "POST", body: JSON.stringify(req)})
303
+ return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogRequest, InsightIoApiLogV1alpha1Log.QueryLogResponse>(`/apis/insight.io/v1alpha1/log/query`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
291
304
  }
292
305
  static QueryLogHistogram(req: InsightIoApiLogV1alpha1Log.QueryLogHistogramRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.QueryLogHistogramResponse> {
293
- return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogHistogramRequest, InsightIoApiLogV1alpha1Log.QueryLogHistogramResponse>(`/apis/insight.io/v1alpha1/log/histogram`, {...initReq, method: "POST", body: JSON.stringify(req)})
306
+ return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogHistogramRequest, InsightIoApiLogV1alpha1Log.QueryLogHistogramResponse>(`/apis/insight.io/v1alpha1/log/histogram`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
294
307
  }
295
308
  static QueryLogContext(req: InsightIoApiLogV1alpha1Log.QueryLogContextRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.QueryLogResponse> {
296
- return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogContextRequest, InsightIoApiLogV1alpha1Log.QueryLogResponse>(`/apis/insight.io/v1alpha1/log/context`, {...initReq, method: "POST", body: JSON.stringify(req)})
309
+ return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogContextRequest, InsightIoApiLogV1alpha1Log.QueryLogResponse>(`/apis/insight.io/v1alpha1/log/context`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
297
310
  }
298
311
  static DownloadLog(req: InsightIoApiLogV1alpha1Log.DownloadLogRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.DownloadLogResponse> {
299
- return fm.fetchReq<InsightIoApiLogV1alpha1Log.DownloadLogRequest, InsightIoApiLogV1alpha1Log.DownloadLogResponse>(`/apis/insight.io/v1alpha1/log/export`, {...initReq, method: "POST", body: JSON.stringify(req)})
312
+ return fm.fetchReq<InsightIoApiLogV1alpha1Log.DownloadLogRequest, InsightIoApiLogV1alpha1Log.DownloadLogResponse>(`/apis/insight.io/v1alpha1/log/export`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
300
313
  }
301
314
  static ListLogFilePaths(req: InsightIoApiLogV1alpha1Log.ListLogFilePathsRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.ListLogFilePathsResponse> {
302
315
  return fm.fetchReq<InsightIoApiLogV1alpha1Log.ListLogFilePathsRequest, InsightIoApiLogV1alpha1Log.ListLogFilePathsResponse>(`/apis/insight.io/v1alpha1/log/filepaths?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -310,13 +323,13 @@ export class Metric {
310
323
  return fm.fetchReq<InsightIoApiMetricV1alpha1Metric.PrometheusQueryRangeRequest, InsightIoApiMetricV1alpha1Metric.PrometheusQueryRangeResult>(`/apis/insight.io/v1alpha1/metric/queryrange?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
311
324
  }
312
325
  static BatchQueryMetric(req: InsightIoApiMetricV1alpha1Metric.BatchQueryRequest, initReq?: fm.InitReq): Promise<InsightIoApiMetricV1alpha1Metric.BatchQueryResponse> {
313
- return fm.fetchReq<InsightIoApiMetricV1alpha1Metric.BatchQueryRequest, InsightIoApiMetricV1alpha1Metric.BatchQueryResponse>(`/apis/insight.io/v1alpha1/metric/query`, {...initReq, method: "POST", body: JSON.stringify(req)})
326
+ return fm.fetchReq<InsightIoApiMetricV1alpha1Metric.BatchQueryRequest, InsightIoApiMetricV1alpha1Metric.BatchQueryResponse>(`/apis/insight.io/v1alpha1/metric/query`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
314
327
  }
315
328
  static BatchQueryRangeMetric(req: InsightIoApiMetricV1alpha1Metric.BatchQueryRangeRequest, initReq?: fm.InitReq): Promise<InsightIoApiMetricV1alpha1Metric.BatchQueryRangeResponse> {
316
- return fm.fetchReq<InsightIoApiMetricV1alpha1Metric.BatchQueryRangeRequest, InsightIoApiMetricV1alpha1Metric.BatchQueryRangeResponse>(`/apis/insight.io/v1alpha1/metric/queryrange`, {...initReq, method: "POST", body: JSON.stringify(req)})
329
+ return fm.fetchReq<InsightIoApiMetricV1alpha1Metric.BatchQueryRangeRequest, InsightIoApiMetricV1alpha1Metric.BatchQueryRangeResponse>(`/apis/insight.io/v1alpha1/metric/queryrange`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
317
330
  }
318
331
  static FormatQuery(req: InsightIoApiMetricV1alpha1Metric.FormatQueryRequest, initReq?: fm.InitReq): Promise<InsightIoApiMetricV1alpha1Metric.FormatQueryResponse> {
319
- return fm.fetchReq<InsightIoApiMetricV1alpha1Metric.FormatQueryRequest, InsightIoApiMetricV1alpha1Metric.FormatQueryResponse>(`/apis/insight.io/v1alpha1/metric/format_query`, {...initReq, method: "POST", body: JSON.stringify(req)})
332
+ return fm.fetchReq<InsightIoApiMetricV1alpha1Metric.FormatQueryRequest, InsightIoApiMetricV1alpha1Metric.FormatQueryResponse>(`/apis/insight.io/v1alpha1/metric/format_query`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
320
333
  }
321
334
  }
322
335
  export class Resource {
@@ -425,10 +438,13 @@ export class Tracing {
425
438
  return fm.fetchReq<InsightIoApiTracingV1alpha1Query.TraceQueryParameters, InsightIoApiTracingV1alpha1Query.TracesResponseChunk>(`/apis/insight.io/v1alpha1/jaeger/v2/traces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
426
439
  }
427
440
  static QuerySpans(req: InsightIoApiTracingV1alpha1Query.SpanQueryParameters, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Query.SpansResponseChunk> {
428
- return fm.fetchReq<InsightIoApiTracingV1alpha1Query.SpanQueryParameters, InsightIoApiTracingV1alpha1Query.SpansResponseChunk>(`/apis/insight.io/v1alpha1/jaeger/v2/spans`, {...initReq, method: "POST", body: JSON.stringify(req)})
441
+ return fm.fetchReq<InsightIoApiTracingV1alpha1Query.SpanQueryParameters, InsightIoApiTracingV1alpha1Query.SpansResponseChunk>(`/apis/insight.io/v1alpha1/jaeger/v2/spans`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
442
+ }
443
+ static SearchSpans(req: InsightIoApiTracingV1alpha1Query.SpanQueryParameters, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Query.SearchResponse> {
444
+ return fm.fetchReq<InsightIoApiTracingV1alpha1Query.SpanQueryParameters, InsightIoApiTracingV1alpha1Query.SearchResponse>(`/apis/insight.io/v1alpha1/spans/search`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
429
445
  }
430
446
  static QuerySpanHistogram(req: InsightIoApiTracingV1alpha1Query.SpanQueryParameters, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Query.QuerySpanHistogramResponse> {
431
- return fm.fetchReq<InsightIoApiTracingV1alpha1Query.SpanQueryParameters, InsightIoApiTracingV1alpha1Query.QuerySpanHistogramResponse>(`/apis/insight.io/v1alpha1/jaeger/v2/spans/histogram`, {...initReq, method: "POST", body: JSON.stringify(req)})
447
+ return fm.fetchReq<InsightIoApiTracingV1alpha1Query.SpanQueryParameters, InsightIoApiTracingV1alpha1Query.QuerySpanHistogramResponse>(`/apis/insight.io/v1alpha1/jaeger/v2/spans/histogram`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
432
448
  }
433
449
  static FindJaegerTrace(req: InsightIoApiTracingV1alpha1Tracing.TraceRequestById, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Query.TracesResponseChunk> {
434
450
  return fm.fetchReq<InsightIoApiTracingV1alpha1Tracing.TraceRequestById, InsightIoApiTracingV1alpha1Query.TracesResponseChunk>(`/apis/insight.io/v1alpha1/jaeger/v2/traces/${req["traceId"]}?${fm.renderURLSearchParams(req, ["traceId"])}`, {...initReq, method: "GET"})
@@ -461,21 +477,21 @@ export class Tracing {
461
477
  return fm.fetchReq<InsightIoApiTracingV1alpha1Tracing.GetTagValuesRequest, InsightIoApiTracingV1alpha1Tracing.GetTagValuesResponse>(`/apis/insight.io/v1alpha1/traces/tags/${req["name"]}/values?${fm.renderURLSearchParams(req, ["name"])}`, {...initReq, method: "GET"})
462
478
  }
463
479
  static QueryMetadata(req: InsightIoApiTracingV1alpha1Statement_analysis.MetadataRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Statement_analysis.MetadataResponse> {
464
- return fm.fetchReq<InsightIoApiTracingV1alpha1Statement_analysis.MetadataRequest, InsightIoApiTracingV1alpha1Statement_analysis.MetadataResponse>(`/apis/insight.io/v1alpha1/traces/slow-sql/clusters/${req["clusterName"]}/type/${req["type"]}/metadata`, {...initReq, method: "POST", body: JSON.stringify(req)})
480
+ return fm.fetchReq<InsightIoApiTracingV1alpha1Statement_analysis.MetadataRequest, InsightIoApiTracingV1alpha1Statement_analysis.MetadataResponse>(`/apis/insight.io/v1alpha1/traces/slow-sql/clusters/${req["clusterName"]}/type/${req["type"]}/metadata`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
465
481
  }
466
482
  static StatementHistogram(req: InsightIoApiTracingV1alpha1Statement_analysis.StatementRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Statement_analysis.StatementHistogramResponse> {
467
- return fm.fetchReq<InsightIoApiTracingV1alpha1Statement_analysis.StatementRequest, InsightIoApiTracingV1alpha1Statement_analysis.StatementHistogramResponse>(`/apis/insight.io/v1alpha1/traces/slow-sql/clusters/${req["clusterName"]}/statement/histogram`, {...initReq, method: "POST", body: JSON.stringify(req)})
483
+ return fm.fetchReq<InsightIoApiTracingV1alpha1Statement_analysis.StatementRequest, InsightIoApiTracingV1alpha1Statement_analysis.StatementHistogramResponse>(`/apis/insight.io/v1alpha1/traces/slow-sql/clusters/${req["clusterName"]}/statement/histogram`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
468
484
  }
469
485
  static StatementTopK(req: InsightIoApiTracingV1alpha1Statement_analysis.StatementRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Statement_analysis.StatementTopKResponse> {
470
- return fm.fetchReq<InsightIoApiTracingV1alpha1Statement_analysis.StatementRequest, InsightIoApiTracingV1alpha1Statement_analysis.StatementTopKResponse>(`/apis/insight.io/v1alpha1/traces/slow-sql/clusters/${req["clusterName"]}/statement/topk`, {...initReq, method: "POST", body: JSON.stringify(req)})
486
+ return fm.fetchReq<InsightIoApiTracingV1alpha1Statement_analysis.StatementRequest, InsightIoApiTracingV1alpha1Statement_analysis.StatementTopKResponse>(`/apis/insight.io/v1alpha1/traces/slow-sql/clusters/${req["clusterName"]}/statement/topk`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
471
487
  }
472
488
  static GetSlowSQLSpans(req: InsightIoApiTracingV1alpha1Statement_analysis.SpansRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Statement_analysis.SpansResponse> {
473
- return fm.fetchReq<InsightIoApiTracingV1alpha1Statement_analysis.SpansRequest, InsightIoApiTracingV1alpha1Statement_analysis.SpansResponse>(`/apis/insight.io/v1alpha1/traces/slow-sql/clusters/${req["clusterName"]}/spans`, {...initReq, method: "POST", body: JSON.stringify(req)})
489
+ return fm.fetchReq<InsightIoApiTracingV1alpha1Statement_analysis.SpansRequest, InsightIoApiTracingV1alpha1Statement_analysis.SpansResponse>(`/apis/insight.io/v1alpha1/traces/slow-sql/clusters/${req["clusterName"]}/spans`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
474
490
  }
475
491
  }
476
492
  export class ServiceGraph {
477
493
  static GetGraph(req: InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, initReq?: fm.InitReq): Promise<InsightIoApiGraphV1alpha1Graph.Graph> {
478
- return fm.fetchReq<InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, InsightIoApiGraphV1alpha1Graph.Graph>(`/apis/insight.io/v1alpha1/service-graph/graph`, {...initReq, method: "POST", body: JSON.stringify(req)})
494
+ return fm.fetchReq<InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, InsightIoApiGraphV1alpha1Graph.Graph>(`/apis/insight.io/v1alpha1/service-graph/graph`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
479
495
  }
480
496
  static GetNodeMetrics(req: InsightIoApiGraphV1alpha1Graph.BaseMetricsQuery, initReq?: fm.InitReq): Promise<InsightIoApiGraphV1alpha1Graph.NodeMetricResponse> {
481
497
  return fm.fetchReq<InsightIoApiGraphV1alpha1Graph.BaseMetricsQuery, InsightIoApiGraphV1alpha1Graph.NodeMetricResponse>(`/apis/insight.io/v1alpha1/service-graph/node-metrics?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -486,7 +502,7 @@ export class Event {
486
502
  return fm.fetchReq<InsightIoApiEventV1alpha1Event.QueryEventHistogramRequest, InsightIoApiEventV1alpha1Event.QueryEventHistogramResponse>(`/apis/insight.io/v1alpha1/event/cluster/${req["clusterName"]}/events/histogram?${fm.renderURLSearchParams(req, ["clusterName"])}`, {...initReq, method: "GET"})
487
503
  }
488
504
  static QueryEventCount(req: InsightIoApiEventV1alpha1Event.QueryEventCountRequest, initReq?: fm.InitReq): Promise<InsightIoApiEventV1alpha1Event.QueryEventCountResponse> {
489
- return fm.fetchReq<InsightIoApiEventV1alpha1Event.QueryEventCountRequest, InsightIoApiEventV1alpha1Event.QueryEventCountResponse>(`/apis/insight.io/v1alpha1/event/cluster/${req["clusterName"]}/events/count`, {...initReq, method: "POST", body: JSON.stringify(req)})
505
+ return fm.fetchReq<InsightIoApiEventV1alpha1Event.QueryEventCountRequest, InsightIoApiEventV1alpha1Event.QueryEventCountResponse>(`/apis/insight.io/v1alpha1/event/cluster/${req["clusterName"]}/events/count`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
490
506
  }
491
507
  static QueryEventFilterOptions(req: InsightIoApiEventV1alpha1Event.QueryEventFilterOptionsRequest, initReq?: fm.InitReq): Promise<InsightIoApiEventV1alpha1Event.QueryEventFilterOptionsResponse> {
492
508
  return fm.fetchReq<InsightIoApiEventV1alpha1Event.QueryEventFilterOptionsRequest, InsightIoApiEventV1alpha1Event.QueryEventFilterOptionsResponse>(`/apis/insight.io/v1alpha1/event/cluster/${req["clusterName"]}/events/filter-options?${fm.renderURLSearchParams(req, ["clusterName"])}`, {...initReq, method: "GET"})
@@ -506,7 +522,7 @@ export class Probe {
506
522
  return fm.fetchReq<InsightIoApiProbesV1alpha1Probe.ListProbesRequest, InsightIoApiProbesV1alpha1Probe.ListProbesResponse>(`/apis/insight.io/v1alpha1/clusters/${req["clusterName"]}/namespaces/${req["namespace"]}/probes?${fm.renderURLSearchParams(req, ["clusterName", "namespace"])}`, {...initReq, method: "GET"})
507
523
  }
508
524
  static AddProbe(req: InsightIoApiProbesV1alpha1Probe.CreateProbeRequest, initReq?: fm.InitReq): Promise<InsightIoApiProbesV1alpha1Probe.Probe> {
509
- return fm.fetchReq<InsightIoApiProbesV1alpha1Probe.CreateProbeRequest, InsightIoApiProbesV1alpha1Probe.Probe>(`/apis/insight.io/v1alpha1/clusters/${req["clusterName"]}/namespaces/${req["namespace"]}/probes`, {...initReq, method: "POST", body: JSON.stringify(req)})
525
+ return fm.fetchReq<InsightIoApiProbesV1alpha1Probe.CreateProbeRequest, InsightIoApiProbesV1alpha1Probe.Probe>(`/apis/insight.io/v1alpha1/clusters/${req["clusterName"]}/namespaces/${req["namespace"]}/probes`, {...initReq, method: "POST", body: JSON.stringify(req, fm.replacer)})
510
526
  }
511
527
  static GetProbe(req: InsightIoApiProbesV1alpha1Probe.BaseProbeRequest, initReq?: fm.InitReq): Promise<InsightIoApiProbesV1alpha1Probe.Probe> {
512
528
  return fm.fetchReq<InsightIoApiProbesV1alpha1Probe.BaseProbeRequest, InsightIoApiProbesV1alpha1Probe.Probe>(`/apis/insight.io/v1alpha1/clusters/${req["clusterName"]}/namespaces/${req["namespace"]}/probes/${req["jobName"]}?${fm.renderURLSearchParams(req, ["clusterName", "namespace", "jobName"])}`, {...initReq, method: "GET"})
@@ -515,7 +531,7 @@ export class Probe {
515
531
  return fm.fetchReq<InsightIoApiProbesV1alpha1Probe.BaseProbeRequest, empty>(`/apis/insight.io/v1alpha1/clusters/${req["clusterName"]}/namespaces/${req["namespace"]}/probes/${req["jobName"]}`, {...initReq, method: "DELETE"})
516
532
  }
517
533
  static UpdateProbe(req: InsightIoApiProbesV1alpha1Probe.UpdateProbeRequest, initReq?: fm.InitReq): Promise<empty> {
518
- return fm.fetchReq<InsightIoApiProbesV1alpha1Probe.UpdateProbeRequest, empty>(`/apis/insight.io/v1alpha1/clusters/${req["clusterName"]}/namespaces/${req["namespace"]}/probes/${req["jobName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req)})
534
+ return fm.fetchReq<InsightIoApiProbesV1alpha1Probe.UpdateProbeRequest, empty>(`/apis/insight.io/v1alpha1/clusters/${req["clusterName"]}/namespaces/${req["namespace"]}/probes/${req["jobName"]}`, {...initReq, method: "PUT", body: JSON.stringify(req, fm.replacer)})
519
535
  }
520
536
  static ListProbers(req: InsightIoApiProbesV1alpha1Probe.GetProbersRequest, initReq?: fm.InitReq): Promise<InsightIoApiProbesV1alpha1Probe.ClusterProbersResponse> {
521
537
  return fm.fetchReq<InsightIoApiProbesV1alpha1Probe.GetProbersRequest, InsightIoApiProbesV1alpha1Probe.ClusterProbersResponse>(`/apis/insight.io/v1alpha1/clusters/${req["clusterName"]}/probers?${fm.renderURLSearchParams(req, ["clusterName"])}`, {...initReq, method: "GET"})
@@ -23,6 +23,8 @@ export enum GetResourcesCountRequestResourcesFilter {
23
23
  JOB_TOTAL = "JOB_TOTAL",
24
24
  POD_NORMAL_TOTAL = "POD_NORMAL_TOTAL",
25
25
  POD_TOTAL = "POD_TOTAL",
26
+ GPU_COUNT = "GPU_COUNT",
27
+ GPU_ALLOCATED_COUNT = "GPU_ALLOCATED_COUNT",
26
28
  LOG_TOTAL = "LOG_TOTAL",
27
29
  TRACE_TOTAL = "TRACE_TOTAL",
28
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/insight",
3
- "version":"0.41.3",
3
+ "version":"0.41.4-2-g3f73d56",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -124,6 +124,7 @@ export type ClusterDetail = {
124
124
  statefulsetNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
125
125
  daemonsetNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
126
126
  podNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
127
+ gpuNumSummary?: InsightIoApiResourceV1alpha1Type.ResourceNumSummary
127
128
  insightAgentStatus?: insightAgentState
128
129
  }
129
130
 
@@ -71,11 +71,16 @@ type BaseSpanQueryParameters = {
71
71
  spanKinds?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind[]
72
72
  sort?: string
73
73
  onlyErrorSpans?: boolean
74
+ onlyRootSpans?: boolean
74
75
  }
75
76
 
76
77
  export type SpanQueryParameters = BaseSpanQueryParameters
77
78
  & OneOf<{ cluster: string; clusterName: string }>
78
79
 
80
+ export type SearchResponse = {
81
+ response?: string
82
+ }
83
+
79
84
  export type SpanDurationHistogram = {
80
85
  timestamp?: string
81
86
  p75Duration?: string