@leaflow/sdk 0.0.0-dev.113.g5d6fb99 → 0.0.0-dev.113.gecc0f27

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.
Files changed (46) hide show
  1. package/README.md +34 -0
  2. package/dist/account/v1/index.d.ts +16 -0
  3. package/dist/account/v1/schema.d.ts +294 -3
  4. package/dist/assistant/v1/index.d.ts +74 -34
  5. package/dist/assistant/v1/schema.d.ts +1113 -157
  6. package/dist/billing/v1/index.d.ts +70 -0
  7. package/dist/billing/v1/index.js +5 -0
  8. package/dist/billing/v1/schema.d.ts +2657 -0
  9. package/dist/canopy/v1/index.d.ts +12 -0
  10. package/dist/compute/v1/index.d.ts +50 -4
  11. package/dist/compute/v1/schema.d.ts +857 -268
  12. package/dist/dns/v1/index.d.ts +42 -0
  13. package/dist/dns/v1/index.js +5 -0
  14. package/dist/dns/v1/schema.d.ts +883 -0
  15. package/dist/iam/v1/index.d.ts +28 -0
  16. package/dist/iam/v1/schema.d.ts +437 -9
  17. package/dist/index.d.ts +4 -0
  18. package/dist/monitoring/v1/index.d.ts +96 -0
  19. package/dist/monitoring/v1/schema.d.ts +2386 -496
  20. package/dist/notification/v1/index.d.ts +76 -0
  21. package/dist/notification/v1/index.js +5 -0
  22. package/dist/notification/v1/schema.d.ts +2044 -0
  23. package/dist/support/v1/index.d.ts +50 -0
  24. package/dist/support/v1/index.js +5 -0
  25. package/dist/support/v1/schema.d.ts +1078 -0
  26. package/dist/tunnel/v1/index.d.ts +14 -32
  27. package/dist/tunnel/v1/schema.d.ts +52 -496
  28. package/package.json +5 -4
  29. package/dist/gen/account/v1/schema.d.ts +0 -866
  30. package/dist/gen/assistant/v1/schema.d.ts +0 -1884
  31. package/dist/gen/canopy/v1/schema.d.ts +0 -1100
  32. package/dist/gen/compute/v1/schema.d.ts +0 -4439
  33. package/dist/gen/iam/v1/schema.d.ts +0 -1230
  34. package/dist/gen/iam/v1/schema.js +0 -5
  35. package/dist/gen/monitoring/v1/schema.d.ts +0 -2291
  36. package/dist/gen/monitoring/v1/schema.js +0 -5
  37. package/dist/gen/tunnel/v1/schema.d.ts +0 -845
  38. package/dist/gen/tunnel/v1/schema.js +0 -5
  39. package/dist/src/client.d.ts +0 -57
  40. package/dist/src/client.js +0 -41
  41. package/dist/src/index.d.ts +0 -9
  42. package/dist/src/index.js +0 -1
  43. /package/dist/{gen/account → billing}/v1/schema.js +0 -0
  44. /package/dist/{gen/assistant → dns}/v1/schema.js +0 -0
  45. /package/dist/{gen/canopy → notification}/v1/schema.js +0 -0
  46. /package/dist/{gen/compute → support}/v1/schema.js +0 -0
