clawsql 0.1.6 → 0.1.8

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 (74) hide show
  1. package/README.md +49 -21
  2. package/dist/api/routes/instances.d.ts.map +1 -1
  3. package/dist/api/routes/instances.js +9 -6
  4. package/dist/api/routes/instances.js.map +1 -1
  5. package/dist/api/schemas/index.d.ts +142 -142
  6. package/dist/app.js +2 -2
  7. package/dist/cli/commands/cleanup.d.ts.map +1 -1
  8. package/dist/cli/commands/cleanup.js +40 -44
  9. package/dist/cli/commands/cleanup.js.map +1 -1
  10. package/dist/cli/commands/instances.d.ts.map +1 -1
  11. package/dist/cli/commands/instances.js +41 -22
  12. package/dist/cli/commands/instances.js.map +1 -1
  13. package/dist/cli/commands/start.d.ts.map +1 -1
  14. package/dist/cli/commands/start.js +16 -36
  15. package/dist/cli/commands/start.js.map +1 -1
  16. package/dist/cli/commands/stop.d.ts.map +1 -1
  17. package/dist/cli/commands/stop.js +18 -35
  18. package/dist/cli/commands/stop.js.map +1 -1
  19. package/dist/cli/utils/command-executor.d.ts +62 -0
  20. package/dist/cli/utils/command-executor.d.ts.map +1 -0
  21. package/dist/cli/utils/command-executor.js +224 -0
  22. package/dist/cli/utils/command-executor.js.map +1 -0
  23. package/dist/config/settings.js +1 -1
  24. package/dist/core/discovery/topology.d.ts +2 -0
  25. package/dist/core/discovery/topology.d.ts.map +1 -1
  26. package/dist/core/discovery/topology.js +48 -7
  27. package/dist/core/discovery/topology.js.map +1 -1
  28. package/docker/Dockerfile.allinone +37 -28
  29. package/docker/orchestrator/orchestrator.conf.json +2 -2
  30. package/docker-compose.demo.yml +26 -17
  31. package/docker-compose.yml +3 -0
  32. package/init/metadata.sql +11 -0
  33. package/init/primary.sql +2 -12
  34. package/init/replica-host.sql +7 -0
  35. package/init/replica.sql +12 -2
  36. package/package.json +1 -1
  37. package/dist/__tests__/config/settings.test.d.ts +0 -5
  38. package/dist/__tests__/config/settings.test.d.ts.map +0 -1
  39. package/dist/__tests__/config/settings.test.js +0 -154
  40. package/dist/__tests__/config/settings.test.js.map +0 -1
  41. package/dist/__tests__/core/discovery/topology.test.d.ts +0 -5
  42. package/dist/__tests__/core/discovery/topology.test.d.ts.map +0 -1
  43. package/dist/__tests__/core/discovery/topology.test.js +0 -191
  44. package/dist/__tests__/core/discovery/topology.test.js.map +0 -1
  45. package/dist/__tests__/core/failover/executor.test.d.ts +0 -5
  46. package/dist/__tests__/core/failover/executor.test.d.ts.map +0 -1
  47. package/dist/__tests__/core/failover/executor.test.js +0 -256
  48. package/dist/__tests__/core/failover/executor.test.js.map +0 -1
  49. package/dist/__tests__/core/monitoring/collector.test.d.ts +0 -5
  50. package/dist/__tests__/core/monitoring/collector.test.d.ts.map +0 -1
  51. package/dist/__tests__/core/monitoring/collector.test.js +0 -131
  52. package/dist/__tests__/core/monitoring/collector.test.js.map +0 -1
  53. package/dist/__tests__/core/monitoring/exporters.test.d.ts +0 -5
  54. package/dist/__tests__/core/monitoring/exporters.test.d.ts.map +0 -1
  55. package/dist/__tests__/core/monitoring/exporters.test.js +0 -90
  56. package/dist/__tests__/core/monitoring/exporters.test.js.map +0 -1
  57. package/dist/__tests__/core/routing/proxysql-manager.test.d.ts +0 -5
  58. package/dist/__tests__/core/routing/proxysql-manager.test.d.ts.map +0 -1
  59. package/dist/__tests__/core/routing/proxysql-manager.test.js +0 -155
  60. package/dist/__tests__/core/routing/proxysql-manager.test.js.map +0 -1
  61. package/dist/__tests__/types/index.test.d.ts +0 -5
  62. package/dist/__tests__/types/index.test.d.ts.map +0 -1
  63. package/dist/__tests__/types/index.test.js +0 -290
  64. package/dist/__tests__/types/index.test.js.map +0 -1
  65. package/dist/__tests__/utils/exceptions.test.d.ts +0 -5
  66. package/dist/__tests__/utils/exceptions.test.d.ts.map +0 -1
  67. package/dist/__tests__/utils/exceptions.test.js +0 -142
  68. package/dist/__tests__/utils/exceptions.test.js.map +0 -1
  69. package/dist/cli/commands/health.d.ts +0 -12
  70. package/dist/cli/commands/health.d.ts.map +0 -1
  71. package/dist/cli/commands/health.js +0 -125
  72. package/dist/cli/commands/health.js.map +0 -1
  73. package/docker/init/primary.sql +0 -26
  74. package/docker/init/replica.sql +0 -16
