@leaflow/sdk 0.0.0-dev.11.g7f2d603

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.
@@ -0,0 +1,2292 @@
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
+ /** @description null 表示这个检查还一轮都没跑过。零值会把「还不知道」显示成「响应 0 秒、状态码 0」 */
1018
+ result: components["schemas"]["WebCheckResultResource"] | null;
1019
+ /** Format: int64 */
1020
+ retries: number;
1021
+ /** Format: uuid */
1022
+ server_id: string;
1023
+ steps: components["schemas"]["WebCheckStepResource"][] | null;
1024
+ /** @enum {string} */
1025
+ sync_status: "PENDING" | "ACTIVE" | "FAILED";
1026
+ /** Format: int64 */
1027
+ timeout_seconds: number;
1028
+ };
1029
+ WebCheckStepRequest: {
1030
+ /** @description 状态码表达式,比如 200 或者 200,301-302;留空表示不检查状态码 */
1031
+ expected_status_codes?: string;
1032
+ follow_redirects?: boolean;
1033
+ name: string;
1034
+ /** @description 响应体里必须出现的字符串 */
1035
+ required_pattern?: string;
1036
+ url: string;
1037
+ };
1038
+ PutWebCheckRequestBody: {
1039
+ /**
1040
+ * Format: int64
1041
+ * @description 0 表示用默认
1042
+ */
1043
+ interval_seconds?: number;
1044
+ /**
1045
+ * Format: int64
1046
+ * @description 超过它算慢,0 表示不看响应时间
1047
+ */
1048
+ response_time_threshold_seconds?: number;
1049
+ /** Format: int64 */
1050
+ retries?: number;
1051
+ steps: components["schemas"]["WebCheckStepRequest"][] | null;
1052
+ /** Format: int64 */
1053
+ timeout_seconds?: number;
1054
+ };
1055
+ WebCheckListResponseBody: {
1056
+ items: components["schemas"]["WebCheckResource"][] | null;
1057
+ };
1058
+ SLIReportRowResource: {
1059
+ /** Format: int64 */
1060
+ downtime_seconds: number;
1061
+ /**
1062
+ * Format: int64
1063
+ * @description 为负表示这个周期的额度已经超支
1064
+ */
1065
+ error_budget_seconds: number;
1066
+ /**
1067
+ * Format: int64
1068
+ * @description 被计划内维护排除掉的那部分
1069
+ */
1070
+ excluded_downtime_seconds: number;
1071
+ /** Format: date-time */
1072
+ period_from: string;
1073
+ /** Format: date-time */
1074
+ period_to: string;
1075
+ /** @description 空表示这一行是项目整体 */
1076
+ server_id: string;
1077
+ /** Format: double */
1078
+ sli_percent: number;
1079
+ /** Format: int64 */
1080
+ uptime_seconds: number;
1081
+ };
1082
+ SLIReportResponseBody: {
1083
+ rows: components["schemas"]["SLIReportRowResource"][] | null;
1084
+ };
1085
+ ScheduleWindowResource: {
1086
+ /** Format: int64 */
1087
+ end_time_seconds: number;
1088
+ /** Format: int64 */
1089
+ start_time_seconds: number;
1090
+ /**
1091
+ * Format: int64
1092
+ * @description 星期几的位图,**周一是最低位**,与维护窗口同一套编码
1093
+ */
1094
+ weekdays: number;
1095
+ };
1096
+ SLOResource: {
1097
+ /** Format: date-time */
1098
+ effective_from: string;
1099
+ last_error: string;
1100
+ /** @enum {string} */
1101
+ min_severity: "ANY" | "INFORMATION" | "WARNING" | "AVERAGE" | "HIGH" | "DISASTER";
1102
+ name: string;
1103
+ /** @enum {string} */
1104
+ period: "DAILY" | "WEEKLY" | "MONTHLY" | "QUARTERLY" | "ANNUALLY";
1105
+ /** Format: uuid */
1106
+ project_id: string;
1107
+ /** @description 空表示 7×24 全天候承诺 */
1108
+ schedule: components["schemas"]["ScheduleWindowResource"][] | null;
1109
+ /** Format: uuid */
1110
+ slo_id: string;
1111
+ /**
1112
+ * Format: double
1113
+ * @description 目标可用率,比如 99.9
1114
+ */
1115
+ slo_percent: number;
1116
+ /** @enum {string} */
1117
+ sync_status: "PENDING" | "ACTIVE" | "FAILED";
1118
+ timezone: string;
1119
+ };
1120
+ ScheduleWindowRequest: {
1121
+ /** Format: int64 */
1122
+ end_time_seconds?: number;
1123
+ /** Format: int64 */
1124
+ start_time_seconds?: number;
1125
+ /**
1126
+ * Format: int64
1127
+ * @description 星期几的位图,**周一是最低位**(1=周一 … 64=周日)
1128
+ */
1129
+ weekdays: number;
1130
+ };
1131
+ PutSLORequestBody: {
1132
+ /** Format: date-time */
1133
+ effective_from?: string;
1134
+ /** @enum {string} */
1135
+ min_severity: "ANY" | "INFORMATION" | "WARNING" | "AVERAGE" | "HIGH" | "DISASTER";
1136
+ name: string;
1137
+ /**
1138
+ * @description 空即按月
1139
+ * @enum {string}
1140
+ */
1141
+ period?: "DAILY" | "WEEKLY" | "MONTHLY" | "QUARTERLY" | "ANNUALLY";
1142
+ schedule?: components["schemas"]["ScheduleWindowRequest"][] | null;
1143
+ /** Format: uuid */
1144
+ slo_id: string;
1145
+ /**
1146
+ * Format: double
1147
+ * @description 目标可用率,比如 99.9;最多四位小数
1148
+ */
1149
+ slo_percent: number;
1150
+ /** @description 决定统计周期的边界,即每个周期从哪一刻开始 */
1151
+ timezone?: string;
1152
+ };
1153
+ };
1154
+ responses: never;
1155
+ parameters: never;
1156
+ requestBodies: never;
1157
+ headers: never;
1158
+ pathItems: never;
1159
+ }
1160
+ export type $defs = Record<string, never>;
1161
+ export interface operations {
1162
+ "list-incidents": {
1163
+ parameters: {
1164
+ query?: {
1165
+ /** @description 这一页最多返回多少条 */
1166
+ limit?: number;
1167
+ /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1168
+ offset?: number;
1169
+ /** @description 只看某一台机器的 */
1170
+ server_id?: string;
1171
+ incident_status?: "PROBLEM" | "RESOLVED";
1172
+ /** @description 按不低于该等级匹配,而非精确匹配 */
1173
+ min_severity?: "NOT_CLASSIFIED" | "INFORMATION" | "WARNING" | "AVERAGE" | "HIGH" | "DISASTER";
1174
+ started_after?: string;
1175
+ started_before?: string;
1176
+ /** @description 与 [active_from, active_to] **有交集**的告警,给指标图叠加故障区间要的是这个 */
1177
+ active_from?: string;
1178
+ active_to?: string;
1179
+ /** @description 形如 key 或 key=value,可重复;多个标签之间是与关系 */
1180
+ tag?: string[] | null;
1181
+ assignee_user_id?: string;
1182
+ /** @description 有没有人在这边把它处理完,与 incident_status 无关 */
1183
+ closed?: "true" | "false";
1184
+ acknowledged?: "true" | "false";
1185
+ unassigned?: "true" | "false";
1186
+ keyword?: string;
1187
+ };
1188
+ header?: never;
1189
+ path?: never;
1190
+ cookie?: never;
1191
+ };
1192
+ requestBody?: never;
1193
+ responses: {
1194
+ /** @description OK */
1195
+ 200: {
1196
+ headers: {
1197
+ [name: string]: unknown;
1198
+ };
1199
+ content: {
1200
+ "application/json": components["schemas"]["LengthAwarePageIncidentResource"];
1201
+ };
1202
+ };
1203
+ /** @description Error */
1204
+ default: {
1205
+ headers: {
1206
+ [name: string]: unknown;
1207
+ };
1208
+ content: {
1209
+ "application/json": components["schemas"]["Error"];
1210
+ };
1211
+ };
1212
+ };
1213
+ };
1214
+ "get-incident": {
1215
+ parameters: {
1216
+ query?: never;
1217
+ header?: never;
1218
+ path: {
1219
+ incidentId: string;
1220
+ };
1221
+ cookie?: never;
1222
+ };
1223
+ requestBody?: never;
1224
+ responses: {
1225
+ /** @description OK */
1226
+ 200: {
1227
+ headers: {
1228
+ [name: string]: unknown;
1229
+ };
1230
+ content: {
1231
+ "application/json": components["schemas"]["IncidentResource"];
1232
+ };
1233
+ };
1234
+ /** @description Error */
1235
+ default: {
1236
+ headers: {
1237
+ [name: string]: unknown;
1238
+ };
1239
+ content: {
1240
+ "application/json": components["schemas"]["Error"];
1241
+ };
1242
+ };
1243
+ };
1244
+ };
1245
+ "acknowledge-incident": {
1246
+ parameters: {
1247
+ query?: never;
1248
+ header?: never;
1249
+ path: {
1250
+ incidentId: string;
1251
+ };
1252
+ cookie?: never;
1253
+ };
1254
+ requestBody: {
1255
+ content: {
1256
+ "application/json": components["schemas"]["AcknowledgeIncidentRequestBody"];
1257
+ };
1258
+ };
1259
+ responses: {
1260
+ /** @description OK */
1261
+ 200: {
1262
+ headers: {
1263
+ [name: string]: unknown;
1264
+ };
1265
+ content: {
1266
+ "application/json": components["schemas"]["IncidentResource"];
1267
+ };
1268
+ };
1269
+ /** @description Error */
1270
+ default: {
1271
+ headers: {
1272
+ [name: string]: unknown;
1273
+ };
1274
+ content: {
1275
+ "application/json": components["schemas"]["Error"];
1276
+ };
1277
+ };
1278
+ };
1279
+ };
1280
+ "assign-incident": {
1281
+ parameters: {
1282
+ query?: never;
1283
+ header?: never;
1284
+ path: {
1285
+ incidentId: string;
1286
+ };
1287
+ cookie?: never;
1288
+ };
1289
+ requestBody: {
1290
+ content: {
1291
+ "application/json": components["schemas"]["AssignIncidentRequestBody"];
1292
+ };
1293
+ };
1294
+ responses: {
1295
+ /** @description OK */
1296
+ 200: {
1297
+ headers: {
1298
+ [name: string]: unknown;
1299
+ };
1300
+ content: {
1301
+ "application/json": components["schemas"]["IncidentResource"];
1302
+ };
1303
+ };
1304
+ /** @description Error */
1305
+ default: {
1306
+ headers: {
1307
+ [name: string]: unknown;
1308
+ };
1309
+ content: {
1310
+ "application/json": components["schemas"]["Error"];
1311
+ };
1312
+ };
1313
+ };
1314
+ };
1315
+ "close-incident": {
1316
+ parameters: {
1317
+ query?: never;
1318
+ header?: never;
1319
+ path: {
1320
+ incidentId: string;
1321
+ };
1322
+ cookie?: never;
1323
+ };
1324
+ requestBody: {
1325
+ content: {
1326
+ "application/json": components["schemas"]["CloseIncidentRequestBody"];
1327
+ };
1328
+ };
1329
+ responses: {
1330
+ /** @description OK */
1331
+ 200: {
1332
+ headers: {
1333
+ [name: string]: unknown;
1334
+ };
1335
+ content: {
1336
+ "application/json": components["schemas"]["IncidentResource"];
1337
+ };
1338
+ };
1339
+ /** @description Error */
1340
+ default: {
1341
+ headers: {
1342
+ [name: string]: unknown;
1343
+ };
1344
+ content: {
1345
+ "application/json": components["schemas"]["Error"];
1346
+ };
1347
+ };
1348
+ };
1349
+ };
1350
+ "add-incident-comment": {
1351
+ parameters: {
1352
+ query?: never;
1353
+ header?: never;
1354
+ path: {
1355
+ incidentId: string;
1356
+ };
1357
+ cookie?: never;
1358
+ };
1359
+ requestBody: {
1360
+ content: {
1361
+ "application/json": components["schemas"]["AddCommentRequestBody"];
1362
+ };
1363
+ };
1364
+ responses: {
1365
+ /** @description OK */
1366
+ 200: {
1367
+ headers: {
1368
+ [name: string]: unknown;
1369
+ };
1370
+ content: {
1371
+ "application/json": components["schemas"]["IncidentActivityResource"];
1372
+ };
1373
+ };
1374
+ /** @description Error */
1375
+ default: {
1376
+ headers: {
1377
+ [name: string]: unknown;
1378
+ };
1379
+ content: {
1380
+ "application/json": components["schemas"]["Error"];
1381
+ };
1382
+ };
1383
+ };
1384
+ };
1385
+ "set-incident-following": {
1386
+ parameters: {
1387
+ query?: never;
1388
+ header?: never;
1389
+ path: {
1390
+ incidentId: string;
1391
+ };
1392
+ cookie?: never;
1393
+ };
1394
+ requestBody: {
1395
+ content: {
1396
+ "application/json": components["schemas"]["SetFollowingRequestBody"];
1397
+ };
1398
+ };
1399
+ responses: {
1400
+ /** @description OK */
1401
+ 200: {
1402
+ headers: {
1403
+ [name: string]: unknown;
1404
+ };
1405
+ content: {
1406
+ "application/json": components["schemas"]["IncidentResource"];
1407
+ };
1408
+ };
1409
+ /** @description Error */
1410
+ default: {
1411
+ headers: {
1412
+ [name: string]: unknown;
1413
+ };
1414
+ content: {
1415
+ "application/json": components["schemas"]["Error"];
1416
+ };
1417
+ };
1418
+ };
1419
+ };
1420
+ "reopen-incident": {
1421
+ parameters: {
1422
+ query?: never;
1423
+ header?: never;
1424
+ path: {
1425
+ incidentId: string;
1426
+ };
1427
+ cookie?: never;
1428
+ };
1429
+ requestBody?: never;
1430
+ responses: {
1431
+ /** @description OK */
1432
+ 200: {
1433
+ headers: {
1434
+ [name: string]: unknown;
1435
+ };
1436
+ content: {
1437
+ "application/json": components["schemas"]["IncidentResource"];
1438
+ };
1439
+ };
1440
+ /** @description Error */
1441
+ default: {
1442
+ headers: {
1443
+ [name: string]: unknown;
1444
+ };
1445
+ content: {
1446
+ "application/json": components["schemas"]["Error"];
1447
+ };
1448
+ };
1449
+ };
1450
+ };
1451
+ "list-incident-timeline": {
1452
+ parameters: {
1453
+ query?: {
1454
+ limit?: number;
1455
+ /** @description 上一页返回的 next_cursor,空即从头开始 */
1456
+ cursor?: string;
1457
+ };
1458
+ header?: never;
1459
+ path: {
1460
+ incidentId: string;
1461
+ };
1462
+ cookie?: never;
1463
+ };
1464
+ requestBody?: never;
1465
+ responses: {
1466
+ /** @description OK */
1467
+ 200: {
1468
+ headers: {
1469
+ [name: string]: unknown;
1470
+ };
1471
+ content: {
1472
+ "application/json": components["schemas"]["CursorPageIncidentActivityResource"];
1473
+ };
1474
+ };
1475
+ /** @description Error */
1476
+ default: {
1477
+ headers: {
1478
+ [name: string]: unknown;
1479
+ };
1480
+ content: {
1481
+ "application/json": components["schemas"]["Error"];
1482
+ };
1483
+ };
1484
+ };
1485
+ };
1486
+ "list-maintenance-windows": {
1487
+ parameters: {
1488
+ query?: never;
1489
+ header?: never;
1490
+ path?: never;
1491
+ cookie?: never;
1492
+ };
1493
+ requestBody?: never;
1494
+ responses: {
1495
+ /** @description OK */
1496
+ 200: {
1497
+ headers: {
1498
+ [name: string]: unknown;
1499
+ };
1500
+ content: {
1501
+ "application/json": components["schemas"]["MaintenanceWindowListResponseBody"];
1502
+ };
1503
+ };
1504
+ /** @description Error */
1505
+ default: {
1506
+ headers: {
1507
+ [name: string]: unknown;
1508
+ };
1509
+ content: {
1510
+ "application/json": components["schemas"]["Error"];
1511
+ };
1512
+ };
1513
+ };
1514
+ };
1515
+ "get-maintenance-window": {
1516
+ parameters: {
1517
+ query?: never;
1518
+ header?: never;
1519
+ path: {
1520
+ windowId: string;
1521
+ };
1522
+ cookie?: never;
1523
+ };
1524
+ requestBody?: never;
1525
+ responses: {
1526
+ /** @description OK */
1527
+ 200: {
1528
+ headers: {
1529
+ [name: string]: unknown;
1530
+ };
1531
+ content: {
1532
+ "application/json": components["schemas"]["MaintenanceWindowResource"];
1533
+ };
1534
+ };
1535
+ /** @description Error */
1536
+ default: {
1537
+ headers: {
1538
+ [name: string]: unknown;
1539
+ };
1540
+ content: {
1541
+ "application/json": components["schemas"]["Error"];
1542
+ };
1543
+ };
1544
+ };
1545
+ };
1546
+ "put-maintenance-window": {
1547
+ parameters: {
1548
+ query?: never;
1549
+ header?: never;
1550
+ path: {
1551
+ windowId: string;
1552
+ };
1553
+ cookie?: never;
1554
+ };
1555
+ requestBody: {
1556
+ content: {
1557
+ "application/json": components["schemas"]["PutMaintenanceWindowRequestBody"];
1558
+ };
1559
+ };
1560
+ responses: {
1561
+ /** @description OK */
1562
+ 200: {
1563
+ headers: {
1564
+ [name: string]: unknown;
1565
+ };
1566
+ content: {
1567
+ "application/json": components["schemas"]["MaintenanceWindowResource"];
1568
+ };
1569
+ };
1570
+ /** @description Error */
1571
+ default: {
1572
+ headers: {
1573
+ [name: string]: unknown;
1574
+ };
1575
+ content: {
1576
+ "application/json": components["schemas"]["Error"];
1577
+ };
1578
+ };
1579
+ };
1580
+ };
1581
+ "delete-maintenance-window": {
1582
+ parameters: {
1583
+ query?: never;
1584
+ header?: never;
1585
+ path: {
1586
+ windowId: string;
1587
+ };
1588
+ cookie?: never;
1589
+ };
1590
+ requestBody?: never;
1591
+ responses: {
1592
+ /** @description No Content */
1593
+ 204: {
1594
+ headers: {
1595
+ [name: string]: unknown;
1596
+ };
1597
+ content?: never;
1598
+ };
1599
+ /** @description Error */
1600
+ default: {
1601
+ headers: {
1602
+ [name: string]: unknown;
1603
+ };
1604
+ content: {
1605
+ "application/json": components["schemas"]["Error"];
1606
+ };
1607
+ };
1608
+ };
1609
+ };
1610
+ "get-project-overview": {
1611
+ parameters: {
1612
+ query?: never;
1613
+ header?: never;
1614
+ path?: never;
1615
+ cookie?: never;
1616
+ };
1617
+ requestBody?: never;
1618
+ responses: {
1619
+ /** @description OK */
1620
+ 200: {
1621
+ headers: {
1622
+ [name: string]: unknown;
1623
+ };
1624
+ content: {
1625
+ "application/json": components["schemas"]["ProjectOverviewResource"];
1626
+ };
1627
+ };
1628
+ /** @description Error */
1629
+ default: {
1630
+ headers: {
1631
+ [name: string]: unknown;
1632
+ };
1633
+ content: {
1634
+ "application/json": components["schemas"]["Error"];
1635
+ };
1636
+ };
1637
+ };
1638
+ };
1639
+ "list-server-items": {
1640
+ parameters: {
1641
+ query?: {
1642
+ /** @description 按 key 或名字模糊匹配 */
1643
+ keyword?: string;
1644
+ /** @description 形如 key 或 key=value,可重复。官方模板打好的 component 标签(cpu / memory / filesystem…)就是靠它筛 */
1645
+ tag?: string[] | null;
1646
+ };
1647
+ header?: never;
1648
+ path: {
1649
+ serverId: string;
1650
+ };
1651
+ cookie?: never;
1652
+ };
1653
+ requestBody?: never;
1654
+ responses: {
1655
+ /** @description OK */
1656
+ 200: {
1657
+ headers: {
1658
+ [name: string]: unknown;
1659
+ };
1660
+ content: {
1661
+ "application/json": components["schemas"]["ItemListResponseBody"];
1662
+ };
1663
+ };
1664
+ /** @description Error */
1665
+ default: {
1666
+ headers: {
1667
+ [name: string]: unknown;
1668
+ };
1669
+ content: {
1670
+ "application/json": components["schemas"]["Error"];
1671
+ };
1672
+ };
1673
+ };
1674
+ };
1675
+ "get-server-metric": {
1676
+ parameters: {
1677
+ query?: {
1678
+ /** @description **前缀匹配**:vfs.fs.size 一次拿回每个挂载点一条线。与 item_id 至少给一个 */
1679
+ item_key?: string;
1680
+ item_id?: string;
1681
+ /** @description 不给就是一小时前 */
1682
+ from?: string;
1683
+ to?: string;
1684
+ /** @description 降采样的桶数,0 表示原样返回采集到的数据点 */
1685
+ max_points?: number;
1686
+ /** @description 顺带取这些监控项当前生效的阈值线 */
1687
+ include_thresholds?: boolean;
1688
+ };
1689
+ header?: never;
1690
+ path: {
1691
+ serverId: string;
1692
+ };
1693
+ cookie?: never;
1694
+ };
1695
+ requestBody?: never;
1696
+ responses: {
1697
+ /** @description OK */
1698
+ 200: {
1699
+ headers: {
1700
+ [name: string]: unknown;
1701
+ };
1702
+ content: {
1703
+ "application/json": components["schemas"]["MetricResponseBody"];
1704
+ };
1705
+ };
1706
+ /** @description Error */
1707
+ default: {
1708
+ headers: {
1709
+ [name: string]: unknown;
1710
+ };
1711
+ content: {
1712
+ "application/json": components["schemas"]["Error"];
1713
+ };
1714
+ };
1715
+ };
1716
+ };
1717
+ "get-server-resources": {
1718
+ parameters: {
1719
+ query?: never;
1720
+ header?: never;
1721
+ path: {
1722
+ serverId: string;
1723
+ };
1724
+ cookie?: never;
1725
+ };
1726
+ requestBody?: never;
1727
+ responses: {
1728
+ /** @description OK */
1729
+ 200: {
1730
+ headers: {
1731
+ [name: string]: unknown;
1732
+ };
1733
+ content: {
1734
+ "application/json": components["schemas"]["ServerResourcesResource"];
1735
+ };
1736
+ };
1737
+ /** @description Error */
1738
+ default: {
1739
+ headers: {
1740
+ [name: string]: unknown;
1741
+ };
1742
+ content: {
1743
+ "application/json": components["schemas"]["Error"];
1744
+ };
1745
+ };
1746
+ };
1747
+ };
1748
+ "get-server-snapshot": {
1749
+ parameters: {
1750
+ query?: never;
1751
+ header?: never;
1752
+ path: {
1753
+ serverId: string;
1754
+ };
1755
+ cookie?: never;
1756
+ };
1757
+ requestBody?: never;
1758
+ responses: {
1759
+ /** @description OK */
1760
+ 200: {
1761
+ headers: {
1762
+ [name: string]: unknown;
1763
+ };
1764
+ content: {
1765
+ "application/json": components["schemas"]["SnapshotResource"];
1766
+ };
1767
+ };
1768
+ /** @description Error */
1769
+ default: {
1770
+ headers: {
1771
+ [name: string]: unknown;
1772
+ };
1773
+ content: {
1774
+ "application/json": components["schemas"]["Error"];
1775
+ };
1776
+ };
1777
+ };
1778
+ };
1779
+ "list-project-top-items": {
1780
+ parameters: {
1781
+ query: {
1782
+ kind: "CPU_UTILIZATION" | "MEMORY_UTILIZATION" | "ROOT_FILESYSTEM_USED";
1783
+ /** @description 0 表示用默认 */
1784
+ limit?: number;
1785
+ };
1786
+ header?: never;
1787
+ path?: never;
1788
+ cookie?: never;
1789
+ };
1790
+ requestBody?: never;
1791
+ responses: {
1792
+ /** @description OK */
1793
+ 200: {
1794
+ headers: {
1795
+ [name: string]: unknown;
1796
+ };
1797
+ content: {
1798
+ "application/json": components["schemas"]["TopItemListResponseBody"];
1799
+ };
1800
+ };
1801
+ /** @description Error */
1802
+ default: {
1803
+ headers: {
1804
+ [name: string]: unknown;
1805
+ };
1806
+ content: {
1807
+ "application/json": components["schemas"]["Error"];
1808
+ };
1809
+ };
1810
+ };
1811
+ };
1812
+ "list-servers": {
1813
+ parameters: {
1814
+ query?: {
1815
+ /** @description 这一页最多返回多少条 */
1816
+ limit?: number;
1817
+ /** @description 跳过多少条。要翻得更深请改用游标翻页的接口 */
1818
+ offset?: number;
1819
+ /** @description 按名字或地址模糊匹配 */
1820
+ keyword?: string;
1821
+ monitoring_status?: "PENDING" | "ACTIVE" | "DISABLED" | "FAILED";
1822
+ };
1823
+ header?: never;
1824
+ path?: never;
1825
+ cookie?: never;
1826
+ };
1827
+ requestBody?: never;
1828
+ responses: {
1829
+ /** @description OK */
1830
+ 200: {
1831
+ headers: {
1832
+ [name: string]: unknown;
1833
+ };
1834
+ content: {
1835
+ "application/json": components["schemas"]["LengthAwarePageServerResource"];
1836
+ };
1837
+ };
1838
+ /** @description Error */
1839
+ default: {
1840
+ headers: {
1841
+ [name: string]: unknown;
1842
+ };
1843
+ content: {
1844
+ "application/json": components["schemas"]["Error"];
1845
+ };
1846
+ };
1847
+ };
1848
+ };
1849
+ "get-server": {
1850
+ parameters: {
1851
+ query?: never;
1852
+ header?: never;
1853
+ path: {
1854
+ serverId: string;
1855
+ };
1856
+ cookie?: never;
1857
+ };
1858
+ requestBody?: never;
1859
+ responses: {
1860
+ /** @description OK */
1861
+ 200: {
1862
+ headers: {
1863
+ [name: string]: unknown;
1864
+ };
1865
+ content: {
1866
+ "application/json": components["schemas"]["ServerResource"];
1867
+ };
1868
+ };
1869
+ /** @description Error */
1870
+ default: {
1871
+ headers: {
1872
+ [name: string]: unknown;
1873
+ };
1874
+ content: {
1875
+ "application/json": components["schemas"]["Error"];
1876
+ };
1877
+ };
1878
+ };
1879
+ };
1880
+ "enable-server-monitoring": {
1881
+ parameters: {
1882
+ query?: never;
1883
+ header?: never;
1884
+ path: {
1885
+ serverId: string;
1886
+ };
1887
+ cookie?: never;
1888
+ };
1889
+ requestBody: {
1890
+ content: {
1891
+ "application/json": components["schemas"]["EnableMonitoringRequestBody"];
1892
+ };
1893
+ };
1894
+ responses: {
1895
+ /** @description OK */
1896
+ 200: {
1897
+ headers: {
1898
+ [name: string]: unknown;
1899
+ };
1900
+ content: {
1901
+ "application/json": components["schemas"]["ServerEnrollmentResponseBody"];
1902
+ };
1903
+ };
1904
+ /** @description Error */
1905
+ default: {
1906
+ headers: {
1907
+ [name: string]: unknown;
1908
+ };
1909
+ content: {
1910
+ "application/json": components["schemas"]["Error"];
1911
+ };
1912
+ };
1913
+ };
1914
+ };
1915
+ "delete-server": {
1916
+ parameters: {
1917
+ query?: never;
1918
+ header?: never;
1919
+ path: {
1920
+ serverId: string;
1921
+ };
1922
+ cookie?: never;
1923
+ };
1924
+ requestBody?: never;
1925
+ responses: {
1926
+ /** @description No Content */
1927
+ 204: {
1928
+ headers: {
1929
+ [name: string]: unknown;
1930
+ };
1931
+ content?: never;
1932
+ };
1933
+ /** @description Error */
1934
+ default: {
1935
+ headers: {
1936
+ [name: string]: unknown;
1937
+ };
1938
+ content: {
1939
+ "application/json": components["schemas"]["Error"];
1940
+ };
1941
+ };
1942
+ };
1943
+ };
1944
+ "update-server": {
1945
+ parameters: {
1946
+ query?: never;
1947
+ header?: never;
1948
+ path: {
1949
+ serverId: string;
1950
+ };
1951
+ cookie?: never;
1952
+ };
1953
+ requestBody: {
1954
+ content: {
1955
+ "application/json": components["schemas"]["UpdateServerRequestBody"];
1956
+ };
1957
+ };
1958
+ responses: {
1959
+ /** @description OK */
1960
+ 200: {
1961
+ headers: {
1962
+ [name: string]: unknown;
1963
+ };
1964
+ content: {
1965
+ "application/json": components["schemas"]["ServerResource"];
1966
+ };
1967
+ };
1968
+ /** @description Error */
1969
+ default: {
1970
+ headers: {
1971
+ [name: string]: unknown;
1972
+ };
1973
+ content: {
1974
+ "application/json": components["schemas"]["Error"];
1975
+ };
1976
+ };
1977
+ };
1978
+ };
1979
+ "disable-server-monitoring": {
1980
+ parameters: {
1981
+ query?: never;
1982
+ header?: never;
1983
+ path: {
1984
+ serverId: string;
1985
+ };
1986
+ cookie?: never;
1987
+ };
1988
+ requestBody?: never;
1989
+ responses: {
1990
+ /** @description No Content */
1991
+ 204: {
1992
+ headers: {
1993
+ [name: string]: unknown;
1994
+ };
1995
+ content?: never;
1996
+ };
1997
+ /** @description Error */
1998
+ default: {
1999
+ headers: {
2000
+ [name: string]: unknown;
2001
+ };
2002
+ content: {
2003
+ "application/json": components["schemas"]["Error"];
2004
+ };
2005
+ };
2006
+ };
2007
+ };
2008
+ "rotate-agent-psk": {
2009
+ parameters: {
2010
+ query?: never;
2011
+ header?: never;
2012
+ path: {
2013
+ serverId: string;
2014
+ };
2015
+ cookie?: never;
2016
+ };
2017
+ requestBody?: never;
2018
+ responses: {
2019
+ /** @description OK */
2020
+ 200: {
2021
+ headers: {
2022
+ [name: string]: unknown;
2023
+ };
2024
+ content: {
2025
+ "application/json": components["schemas"]["EnrollmentResource"];
2026
+ };
2027
+ };
2028
+ /** @description Error */
2029
+ default: {
2030
+ headers: {
2031
+ [name: string]: unknown;
2032
+ };
2033
+ content: {
2034
+ "application/json": components["schemas"]["Error"];
2035
+ };
2036
+ };
2037
+ };
2038
+ };
2039
+ "get-web-check": {
2040
+ parameters: {
2041
+ query?: never;
2042
+ header?: never;
2043
+ path: {
2044
+ serverId: string;
2045
+ checkId: string;
2046
+ };
2047
+ cookie?: never;
2048
+ };
2049
+ requestBody?: never;
2050
+ responses: {
2051
+ /** @description OK */
2052
+ 200: {
2053
+ headers: {
2054
+ [name: string]: unknown;
2055
+ };
2056
+ content: {
2057
+ "application/json": components["schemas"]["WebCheckResource"];
2058
+ };
2059
+ };
2060
+ /** @description Error */
2061
+ default: {
2062
+ headers: {
2063
+ [name: string]: unknown;
2064
+ };
2065
+ content: {
2066
+ "application/json": components["schemas"]["Error"];
2067
+ };
2068
+ };
2069
+ };
2070
+ };
2071
+ "put-web-check": {
2072
+ parameters: {
2073
+ query?: never;
2074
+ header?: never;
2075
+ path: {
2076
+ serverId: string;
2077
+ checkId: string;
2078
+ };
2079
+ cookie?: never;
2080
+ };
2081
+ requestBody: {
2082
+ content: {
2083
+ "application/json": components["schemas"]["PutWebCheckRequestBody"];
2084
+ };
2085
+ };
2086
+ responses: {
2087
+ /** @description OK */
2088
+ 200: {
2089
+ headers: {
2090
+ [name: string]: unknown;
2091
+ };
2092
+ content: {
2093
+ "application/json": components["schemas"]["WebCheckResource"];
2094
+ };
2095
+ };
2096
+ /** @description Error */
2097
+ default: {
2098
+ headers: {
2099
+ [name: string]: unknown;
2100
+ };
2101
+ content: {
2102
+ "application/json": components["schemas"]["Error"];
2103
+ };
2104
+ };
2105
+ };
2106
+ };
2107
+ "delete-web-check": {
2108
+ parameters: {
2109
+ query?: never;
2110
+ header?: never;
2111
+ path: {
2112
+ serverId: string;
2113
+ checkId: string;
2114
+ };
2115
+ cookie?: never;
2116
+ };
2117
+ requestBody?: never;
2118
+ responses: {
2119
+ /** @description No Content */
2120
+ 204: {
2121
+ headers: {
2122
+ [name: string]: unknown;
2123
+ };
2124
+ content?: never;
2125
+ };
2126
+ /** @description Error */
2127
+ default: {
2128
+ headers: {
2129
+ [name: string]: unknown;
2130
+ };
2131
+ content: {
2132
+ "application/json": components["schemas"]["Error"];
2133
+ };
2134
+ };
2135
+ };
2136
+ };
2137
+ "list-web-checks": {
2138
+ parameters: {
2139
+ query?: {
2140
+ /** @description 只看某一台机器的检查;不给就是整个项目的 */
2141
+ server_id?: string;
2142
+ };
2143
+ header?: never;
2144
+ path?: never;
2145
+ cookie?: never;
2146
+ };
2147
+ requestBody?: never;
2148
+ responses: {
2149
+ /** @description OK */
2150
+ 200: {
2151
+ headers: {
2152
+ [name: string]: unknown;
2153
+ };
2154
+ content: {
2155
+ "application/json": components["schemas"]["WebCheckListResponseBody"];
2156
+ };
2157
+ };
2158
+ /** @description Error */
2159
+ default: {
2160
+ headers: {
2161
+ [name: string]: unknown;
2162
+ };
2163
+ content: {
2164
+ "application/json": components["schemas"]["Error"];
2165
+ };
2166
+ };
2167
+ };
2168
+ };
2169
+ "get-sli-report": {
2170
+ parameters: {
2171
+ query?: {
2172
+ from?: string;
2173
+ to?: string;
2174
+ /** @description 取最近 N 个完整周期,与 from/to 二选一 */
2175
+ periods?: number;
2176
+ };
2177
+ header?: never;
2178
+ path?: never;
2179
+ cookie?: never;
2180
+ };
2181
+ requestBody?: never;
2182
+ responses: {
2183
+ /** @description OK */
2184
+ 200: {
2185
+ headers: {
2186
+ [name: string]: unknown;
2187
+ };
2188
+ content: {
2189
+ "application/json": components["schemas"]["SLIReportResponseBody"];
2190
+ };
2191
+ };
2192
+ /** @description Error */
2193
+ default: {
2194
+ headers: {
2195
+ [name: string]: unknown;
2196
+ };
2197
+ content: {
2198
+ "application/json": components["schemas"]["Error"];
2199
+ };
2200
+ };
2201
+ };
2202
+ };
2203
+ "get-slo": {
2204
+ parameters: {
2205
+ query?: never;
2206
+ header?: never;
2207
+ path?: never;
2208
+ cookie?: never;
2209
+ };
2210
+ requestBody?: never;
2211
+ responses: {
2212
+ /** @description OK */
2213
+ 200: {
2214
+ headers: {
2215
+ [name: string]: unknown;
2216
+ };
2217
+ content: {
2218
+ "application/json": components["schemas"]["SLOResource"];
2219
+ };
2220
+ };
2221
+ /** @description Error */
2222
+ default: {
2223
+ headers: {
2224
+ [name: string]: unknown;
2225
+ };
2226
+ content: {
2227
+ "application/json": components["schemas"]["Error"];
2228
+ };
2229
+ };
2230
+ };
2231
+ };
2232
+ "put-slo": {
2233
+ parameters: {
2234
+ query?: never;
2235
+ header?: never;
2236
+ path?: never;
2237
+ cookie?: never;
2238
+ };
2239
+ requestBody: {
2240
+ content: {
2241
+ "application/json": components["schemas"]["PutSLORequestBody"];
2242
+ };
2243
+ };
2244
+ responses: {
2245
+ /** @description OK */
2246
+ 200: {
2247
+ headers: {
2248
+ [name: string]: unknown;
2249
+ };
2250
+ content: {
2251
+ "application/json": components["schemas"]["SLOResource"];
2252
+ };
2253
+ };
2254
+ /** @description Error */
2255
+ default: {
2256
+ headers: {
2257
+ [name: string]: unknown;
2258
+ };
2259
+ content: {
2260
+ "application/json": components["schemas"]["Error"];
2261
+ };
2262
+ };
2263
+ };
2264
+ };
2265
+ "delete-slo": {
2266
+ parameters: {
2267
+ query?: never;
2268
+ header?: never;
2269
+ path?: never;
2270
+ cookie?: never;
2271
+ };
2272
+ requestBody?: never;
2273
+ responses: {
2274
+ /** @description No Content */
2275
+ 204: {
2276
+ headers: {
2277
+ [name: string]: unknown;
2278
+ };
2279
+ content?: never;
2280
+ };
2281
+ /** @description Error */
2282
+ default: {
2283
+ headers: {
2284
+ [name: string]: unknown;
2285
+ };
2286
+ content: {
2287
+ "application/json": components["schemas"]["Error"];
2288
+ };
2289
+ };
2290
+ };
2291
+ };
2292
+ }