@@ -1,2291 +0,0 @@
1
- /**
2
- * This file was auto-generated by openapi-typescript.
3
- * Do not make direct changes to the file.
4
- */
5
- export interface paths {
6
- "/api/v1/incidents": {
7
- parameters: {
8
- query?: never;
9
- header?: never;
10
- path?: never;
11
- cookie?: never;
12
- };
13
- /**
14
- * 列出告警
15
- * @description `incident_status` 表示监控系统是否判定已恢复,`closed` 表示是否有人完成了处理。两者相互独立,可分别筛选。
16
- */
17
- get: operations["list-incidents"];
18
- put?: never;
19
- post?: never;
20
- delete?: never;
21
- options?: never;
22
- head?: never;
23
- patch?: never;
24
- trace?: never;
25
- };
26
- "/api/v1/incidents/{incidentId}": {
27
- parameters: {
28
- query?: never;
29
- header?: never;
30
- path?: never;
31
- cookie?: never;
32
- };
33
- /** 查一条告警 */
34
- get: operations["get-incident"];
35
- put?: never;
36
- post?: never;
37
- delete?: never;
38
- options?: never;
39
- head?: never;
40
- patch?: never;
41
- trace?: never;
42
- };
43
- "/api/v1/incidents/{incidentId}/acknowledge": {
44
- parameters: {
45
- query?: never;
46
- header?: never;
47
- path?: never;
48
- cookie?: never;
49
- };
50
- get?: never;
51
- put?: never;
52
- /**
53
- * 确认这条告警
54
- * @description 同时会在监控系统中标记为已确认,便于其他渠道也能看到该告警已有人处理。
55
- */
56
- post: operations["acknowledge-incident"];
57
- delete?: never;
58
- options?: never;
59
- head?: never;
60
- patch?: never;
61
- trace?: never;
62
- };
63
- "/api/v1/incidents/{incidentId}/assignee": {
64
- parameters: {
65
- query?: never;
66
- header?: never;
67
- path?: never;
68
- cookie?: never;
69
- };
70
- get?: never;
71
- /**
72
- * 把这条告警交给谁,或者收回来
73
- * @description `assignee_user_id` 留空即取消指派。
74
- *
75
- * **这里不校验被指派的人在不在这个项目里**——那要问 IAM,而这个服务的准入还没接。
76
- */
77
- put: operations["assign-incident"];
78
- post?: never;
79
- delete?: never;
80
- options?: never;
81
- head?: never;
82
- patch?: never;
83
- trace?: never;
84
- };
85
- "/api/v1/incidents/{incidentId}/close": {
86
- parameters: {
87
- query?: never;
88
- header?: never;
89
- path?: never;
90
- cookie?: never;
91
- };
92
- get?: never;
93
- put?: never;
94
- /**
95
- * 了结这条告警
96
- * @description 了结的是**平台上的处理流程**,不是告警本身的状态:尚未恢复的告警也可以按「已接受的风险」了结,它在监控系统中仍为未恢复。
97
- */
98
- post: operations["close-incident"];
99
- delete?: never;
100
- options?: never;
101
- head?: never;
102
- patch?: never;
103
- trace?: never;
104
- };
105
- "/api/v1/incidents/{incidentId}/comments": {
106
- parameters: {
107
- query?: never;
108
- header?: never;
109
- path?: never;
110
- cookie?: never;
111
- };
112
- get?: never;
113
- put?: never;
114
- /** 在时间线上写一条备注 */
115
- post: operations["add-incident-comment"];
116
- delete?: never;
117
- options?: never;
118
- head?: never;
119
- patch?: never;
120
- trace?: never;
121
- };
122
- "/api/v1/incidents/{incidentId}/following": {
123
- parameters: {
124
- query?: never;
125
- header?: never;
126
- path?: never;
127
- cookie?: never;
128
- };
129
- get?: never;
130
- /**
131
- * 关注这条告警,或者取消关注
132
- * @description 关注的是**自己**:操作者就是被加进关注列表的那个人。
133
- */
134
- put: operations["set-incident-following"];
135
- post?: never;
136
- delete?: never;
137
- options?: never;
138
- head?: never;
139
- patch?: never;
140
- trace?: never;
141
- };
142
- "/api/v1/incidents/{incidentId}/reopen": {
143
- parameters: {
144
- query?: never;
145
- header?: never;
146
- path?: never;
147
- cookie?: never;
148
- };
149
- get?: never;
150
- put?: never;
151
- /** 重新打开一条已经了结的告警 */
152
- post: operations["reopen-incident"];
153
- delete?: never;
154
- options?: never;
155
- head?: never;
156
- patch?: never;
157
- trace?: never;
158
- };
159
- "/api/v1/incidents/{incidentId}/timeline": {
160
- parameters: {
161
- query?: never;
162
- header?: never;
163
- path?: never;
164
- cookie?: never;
165
- };
166
- /**
167
- * 列出这条告警的时间线
168
- * @description 游标翻页而不是偏移量:时间线是只增的,用偏移量翻页会在新记录写入时漏行和重行。
169
- */
170
- get: operations["list-incident-timeline"];
171
- put?: never;
172
- post?: never;
173
- delete?: never;
174
- options?: never;
175
- head?: never;
176
- patch?: never;
177
- trace?: never;
178
- };
179
- "/api/v1/maintenance-windows": {
180
- parameters: {
181
- query?: never;
182
- header?: never;
183
- path?: never;
184
- cookie?: never;
185
- };
186
- /** 列出维护窗口 */
187
- get: operations["list-maintenance-windows"];
188
- put?: never;
189
- post?: never;
190
- delete?: never;
191
- options?: never;
192
- head?: never;
193
- patch?: never;
194
- trace?: never;
195
- };
196
- "/api/v1/maintenance-windows/{windowId}": {
197
- parameters: {
198
- query?: never;
199
- header?: never;
200
- path?: never;
201
- cookie?: never;
202
- };
203
- /** 查一个维护窗口 */
204
- get: operations["get-maintenance-window"];
205
- /**
206
- * 开一个维护窗口,或者按同一个 id 覆盖它
207
- * @description **创建即覆盖**:延长一个正在进行的窗口就是用同一个 id 再调一次。
208
- *
209
- * 窗口期内这些机器的问题不告警,也不扣 SLA 的可用率。`server_ids` 留空表示整个项目,包括窗口开着的时候新接进来的机器。
210
- */
211
- put: operations["put-maintenance-window"];
212
- post?: never;
213
- /**
214
- * 撤掉一个维护窗口
215
- * @description 立刻恢复告警,哪怕窗口还没到期。
216
- */
217
- delete: operations["delete-maintenance-window"];
218
- options?: never;
219
- head?: never;
220
- patch?: never;
221
- trace?: never;
222
- };
223
- "/api/v1/overview": {
224
- parameters: {
225
- query?: never;
226
- header?: never;
227
- path?: never;
228
- cookie?: never;
229
- };
230
- /**
231
- * 项目总览
232
- * @description 项目下还没有任何机器时返回各项均为零的总览,而不是 404——空项目是一个正常状态。
233
- */
234
- get: operations["get-project-overview"];
235
- put?: never;
236
- post?: never;
237
- delete?: never;
238
- options?: never;
239
- head?: never;
240
- patch?: never;
241
- trace?: never;
242
- };
243
- "/api/v1/servers/{serverId}/items": {
244
- parameters: {
245
- query?: never;
246
- header?: never;
247
- path?: never;
248
- cookie?: never;
249
- };
250
- /**
251
- * 列出一台机器的监控项
252
- * @description 原样返回采集到的监控项,不做筛选或重命名。哪些属于重要指标,由调用方依据监控项自带的标签自行判断。
253
- */
254
- get: operations["list-server-items"];
255
- put?: never;
256
- post?: never;
257
- delete?: never;
258
- options?: never;
259
- head?: never;
260
- patch?: never;
261
- trace?: never;
262
- };
263
- "/api/v1/servers/{serverId}/metrics": {
264
- parameters: {
265
- query?: never;
266
- header?: never;
267
- path?: never;
268
- cookie?: never;
269
- };
270
- /**
271
- * 取一个监控项的时间序列
272
- * @description `item_key` 是**前缀匹配**:按分区、按网卡发现出来的监控项 key 带参数(`vfs.fs.size[/var,pused]`),所以 `vfs.fs.size` 这一个请求就能画出每个挂载点一条线。
273
- */
274
- get: operations["get-server-metric"];
275
- put?: never;
276
- post?: never;
277
- delete?: never;
278
- options?: never;
279
- head?: never;
280
- patch?: never;
281
- trace?: never;
282
- };
283
- "/api/v1/servers/{serverId}/resources": {
284
- parameters: {
285
- query?: never;
286
- header?: never;
287
- path?: never;
288
- cookie?: never;
289
- };
290
- /** 一台机器的硬件与接口 */
291
- get: operations["get-server-resources"];
292
- put?: never;
293
- post?: never;
294
- delete?: never;
295
- options?: never;
296
- head?: never;
297
- patch?: never;
298
- trace?: never;
299
- };
300
- "/api/v1/servers/{serverId}/snapshot": {
301
- parameters: {
302
- query?: never;
303
- header?: never;
304
- path?: never;
305
- cookie?: never;
306
- };
307
- /** 一台机器此刻的状态 */
308
- get: operations["get-server-snapshot"];
309
- put?: never;
310
- post?: never;
311
- delete?: never;
312
- options?: never;
313
- head?: never;
314
- patch?: never;
315
- trace?: never;
316
- };
317
- "/api/v1/top-items": {
318
- parameters: {
319
- query?: never;
320
- header?: never;
321
- path?: never;
322
- cookie?: never;
323
- };
324
- /** 某个指标最高的前几台 */
325
- get: operations["list-project-top-items"];
326
- put?: never;
327
- post?: never;
328
- delete?: never;
329
- options?: never;
330
- head?: never;
331
- patch?: never;
332
- trace?: never;
333
- };
334
- "/api/v1/servers": {
335
- parameters: {
336
- query?: never;
337
- header?: never;
338
- path?: never;
339
- cookie?: never;
340
- };
341
- /** 列出项目里的机器 */
342
- get: operations["list-servers"];
343
- put?: never;
344
- post?: never;
345
- delete?: never;
346
- options?: never;
347
- head?: never;
348
- patch?: never;
349
- trace?: never;
350
- };
351
- "/api/v1/servers/{serverId}": {
352
- parameters: {
353
- query?: never;
354
- header?: never;
355
- path?: never;
356
- cookie?: never;
357
- };
358
- /** 查一台机器的接入情况 */
359
- get: operations["get-server"];
360
- /**
361
- * 把一台机器接入监控
362
- * @description **同一个 server id 重复调用是幂等的**:参数一致时返回已接入的那台,不会重复创建监控主机,因此接入失败可以安全重试。
363
- *
364
- * 修改接入参数请改用 PATCH。本接口在参数不一致时会返回错误,不会更新已有配置。
365
- *
366
- * 响应中的 `tls_psk` **只返回这一次**,请及时保存;遗失后需要轮换。
367
- */
368
- put: operations["enable-server-monitoring"];
369
- post?: never;
370
- /**
371
- * 删掉这台机器
372
- * @description **不可逆**:监控主机、历史数据和这台机器名下的告警会一并删除。若只是想暂时停止采集,改用 /disable。
373
- */
374
- delete: operations["delete-server"];
375
- options?: never;
376
- head?: never;
377
- /**
378
- * 改一台机器的接入参数
379
- * @description 只更新请求体中出现的字段。`address` 与 `address_kind` 必须一并提供:只改其中一个会得到互相矛盾的接入配置,该错误不会被报出,表现为 agent 连不上。
380
- */
381
- patch: operations["update-server"];
382
- trace?: never;
383
- };
384
- "/api/v1/servers/{serverId}/disable": {
385
- parameters: {
386
- query?: never;
387
- header?: never;
388
- path?: never;
389
- cookie?: never;
390
- };
391
- get?: never;
392
- put?: never;
393
- /**
394
- * 停止监控这台机器
395
- * @description 可逆操作:监控主机保留,仅停止采集,历史数据不受影响。重新接入即可恢复采集。如需连同历史数据一并删除,改用 DELETE。
396
- */
397
- post: operations["disable-server-monitoring"];
398
- delete?: never;
399
- options?: never;
400
- head?: never;
401
- patch?: never;
402
- trace?: never;
403
- };
404
- "/api/v1/servers/{serverId}/psk": {
405
- parameters: {
406
- query?: never;
407
- header?: never;
408
- path?: never;
409
- cookie?: never;
410
- };
411
- get?: never;
412
- put?: never;
413
- /**
414
- * 换一把 agent 的 PSK
415
- * @description 换完要同步改 agent 侧的配置,否则那台机器立刻失联。新密钥同样**只在这个响应里明文出现一次**。
416
- */
417
- post: operations["rotate-agent-psk"];
418
- delete?: never;
419
- options?: never;
420
- head?: never;
421
- patch?: never;
422
- trace?: never;
423
- };
424
- "/api/v1/servers/{serverId}/web-checks/{checkId}": {
425
- parameters: {
426
- query?: never;
427
- header?: never;
428
- path?: never;
429
- cookie?: never;
430
- };
431
- /** 查一个网页检查 */
432
- get: operations["get-web-check"];
433
- /**
434
- * 建一个网页检查,或者按同一个 id 覆盖它
435
- * @description **创建即覆盖**:修改一个检查即用同一个 id 再次调用本接口,无需先判断它是否已存在。
436
- */
437
- put: operations["put-web-check"];
438
- post?: never;
439
- /**
440
- * 删掉一个网页检查
441
- * @description 同时删除监控系统中对应的检查任务和触发器,不会遗留永远无法恢复的告警。
442
- */
443
- delete: operations["delete-web-check"];
444
- options?: never;
445
- head?: never;
446
- patch?: never;
447
- trace?: never;
448
- };
449
- "/api/v1/web-checks": {
450
- parameters: {
451
- query?: never;
452
- header?: never;
453
- path?: never;
454
- cookie?: never;
455
- };
456
- /** 列出网页检查 */
457
- get: operations["list-web-checks"];
458
- put?: never;
459
- post?: never;
460
- delete?: never;
461
- options?: never;
462
- head?: never;
463
- patch?: never;
464
- trace?: never;
465
- };
466
- "/api/v1/sli-report": {
467
- parameters: {
468
- query?: never;
469
- header?: never;
470
- path?: never;
471
- cookie?: never;
472
- };
473
- /**
474
- * 查实测的达成情况
475
- * @description SLI 是测出来的数,SLO 是定下来的目标——这里返回的是前者。
476
- *
477
- * `server_id` 为空的那一行是项目整体。
478
- */
479
- get: operations["get-sli-report"];
480
- put?: never;
481
- post?: never;
482
- delete?: never;
483
- options?: never;
484
- head?: never;
485
- patch?: never;
486
- trace?: never;
487
- };
488
- "/api/v1/slo": {
489
- parameters: {
490
- query?: never;
491
- header?: never;
492
- path?: never;
493
- cookie?: never;
494
- };
495
- /**
496
- * 查这个项目的可用率目标
497
- * @description 没定过就是 404,而不是一份默认目标:没承诺过和承诺了 99.9% 是两回事。
498
- */
499
- get: operations["get-slo"];
500
- /**
501
- * 定下这个项目的可用率目标,或者改它
502
- * @description 一个项目一条 SLO,**创建即覆盖**。
503
- *
504
- * `min_severity` 必须显式选:它决定什么算「不可用」,是这条承诺的一半内容。
505
- */
506
- put: operations["put-slo"];
507
- post?: never;
508
- /**
509
- * 撤掉这个项目的可用率目标
510
- * @description 同时移除监控系统中对应的服务树,此后不再统计可用率。
511
- */
512
- delete: operations["delete-slo"];
513
- options?: never;
514
- head?: never;
515
- patch?: never;
516
- trace?: never;
517
- };
518
- }
519
- export type webhooks = Record<string, never>;
520
- export interface components {
521
- schemas: {
522
- Error: {
523
- code?: string;
524
- message: string;
525
- meta?: {
526
- [key: string]: unknown;
527
- };
528
- /** Format: int64 */
529
- status: number;
530
- };
531
- IncidentFollowerResource: {
532
- display_name: string;
533
- /** Format: date-time */
534
- followed_at: string;
535
- user_id: string;
536
- };
537
- MonitoringItemResource: {
538
- /** @description last / avg / min / max 之类 */
539
- aggregation_function: string;
540
- /** Format: int64 */
541
- evaluation_window_seconds: number;
542
- item_id: string;
543
- key: string;
544
- name: string;
545
- operator: string;
546
- /**
547
- * Format: double
548
- * @description 只有 threshold_status 为 RESOLVED 时才有
549
- */
550
- threshold: number | null;
551
- threshold_status: string;
552
- /** @description 触发那一刻的值,原样存下来的 */
553
- value: string;
554
- };
555
- TagResource: {
556
- tag: string;
557
- value: string;
558
- };
559
- IncidentResource: {
560
- acknowledge_message: string;
561
- acknowledged: boolean;
562
- /** Format: date-time */
563
- acknowledged_at: string | null;
564
- acknowledged_by_display_name: string;
565
- acknowledged_by_user_id: string;
566
- /** Format: date-time */
567
- assigned_at: string | null;
568
- assignee_display_name: string;
569
- assignee_user_id: string;
570
- close_message: string;
571
- close_reason: string;
572
- /** Format: date-time */
573
- closed_at: string | null;
574
- closed_by_display_name: string;
575
- closed_by_user_id: string;
576
- /** Format: int64 */
577
- duration_seconds: number;
578
- followers: components["schemas"]["IncidentFollowerResource"][] | null;
579
- host_connection: string;
580
- host_display_name: string;
581
- /** Format: uuid */
582
- id: string;
583
- /**
584
- * @description 监控系统是否判定已恢复。它与是否有人了结这条告警是两件事
585
- * @enum {string}
586
- */
587
- incident_status: "PROBLEM" | "RESOLVED";
588
- items: components["schemas"]["MonitoringItemResource"][] | null;
589
- name: string;
590
- /** @description 触发器配的那行现场数据 */
591
- operational_data: string;
592
- /** Format: uuid */
593
- project_id: string;
594
- /** Format: date-time */
595
- resolved_at: string | null;
596
- resolved_trigger_expression: string;
597
- /** Format: uuid */
598
- server_id: string;
599
- server_name: string;
600
- /** @enum {string} */
601
- severity: "NOT_CLASSIFIED" | "INFORMATION" | "WARNING" | "AVERAGE" | "HIGH" | "DISASTER";
602
- /** Format: date-time */
603
- started_at: string;
604
- tags: components["schemas"]["TagResource"][] | null;
605
- trigger_expression: string;
606
- zabbix_event_id: string;
607
- };
608
- LengthAwarePageIncidentResource: {
609
- /** @description 这一页的内容 */
610
- items: components["schemas"]["IncidentResource"][];
611
- /**
612
- * Format: int64
613
- * @description 这一页最多几条,回显请求里的值
614
- */
615
- limit: number;
616
- /**
617
- * Format: int64
618
- * @description 跳过了多少条,回显请求里的值
619
- */
620
- offset: number;
621
- /**
622
- * Format: int64
623
- * @description 命中的总条数,不只是这一页
624
- */
625
- total: number;
626
- };
627
- AcknowledgeIncidentRequestBody: {
628
- /** @description 会一并写入监控系统的确认记录 */
629
- message?: string;
630
- };
631
- AssignIncidentRequestBody: {
632
- /** @description 不给就用 user id:时间线上要留一个当时的人名副本 */
633
- assignee_display_name?: string;
634
- assignee_user_id?: string;
635
- };
636
- CloseIncidentRequestBody: {
637
- /** @description reason 为 OTHER 时必填,否则请求会被拒绝 */
638
- message?: string;
639
- /** @enum {string} */
640
- reason: "RECOVERED" | "FIXED" | "FALSE_POSITIVE" | "DUPLICATE" | "NO_ACTION_REQUIRED" | "ACCEPTED_RISK" | "OTHER";
641
- };
642
- AddCommentRequestBody: {
643
- message: string;
644
- };
645
- IncidentActivityResource: {
646
- /** @enum {string} */
647
- activity_type: "OPENED" | "RECOVERED" | "ACKNOWLEDGED" | "ASSIGNED" | "UNASSIGNED" | "FOLLOWER_ADDED" | "FOLLOWER_REMOVED" | "COMMENT" | "CLOSED" | "REOPENED";
648
- actor_display_name: string;
649
- /** @description 操作者;来源为 SYSTEM 或 ZABBIX 时为空 */
650
- actor_user_id: string;
651
- close_reason: string;
652
- /** Format: uuid */
653
- id: string;
654
- /** Format: uuid */
655
- incident_id: string;
656
- message: string;
657
- /** Format: date-time */
658
- occurred_at: string;
659
- /** @enum {string} */
660
- source: "SYSTEM" | "OPERATOR" | "ZABBIX";
661
- subject_display_name: string;
662
- /** @description 被指派 / 被取消关注的那个人 */
663
- subject_user_id: string;
664
- };
665
- SetFollowingRequestBody: {
666
- following: boolean;
667
- };
668
- CursorPageIncidentActivityResource: {
669
- /** @description 这一页的内容 */
670
- items: components["schemas"]["IncidentActivityResource"][];
671
- /** @description 下一页的游标;为空表示已经到底 */
672
- next_cursor: string;
673
- };
674
- MaintenancePeriodResource: {
675
- /** Format: int64 */
676
- duration_seconds: number;
677
- /**
678
- * Format: int64
679
- * @description DAILY / WEEKLY:每 N 天 / 每 N 周
680
- */
681
- every: number;
682
- /** @enum {string} */
683
- kind: "ONCE" | "DAILY" | "WEEKLY";
684
- /**
685
- * Format: int64
686
- * @description DAILY / WEEKLY:当天零点起的秒数,按窗口自己的时区算
687
- */
688
- start_time_seconds: number;
689
- /**
690
- * Format: date-time
691
- * @description 只有 ONCE 有
692
- */
693
- starts_at: string | null;
694
- /**
695
- * Format: int64
696
- * @description WEEKLY:星期几的位图,**周一是最低位**
697
- */
698
- weekdays: number;
699
- };
700
- MaintenanceWindowResource: {
701
- /** Format: date-time */
702
- active_since: string;
703
- /** Format: date-time */
704
- active_till: string;
705
- description: string;
706
- last_error: string;
707
- name: string;
708
- period: components["schemas"]["MaintenancePeriodResource"];
709
- /** Format: uuid */
710
- project_id: string;
711
- /** @description 空表示**整个项目** */
712
- server_ids: string[] | null;
713
- /** @enum {string} */
714
- sync_status: "PENDING" | "ACTIVE" | "FAILED" | "EXPIRED";
715
- timezone: string;
716
- /** Format: uuid */
717
- window_id: string;
718
- };
719
- MaintenanceWindowListResponseBody: {
720
- items: components["schemas"]["MaintenanceWindowResource"][] | null;
721
- };
722
- MaintenancePeriodRequest: {
723
- /** Format: int64 */
724
- duration_seconds?: number;
725
- /**
726
- * Format: int64
727
- * @description DAILY / WEEKLY:每 N 天 / 每 N 周
728
- */
729
- every?: number;
730
- /** @enum {string} */
731
- kind: "ONCE" | "DAILY" | "WEEKLY";
732
- /**
733
- * Format: int64
734
- * @description DAILY / WEEKLY:当天零点起的秒数,按窗口自己的时区算
735
- */
736
- start_time_seconds?: number;
737
- /**
738
- * Format: date-time
739
- * @description 只有 ONCE 用得上
740
- */
741
- starts_at?: string;
742
- /**
743
- * Format: int64
744
- * @description WEEKLY:星期几的位图,**周一是最低位**
745
- */
746
- weekdays?: number;
747
- };
748
- PutMaintenanceWindowRequestBody: {
749
- /**
750
- * Format: date-time
751
- * @description 整条规则的生效区间起点
752
- */
753
- active_since: string;
754
- /** Format: date-time */
755
- active_till: string;
756
- description?: string;
757
- name: string;
758
- period: components["schemas"]["MaintenancePeriodRequest"];
759
- server_ids?: string[] | null;
760
- /** @description IANA 名字,比如 Asia/Shanghai;空即用部署配的默认 */
761
- timezone?: string;
762
- };
763
- CountResource: {
764
- /** Format: int64 */
765
- count: number;
766
- key: string;
767
- };
768
- ProjectOverviewResource: {
769
- /** Format: int64 */
770
- monitored_servers: number;
771
- problem_counts: components["schemas"]["CountResource"][] | null;
772
- reachability_counts: components["schemas"]["CountResource"][] | null;
773
- /** Format: int64 */
774
- total_servers: number;
775
- };
776
- ItemResource: {
777
- item_id: string;
778
- key: string;
779
- /** Format: date-time */
780
- last_collected_at: string | null;
781
- last_value: string;
782
- name: string;
783
- tags: components["schemas"]["TagResource"][] | null;
784
- units: string;
785
- /** @enum {string} */
786
- value_type: "FLOAT" | "CHARACTER" | "LOG" | "UNSIGNED" | "TEXT";
787
- };
788
- ItemListResponseBody: {
789
- items: components["schemas"]["ItemResource"][] | null;
790
- };
791
- MetricPointResource: {
792
- /** Format: double */
793
- max_value: number;
794
- /** Format: double */
795
- min_value: number;
796
- /** Format: date-time */
797
- timestamp: string;
798
- /** Format: double */
799
- value: number;
800
- };
801
- MetricSeriesResource: {
802
- item_id: string;
803
- item_key: string;
804
- item_name: string;
805
- points: components["schemas"]["MetricPointResource"][] | null;
806
- units: string;
807
- };
808
- ItemThresholdResource: {
809
- aggregation_function: string;
810
- /** Format: int64 */
811
- evaluation_window_seconds: number;
812
- item_id: string;
813
- operator: string;
814
- severity: string;
815
- /** Format: double */
816
- threshold: number;
817
- /** @description 图例上说明这条线是什么 */
818
- trigger_name: string;
819
- };
820
- MetricResponseBody: {
821
- downsampled: boolean;
822
- /** Format: date-time */
823
- effective_from: string;
824
- /** Format: date-time */
825
- effective_to: string;
826
- /** @description 数据来自趋势表,每个点是一小时的聚合 */
827
- from_trends: boolean;
828
- series: components["schemas"]["MetricSeriesResource"][] | null;
829
- thresholds: components["schemas"]["ItemThresholdResource"][] | null;
830
- truncated: boolean;
831
- };
832
- HostInterfaceResource: {
833
- available: boolean;
834
- dns: string;
835
- ip: string;
836
- /** Format: int64 */
837
- port: number;
838
- use_ip: boolean;
839
- };
840
- ServerResourcesResource: {
841
- interfaces: components["schemas"]["HostInterfaceResource"][] | null;
842
- /** @description 自动采集的硬件与系统清单:CPU、内存、操作系统等 */
843
- inventory: {
844
- [key: string]: string;
845
- };
846
- tags: components["schemas"]["TagResource"][] | null;
847
- };
848
- SnapshotResource: {
849
- agent_error: string;
850
- /**
851
- * @description AGENT_DOWN 是 agent 不通但机器还活着;UNREACHABLE 是连这一点都说不上
852
- * @enum {string}
853
- */
854
- agent_reachability: "UNKNOWN" | "REACHABLE" | "AGENT_DOWN" | "UNREACHABLE";
855
- /** Format: date-time */
856
- last_collected_at: string | null;
857
- monitoring_enabled: boolean;
858
- problem_counts: components["schemas"]["CountResource"][] | null;
859
- };
860
- TopItemResource: {
861
- item_key: string;
862
- /** Format: uuid */
863
- server_id: string;
864
- units: string;
865
- /** Format: double */
866
- value: number;
867
- };
868
- TopItemListResponseBody: {
869
- items: components["schemas"]["TopItemResource"][] | null;
870
- };
871
- ServerTemplateResource: {
872
- configured_secret_parameters: string[] | null;
873
- parameters: {
874
- [key: string]: string;
875
- };
876
- template_key: string;
877
- zabbix_template_id: string;
878
- zabbix_template_name: string;
879
- };
880
- ServerResource: {
881
- address: string;
882
- /** @enum {string} */
883
- address_kind: "ip" | "dns";
884
- /** @enum {string} */
885
- agent_mode: "PASSIVE" | "ACTIVE";
886
- /** Format: int64 */
887
- agent_port: number;
888
- /** Format: date-time */
889
- created_at: string;
890
- description: string;
891
- /** Format: uuid */
892
- id: string;
893
- last_error: string;
894
- /**
895
- * @description FAILED 时看 last_error
896
- * @enum {string}
897
- */
898
- monitoring_status: "PENDING" | "ACTIVE" | "DISABLED" | "FAILED";
899
- name: string;
900
- /** Format: uuid */
901
- project_id: string;
902
- templates: components["schemas"]["ServerTemplateResource"][] | null;
903
- /** Format: date-time */
904
- updated_at: string;
905
- /** @description agent 配置里的 Hostname 必须与它一致,主动式采集靠它认人 */
906
- zabbix_host_name: string;
907
- };
908
- LengthAwarePageServerResource: {
909
- /** @description 这一页的内容 */
910
- items: components["schemas"]["ServerResource"][];
911
- /**
912
- * Format: int64
913
- * @description 这一页最多几条,回显请求里的值
914
- */
915
- limit: number;
916
- /**
917
- * Format: int64
918
- * @description 跳过了多少条,回显请求里的值
919
- */
920
- offset: number;
921
- /**
922
- * Format: int64
923
- * @description 命中的总条数,不只是这一页
924
- */
925
- total: number;
926
- };
927
- TemplateBindingRequest: {
928
- /** @description 模板自己声明的参数,密钥参数写明文,返回时只报名字 */
929
- parameters?: {
930
- [key: string]: string;
931
- };
932
- /** @enum {string} */
933
- template_key: "LINUX" | "SYSTEMD" | "DOCKER" | "ICMP_PING" | "NGINX" | "PHP_FPM" | "WEBSITE_CERTIFICATE" | "WINDOWS" | "SMART" | "NVIDIA" | "PROXMOX_VE";
934
- };
935
- EnableMonitoringRequestBody: {
936
- address: string;
937
- /** @enum {string} */
938
- address_kind: "ip" | "dns";
939
- /**
940
- * @description 空即被动式:它对 agent 侧配置要求最少
941
- * @enum {string}
942
- */
943
- agent_mode?: "PASSIVE" | "ACTIVE";
944
- /**
945
- * Format: int64
946
- * @description 0 表示用默认的 10050
947
- */
948
- agent_port?: number;
949
- description?: string;
950
- name: string;
951
- template_bindings?: components["schemas"]["TemplateBindingRequest"][] | null;
952
- };
953
- EnrollmentResource: {
954
- /** @description 含 PSK,与 tls_psk 一样只出现这一次 */
955
- install_command: string;
956
- install_script_url: string;
957
- /** @description **只出现这一次** */
958
- tls_psk: string;
959
- tls_psk_identity: string;
960
- zabbix_host_name: string;
961
- /** @description agent 配置里的 Server / ServerActive */
962
- zabbix_server_address: string;
963
- };
964
- ServerEnrollmentResponseBody: {
965
- enrollment: components["schemas"]["EnrollmentResource"];
966
- server: components["schemas"]["ServerResource"];
967
- };
968
- UpdateServerRequestBody: {
969
- address?: string;
970
- /**
971
- * @description 要改地址就必须和 address 一起给
972
- * @enum {string}
973
- */
974
- address_kind?: "ip" | "dns";
975
- /**
976
- * @description 改采集模式会把全部模板换成另一个变体
977
- * @enum {string}
978
- */
979
- agent_mode?: "PASSIVE" | "ACTIVE";
980
- /** Format: int64 */
981
- agent_port?: number;
982
- description?: string;
983
- name?: string;
984
- template_bindings?: components["schemas"]["TemplateBindingRequest"][];
985
- };
986
- WebCheckResultResource: {
987
- /** Format: date-time */
988
- checked_at: string;
989
- error: string;
990
- /**
991
- * Format: int64
992
- * @description 第几步失败的,从 1 数;healthy 时为 0
993
- */
994
- failed_step: number;
995
- healthy: boolean;
996
- /** Format: int64 */
997
- response_code: number;
998
- /** Format: double */
999
- response_time_seconds: number;
1000
- };
1001
- WebCheckStepResource: {
1002
- /** @description 状态码表达式,比如 200 或者 200,301-302 */
1003
- expected_status_codes: string;
1004
- follow_redirects: boolean;
1005
- name: string;
1006
- required_pattern: string;
1007
- url: string;
1008
- };
1009
- WebCheckResource: {
1010
- /** Format: uuid */
1011
- check_id: string;
1012
- /** Format: int64 */
1013
- interval_seconds: number;
1014
- last_error: string;
1015
- /** Format: int64 */
1016
- response_time_threshold_seconds: number;
1017
- result: components["schemas"]["WebCheckResultResource"];
1018
- /** Format: int64 */
1019
- retries: number;
1020
- /** Format: uuid */
1021
- server_id: string;
1022
- steps: components["schemas"]["WebCheckStepResource"][] | null;
1023
- /** @enum {string} */
1024
- sync_status: "PENDING" | "ACTIVE" | "FAILED";
1025
- /** Format: int64 */
1026
- timeout_seconds: number;
1027
- };
1028
- WebCheckStepRequest: {
1029
- /** @description 状态码表达式,比如 200 或者 200,301-302;留空表示不检查状态码 */
1030
- expected_status_codes?: string;
1031
- follow_redirects?: boolean;
1032
- name: string;
1033
- /** @description 响应体里必须出现的字符串 */
1034
- required_pattern?: string;
1035
- url: string;
1036
- };
1037
- PutWebCheckRequestBody: {
1038
- /**
1039
- * Format: int64
1040
- * @description 0 表示用默认
1041
- */
1042
- interval_seconds?: number;
1043
- /**
1044
- * Format: int64
1045
- * @description 超过它算慢,0 表示不看响应时间
1046
- */
1047
- response_time_threshold_seconds?: number;
1048
- /** Format: int64 */
1049
- retries?: number;
1050
- steps: components["schemas"]["WebCheckStepRequest"][] | null;
1051
- /** Format: int64 */
1052
- timeout_seconds?: number;
1053
- };
1054
- WebCheckListResponseBody: {
1055
- items: components["schemas"]["WebCheckResource"][] | null;
1056
- };
1057
- SLIReportRowResource: {
1058
- /** Format: int64 */
1059
- downtime_seconds: number;
1060
- /**
1061
- * Format: int64
1062
- * @description 为负表示这个周期的额度已经超支
1063
- */
1064
- error_budget_seconds: number;
1065
- /**
1066
- * Format: int64
1067
- * @description 被计划内维护排除掉的那部分
1068
- */
1069
- excluded_downtime_seconds: number;
1070
- /** Format: date-time */
1071
- period_from: string;
1072
- /** Format: date-time */
1073
- period_to: string;
1074
- /** @description 空表示这一行是项目整体 */
1075
- server_id: string;
1076
- /** Format: double */
1077
- sli_percent: number;
1078
- /** Format: int64 */
1079
- uptime_seconds: number;
1080
- };
1081
- SLIReportResponseBody: {
1082
- rows: components["schemas"]["SLIReportRowResource"][] | null;
1083
- };
1084
- ScheduleWindowResource: {
1085
- /** Format: int64 */
1086
- end_time_seconds: number;
1087
- /** Format: int64 */
1088
- start_time_seconds: number;
1089
- /**
1090
- * Format: int64
1091
- * @description 星期几的位图,**周一是最低位**,与维护窗口同一套编码
1092
- */
1093
- weekdays: number;
1094
- };
1095
- SLOResource: {
1096
- /** Format: date-time */
1097
- effective_from: string;
1098
- last_error: string;
1099
- /** @enum {string} */
1100
- min_severity: "ANY" | "INFORMATION" | "WARNING" | "AVERAGE" | "HIGH" | "DISASTER";
1101
- name: string;
1102
- /** @enum {string} */
1103
- period: "DAILY" | "WEEKLY" | "MONTHLY" | "QUARTERLY" | "ANNUALLY";
1104
- /** Format: uuid */
1105
- project_id: string;
1106
- /** @description 空表示 7×24 全天候承诺 */
1107
- schedule: components["schemas"]["ScheduleWindowResource"][] | null;
1108
- /** Format: uuid */
1109
- slo_id: string;
1110
- /**
1111
- * Format: double
1112
- * @description 目标可用率,比如 99.9
1113
- */
1114
- slo_percent: number;
1115
- /** @enum {string} */
1116
- sync_status: "PENDING" | "ACTIVE" | "FAILED";
1117
- timezone: string;
1118
- };
1119
- ScheduleWindowRequest: {
1120
- /** Format: int64 */
1121
- end_time_seconds?: number;
1122
- /** Format: int64 */
1123
- start_time_seconds?: number;
1124
- /**
1125
- * Format: int64
1126
- * @description 星期几的位图,**周一是最低位**(1=周一 … 64=周日)
1127
- */
1128
- weekdays: number;
1129
- };
1130
- PutSLORequestBody: {
1131
- /** Format: date-time */
1132
- effective_from?: string;
1133
- /** @enum {string} */
1134
- min_severity: "ANY" | "INFORMATION" | "WARNING" | "AVERAGE" | "HIGH" | "DISASTER";
1135
- name: string;
1136
- /**
1137
- * @description 空即按月
1138
- * @enum {string}
1139
- */
1140
- period?: "DAILY" | "WEEKLY" | "MONTHLY" | "QUARTERLY" | "ANNUALLY";
1141
- schedule?: components["schemas"]["ScheduleWindowRequest"][] | null;
1142
- /** Format: uuid */
1143
- slo_id: string;
1144
- /**
1145
- * Format: double
1146
- * @description 目标可用率,比如 99.9;最多四位小数
1147
- */
1148
- slo_percent: number;
1149
- /** @description 决定统计周期的边界,即每个周期从哪一刻开始 */
1150
- timezone?: string;
1151
- };
1152
- };
1153
- responses: never;
1154
- parameters: never;
1155
- requestBodies: never;
1156
- headers: never;
1157
- pathItems: never;
1158
- }
1159
- export type $defs = Record<string, never>;
1160
- export interface operations {
1161
- "list-incidents": {
1162
- parameters: {
1163
- query?: {
1164
- /** @description 这一页最多返回多少条 */
1165
- limit?: number;
1166
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1167
- offset?: number;
1168
- /** @description 只看某一台机器的 */
1169
- server_id?: string;
1170
- incident_status?: "PROBLEM" | "RESOLVED";
1171
- /** @description 按不低于该等级匹配,而非精确匹配 */
1172
- min_severity?: "NOT_CLASSIFIED" | "INFORMATION" | "WARNING" | "AVERAGE" | "HIGH" | "DISASTER";
1173
- started_after?: string;
1174
- started_before?: string;
1175
- /** @description 与 [active_from, active_to] **有交集**的告警,给指标图叠加故障区间要的是这个 */
1176
- active_from?: string;
1177
- active_to?: string;
1178
- /** @description 形如 key 或 key=value,可重复;多个标签之间是与关系 */
1179
- tag?: string[] | null;
1180
- assignee_user_id?: string;
1181
- /** @description 有没有人在这边把它处理完,与 incident_status 无关 */
1182
- closed?: "true" | "false";
1183
- acknowledged?: "true" | "false";
1184
- unassigned?: "true" | "false";
1185
- keyword?: string;
1186
- };
1187
- header?: never;
1188
- path?: never;
1189
- cookie?: never;
1190
- };
1191
- requestBody?: never;
1192
- responses: {
1193
- /** @description OK */
1194
- 200: {
1195
- headers: {
1196
- [name: string]: unknown;
1197
- };
1198
- content: {
1199
- "application/json": components["schemas"]["LengthAwarePageIncidentResource"];
1200
- };
1201
- };
1202
- /** @description Error */
1203
- default: {
1204
- headers: {
1205
- [name: string]: unknown;
1206
- };
1207
- content: {
1208
- "application/json": components["schemas"]["Error"];
1209
- };
1210
- };
1211
- };
1212
- };
1213
- "get-incident": {
1214
- parameters: {
1215
- query?: never;
1216
- header?: never;
1217
- path: {
1218
- incidentId: string;
1219
- };
1220
- cookie?: never;
1221
- };
1222
- requestBody?: never;
1223
- responses: {
1224
- /** @description OK */
1225
- 200: {
1226
- headers: {
1227
- [name: string]: unknown;
1228
- };
1229
- content: {
1230
- "application/json": components["schemas"]["IncidentResource"];
1231
- };
1232
- };
1233
- /** @description Error */
1234
- default: {
1235
- headers: {
1236
- [name: string]: unknown;
1237
- };
1238
- content: {
1239
- "application/json": components["schemas"]["Error"];
1240
- };
1241
- };
1242
- };
1243
- };
1244
- "acknowledge-incident": {
1245
- parameters: {
1246
- query?: never;
1247
- header?: never;
1248
- path: {
1249
- incidentId: string;
1250
- };
1251
- cookie?: never;
1252
- };
1253
- requestBody: {
1254
- content: {
1255
- "application/json": components["schemas"]["AcknowledgeIncidentRequestBody"];
1256
- };
1257
- };
1258
- responses: {
1259
- /** @description OK */
1260
- 200: {
1261
- headers: {
1262
- [name: string]: unknown;
1263
- };
1264
- content: {
1265
- "application/json": components["schemas"]["IncidentResource"];
1266
- };
1267
- };
1268
- /** @description Error */
1269
- default: {
1270
- headers: {
1271
- [name: string]: unknown;
1272
- };
1273
- content: {
1274
- "application/json": components["schemas"]["Error"];
1275
- };
1276
- };
1277
- };
1278
- };
1279
- "assign-incident": {
1280
- parameters: {
1281
- query?: never;
1282
- header?: never;
1283
- path: {
1284
- incidentId: string;
1285
- };
1286
- cookie?: never;
1287
- };
1288
- requestBody: {
1289
- content: {
1290
- "application/json": components["schemas"]["AssignIncidentRequestBody"];
1291
- };
1292
- };
1293
- responses: {
1294
- /** @description OK */
1295
- 200: {
1296
- headers: {
1297
- [name: string]: unknown;
1298
- };
1299
- content: {
1300
- "application/json": components["schemas"]["IncidentResource"];
1301
- };
1302
- };
1303
- /** @description Error */
1304
- default: {
1305
- headers: {
1306
- [name: string]: unknown;
1307
- };
1308
- content: {
1309
- "application/json": components["schemas"]["Error"];
1310
- };
1311
- };
1312
- };
1313
- };
1314
- "close-incident": {
1315
- parameters: {
1316
- query?: never;
1317
- header?: never;
1318
- path: {
1319
- incidentId: string;
1320
- };
1321
- cookie?: never;
1322
- };
1323
- requestBody: {
1324
- content: {
1325
- "application/json": components["schemas"]["CloseIncidentRequestBody"];
1326
- };
1327
- };
1328
- responses: {
1329
- /** @description OK */
1330
- 200: {
1331
- headers: {
1332
- [name: string]: unknown;
1333
- };
1334
- content: {
1335
- "application/json": components["schemas"]["IncidentResource"];
1336
- };
1337
- };
1338
- /** @description Error */
1339
- default: {
1340
- headers: {
1341
- [name: string]: unknown;
1342
- };
1343
- content: {
1344
- "application/json": components["schemas"]["Error"];
1345
- };
1346
- };
1347
- };
1348
- };
1349
- "add-incident-comment": {
1350
- parameters: {
1351
- query?: never;
1352
- header?: never;
1353
- path: {
1354
- incidentId: string;
1355
- };
1356
- cookie?: never;
1357
- };
1358
- requestBody: {
1359
- content: {
1360
- "application/json": components["schemas"]["AddCommentRequestBody"];
1361
- };
1362
- };
1363
- responses: {
1364
- /** @description OK */
1365
- 200: {
1366
- headers: {
1367
- [name: string]: unknown;
1368
- };
1369
- content: {
1370
- "application/json": components["schemas"]["IncidentActivityResource"];
1371
- };
1372
- };
1373
- /** @description Error */
1374
- default: {
1375
- headers: {
1376
- [name: string]: unknown;
1377
- };
1378
- content: {
1379
- "application/json": components["schemas"]["Error"];
1380
- };
1381
- };
1382
- };
1383
- };
1384
- "set-incident-following": {
1385
- parameters: {
1386
- query?: never;
1387
- header?: never;
1388
- path: {
1389
- incidentId: string;
1390
- };
1391
- cookie?: never;
1392
- };
1393
- requestBody: {
1394
- content: {
1395
- "application/json": components["schemas"]["SetFollowingRequestBody"];
1396
- };
1397
- };
1398
- responses: {
1399
- /** @description OK */
1400
- 200: {
1401
- headers: {
1402
- [name: string]: unknown;
1403
- };
1404
- content: {
1405
- "application/json": components["schemas"]["IncidentResource"];
1406
- };
1407
- };
1408
- /** @description Error */
1409
- default: {
1410
- headers: {
1411
- [name: string]: unknown;
1412
- };
1413
- content: {
1414
- "application/json": components["schemas"]["Error"];
1415
- };
1416
- };
1417
- };
1418
- };
1419
- "reopen-incident": {
1420
- parameters: {
1421
- query?: never;
1422
- header?: never;
1423
- path: {
1424
- incidentId: string;
1425
- };
1426
- cookie?: never;
1427
- };
1428
- requestBody?: never;
1429
- responses: {
1430
- /** @description OK */
1431
- 200: {
1432
- headers: {
1433
- [name: string]: unknown;
1434
- };
1435
- content: {
1436
- "application/json": components["schemas"]["IncidentResource"];
1437
- };
1438
- };
1439
- /** @description Error */
1440
- default: {
1441
- headers: {
1442
- [name: string]: unknown;
1443
- };
1444
- content: {
1445
- "application/json": components["schemas"]["Error"];
1446
- };
1447
- };
1448
- };
1449
- };
1450
- "list-incident-timeline": {
1451
- parameters: {
1452
- query?: {
1453
- limit?: number;
1454
- /** @description 上一页返回的 next_cursor,空即从头开始 */
1455
- cursor?: string;
1456
- };
1457
- header?: never;
1458
- path: {
1459
- incidentId: string;
1460
- };
1461
- cookie?: never;
1462
- };
1463
- requestBody?: never;
1464
- responses: {
1465
- /** @description OK */
1466
- 200: {
1467
- headers: {
1468
- [name: string]: unknown;
1469
- };
1470
- content: {
1471
- "application/json": components["schemas"]["CursorPageIncidentActivityResource"];
1472
- };
1473
- };
1474
- /** @description Error */
1475
- default: {
1476
- headers: {
1477
- [name: string]: unknown;
1478
- };
1479
- content: {
1480
- "application/json": components["schemas"]["Error"];
1481
- };
1482
- };
1483
- };
1484
- };
1485
- "list-maintenance-windows": {
1486
- parameters: {
1487
- query?: never;
1488
- header?: never;
1489
- path?: never;
1490
- cookie?: never;
1491
- };
1492
- requestBody?: never;
1493
- responses: {
1494
- /** @description OK */
1495
- 200: {
1496
- headers: {
1497
- [name: string]: unknown;
1498
- };
1499
- content: {
1500
- "application/json": components["schemas"]["MaintenanceWindowListResponseBody"];
1501
- };
1502
- };
1503
- /** @description Error */
1504
- default: {
1505
- headers: {
1506
- [name: string]: unknown;
1507
- };
1508
- content: {
1509
- "application/json": components["schemas"]["Error"];
1510
- };
1511
- };
1512
- };
1513
- };
1514
- "get-maintenance-window": {
1515
- parameters: {
1516
- query?: never;
1517
- header?: never;
1518
- path: {
1519
- windowId: string;
1520
- };
1521
- cookie?: never;
1522
- };
1523
- requestBody?: never;
1524
- responses: {
1525
- /** @description OK */
1526
- 200: {
1527
- headers: {
1528
- [name: string]: unknown;
1529
- };
1530
- content: {
1531
- "application/json": components["schemas"]["MaintenanceWindowResource"];
1532
- };
1533
- };
1534
- /** @description Error */
1535
- default: {
1536
- headers: {
1537
- [name: string]: unknown;
1538
- };
1539
- content: {
1540
- "application/json": components["schemas"]["Error"];
1541
- };
1542
- };
1543
- };
1544
- };
1545
- "put-maintenance-window": {
1546
- parameters: {
1547
- query?: never;
1548
- header?: never;
1549
- path: {
1550
- windowId: string;
1551
- };
1552
- cookie?: never;
1553
- };
1554
- requestBody: {
1555
- content: {
1556
- "application/json": components["schemas"]["PutMaintenanceWindowRequestBody"];
1557
- };
1558
- };
1559
- responses: {
1560
- /** @description OK */
1561
- 200: {
1562
- headers: {
1563
- [name: string]: unknown;
1564
- };
1565
- content: {
1566
- "application/json": components["schemas"]["MaintenanceWindowResource"];
1567
- };
1568
- };
1569
- /** @description Error */
1570
- default: {
1571
- headers: {
1572
- [name: string]: unknown;
1573
- };
1574
- content: {
1575
- "application/json": components["schemas"]["Error"];
1576
- };
1577
- };
1578
- };
1579
- };
1580
- "delete-maintenance-window": {
1581
- parameters: {
1582
- query?: never;
1583
- header?: never;
1584
- path: {
1585
- windowId: string;
1586
- };
1587
- cookie?: never;
1588
- };
1589
- requestBody?: never;
1590
- responses: {
1591
- /** @description No Content */
1592
- 204: {
1593
- headers: {
1594
- [name: string]: unknown;
1595
- };
1596
- content?: never;
1597
- };
1598
- /** @description Error */
1599
- default: {
1600
- headers: {
1601
- [name: string]: unknown;
1602
- };
1603
- content: {
1604
- "application/json": components["schemas"]["Error"];
1605
- };
1606
- };
1607
- };
1608
- };
1609
- "get-project-overview": {
1610
- parameters: {
1611
- query?: never;
1612
- header?: never;
1613
- path?: never;
1614
- cookie?: never;
1615
- };
1616
- requestBody?: never;
1617
- responses: {
1618
- /** @description OK */
1619
- 200: {
1620
- headers: {
1621
- [name: string]: unknown;
1622
- };
1623
- content: {
1624
- "application/json": components["schemas"]["ProjectOverviewResource"];
1625
- };
1626
- };
1627
- /** @description Error */
1628
- default: {
1629
- headers: {
1630
- [name: string]: unknown;
1631
- };
1632
- content: {
1633
- "application/json": components["schemas"]["Error"];
1634
- };
1635
- };
1636
- };
1637
- };
1638
- "list-server-items": {
1639
- parameters: {
1640
- query?: {
1641
- /** @description 按 key 或名字模糊匹配 */
1642
- keyword?: string;
1643
- /** @description 形如 key 或 key=value,可重复。官方模板打好的 component 标签(cpu / memory / filesystem…)就是靠它筛 */
1644
- tag?: string[] | null;
1645
- };
1646
- header?: never;
1647
- path: {
1648
- serverId: string;
1649
- };
1650
- cookie?: never;
1651
- };
1652
- requestBody?: never;
1653
- responses: {
1654
- /** @description OK */
1655
- 200: {
1656
- headers: {
1657
- [name: string]: unknown;
1658
- };
1659
- content: {
1660
- "application/json": components["schemas"]["ItemListResponseBody"];
1661
- };
1662
- };
1663
- /** @description Error */
1664
- default: {
1665
- headers: {
1666
- [name: string]: unknown;
1667
- };
1668
- content: {
1669
- "application/json": components["schemas"]["Error"];
1670
- };
1671
- };
1672
- };
1673
- };
1674
- "get-server-metric": {
1675
- parameters: {
1676
- query?: {
1677
- /** @description **前缀匹配**:vfs.fs.size 一次拿回每个挂载点一条线。与 item_id 至少给一个 */
1678
- item_key?: string;
1679
- item_id?: string;
1680
- /** @description 不给就是一小时前 */
1681
- from?: string;
1682
- to?: string;
1683
- /** @description 降采样的桶数,0 表示原样返回采集到的数据点 */
1684
- max_points?: number;
1685
- /** @description 顺带取这些监控项当前生效的阈值线 */
1686
- include_thresholds?: boolean;
1687
- };
1688
- header?: never;
1689
- path: {
1690
- serverId: string;
1691
- };
1692
- cookie?: never;
1693
- };
1694
- requestBody?: never;
1695
- responses: {
1696
- /** @description OK */
1697
- 200: {
1698
- headers: {
1699
- [name: string]: unknown;
1700
- };
1701
- content: {
1702
- "application/json": components["schemas"]["MetricResponseBody"];
1703
- };
1704
- };
1705
- /** @description Error */
1706
- default: {
1707
- headers: {
1708
- [name: string]: unknown;
1709
- };
1710
- content: {
1711
- "application/json": components["schemas"]["Error"];
1712
- };
1713
- };
1714
- };
1715
- };
1716
- "get-server-resources": {
1717
- parameters: {
1718
- query?: never;
1719
- header?: never;
1720
- path: {
1721
- serverId: string;
1722
- };
1723
- cookie?: never;
1724
- };
1725
- requestBody?: never;
1726
- responses: {
1727
- /** @description OK */
1728
- 200: {
1729
- headers: {
1730
- [name: string]: unknown;
1731
- };
1732
- content: {
1733
- "application/json": components["schemas"]["ServerResourcesResource"];
1734
- };
1735
- };
1736
- /** @description Error */
1737
- default: {
1738
- headers: {
1739
- [name: string]: unknown;
1740
- };
1741
- content: {
1742
- "application/json": components["schemas"]["Error"];
1743
- };
1744
- };
1745
- };
1746
- };
1747
- "get-server-snapshot": {
1748
- parameters: {
1749
- query?: never;
1750
- header?: never;
1751
- path: {
1752
- serverId: string;
1753
- };
1754
- cookie?: never;
1755
- };
1756
- requestBody?: never;
1757
- responses: {
1758
- /** @description OK */
1759
- 200: {
1760
- headers: {
1761
- [name: string]: unknown;
1762
- };
1763
- content: {
1764
- "application/json": components["schemas"]["SnapshotResource"];
1765
- };
1766
- };
1767
- /** @description Error */
1768
- default: {
1769
- headers: {
1770
- [name: string]: unknown;
1771
- };
1772
- content: {
1773
- "application/json": components["schemas"]["Error"];
1774
- };
1775
- };
1776
- };
1777
- };
1778
- "list-project-top-items": {
1779
- parameters: {
1780
- query: {
1781
- kind: "CPU_UTILIZATION" | "MEMORY_UTILIZATION" | "ROOT_FILESYSTEM_USED";
1782
- /** @description 0 表示用默认 */
1783
- limit?: number;
1784
- };
1785
- header?: never;
1786
- path?: never;
1787
- cookie?: never;
1788
- };
1789
- requestBody?: never;
1790
- responses: {
1791
- /** @description OK */
1792
- 200: {
1793
- headers: {
1794
- [name: string]: unknown;
1795
- };
1796
- content: {
1797
- "application/json": components["schemas"]["TopItemListResponseBody"];
1798
- };
1799
- };
1800
- /** @description Error */
1801
- default: {
1802
- headers: {
1803
- [name: string]: unknown;
1804
- };
1805
- content: {
1806
- "application/json": components["schemas"]["Error"];
1807
- };
1808
- };
1809
- };
1810
- };
1811
- "list-servers": {
1812
- parameters: {
1813
- query?: {
1814
- /** @description 这一页最多返回多少条 */
1815
- limit?: number;
1816
- /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1817
- offset?: number;
1818
- /** @description 按名字或地址模糊匹配 */
1819
- keyword?: string;
1820
- monitoring_status?: "PENDING" | "ACTIVE" | "DISABLED" | "FAILED";
1821
- };
1822
- header?: never;
1823
- path?: never;
1824
- cookie?: never;
1825
- };
1826
- requestBody?: never;
1827
- responses: {
1828
- /** @description OK */
1829
- 200: {
1830
- headers: {
1831
- [name: string]: unknown;
1832
- };
1833
- content: {
1834
- "application/json": components["schemas"]["LengthAwarePageServerResource"];
1835
- };
1836
- };
1837
- /** @description Error */
1838
- default: {
1839
- headers: {
1840
- [name: string]: unknown;
1841
- };
1842
- content: {
1843
- "application/json": components["schemas"]["Error"];
1844
- };
1845
- };
1846
- };
1847
- };
1848
- "get-server": {
1849
- parameters: {
1850
- query?: never;
1851
- header?: never;
1852
- path: {
1853
- serverId: string;
1854
- };
1855
- cookie?: never;
1856
- };
1857
- requestBody?: never;
1858
- responses: {
1859
- /** @description OK */
1860
- 200: {
1861
- headers: {
1862
- [name: string]: unknown;
1863
- };
1864
- content: {
1865
- "application/json": components["schemas"]["ServerResource"];
1866
- };
1867
- };
1868
- /** @description Error */
1869
- default: {
1870
- headers: {
1871
- [name: string]: unknown;
1872
- };
1873
- content: {
1874
- "application/json": components["schemas"]["Error"];
1875
- };
1876
- };
1877
- };
1878
- };
1879
- "enable-server-monitoring": {
1880
- parameters: {
1881
- query?: never;
1882
- header?: never;
1883
- path: {
1884
- serverId: string;
1885
- };
1886
- cookie?: never;
1887
- };
1888
- requestBody: {
1889
- content: {
1890
- "application/json": components["schemas"]["EnableMonitoringRequestBody"];
1891
- };
1892
- };
1893
- responses: {
1894
- /** @description OK */
1895
- 200: {
1896
- headers: {
1897
- [name: string]: unknown;
1898
- };
1899
- content: {
1900
- "application/json": components["schemas"]["ServerEnrollmentResponseBody"];
1901
- };
1902
- };
1903
- /** @description Error */
1904
- default: {
1905
- headers: {
1906
- [name: string]: unknown;
1907
- };
1908
- content: {
1909
- "application/json": components["schemas"]["Error"];
1910
- };
1911
- };
1912
- };
1913
- };
1914
- "delete-server": {
1915
- parameters: {
1916
- query?: never;
1917
- header?: never;
1918
- path: {
1919
- serverId: string;
1920
- };
1921
- cookie?: never;
1922
- };
1923
- requestBody?: never;
1924
- responses: {
1925
- /** @description No Content */
1926
- 204: {
1927
- headers: {
1928
- [name: string]: unknown;
1929
- };
1930
- content?: never;
1931
- };
1932
- /** @description Error */
1933
- default: {
1934
- headers: {
1935
- [name: string]: unknown;
1936
- };
1937
- content: {
1938
- "application/json": components["schemas"]["Error"];
1939
- };
1940
- };
1941
- };
1942
- };
1943
- "update-server": {
1944
- parameters: {
1945
- query?: never;
1946
- header?: never;
1947
- path: {
1948
- serverId: string;
1949
- };
1950
- cookie?: never;
1951
- };
1952
- requestBody: {
1953
- content: {
1954
- "application/json": components["schemas"]["UpdateServerRequestBody"];
1955
- };
1956
- };
1957
- responses: {
1958
- /** @description OK */
1959
- 200: {
1960
- headers: {
1961
- [name: string]: unknown;
1962
- };
1963
- content: {
1964
- "application/json": components["schemas"]["ServerResource"];
1965
- };
1966
- };
1967
- /** @description Error */
1968
- default: {
1969
- headers: {
1970
- [name: string]: unknown;
1971
- };
1972
- content: {
1973
- "application/json": components["schemas"]["Error"];
1974
- };
1975
- };
1976
- };
1977
- };
1978
- "disable-server-monitoring": {
1979
- parameters: {
1980
- query?: never;
1981
- header?: never;
1982
- path: {
1983
- serverId: string;
1984
- };
1985
- cookie?: never;
1986
- };
1987
- requestBody?: never;
1988
- responses: {
1989
- /** @description No Content */
1990
- 204: {
1991
- headers: {
1992
- [name: string]: unknown;
1993
- };
1994
- content?: never;
1995
- };
1996
- /** @description Error */
1997
- default: {
1998
- headers: {
1999
- [name: string]: unknown;
2000
- };
2001
- content: {
2002
- "application/json": components["schemas"]["Error"];
2003
- };
2004
- };
2005
- };
2006
- };
2007
- "rotate-agent-psk": {
2008
- parameters: {
2009
- query?: never;
2010
- header?: never;
2011
- path: {
2012
- serverId: string;
2013
- };
2014
- cookie?: never;
2015
- };
2016
- requestBody?: never;
2017
- responses: {
2018
- /** @description OK */
2019
- 200: {
2020
- headers: {
2021
- [name: string]: unknown;
2022
- };
2023
- content: {
2024
- "application/json": components["schemas"]["EnrollmentResource"];
2025
- };
2026
- };
2027
- /** @description Error */
2028
- default: {
2029
- headers: {
2030
- [name: string]: unknown;
2031
- };
2032
- content: {
2033
- "application/json": components["schemas"]["Error"];
2034
- };
2035
- };
2036
- };
2037
- };
2038
- "get-web-check": {
2039
- parameters: {
2040
- query?: never;
2041
- header?: never;
2042
- path: {
2043
- serverId: string;
2044
- checkId: string;
2045
- };
2046
- cookie?: never;
2047
- };
2048
- requestBody?: never;
2049
- responses: {
2050
- /** @description OK */
2051
- 200: {
2052
- headers: {
2053
- [name: string]: unknown;
2054
- };
2055
- content: {
2056
- "application/json": components["schemas"]["WebCheckResource"];
2057
- };
2058
- };
2059
- /** @description Error */
2060
- default: {
2061
- headers: {
2062
- [name: string]: unknown;
2063
- };
2064
- content: {
2065
- "application/json": components["schemas"]["Error"];
2066
- };
2067
- };
2068
- };
2069
- };
2070
- "put-web-check": {
2071
- parameters: {
2072
- query?: never;
2073
- header?: never;
2074
- path: {
2075
- serverId: string;
2076
- checkId: string;
2077
- };
2078
- cookie?: never;
2079
- };
2080
- requestBody: {
2081
- content: {
2082
- "application/json": components["schemas"]["PutWebCheckRequestBody"];
2083
- };
2084
- };
2085
- responses: {
2086
- /** @description OK */
2087
- 200: {
2088
- headers: {
2089
- [name: string]: unknown;
2090
- };
2091
- content: {
2092
- "application/json": components["schemas"]["WebCheckResource"];
2093
- };
2094
- };
2095
- /** @description Error */
2096
- default: {
2097
- headers: {
2098
- [name: string]: unknown;
2099
- };
2100
- content: {
2101
- "application/json": components["schemas"]["Error"];
2102
- };
2103
- };
2104
- };
2105
- };
2106
- "delete-web-check": {
2107
- parameters: {
2108
- query?: never;
2109
- header?: never;
2110
- path: {
2111
- serverId: string;
2112
- checkId: string;
2113
- };
2114
- cookie?: never;
2115
- };
2116
- requestBody?: never;
2117
- responses: {
2118
- /** @description No Content */
2119
- 204: {
2120
- headers: {
2121
- [name: string]: unknown;
2122
- };
2123
- content?: never;
2124
- };
2125
- /** @description Error */
2126
- default: {
2127
- headers: {
2128
- [name: string]: unknown;
2129
- };
2130
- content: {
2131
- "application/json": components["schemas"]["Error"];
2132
- };
2133
- };
2134
- };
2135
- };
2136
- "list-web-checks": {
2137
- parameters: {
2138
- query?: {
2139
- /** @description 只看某一台机器的检查;不给就是整个项目的 */
2140
- server_id?: string;
2141
- };
2142
- header?: never;
2143
- path?: never;
2144
- cookie?: never;
2145
- };
2146
- requestBody?: never;
2147
- responses: {
2148
- /** @description OK */
2149
- 200: {
2150
- headers: {
2151
- [name: string]: unknown;
2152
- };
2153
- content: {
2154
- "application/json": components["schemas"]["WebCheckListResponseBody"];
2155
- };
2156
- };
2157
- /** @description Error */
2158
- default: {
2159
- headers: {
2160
- [name: string]: unknown;
2161
- };
2162
- content: {
2163
- "application/json": components["schemas"]["Error"];
2164
- };
2165
- };
2166
- };
2167
- };
2168
- "get-sli-report": {
2169
- parameters: {
2170
- query?: {
2171
- from?: string;
2172
- to?: string;
2173
- /** @description 取最近 N 个完整周期,与 from/to 二选一 */
2174
- periods?: number;
2175
- };
2176
- header?: never;
2177
- path?: never;
2178
- cookie?: never;
2179
- };
2180
- requestBody?: never;
2181
- responses: {
2182
- /** @description OK */
2183
- 200: {
2184
- headers: {
2185
- [name: string]: unknown;
2186
- };
2187
- content: {
2188
- "application/json": components["schemas"]["SLIReportResponseBody"];
2189
- };
2190
- };
2191
- /** @description Error */
2192
- default: {
2193
- headers: {
2194
- [name: string]: unknown;
2195
- };
2196
- content: {
2197
- "application/json": components["schemas"]["Error"];
2198
- };
2199
- };
2200
- };
2201
- };
2202
- "get-slo": {
2203
- parameters: {
2204
- query?: never;
2205
- header?: never;
2206
- path?: never;
2207
- cookie?: never;
2208
- };
2209
- requestBody?: never;
2210
- responses: {
2211
- /** @description OK */
2212
- 200: {
2213
- headers: {
2214
- [name: string]: unknown;
2215
- };
2216
- content: {
2217
- "application/json": components["schemas"]["SLOResource"];
2218
- };
2219
- };
2220
- /** @description Error */
2221
- default: {
2222
- headers: {
2223
- [name: string]: unknown;
2224
- };
2225
- content: {
2226
- "application/json": components["schemas"]["Error"];
2227
- };
2228
- };
2229
- };
2230
- };
2231
- "put-slo": {
2232
- parameters: {
2233
- query?: never;
2234
- header?: never;
2235
- path?: never;
2236
- cookie?: never;
2237
- };
2238
- requestBody: {
2239
- content: {
2240
- "application/json": components["schemas"]["PutSLORequestBody"];
2241
- };
2242
- };
2243
- responses: {
2244
- /** @description OK */
2245
- 200: {
2246
- headers: {
2247
- [name: string]: unknown;
2248
- };
2249
- content: {
2250
- "application/json": components["schemas"]["SLOResource"];
2251
- };
2252
- };
2253
- /** @description Error */
2254
- default: {
2255
- headers: {
2256
- [name: string]: unknown;
2257
- };
2258
- content: {
2259
- "application/json": components["schemas"]["Error"];
2260
- };
2261
- };
2262
- };
2263
- };
2264
- "delete-slo": {
2265
- parameters: {
2266
- query?: never;
2267
- header?: never;
2268
- path?: never;
2269
- cookie?: never;
2270
- };
2271
- requestBody?: never;
2272
- responses: {
2273
- /** @description No Content */
2274
- 204: {
2275
- headers: {
2276
- [name: string]: unknown;
2277
- };
2278
- content?: never;
2279
- };
2280
- /** @description Error */
2281
- default: {
2282
- headers: {
2283
- [name: string]: unknown;
2284
- };
2285
- content: {
2286
- "application/json": components["schemas"]["Error"];
2287
- };
2288
- };
2289
- };
2290
- };
2291
- }