@@ -68,27 +68,27 @@ export declare const InstanceResponse: z.ZodObject<{
68
68
  }, "strip", z.ZodTypeAny, {
69
69
  host: string;
70
70
  port: number;
71
+ version: string | null;
71
72
  role: "primary" | "replica" | "unknown";
72
73
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
73
- version: string | null;
74
74
  labels: Record<string, string>;
75
75
  cluster_id: string | null;
76
76
  instance_id: string;
77
- server_id: number | null;
78
77
  replication_lag: number | null;
78
+ server_id: number | null;
79
79
  last_seen: Date;
80
80
  created_at: Date;
81
81
  }, {
82
82
  host: string;
83
83
  port: number;
84
+ version: string | null;
84
85
  role: "primary" | "replica" | "unknown";
85
86
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
86
- version: string | null;
87
87
  labels: Record<string, string>;
88
88
  cluster_id: string | null;
89
89
  instance_id: string;
90
- server_id: number | null;
91
90
  replication_lag: number | null;
91
+ server_id: number | null;
92
92
  last_seen: Date;
93
93
  created_at: Date;
94
94
  }>;
@@ -109,27 +109,27 @@ export declare const InstanceListResponse: z.ZodObject<{
109
109
  }, "strip", z.ZodTypeAny, {
110
110
  host: string;
111
111
  port: number;
112
+ version: string | null;
112
113
  role: "primary" | "replica" | "unknown";
113
114
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
114
- version: string | null;
115
115
  labels: Record<string, string>;
116
116
  cluster_id: string | null;
117
117
  instance_id: string;
118
- server_id: number | null;
119
118
  replication_lag: number | null;
119
+ server_id: number | null;
120
120
  last_seen: Date;
121
121
  created_at: Date;
122
122
  }, {
123
123
  host: string;
124
124
  port: number;
125
+ version: string | null;
125
126
  role: "primary" | "replica" | "unknown";
126
127
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
127
- version: string | null;
128
128
  labels: Record<string, string>;
129
129
  cluster_id: string | null;
130
130
  instance_id: string;
131
- server_id: number | null;
132
131
  replication_lag: number | null;
132
+ server_id: number | null;
133
133
  last_seen: Date;
134
134
  created_at: Date;
135
135
  }>, "many">;
@@ -138,40 +138,40 @@ export declare const InstanceListResponse: z.ZodObject<{
138
138
  page_size: z.ZodNumber;
139
139
  }, "strip", z.ZodTypeAny, {
140
140
  page: number;
141
+ page_size: number;
141
142
  items: {
142
143
  host: string;
143
144
  port: number;
145
+ version: string | null;
144
146
  role: "primary" | "replica" | "unknown";
145
147
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
146
- version: string | null;
147
148
  labels: Record<string, string>;
148
149
  cluster_id: string | null;
149
150
  instance_id: string;
150
- server_id: number | null;
151
151
  replication_lag: number | null;
152
+ server_id: number | null;
152
153
  last_seen: Date;
153
154
  created_at: Date;
154
155
  }[];
155
156
  total: number;
156
- page_size: number;
157
157
  }, {
158
158
  page: number;
159
+ page_size: number;
159
160
  items: {
160
161
  host: string;
161
162
  port: number;
163
+ version: string | null;
162
164
  role: "primary" | "replica" | "unknown";
163
165
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
164
- version: string | null;
165
166
  labels: Record<string, string>;
166
167
  cluster_id: string | null;
167
168
  instance_id: string;
168
- server_id: number | null;
169
169
  replication_lag: number | null;
170
+ server_id: number | null;
170
171
  last_seen: Date;
171
172
  created_at: Date;
172
173
  }[];
173
174
  total: number;
174
- page_size: number;
175
175
  }>;
176
176
  export declare const InstanceMetricsResponse: z.ZodObject<{
177
177
  instance_id: z.ZodString;
@@ -185,8 +185,8 @@ export declare const InstanceMetricsResponse: z.ZodObject<{
185
185
  innodb_buffer_pool_hit_rate: z.ZodNumber;
186
186
  uptime_seconds: z.ZodNumber;
187
187
  }, "strip", z.ZodTypeAny, {
188
- instance_id: string;
189
188
  timestamp: Date;
189
+ instance_id: string;
190
190
  replication_lag_seconds: number | null;
191
191
  replication_io_running: boolean;
192
192
  replication_sql_running: boolean;
@@ -196,8 +196,8 @@ export declare const InstanceMetricsResponse: z.ZodObject<{
196
196
  innodb_buffer_pool_hit_rate: number;
197
197
  uptime_seconds: number;
198
198
  }, {
199
- instance_id: string;
200
199
  timestamp: Date;
200
+ instance_id: string;
201
201
  replication_lag_seconds: number | null;
202
202
  replication_io_running: boolean;
203
203
  replication_sql_running: boolean;
@@ -266,27 +266,27 @@ export declare const DiscoveryResponse: z.ZodObject<{
266
266
  }, "strip", z.ZodTypeAny, {
267
267
  host: string;
268
268
  port: number;
269
+ version: string | null;
269
270
  role: "primary" | "replica" | "unknown";
270
271
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
271
- version: string | null;
272
272
  labels: Record<string, string>;
273
273
  cluster_id: string | null;
274
274
  instance_id: string;
275
- server_id: number | null;
276
275
  replication_lag: number | null;
276
+ server_id: number | null;
277
277
  last_seen: Date;
278
278
  created_at: Date;
279
279
  }, {
280
280
  host: string;
281
281
  port: number;
282
+ version: string | null;
282
283
  role: "primary" | "replica" | "unknown";
283
284
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
284
- version: string | null;
285
285
  labels: Record<string, string>;
286
286
  cluster_id: string | null;
287
287
  instance_id: string;
288
- server_id: number | null;
289
288
  replication_lag: number | null;
289
+ server_id: number | null;
290
290
  last_seen: Date;
291
291
  created_at: Date;
292
292
  }>, "many">>;
@@ -294,7 +294,7 @@ export declare const DiscoveryResponse: z.ZodObject<{
294
294
  started_at: z.ZodOptional<z.ZodDate>;
295
295
  completed_at: z.ZodOptional<z.ZodDate>;
296
296
  }, "strip", z.ZodTypeAny, {
297
- status: "failed" | "pending" | "running" | "completed";
297
+ status: "failed" | "completed" | "running" | "pending";
298
298
  network_segments: string[];
299
299
  task_id: string;
300
300
  instances_found: number;
@@ -302,21 +302,21 @@ export declare const DiscoveryResponse: z.ZodObject<{
302
302
  instances?: {
303
303
  host: string;
304
304
  port: number;
305
+ version: string | null;
305
306
  role: "primary" | "replica" | "unknown";
306
307
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
307
- version: string | null;
308
308
  labels: Record<string, string>;
309
309
  cluster_id: string | null;
310
310
  instance_id: string;
311
- server_id: number | null;
312
311
  replication_lag: number | null;
312
+ server_id: number | null;
313
313
  last_seen: Date;
314
314
  created_at: Date;
315
315
  }[] | undefined;
316
316
  started_at?: Date | undefined;
317
317
  completed_at?: Date | undefined;
318
318
  }, {
319
- status: "failed" | "pending" | "running" | "completed";
319
+ status: "failed" | "completed" | "running" | "pending";
320
320
  network_segments: string[];
321
321
  task_id: string;
322
322
  instances_found: number;
@@ -324,14 +324,14 @@ export declare const DiscoveryResponse: z.ZodObject<{
324
324
  instances?: {
325
325
  host: string;
326
326
  port: number;
327
+ version: string | null;
327
328
  role: "primary" | "replica" | "unknown";
328
329
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
329
- version: string | null;
330
330
  labels: Record<string, string>;
331
331
  cluster_id: string | null;
332
332
  instance_id: string;
333
- server_id: number | null;
334
333
  replication_lag: number | null;
334
+ server_id: number | null;
335
335
  last_seen: Date;
336
336
  created_at: Date;
337
337
  }[] | undefined;
@@ -368,27 +368,27 @@ export declare const ClusterResponse: z.ZodObject<{
368
368
  }, "strip", z.ZodTypeAny, {
369
369
  host: string;
370
370
  port: number;
371
+ version: string | null;
371
372
  role: "primary" | "replica" | "unknown";
372
373
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
373
- version: string | null;
374
374
  labels: Record<string, string>;
375
375
  cluster_id: string | null;
376
376
  instance_id: string;
377
- server_id: number | null;
378
377
  replication_lag: number | null;
378
+ server_id: number | null;
379
379
  last_seen: Date;
380
380
  created_at: Date;
381
381
  }, {
382
382
  host: string;
383
383
  port: number;
384
+ version: string | null;
384
385
  role: "primary" | "replica" | "unknown";
385
386
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
386
- version: string | null;
387
387
  labels: Record<string, string>;
388
388
  cluster_id: string | null;
389
389
  instance_id: string;
390
- server_id: number | null;
391
390
  replication_lag: number | null;
391
+ server_id: number | null;
392
392
  last_seen: Date;
393
393
  created_at: Date;
394
394
  }>>;
@@ -408,27 +408,27 @@ export declare const ClusterResponse: z.ZodObject<{
408
408
  }, "strip", z.ZodTypeAny, {
409
409
  host: string;
410
410
  port: number;
411
+ version: string | null;
411
412
  role: "primary" | "replica" | "unknown";
412
413
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
413
- version: string | null;
414
414
  labels: Record<string, string>;
415
415
  cluster_id: string | null;
416
416
  instance_id: string;
417
- server_id: number | null;
418
417
  replication_lag: number | null;
418
+ server_id: number | null;
419
419
  last_seen: Date;
420
420
  created_at: Date;
421
421
  }, {
422
422
  host: string;
423
423
  port: number;
424
+ version: string | null;
424
425
  role: "primary" | "replica" | "unknown";
425
426
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
426
- version: string | null;
427
427
  labels: Record<string, string>;
428
428
  cluster_id: string | null;
429
429
  instance_id: string;
430
- server_id: number | null;
431
430
  replication_lag: number | null;
431
+ server_id: number | null;
432
432
  last_seen: Date;
433
433
  created_at: Date;
434
434
  }>, "many">;
@@ -437,76 +437,76 @@ export declare const ClusterResponse: z.ZodObject<{
437
437
  created_at: z.ZodDate;
438
438
  updated_at: z.ZodDate;
439
439
  }, "strip", z.ZodTypeAny, {
440
- replicas: {
440
+ name: string;
441
+ primary: {
441
442
  host: string;
442
443
  port: number;
444
+ version: string | null;
443
445
  role: "primary" | "replica" | "unknown";
444
446
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
445
- version: string | null;
446
447
  labels: Record<string, string>;
447
448
  cluster_id: string | null;
448
449
  instance_id: string;
449
- server_id: number | null;
450
450
  replication_lag: number | null;
451
+ server_id: number | null;
451
452
  last_seen: Date;
452
453
  created_at: Date;
453
- }[];
454
- primary: {
454
+ } | null;
455
+ replicas: {
455
456
  host: string;
456
457
  port: number;
458
+ version: string | null;
457
459
  role: "primary" | "replica" | "unknown";
458
460
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
459
- version: string | null;
460
461
  labels: Record<string, string>;
461
462
  cluster_id: string | null;
462
463
  instance_id: string;
463
- server_id: number | null;
464
464
  replication_lag: number | null;
465
+ server_id: number | null;
465
466
  last_seen: Date;
466
467
  created_at: Date;
467
- } | null;
468
+ }[];
469
+ description: string | null;
468
470
  cluster_id: string;
469
471
  created_at: Date;
470
- name: string;
471
- description: string | null;
472
472
  instance_count: number;
473
- health_status: "unknown" | "healthy" | "unhealthy" | "degraded";
473
+ health_status: "unknown" | "healthy" | "degraded" | "unhealthy";
474
474
  updated_at: Date;
475
475
  }, {
476
- replicas: {
476
+ name: string;
477
+ primary: {
477
478
  host: string;
478
479
  port: number;
480
+ version: string | null;
479
481
  role: "primary" | "replica" | "unknown";
480
482
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
481
- version: string | null;
482
483
  labels: Record<string, string>;
483
484
  cluster_id: string | null;
484
485
  instance_id: string;
485
- server_id: number | null;
486
486
  replication_lag: number | null;
487
+ server_id: number | null;
487
488
  last_seen: Date;
488
489
  created_at: Date;
489
- }[];
490
- primary: {
490
+ } | null;
491
+ replicas: {
491
492
  host: string;
492
493
  port: number;
494
+ version: string | null;
493
495
  role: "primary" | "replica" | "unknown";
494
496
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
495
- version: string | null;
496
497
  labels: Record<string, string>;
497
498
  cluster_id: string | null;
498
499
  instance_id: string;
499
- server_id: number | null;
500
500
  replication_lag: number | null;
501
+ server_id: number | null;
501
502
  last_seen: Date;
502
503
  created_at: Date;
503
- } | null;
504
+ }[];
505
+ description: string | null;
504
506
  cluster_id: string;
505
507
  created_at: Date;
506
- name: string;
507
- description: string | null;
508
508
  instance_count: number;
509
- health_status: "unknown" | "healthy" | "unhealthy" | "degraded";
509
+ health_status: "unknown" | "healthy" | "degraded" | "unhealthy";
510
510
  updated_at: Date;
511
511
  }>;
512
512
  export declare const ClusterListResponse: z.ZodObject<{
@@ -530,27 +530,27 @@ export declare const ClusterListResponse: z.ZodObject<{
530
530
  }, "strip", z.ZodTypeAny, {
531
531
  host: string;
532
532
  port: number;
533
+ version: string | null;
533
534
  role: "primary" | "replica" | "unknown";
534
535
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
535
- version: string | null;
536
536
  labels: Record<string, string>;
537
537
  cluster_id: string | null;
538
538
  instance_id: string;
539
- server_id: number | null;
540
539
  replication_lag: number | null;
540
+ server_id: number | null;
541
541
  last_seen: Date;
542
542
  created_at: Date;
543
543
  }, {
544
544
  host: string;
545
545
  port: number;
546
+ version: string | null;
546
547
  role: "primary" | "replica" | "unknown";
547
548
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
548
- version: string | null;
549
549
  labels: Record<string, string>;
550
550
  cluster_id: string | null;
551
551
  instance_id: string;
552
- server_id: number | null;
553
552
  replication_lag: number | null;
553
+ server_id: number | null;
554
554
  last_seen: Date;
555
555
  created_at: Date;
556
556
  }>>;
@@ -570,27 +570,27 @@ export declare const ClusterListResponse: z.ZodObject<{
570
570
  }, "strip", z.ZodTypeAny, {
571
571
  host: string;
572
572
  port: number;
573
+ version: string | null;
573
574
  role: "primary" | "replica" | "unknown";
574
575
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
575
- version: string | null;
576
576
  labels: Record<string, string>;
577
577
  cluster_id: string | null;
578
578
  instance_id: string;
579
- server_id: number | null;
580
579
  replication_lag: number | null;
580
+ server_id: number | null;
581
581
  last_seen: Date;
582
582
  created_at: Date;
583
583
  }, {
584
584
  host: string;
585
585
  port: number;
586
+ version: string | null;
586
587
  role: "primary" | "replica" | "unknown";
587
588
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
588
- version: string | null;
589
589
  labels: Record<string, string>;
590
590
  cluster_id: string | null;
591
591
  instance_id: string;
592
- server_id: number | null;
593
592
  replication_lag: number | null;
593
+ server_id: number | null;
594
594
  last_seen: Date;
595
595
  created_at: Date;
596
596
  }>, "many">;
@@ -599,76 +599,76 @@ export declare const ClusterListResponse: z.ZodObject<{
599
599
  created_at: z.ZodDate;
600
600
  updated_at: z.ZodDate;
601
601
  }, "strip", z.ZodTypeAny, {
602
- replicas: {
602
+ name: string;
603
+ primary: {
603
604
  host: string;
604
605
  port: number;
606
+ version: string | null;
605
607
  role: "primary" | "replica" | "unknown";
606
608
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
607
- version: string | null;
608
609
  labels: Record<string, string>;
609
610
  cluster_id: string | null;
610
611
  instance_id: string;
611
- server_id: number | null;
612
612
  replication_lag: number | null;
613
+ server_id: number | null;
613
614
  last_seen: Date;
614
615
  created_at: Date;
615
- }[];
616
- primary: {
616
+ } | null;
617
+ replicas: {
617
618
  host: string;
618
619
  port: number;
620
+ version: string | null;
619
621
  role: "primary" | "replica" | "unknown";
620
622
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
621
- version: string | null;
622
623
  labels: Record<string, string>;
623
624
  cluster_id: string | null;
624
625
  instance_id: string;
625
- server_id: number | null;
626
626
  replication_lag: number | null;
627
+ server_id: number | null;
627
628
  last_seen: Date;
628
629
  created_at: Date;
629
- } | null;
630
+ }[];
631
+ description: string | null;
630
632
  cluster_id: string;
631
633
  created_at: Date;
632
- name: string;
633
- description: string | null;
634
634
  instance_count: number;
635
- health_status: "unknown" | "healthy" | "unhealthy" | "degraded";
635
+ health_status: "unknown" | "healthy" | "degraded" | "unhealthy";
636
636
  updated_at: Date;
637
637
  }, {
638
- replicas: {
638
+ name: string;
639
+ primary: {
639
640
  host: string;
640
641
  port: number;
642
+ version: string | null;
641
643
  role: "primary" | "replica" | "unknown";
642
644
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
643
- version: string | null;
644
645
  labels: Record<string, string>;
645
646
  cluster_id: string | null;
646
647
  instance_id: string;
647
- server_id: number | null;
648
648
  replication_lag: number | null;
649
+ server_id: number | null;
649
650
  last_seen: Date;
650
651
  created_at: Date;
651
- }[];
652
- primary: {
652
+ } | null;
653
+ replicas: {
653
654
  host: string;
654
655
  port: number;
656
+ version: string | null;
655
657
  role: "primary" | "replica" | "unknown";
656
658
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
657
- version: string | null;
658
659
  labels: Record<string, string>;
659
660
  cluster_id: string | null;
660
661
  instance_id: string;
661
- server_id: number | null;
662
662
  replication_lag: number | null;
663
+ server_id: number | null;
663
664
  last_seen: Date;
664
665
  created_at: Date;
665
- } | null;
666
+ }[];
667
+ description: string | null;
666
668
  cluster_id: string;
667
669
  created_at: Date;
668
- name: string;
669
- description: string | null;
670
670
  instance_count: number;
671
- health_status: "unknown" | "healthy" | "unhealthy" | "degraded";
671
+ health_status: "unknown" | "healthy" | "degraded" | "unhealthy";
672
672
  updated_at: Date;
673
673
  }>, "many">;
674
674
  total: z.ZodNumber;
@@ -676,86 +676,86 @@ export declare const ClusterListResponse: z.ZodObject<{
676
676
  page_size: z.ZodNumber;
677
677
  }, "strip", z.ZodTypeAny, {
678
678
  page: number;
679
+ page_size: number;
679
680
  items: {
680
- replicas: {
681
+ name: string;
682
+ primary: {
681
683
  host: string;
682
684
  port: number;
685
+ version: string | null;
683
686
  role: "primary" | "replica" | "unknown";
684
687
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
685
- version: string | null;
686
688
  labels: Record<string, string>;
687
689
  cluster_id: string | null;
688
690
  instance_id: string;
689
- server_id: number | null;
690
691
  replication_lag: number | null;
692
+ server_id: number | null;
691
693
  last_seen: Date;
692
694
  created_at: Date;
693
- }[];
694
- primary: {
695
+ } | null;
696
+ replicas: {
695
697
  host: string;
696
698
  port: number;
699
+ version: string | null;
697
700
  role: "primary" | "replica" | "unknown";
698
701
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
699
- version: string | null;
700
702
  labels: Record<string, string>;
701
703
  cluster_id: string | null;
702
704
  instance_id: string;
703
- server_id: number | null;
704
705
  replication_lag: number | null;
706
+ server_id: number | null;
705
707
  last_seen: Date;
706
708
  created_at: Date;
707
- } | null;
709
+ }[];
710
+ description: string | null;
708
711
  cluster_id: string;
709
712
  created_at: Date;
710
- name: string;
711
- description: string | null;
712
713
  instance_count: number;
713
- health_status: "unknown" | "healthy" | "unhealthy" | "degraded";
714
+ health_status: "unknown" | "healthy" | "degraded" | "unhealthy";
714
715
  updated_at: Date;
715
716
  }[];
716
717
  total: number;
717
- page_size: number;
718
718
  }, {
719
719
  page: number;
720
+ page_size: number;
720
721
  items: {
721
- replicas: {
722
+ name: string;
723
+ primary: {
722
724
  host: string;
723
725
  port: number;
726
+ version: string | null;
724
727
  role: "primary" | "replica" | "unknown";
725
728
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
726
- version: string | null;
727
729
  labels: Record<string, string>;
728
730
  cluster_id: string | null;
729
731
  instance_id: string;
730
- server_id: number | null;
731
732
  replication_lag: number | null;
733
+ server_id: number | null;
732
734
  last_seen: Date;
733
735
  created_at: Date;
734
- }[];
735
- primary: {
736
+ } | null;
737
+ replicas: {
736
738
  host: string;
737
739
  port: number;
740
+ version: string | null;
738
741
  role: "primary" | "replica" | "unknown";
739
742
  state: "online" | "offline" | "recovering" | "failed" | "maintenance";
740
- version: string | null;
741
743
  labels: Record<string, string>;
742
744
  cluster_id: string | null;
743
745
  instance_id: string;
744
- server_id: number | null;
745
746
  replication_lag: number | null;
747
+ server_id: number | null;
746
748
  last_seen: Date;
747
749
  created_at: Date;
748
- } | null;
750
+ }[];
751
+ description: string | null;
749
752
  cluster_id: string;
750
753
  created_at: Date;
751
- name: string;
752
- description: string | null;
753
754
  instance_count: number;
754
- health_status: "unknown" | "healthy" | "unhealthy" | "degraded";
755
+ health_status: "unknown" | "healthy" | "degraded" | "unhealthy";
755
756
  updated_at: Date;
756
757
  }[];
757
758
  total: number;
758
- page_size: number;
759
759
  }>;
760
760
  export declare const FailoverStateSchema: z.ZodEnum<["idle", "detecting", "candidate_selection", "promoting", "reconfiguring", "completed", "failed"]>;
761
761
  export declare const FailoverRequest: z.ZodObject<{
@@ -784,31 +784,31 @@ export declare const FailoverOperationResponse: z.ZodObject<{
784
784
  triggered_by: z.ZodNullable<z.ZodString>;
785
785
  }, "strip", z.ZodTypeAny, {
786
786
  error: string | null;
787
+ state: "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring" | "completed";
787
788
  reason: string | null;
788
- state: "failed" | "completed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring";
789
789
  cluster_id: string;
790
+ steps: string[];
791
+ manual: boolean;
792
+ operation_id: string;
790
793
  started_at: string | null;
791
794
  completed_at: string | null;
792
- operation_id: string;
793
795
  old_primary_id: string | null;
794
796
  new_primary_id: string | null;
795
797
  duration_seconds: number | null;
796
- steps: string[];
797
- manual: boolean;
798
798
  triggered_by: string | null;
799
799
  }, {
800
800
  error: string | null;
801
+ state: "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring" | "completed";
801
802
  reason: string | null;
802
- state: "failed" | "completed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring";
803
803
  cluster_id: string;
804
+ steps: string[];
805
+ manual: boolean;
806
+ operation_id: string;
804
807
  started_at: string | null;
805
808
  completed_at: string | null;
806
- operation_id: string;
807
809
  old_primary_id: string | null;
808
810
  new_primary_id: string | null;
809
811
  duration_seconds: number | null;
810
- steps: string[];
811
- manual: boolean;
812
812
  triggered_by: string | null;
813
813
  }>;
814
814
  export declare const FailoverListResponse: z.ZodObject<{
@@ -828,65 +828,65 @@ export declare const FailoverListResponse: z.ZodObject<{
828
828
  triggered_by: z.ZodNullable<z.ZodString>;
829
829
  }, "strip", z.ZodTypeAny, {
830
830
  error: string | null;
831
+ state: "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring" | "completed";
831
832
  reason: string | null;
832
- state: "failed" | "completed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring";
833
833
  cluster_id: string;
834
+ steps: string[];
835
+ manual: boolean;
836
+ operation_id: string;
834
837
  started_at: string | null;
835
838
  completed_at: string | null;
836
- operation_id: string;
837
839
  old_primary_id: string | null;
838
840
  new_primary_id: string | null;
839
841
  duration_seconds: number | null;
840
- steps: string[];
841
- manual: boolean;
842
842
  triggered_by: string | null;
843
843
  }, {
844
844
  error: string | null;
845
+ state: "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring" | "completed";
845
846
  reason: string | null;
846
- state: "failed" | "completed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring";
847
847
  cluster_id: string;
848
+ steps: string[];
849
+ manual: boolean;
850
+ operation_id: string;
848
851
  started_at: string | null;
849
852
  completed_at: string | null;
850
- operation_id: string;
851
853
  old_primary_id: string | null;
852
854
  new_primary_id: string | null;
853
855
  duration_seconds: number | null;
854
- steps: string[];
855
- manual: boolean;
856
856
  triggered_by: string | null;
857
857
  }>, "many">;
858
858
  total: z.ZodNumber;
859
859
  }, "strip", z.ZodTypeAny, {
860
860
  items: {
861
861
  error: string | null;
862
+ state: "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring" | "completed";
862
863
  reason: string | null;
863
- state: "failed" | "completed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring";
864
864
  cluster_id: string;
865
+ steps: string[];
866
+ manual: boolean;
867
+ operation_id: string;
865
868
  started_at: string | null;
866
869
  completed_at: string | null;
867
- operation_id: string;
868
870
  old_primary_id: string | null;
869
871
  new_primary_id: string | null;
870
872
  duration_seconds: number | null;
871
- steps: string[];
872
- manual: boolean;
873
873
  triggered_by: string | null;
874
874
  }[];
875
875
  total: number;
876
876
  }, {
877
877
  items: {
878
878
  error: string | null;
879
+ state: "failed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring" | "completed";
879
880
  reason: string | null;
880
- state: "failed" | "completed" | "idle" | "detecting" | "candidate_selection" | "promoting" | "reconfiguring";
881
881
  cluster_id: string;
882
+ steps: string[];
883
+ manual: boolean;
884
+ operation_id: string;
882
885
  started_at: string | null;
883
886
  completed_at: string | null;
884
- operation_id: string;
885
887
  old_primary_id: string | null;
886
888
  new_primary_id: string | null;
887
889
  duration_seconds: number | null;
888
- steps: string[];
889
- manual: boolean;
890
890
  triggered_by: string | null;
891
891
  }[];
892
892
  total: number;
@@ -913,33 +913,33 @@ export declare const MonitoringHealthResponse: z.ZodObject<{
913
913
  prometheus: z.ZodEnum<["healthy", "unhealthy"]>;
914
914
  }, "strip", z.ZodTypeAny, {
915
915
  orchestrator: "healthy" | "unhealthy";
916
- api: "healthy" | "unhealthy";
917
916
  proxysql: "healthy" | "unhealthy";
918
917
  prometheus: "healthy" | "unhealthy";
918
+ api: "healthy" | "unhealthy";
919
919
  }, {
920
920
  orchestrator: "healthy" | "unhealthy";
921
- api: "healthy" | "unhealthy";
922
921
  proxysql: "healthy" | "unhealthy";
923
922
  prometheus: "healthy" | "unhealthy";
923
+ api: "healthy" | "unhealthy";
924
924
  }>;
925
925
  timestamp: z.ZodDate;
926
926
  }, "strip", z.ZodTypeAny, {
927
- status: "healthy" | "unhealthy" | "degraded";
927
+ status: "healthy" | "degraded" | "unhealthy";
928
928
  timestamp: Date;
929
929
  services: {
930
930
  orchestrator: "healthy" | "unhealthy";
931
- api: "healthy" | "unhealthy";
932
931
  proxysql: "healthy" | "unhealthy";
933
932
  prometheus: "healthy" | "unhealthy";
933
+ api: "healthy" | "unhealthy";
934
934
  };
935
935
  }, {
936
- status: "healthy" | "unhealthy" | "degraded";
936
+ status: "healthy" | "degraded" | "unhealthy";
937
937
  timestamp: Date;
938
938
  services: {
939
939
  orchestrator: "healthy" | "unhealthy";
940
- api: "healthy" | "unhealthy";
941
940
  proxysql: "healthy" | "unhealthy";
942
941
  prometheus: "healthy" | "unhealthy";
942
+ api: "healthy" | "unhealthy";
943
943
  };
944
944
  }>;
945
945
  export declare const SuccessResponse: z.ZodObject<{
@@ -954,12 +954,12 @@ export declare const ErrorResponse: z.ZodObject<{
954
954
  message: z.ZodString;
955
955
  details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
956
956
  }, "strip", z.ZodTypeAny, {
957
- error: string;
958
957
  message: string;
958
+ error: string;
959
959
  details?: Record<string, unknown> | undefined;
960
960
  }, {
961
- error: string;
962
961
  message: string;
962
+ error: string;
963
963
  details?: Record<string, unknown> | undefined;
964
964
  }>;
965
965
  //# sourceMappingURL=index.d.ts.map