sealos-cli 0.1.0

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,3969 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/databases": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /**
15
+ * List all databases
16
+ * @description Returns all database clusters in the current namespace with their status and resource allocation.
17
+ */
18
+ get: operations["listDatabases"];
19
+ put?: never;
20
+ /**
21
+ * Create database
22
+ * @description Provisions a new database cluster. The database is created asynchronously — the request returns immediately and the cluster becomes available shortly after.
23
+ *
24
+ * **Example — PostgreSQL with daily backup:**
25
+ * ```json
26
+ * {
27
+ * "name": "my-postgres-db",
28
+ * "type": "postgresql",
29
+ * "version": "postgresql-14.8.0",
30
+ * "quota": { "cpu": 1, "memory": 2, "storage": 5, "replicas": 1 },
31
+ * "autoBackup": {
32
+ * "start": true,
33
+ * "type": "day",
34
+ * "hour": "02",
35
+ * "minute": "00",
36
+ * "saveTime": 7,
37
+ * "saveType": "days"
38
+ * }
39
+ * }
40
+ * ```
41
+ *
42
+ * **Example — Redis (minimal):**
43
+ * ```json
44
+ * {
45
+ * "name": "my-redis",
46
+ * "type": "redis",
47
+ * "quota": { "cpu": 1, "memory": 1, "storage": 3, "replicas": 1 }
48
+ * }
49
+ * ```
50
+ */
51
+ post: operations["createDatabase"];
52
+ delete?: never;
53
+ options?: never;
54
+ head?: never;
55
+ patch?: never;
56
+ trace?: never;
57
+ };
58
+ "/databases/{databaseName}": {
59
+ parameters: {
60
+ query?: never;
61
+ header?: never;
62
+ path?: never;
63
+ cookie?: never;
64
+ };
65
+ /**
66
+ * Get database details
67
+ * @description Returns detailed information about a specific database including its current status, resource allocation, and configuration.
68
+ */
69
+ get: operations["getDatabase"];
70
+ put?: never;
71
+ post?: never;
72
+ /**
73
+ * Delete database
74
+ * @description Deletes a database cluster. **Irreversible** — depending on `terminationPolicy`, persistent volumes may also be removed. This operation is idempotent: if the database does not exist, `204` is returned.
75
+ */
76
+ delete: operations["deleteDatabase"];
77
+ options?: never;
78
+ head?: never;
79
+ /**
80
+ * Update database resources
81
+ * @description Updates a database's resource allocation (CPU, memory, storage, replicas). Only provide fields you want to change — all fields are optional.
82
+ *
83
+ * Key points:
84
+ * - CPU: one of `1, 2, 3, 4, 5, 6, 7, 8` cores
85
+ * - Memory: one of `1, 2, 4, 6, 8, 12, 16, 32` GB
86
+ * - Storage: `1–300` GB (can only be expanded, not shrunk)
87
+ * - Replicas: `1–20`
88
+ */
89
+ patch: operations["updateDatabase"];
90
+ trace?: never;
91
+ };
92
+ "/databases/{databaseName}/start": {
93
+ parameters: {
94
+ query?: never;
95
+ header?: never;
96
+ path?: never;
97
+ cookie?: never;
98
+ };
99
+ get?: never;
100
+ put?: never;
101
+ /**
102
+ * Start database
103
+ * @description Resumes a paused or stopped database. This operation is idempotent: if the database is already running, `204` is returned.
104
+ */
105
+ post: operations["startDatabase"];
106
+ delete?: never;
107
+ options?: never;
108
+ head?: never;
109
+ patch?: never;
110
+ trace?: never;
111
+ };
112
+ "/databases/{databaseName}/pause": {
113
+ parameters: {
114
+ query?: never;
115
+ header?: never;
116
+ path?: never;
117
+ cookie?: never;
118
+ };
119
+ get?: never;
120
+ put?: never;
121
+ /**
122
+ * Pause database
123
+ * @description Gracefully stops a running database while preserving all data and configuration. The database can be resumed with the `start` operation.
124
+ */
125
+ post: operations["pauseDatabase"];
126
+ delete?: never;
127
+ options?: never;
128
+ head?: never;
129
+ patch?: never;
130
+ trace?: never;
131
+ };
132
+ "/databases/{databaseName}/restart": {
133
+ parameters: {
134
+ query?: never;
135
+ header?: never;
136
+ path?: never;
137
+ cookie?: never;
138
+ };
139
+ get?: never;
140
+ put?: never;
141
+ /**
142
+ * Restart database
143
+ * @description Performs a rolling restart of all database replicas. This operation is idempotent: if a restart is already in progress, `204` is returned.
144
+ */
145
+ post: operations["restartDatabase"];
146
+ delete?: never;
147
+ options?: never;
148
+ head?: never;
149
+ patch?: never;
150
+ trace?: never;
151
+ };
152
+ "/databases/{databaseName}/backups": {
153
+ parameters: {
154
+ query?: never;
155
+ header?: never;
156
+ path?: never;
157
+ cookie?: never;
158
+ };
159
+ /**
160
+ * List database backups
161
+ * @description Returns all manual and automatic backups associated with the specified database, including status and creation timestamp.
162
+ */
163
+ get: operations["listDatabaseBackups"];
164
+ put?: never;
165
+ /**
166
+ * Create database backup
167
+ * @description Initiates a manual backup of the database. The backup is created asynchronously.
168
+ */
169
+ post: operations["createDatabaseBackup"];
170
+ delete?: never;
171
+ options?: never;
172
+ head?: never;
173
+ patch?: never;
174
+ trace?: never;
175
+ };
176
+ "/databases/{databaseName}/backups/{backupName}": {
177
+ parameters: {
178
+ query?: never;
179
+ header?: never;
180
+ path?: never;
181
+ cookie?: never;
182
+ };
183
+ get?: never;
184
+ put?: never;
185
+ post?: never;
186
+ /**
187
+ * Delete database backup
188
+ * @description Deletes a backup. **Irreversible.** This operation is idempotent: if the backup does not exist, `204` is returned.
189
+ */
190
+ delete: operations["deleteDatabaseBackup"];
191
+ options?: never;
192
+ head?: never;
193
+ patch?: never;
194
+ trace?: never;
195
+ };
196
+ "/databases/{databaseName}/backups/{backupName}/restore": {
197
+ parameters: {
198
+ query?: never;
199
+ header?: never;
200
+ path?: never;
201
+ cookie?: never;
202
+ };
203
+ get?: never;
204
+ put?: never;
205
+ /**
206
+ * Restore database from backup
207
+ * @description Creates a new database cluster restored from the specified backup. Useful for point-in-time recovery or cloning a database for testing.
208
+ *
209
+ * Key points:
210
+ * - All body fields are optional — if `name` is omitted a name is auto-generated, if `replicas` is omitted the source cluster replica count is used.
211
+ * - The restored database is a completely new cluster — it does not modify or delete the backup.
212
+ */
213
+ post: operations["restoreDatabase"];
214
+ delete?: never;
215
+ options?: never;
216
+ head?: never;
217
+ patch?: never;
218
+ trace?: never;
219
+ };
220
+ "/databases/{databaseName}/enable-public": {
221
+ parameters: {
222
+ query?: never;
223
+ header?: never;
224
+ path?: never;
225
+ cookie?: never;
226
+ };
227
+ get?: never;
228
+ put?: never;
229
+ /**
230
+ * Enable public access
231
+ * @description Exposes the database externally via a NodePort or LoadBalancer service. After this succeeds, external connection details are available via `GET /databases/{databaseName}`.
232
+ */
233
+ post: operations["enablePublicAccess"];
234
+ delete?: never;
235
+ options?: never;
236
+ head?: never;
237
+ patch?: never;
238
+ trace?: never;
239
+ };
240
+ "/databases/{databaseName}/disable-public": {
241
+ parameters: {
242
+ query?: never;
243
+ header?: never;
244
+ path?: never;
245
+ cookie?: never;
246
+ };
247
+ get?: never;
248
+ put?: never;
249
+ /**
250
+ * Disable public access
251
+ * @description Removes the external NodePort or LoadBalancer service, restricting database access to within the cluster.
252
+ */
253
+ post: operations["disablePublicAccess"];
254
+ delete?: never;
255
+ options?: never;
256
+ head?: never;
257
+ patch?: never;
258
+ trace?: never;
259
+ };
260
+ "/databases/versions": {
261
+ parameters: {
262
+ query?: never;
263
+ header?: never;
264
+ path?: never;
265
+ cookie?: never;
266
+ };
267
+ /**
268
+ * List available database versions
269
+ * @description Returns all supported database versions per engine type. Use these version strings when creating a new database.
270
+ *
271
+ * This endpoint does not require authentication — it queries the cluster using the server’s own service account.
272
+ */
273
+ get: operations["listDatabaseVersions"];
274
+ put?: never;
275
+ post?: never;
276
+ delete?: never;
277
+ options?: never;
278
+ head?: never;
279
+ patch?: never;
280
+ trace?: never;
281
+ };
282
+ "/logs": {
283
+ parameters: {
284
+ query?: never;
285
+ header?: never;
286
+ path?: never;
287
+ cookie?: never;
288
+ };
289
+ /**
290
+ * Get database log entries
291
+ * @description Returns paginated log entries from a specific database pod. Use `/logs/files` first to discover available log file paths.
292
+ */
293
+ get: operations["getDatabaseLogsData"];
294
+ put?: never;
295
+ post?: never;
296
+ delete?: never;
297
+ options?: never;
298
+ head?: never;
299
+ patch?: never;
300
+ trace?: never;
301
+ };
302
+ "/logs/files": {
303
+ parameters: {
304
+ query?: never;
305
+ header?: never;
306
+ path?: never;
307
+ cookie?: never;
308
+ };
309
+ /**
310
+ * List database log files
311
+ * @description Returns metadata about available log files for a specific database pod. Use the returned paths with `GET /logs` to fetch log entries.
312
+ */
313
+ get: operations["listDatabaseLogFiles"];
314
+ put?: never;
315
+ post?: never;
316
+ delete?: never;
317
+ options?: never;
318
+ head?: never;
319
+ patch?: never;
320
+ trace?: never;
321
+ };
322
+ }
323
+ export type webhooks = Record<string, never>;
324
+ export interface components {
325
+ schemas: {
326
+ /** @description Resource configuration for database update. All fields are optional. */
327
+ UpdateResourceSchema: {
328
+ /**
329
+ * @description CPU cores. Allowed values: 1, 2, 3, 4, 5, 6, 7, or 8 (converted to millicores in K8s)
330
+ * @example 2
331
+ * @enum {number}
332
+ */
333
+ cpu?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
334
+ /**
335
+ * @description Memory in GB. Allowed values: 1, 2, 4, 6, 8, 12, 16, or 32 GB (converted to Gi in K8s)
336
+ * @example 4
337
+ * @enum {number}
338
+ */
339
+ memory?: 1 | 2 | 4 | 6 | 8 | 12 | 16 | 32;
340
+ /**
341
+ * @description Storage in GB (1–300). Storage can only be expanded, not shrunk (converted to Gi in K8s)
342
+ * @example 20
343
+ */
344
+ storage?: number;
345
+ /**
346
+ * @description Number of replicas (1–20)
347
+ * @example 2
348
+ */
349
+ replicas?: number;
350
+ };
351
+ /** @description Full Kubernetes cluster resource object */
352
+ K8sClusterResource: {
353
+ [key: string]: unknown;
354
+ };
355
+ OpsRequest: {
356
+ /** @example apps.kubeblocks.io/v1alpha1 */
357
+ apiVersion?: string;
358
+ /** @example OpsRequest */
359
+ kind?: string;
360
+ metadata?: {
361
+ name?: string;
362
+ namespace?: string;
363
+ labels?: {
364
+ [key: string]: string;
365
+ };
366
+ };
367
+ spec?: {
368
+ [key: string]: unknown;
369
+ };
370
+ status?: {
371
+ [key: string]: unknown;
372
+ };
373
+ };
374
+ };
375
+ responses: never;
376
+ parameters: never;
377
+ requestBodies: never;
378
+ headers: never;
379
+ pathItems: never;
380
+ }
381
+ export type $defs = Record<string, never>;
382
+ export interface operations {
383
+ listDatabases: {
384
+ parameters: {
385
+ query?: never;
386
+ header?: never;
387
+ path?: never;
388
+ cookie?: never;
389
+ };
390
+ requestBody?: never;
391
+ responses: {
392
+ /** @description List of databases retrieved successfully */
393
+ 200: {
394
+ headers: {
395
+ [name: string]: unknown;
396
+ };
397
+ content: {
398
+ "application/json": {
399
+ /**
400
+ * @description Database name
401
+ * @example my-postgres-db
402
+ */
403
+ name?: string;
404
+ /**
405
+ * @description Unique identifier
406
+ * @example a1b2c3d4-e5f6-7890-abcd-ef1234567890
407
+ */
408
+ uid?: string;
409
+ /**
410
+ * @description Database engine
411
+ * @example postgresql
412
+ */
413
+ type?: string;
414
+ /**
415
+ * @description Database version
416
+ * @example postgresql-14.8.0
417
+ */
418
+ version?: string;
419
+ /**
420
+ * @description Resource type identifier — always "cluster"
421
+ * @example cluster
422
+ */
423
+ resourceType?: string;
424
+ /**
425
+ * @description Current cluster status
426
+ * @example Running
427
+ * @enum {string}
428
+ */
429
+ status?: "Running" | "Stopped" | "Creating" | "Updating" | "Failed" | "Deleting";
430
+ /** @description Resource allocation for each database replica */
431
+ quota?: {
432
+ /**
433
+ * @description CPU cores per replica
434
+ * @example 1
435
+ */
436
+ cpu?: number;
437
+ /**
438
+ * @description Memory in GB per replica
439
+ * @example 2
440
+ */
441
+ memory?: number;
442
+ /**
443
+ * @description Storage in GB per replica
444
+ * @example 5
445
+ */
446
+ storage?: number;
447
+ /**
448
+ * @description Number of database replicas
449
+ * @example 1
450
+ */
451
+ replicas?: number;
452
+ };
453
+ }[];
454
+ };
455
+ };
456
+ /** @description Unauthorized — invalid or missing kubeconfig */
457
+ 401: {
458
+ headers: {
459
+ [name: string]: unknown;
460
+ };
461
+ content: {
462
+ "application/json": {
463
+ /** @description Structured error object containing type, code, message, and optional details */
464
+ error: {
465
+ /**
466
+ * @description High-level error type for categorization
467
+ * @constant
468
+ */
469
+ type: "authentication_error";
470
+ /**
471
+ * @description Specific error code for programmatic handling and i18n
472
+ * @constant
473
+ */
474
+ code: "AUTHENTICATION_REQUIRED";
475
+ /** @description Human-readable error message */
476
+ message: string;
477
+ /** @description Typically omitted. May contain additional context in edge cases. */
478
+ details?: string;
479
+ };
480
+ };
481
+ };
482
+ };
483
+ /** @description Forbidden — insufficient permissions */
484
+ 403: {
485
+ headers: {
486
+ [name: string]: unknown;
487
+ };
488
+ content: {
489
+ "application/json": {
490
+ /** @description Structured error object containing type, code, message, and optional details */
491
+ error: {
492
+ /**
493
+ * @description High-level error type for categorization
494
+ * @constant
495
+ */
496
+ type: "authorization_error";
497
+ /**
498
+ * @description Specific error code for programmatic handling and i18n
499
+ * @enum {string}
500
+ */
501
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
502
+ /** @description Human-readable error message */
503
+ message: string;
504
+ /** @description Typically omitted. May contain additional context in edge cases. */
505
+ details?: string;
506
+ };
507
+ };
508
+ };
509
+ };
510
+ /** @description Internal server error */
511
+ 500: {
512
+ headers: {
513
+ [name: string]: unknown;
514
+ };
515
+ content: {
516
+ "application/json": {
517
+ /** @description Structured error object containing type, code, message, and optional details */
518
+ error: {
519
+ /**
520
+ * @description High-level error type for categorization
521
+ * @enum {string}
522
+ */
523
+ type: "operation_error" | "internal_error";
524
+ /**
525
+ * @description Specific error code for programmatic handling and i18n
526
+ * @enum {string}
527
+ */
528
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
529
+ /** @description Human-readable error message */
530
+ message: string;
531
+ /** @description Raw error string from the underlying system, for troubleshooting. */
532
+ details?: string;
533
+ };
534
+ };
535
+ };
536
+ };
537
+ /** @description Service unavailable — Kubernetes cluster unreachable */
538
+ 503: {
539
+ headers: {
540
+ [name: string]: unknown;
541
+ };
542
+ content: {
543
+ "application/json": {
544
+ /** @description Structured error object containing type, code, message, and optional details */
545
+ error: {
546
+ /**
547
+ * @description High-level error type for categorization
548
+ * @constant
549
+ */
550
+ type: "internal_error";
551
+ /**
552
+ * @description Specific error code for programmatic handling and i18n
553
+ * @constant
554
+ */
555
+ code: "SERVICE_UNAVAILABLE";
556
+ /** @description Human-readable error message */
557
+ message: string;
558
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
559
+ details?: string;
560
+ };
561
+ };
562
+ };
563
+ };
564
+ };
565
+ };
566
+ createDatabase: {
567
+ parameters: {
568
+ query?: never;
569
+ header?: never;
570
+ path?: never;
571
+ cookie?: never;
572
+ };
573
+ /** @description Database configuration including type, version, resources, and optional backup/parameter settings */
574
+ requestBody: {
575
+ content: {
576
+ "application/json": {
577
+ /**
578
+ * @description Cluster termination policy. "delete" removes the cluster but keeps PVCs, "wipeout" removes everything including data. Defaults to "delete" if not provided.
579
+ * @default delete
580
+ * @example delete
581
+ * @enum {string}
582
+ */
583
+ terminationPolicy?: "delete" | "wipeout";
584
+ /**
585
+ * @description Database name. Must be a valid Kubernetes resource name (lowercase alphanumeric and hyphens)
586
+ * @example my-postgres-db
587
+ */
588
+ name: string;
589
+ /**
590
+ * @description Database type/engine to deploy
591
+ * @example postgresql
592
+ * @enum {string}
593
+ */
594
+ type: "postgresql" | "mongodb" | "apecloud-mysql" | "mysql" | "redis" | "kafka" | "qdrant" | "nebula" | "weaviate" | "milvus" | "pulsar" | "clickhouse";
595
+ /**
596
+ * @description Database version (e.g., "14.8.0" for PostgreSQL). Must match available versions from /databases/versions endpoint. If not provided, the latest version for the specified database type will be automatically selected.
597
+ * @example postgresql-14.8.0
598
+ */
599
+ version?: string;
600
+ /** @description Resource allocation for the database cluster. All four fields are required. */
601
+ quota: {
602
+ /**
603
+ * @description CPU cores allocated to each database instance. Allowed values: 1, 2, 3, 4, 5, 6, 7, or 8 (converted to millicores in Kubernetes)
604
+ * @default 1
605
+ * @example 1
606
+ * @enum {number}
607
+ */
608
+ cpu: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
609
+ /**
610
+ * @description Memory in GB allocated to each database instance - range [0.1, 32] (automatically converted to Gi in Kubernetes)
611
+ * @default 1
612
+ * @example 2
613
+ */
614
+ memory: number;
615
+ /**
616
+ * @description Persistent storage in GB for each database instance (automatically converted to Gi in Kubernetes)
617
+ * @default 3
618
+ * @example 5
619
+ */
620
+ storage: number;
621
+ /**
622
+ * @description Number of database replicas for high availability
623
+ * @default 3
624
+ * @example 1
625
+ */
626
+ replicas: number;
627
+ };
628
+ /** @description Automatic backup configuration (optional). If not provided, no automatic backups will be configured */
629
+ autoBackup?: {
630
+ /**
631
+ * @description Enable automatic backups
632
+ * @example true
633
+ */
634
+ start?: boolean;
635
+ /**
636
+ * @description Backup frequency type
637
+ * @example day
638
+ * @enum {string}
639
+ */
640
+ type?: "day" | "hour" | "week";
641
+ /**
642
+ * @description Days of the week to run backups (for weekly backups)
643
+ * @example [
644
+ * "monday"
645
+ * ]
646
+ */
647
+ week?: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
648
+ /**
649
+ * @description Hour to run backup (24-hour format, 00-23)
650
+ * @example 02
651
+ */
652
+ hour?: string;
653
+ /**
654
+ * @description Minute to run backup (00-59)
655
+ * @example 00
656
+ */
657
+ minute?: string;
658
+ /**
659
+ * @description Backup retention duration
660
+ * @example 7
661
+ */
662
+ saveTime?: number;
663
+ /**
664
+ * @description Backup retention unit
665
+ * @example days
666
+ * @enum {string}
667
+ */
668
+ saveType?: "days" | "hours" | "weeks" | "months";
669
+ };
670
+ /** @description Database-specific parameter configuration (optional). Available parameters vary by database type */
671
+ parameterConfig?: {
672
+ /**
673
+ * @description Maximum number of database connections
674
+ * @example 100
675
+ */
676
+ maxConnections?: string;
677
+ /**
678
+ * @description Database timezone (e.g., "Asia/Shanghai", "UTC")
679
+ * @example Asia/Shanghai
680
+ */
681
+ timeZone?: string;
682
+ /**
683
+ * @description MySQL-specific: whether table names are case-sensitive. 0=case-sensitive, 1=case-insensitive
684
+ * @example 0
685
+ * @enum {string}
686
+ */
687
+ lowerCaseTableNames?: "0" | "1";
688
+ /**
689
+ * @description Redis-specific: maximum memory usage in bytes
690
+ * @example 512mb
691
+ */
692
+ maxmemory?: string;
693
+ };
694
+ };
695
+ };
696
+ };
697
+ responses: {
698
+ /** @description Database created. The Kubernetes Cluster resource has been created and provisioning is underway. Poll `GET /databases/{databaseName}` until `status` is `"Running"`. */
699
+ 201: {
700
+ headers: {
701
+ [name: string]: unknown;
702
+ };
703
+ content: {
704
+ /**
705
+ * @example {
706
+ * "name": "my-postgres-db",
707
+ * "status": "creating"
708
+ * }
709
+ */
710
+ "application/json": {
711
+ /**
712
+ * @description Name of the created database
713
+ * @example my-postgres-db
714
+ */
715
+ name: string;
716
+ /**
717
+ * @description Initial provisioning status — always "creating" at creation time
718
+ * @example creating
719
+ * @enum {string}
720
+ */
721
+ status: "creating";
722
+ };
723
+ };
724
+ };
725
+ /** @description Bad request — invalid body, resource values, or parameter configuration */
726
+ 400: {
727
+ headers: {
728
+ [name: string]: unknown;
729
+ };
730
+ content: {
731
+ "application/json": {
732
+ /** @description Structured error object containing type, code, message, and optional details */
733
+ error: {
734
+ /**
735
+ * @description High-level error type for categorization
736
+ * @enum {string}
737
+ */
738
+ type: "validation_error";
739
+ /**
740
+ * @description Specific error code for programmatic handling and i18n
741
+ * @enum {string}
742
+ */
743
+ code: "INVALID_PARAMETER" | "INVALID_VALUE";
744
+ /** @description Human-readable error message */
745
+ message: string;
746
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
747
+ details?: {
748
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
749
+ field: string;
750
+ /** @description Validation error message for this field */
751
+ message: string;
752
+ }[] | string;
753
+ };
754
+ };
755
+ };
756
+ };
757
+ /** @description Unauthorized — invalid or missing kubeconfig */
758
+ 401: {
759
+ headers: {
760
+ [name: string]: unknown;
761
+ };
762
+ content: {
763
+ "application/json": {
764
+ /** @description Structured error object containing type, code, message, and optional details */
765
+ error: {
766
+ /**
767
+ * @description High-level error type for categorization
768
+ * @constant
769
+ */
770
+ type: "authentication_error";
771
+ /**
772
+ * @description Specific error code for programmatic handling and i18n
773
+ * @constant
774
+ */
775
+ code: "AUTHENTICATION_REQUIRED";
776
+ /** @description Human-readable error message */
777
+ message: string;
778
+ /** @description Typically omitted. May contain additional context in edge cases. */
779
+ details?: string;
780
+ };
781
+ };
782
+ };
783
+ };
784
+ /** @description Forbidden — insufficient permissions */
785
+ 403: {
786
+ headers: {
787
+ [name: string]: unknown;
788
+ };
789
+ content: {
790
+ "application/json": {
791
+ /** @description Structured error object containing type, code, message, and optional details */
792
+ error: {
793
+ /**
794
+ * @description High-level error type for categorization
795
+ * @constant
796
+ */
797
+ type: "authorization_error";
798
+ /**
799
+ * @description Specific error code for programmatic handling and i18n
800
+ * @enum {string}
801
+ */
802
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
803
+ /** @description Human-readable error message */
804
+ message: string;
805
+ /** @description Typically omitted. May contain additional context in edge cases. */
806
+ details?: string;
807
+ };
808
+ };
809
+ };
810
+ };
811
+ /** @description Conflict — database with this name already exists */
812
+ 409: {
813
+ headers: {
814
+ [name: string]: unknown;
815
+ };
816
+ content: {
817
+ "application/json": {
818
+ /** @description Structured error object containing type, code, message, and optional details */
819
+ error: {
820
+ /**
821
+ * @description High-level error type for categorization
822
+ * @constant
823
+ */
824
+ type: "resource_error";
825
+ /**
826
+ * @description Specific error code for programmatic handling and i18n
827
+ * @enum {string}
828
+ */
829
+ code: "ALREADY_EXISTS" | "CONFLICT";
830
+ /** @description Human-readable error message */
831
+ message: string;
832
+ /** @description Typically omitted. May contain additional context in edge cases. */
833
+ details?: string;
834
+ };
835
+ };
836
+ };
837
+ };
838
+ /** @description Internal server error */
839
+ 500: {
840
+ headers: {
841
+ [name: string]: unknown;
842
+ };
843
+ content: {
844
+ "application/json": {
845
+ /** @description Structured error object containing type, code, message, and optional details */
846
+ error: {
847
+ /**
848
+ * @description High-level error type for categorization
849
+ * @enum {string}
850
+ */
851
+ type: "operation_error" | "internal_error";
852
+ /**
853
+ * @description Specific error code for programmatic handling and i18n
854
+ * @enum {string}
855
+ */
856
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
857
+ /** @description Human-readable error message */
858
+ message: string;
859
+ /** @description Raw error string from the underlying system, for troubleshooting. */
860
+ details?: string;
861
+ };
862
+ };
863
+ };
864
+ };
865
+ /** @description Service unavailable — Kubernetes cluster unreachable */
866
+ 503: {
867
+ headers: {
868
+ [name: string]: unknown;
869
+ };
870
+ content: {
871
+ "application/json": {
872
+ /** @description Structured error object containing type, code, message, and optional details */
873
+ error: {
874
+ /**
875
+ * @description High-level error type for categorization
876
+ * @constant
877
+ */
878
+ type: "internal_error";
879
+ /**
880
+ * @description Specific error code for programmatic handling and i18n
881
+ * @constant
882
+ */
883
+ code: "SERVICE_UNAVAILABLE";
884
+ /** @description Human-readable error message */
885
+ message: string;
886
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
887
+ details?: string;
888
+ };
889
+ };
890
+ };
891
+ };
892
+ };
893
+ };
894
+ getDatabase: {
895
+ parameters: {
896
+ query?: never;
897
+ header?: never;
898
+ path: {
899
+ /** @description Name of the database to operate on (format: lowercase alphanumeric and hyphens) */
900
+ databaseName: string;
901
+ };
902
+ cookie?: never;
903
+ };
904
+ requestBody?: never;
905
+ responses: {
906
+ /** @description Database details retrieved successfully */
907
+ 200: {
908
+ headers: {
909
+ [name: string]: unknown;
910
+ };
911
+ content: {
912
+ "application/json": {
913
+ /**
914
+ * @description Cluster termination policy. "delete" removes the cluster but keeps PVCs, "wipeout" removes everything including data.
915
+ * @default delete
916
+ * @example delete
917
+ * @enum {string}
918
+ */
919
+ terminationPolicy: "delete" | "wipeout";
920
+ /**
921
+ * @description Database name (Kubernetes resource name — lowercase alphanumeric and hyphens)
922
+ * @example my-postgres-db
923
+ */
924
+ name?: string;
925
+ /**
926
+ * @description Database engine type
927
+ * @example postgresql
928
+ * @enum {string}
929
+ */
930
+ type?: "postgresql" | "mongodb" | "apecloud-mysql" | "redis" | "kafka" | "qdrant" | "nebula" | "weaviate" | "milvus" | "pulsar" | "clickhouse";
931
+ /**
932
+ * @description Database version string (e.g. "postgresql-14.8.0")
933
+ * @example postgresql-14.8.0
934
+ */
935
+ version?: string;
936
+ /** @description Resource allocation for each database replica */
937
+ quota?: {
938
+ /**
939
+ * @description CPU cores per replica
940
+ * @example 1
941
+ */
942
+ cpu?: number;
943
+ /**
944
+ * @description Memory in GB per replica
945
+ * @example 2
946
+ */
947
+ memory?: number;
948
+ /**
949
+ * @description Storage in GB per replica
950
+ * @example 5
951
+ */
952
+ storage?: number;
953
+ /**
954
+ * @description Number of database replicas
955
+ * @example 1
956
+ */
957
+ replicas?: number;
958
+ };
959
+ /** @description Automatic backup configuration */
960
+ autoBackup?: {
961
+ /**
962
+ * @description Whether automatic backups are enabled
963
+ * @example true
964
+ */
965
+ start?: boolean;
966
+ /**
967
+ * @description Backup frequency type
968
+ * @example day
969
+ * @enum {string}
970
+ */
971
+ type?: "day" | "hour" | "week";
972
+ /**
973
+ * @description Days of the week for weekly backups
974
+ * @example [
975
+ * "monday"
976
+ * ]
977
+ */
978
+ week?: ("monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday")[];
979
+ /**
980
+ * @description Hour to run backup (24-hour format)
981
+ * @example 02
982
+ */
983
+ hour?: string;
984
+ /**
985
+ * @description Minute to run backup
986
+ * @example 00
987
+ */
988
+ minute?: string;
989
+ /**
990
+ * @description Backup retention duration
991
+ * @example 7
992
+ */
993
+ saveTime?: number;
994
+ /**
995
+ * @description Backup retention unit
996
+ * @example days
997
+ * @enum {string}
998
+ */
999
+ saveType?: "days" | "hours" | "weeks" | "months";
1000
+ };
1001
+ /** @description Database-specific parameter configuration */
1002
+ parameterConfig?: {
1003
+ /**
1004
+ * @description Maximum number of database connections
1005
+ * @example 100
1006
+ */
1007
+ maxConnections?: string;
1008
+ /**
1009
+ * @description Database timezone
1010
+ * @example Asia/Shanghai
1011
+ */
1012
+ timeZone?: string;
1013
+ /**
1014
+ * @description MySQL-specific: case sensitivity for table names. 0=case-sensitive, 1=case-insensitive
1015
+ * @example 0
1016
+ * @enum {string}
1017
+ */
1018
+ lowerCaseTableNames?: "0" | "1";
1019
+ /**
1020
+ * @description Redis-specific: maximum memory usage
1021
+ * @example 512mb
1022
+ */
1023
+ maxmemory?: string;
1024
+ };
1025
+ /**
1026
+ * @description Unique identifier of the database resource
1027
+ * @example a1b2c3d4-e5f6-7890-abcd-ef1234567890
1028
+ */
1029
+ uid?: string;
1030
+ /**
1031
+ * @description Current status of the database cluster
1032
+ * @example running
1033
+ * @enum {string}
1034
+ */
1035
+ status?: "creating" | "starting" | "stopping" | "stopped" | "running" | "updating" | "specUpdating" | "rebooting" | "upgrade" | "verticalScaling" | "volumeExpanding" | "failed" | "unknown" | "deleting";
1036
+ /**
1037
+ * @description Creation timestamp of the database cluster (ISO 8601)
1038
+ * @example 2024-01-15T10:30:00Z
1039
+ */
1040
+ createdAt?: string;
1041
+ /**
1042
+ * @description Resource type identifier — always "cluster"
1043
+ * @default cluster
1044
+ * @example cluster
1045
+ */
1046
+ resourceType: string;
1047
+ /**
1048
+ * @description Operational status flags from KubeBlocks (structure varies by version)
1049
+ * @example {}
1050
+ */
1051
+ operationalStatus?: {
1052
+ [key: string]: unknown;
1053
+ };
1054
+ /** @description Connection details for the database cluster */
1055
+ connection?: {
1056
+ /** @description Internal (in-cluster) connection details. null if not yet available. */
1057
+ privateConnection?: {
1058
+ /**
1059
+ * @description host:port string for internal cluster access
1060
+ * @example my-postgres-db-postgresql.ns-abc.svc.cluster.local:5432
1061
+ */
1062
+ endpoint?: string;
1063
+ /**
1064
+ * @description ClusterIP service hostname (internal only)
1065
+ * @example my-postgres-db-postgresql.ns-abc.svc.cluster.local
1066
+ */
1067
+ host?: string;
1068
+ /**
1069
+ * @description Database port
1070
+ * @example 5432
1071
+ */
1072
+ port?: string;
1073
+ /**
1074
+ * @description Database username
1075
+ * @example postgres
1076
+ */
1077
+ username?: string;
1078
+ /**
1079
+ * @description Database password
1080
+ * @example s3cr3tpassword
1081
+ */
1082
+ password?: string;
1083
+ /**
1084
+ * @description Ready-to-use connection string
1085
+ * @example postgresql://postgres:s3cr3tpassword@my-postgres-db-postgresql.ns-abc.svc.cluster.local:5432/postgres
1086
+ */
1087
+ connectionString?: string;
1088
+ } | null;
1089
+ /** @description External connection string via NodePort/LoadBalancer. null if public access is not enabled. */
1090
+ publicConnection?: string | null;
1091
+ };
1092
+ /** @description List of database pods and their current phase */
1093
+ pods?: {
1094
+ /**
1095
+ * @description Pod name
1096
+ * @example my-postgres-db-postgresql-0
1097
+ */
1098
+ name?: string;
1099
+ /**
1100
+ * @description Pod phase (e.g. "running", "pending", "failed")
1101
+ * @example running
1102
+ */
1103
+ status?: string;
1104
+ }[];
1105
+ };
1106
+ };
1107
+ };
1108
+ /** @description Bad request — invalid path parameters */
1109
+ 400: {
1110
+ headers: {
1111
+ [name: string]: unknown;
1112
+ };
1113
+ content: {
1114
+ "application/json": {
1115
+ /** @description Structured error object containing type, code, message, and optional details */
1116
+ error: {
1117
+ /**
1118
+ * @description High-level error type for categorization
1119
+ * @enum {string}
1120
+ */
1121
+ type: "validation_error";
1122
+ /**
1123
+ * @description Specific error code for programmatic handling and i18n
1124
+ * @enum {string}
1125
+ */
1126
+ code: "INVALID_PARAMETER";
1127
+ /** @description Human-readable error message */
1128
+ message: string;
1129
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
1130
+ details?: {
1131
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
1132
+ field: string;
1133
+ /** @description Validation error message for this field */
1134
+ message: string;
1135
+ }[] | string;
1136
+ };
1137
+ };
1138
+ };
1139
+ };
1140
+ /** @description Unauthorized — invalid or missing kubeconfig */
1141
+ 401: {
1142
+ headers: {
1143
+ [name: string]: unknown;
1144
+ };
1145
+ content: {
1146
+ "application/json": {
1147
+ /** @description Structured error object containing type, code, message, and optional details */
1148
+ error: {
1149
+ /**
1150
+ * @description High-level error type for categorization
1151
+ * @constant
1152
+ */
1153
+ type: "authentication_error";
1154
+ /**
1155
+ * @description Specific error code for programmatic handling and i18n
1156
+ * @constant
1157
+ */
1158
+ code: "AUTHENTICATION_REQUIRED";
1159
+ /** @description Human-readable error message */
1160
+ message: string;
1161
+ /** @description Typically omitted. May contain additional context in edge cases. */
1162
+ details?: string;
1163
+ };
1164
+ };
1165
+ };
1166
+ };
1167
+ /** @description Forbidden — insufficient permissions */
1168
+ 403: {
1169
+ headers: {
1170
+ [name: string]: unknown;
1171
+ };
1172
+ content: {
1173
+ "application/json": {
1174
+ /** @description Structured error object containing type, code, message, and optional details */
1175
+ error: {
1176
+ /**
1177
+ * @description High-level error type for categorization
1178
+ * @constant
1179
+ */
1180
+ type: "authorization_error";
1181
+ /**
1182
+ * @description Specific error code for programmatic handling and i18n
1183
+ * @enum {string}
1184
+ */
1185
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
1186
+ /** @description Human-readable error message */
1187
+ message: string;
1188
+ /** @description Typically omitted. May contain additional context in edge cases. */
1189
+ details?: string;
1190
+ };
1191
+ };
1192
+ };
1193
+ };
1194
+ /** @description Not found — database does not exist */
1195
+ 404: {
1196
+ headers: {
1197
+ [name: string]: unknown;
1198
+ };
1199
+ content: {
1200
+ "application/json": {
1201
+ /** @description Structured error object containing type, code, message, and optional details */
1202
+ error: {
1203
+ /**
1204
+ * @description High-level error type for categorization
1205
+ * @constant
1206
+ */
1207
+ type: "resource_error";
1208
+ /**
1209
+ * @description Specific error code for programmatic handling and i18n
1210
+ * @constant
1211
+ */
1212
+ code: "NOT_FOUND";
1213
+ /** @description Human-readable error message */
1214
+ message: string;
1215
+ /** @description Typically omitted. May contain additional context in edge cases. */
1216
+ details?: string;
1217
+ };
1218
+ };
1219
+ };
1220
+ };
1221
+ /** @description Internal server error */
1222
+ 500: {
1223
+ headers: {
1224
+ [name: string]: unknown;
1225
+ };
1226
+ content: {
1227
+ "application/json": {
1228
+ /** @description Structured error object containing type, code, message, and optional details */
1229
+ error: {
1230
+ /**
1231
+ * @description High-level error type for categorization
1232
+ * @enum {string}
1233
+ */
1234
+ type: "operation_error" | "internal_error";
1235
+ /**
1236
+ * @description Specific error code for programmatic handling and i18n
1237
+ * @enum {string}
1238
+ */
1239
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
1240
+ /** @description Human-readable error message */
1241
+ message: string;
1242
+ /** @description Raw error string from the underlying system, for troubleshooting. */
1243
+ details?: string;
1244
+ };
1245
+ };
1246
+ };
1247
+ };
1248
+ /** @description Service unavailable — Kubernetes cluster unreachable */
1249
+ 503: {
1250
+ headers: {
1251
+ [name: string]: unknown;
1252
+ };
1253
+ content: {
1254
+ "application/json": {
1255
+ /** @description Structured error object containing type, code, message, and optional details */
1256
+ error: {
1257
+ /**
1258
+ * @description High-level error type for categorization
1259
+ * @constant
1260
+ */
1261
+ type: "internal_error";
1262
+ /**
1263
+ * @description Specific error code for programmatic handling and i18n
1264
+ * @constant
1265
+ */
1266
+ code: "SERVICE_UNAVAILABLE";
1267
+ /** @description Human-readable error message */
1268
+ message: string;
1269
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
1270
+ details?: string;
1271
+ };
1272
+ };
1273
+ };
1274
+ };
1275
+ };
1276
+ };
1277
+ deleteDatabase: {
1278
+ parameters: {
1279
+ query?: never;
1280
+ header?: never;
1281
+ path: {
1282
+ /** @description Name of the database to operate on (format: lowercase alphanumeric and hyphens) */
1283
+ databaseName: string;
1284
+ };
1285
+ cookie?: never;
1286
+ };
1287
+ requestBody?: never;
1288
+ responses: {
1289
+ /** @description Database deleted (or did not exist). */
1290
+ 204: {
1291
+ headers: {
1292
+ [name: string]: unknown;
1293
+ };
1294
+ content?: never;
1295
+ };
1296
+ /** @description Bad request — invalid path parameters */
1297
+ 400: {
1298
+ headers: {
1299
+ [name: string]: unknown;
1300
+ };
1301
+ content: {
1302
+ "application/json": {
1303
+ /** @description Structured error object containing type, code, message, and optional details */
1304
+ error: {
1305
+ /**
1306
+ * @description High-level error type for categorization
1307
+ * @enum {string}
1308
+ */
1309
+ type: "validation_error";
1310
+ /**
1311
+ * @description Specific error code for programmatic handling and i18n
1312
+ * @enum {string}
1313
+ */
1314
+ code: "INVALID_PARAMETER";
1315
+ /** @description Human-readable error message */
1316
+ message: string;
1317
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
1318
+ details?: {
1319
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
1320
+ field: string;
1321
+ /** @description Validation error message for this field */
1322
+ message: string;
1323
+ }[] | string;
1324
+ };
1325
+ };
1326
+ };
1327
+ };
1328
+ /** @description Unauthorized — invalid or missing kubeconfig */
1329
+ 401: {
1330
+ headers: {
1331
+ [name: string]: unknown;
1332
+ };
1333
+ content: {
1334
+ "application/json": {
1335
+ /** @description Structured error object containing type, code, message, and optional details */
1336
+ error: {
1337
+ /**
1338
+ * @description High-level error type for categorization
1339
+ * @constant
1340
+ */
1341
+ type: "authentication_error";
1342
+ /**
1343
+ * @description Specific error code for programmatic handling and i18n
1344
+ * @constant
1345
+ */
1346
+ code: "AUTHENTICATION_REQUIRED";
1347
+ /** @description Human-readable error message */
1348
+ message: string;
1349
+ /** @description Typically omitted. May contain additional context in edge cases. */
1350
+ details?: string;
1351
+ };
1352
+ };
1353
+ };
1354
+ };
1355
+ /** @description Forbidden — insufficient permissions */
1356
+ 403: {
1357
+ headers: {
1358
+ [name: string]: unknown;
1359
+ };
1360
+ content: {
1361
+ "application/json": {
1362
+ /** @description Structured error object containing type, code, message, and optional details */
1363
+ error: {
1364
+ /**
1365
+ * @description High-level error type for categorization
1366
+ * @constant
1367
+ */
1368
+ type: "authorization_error";
1369
+ /**
1370
+ * @description Specific error code for programmatic handling and i18n
1371
+ * @enum {string}
1372
+ */
1373
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
1374
+ /** @description Human-readable error message */
1375
+ message: string;
1376
+ /** @description Typically omitted. May contain additional context in edge cases. */
1377
+ details?: string;
1378
+ };
1379
+ };
1380
+ };
1381
+ };
1382
+ /** @description Internal server error */
1383
+ 500: {
1384
+ headers: {
1385
+ [name: string]: unknown;
1386
+ };
1387
+ content: {
1388
+ "application/json": {
1389
+ /** @description Structured error object containing type, code, message, and optional details */
1390
+ error: {
1391
+ /**
1392
+ * @description High-level error type for categorization
1393
+ * @enum {string}
1394
+ */
1395
+ type: "operation_error" | "internal_error";
1396
+ /**
1397
+ * @description Specific error code for programmatic handling and i18n
1398
+ * @enum {string}
1399
+ */
1400
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
1401
+ /** @description Human-readable error message */
1402
+ message: string;
1403
+ /** @description Raw error string from the underlying system, for troubleshooting. */
1404
+ details?: string;
1405
+ };
1406
+ };
1407
+ };
1408
+ };
1409
+ /** @description Service unavailable — Kubernetes cluster unreachable */
1410
+ 503: {
1411
+ headers: {
1412
+ [name: string]: unknown;
1413
+ };
1414
+ content: {
1415
+ "application/json": {
1416
+ /** @description Structured error object containing type, code, message, and optional details */
1417
+ error: {
1418
+ /**
1419
+ * @description High-level error type for categorization
1420
+ * @constant
1421
+ */
1422
+ type: "internal_error";
1423
+ /**
1424
+ * @description Specific error code for programmatic handling and i18n
1425
+ * @constant
1426
+ */
1427
+ code: "SERVICE_UNAVAILABLE";
1428
+ /** @description Human-readable error message */
1429
+ message: string;
1430
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
1431
+ details?: string;
1432
+ };
1433
+ };
1434
+ };
1435
+ };
1436
+ };
1437
+ };
1438
+ updateDatabase: {
1439
+ parameters: {
1440
+ query?: never;
1441
+ header?: never;
1442
+ path: {
1443
+ /** @description Name of the database to operate on (format: lowercase alphanumeric and hyphens) */
1444
+ databaseName: string;
1445
+ };
1446
+ cookie?: never;
1447
+ };
1448
+ /** @description Resource updates to apply. All fields inside `quota` are optional — only provide fields you want to change. */
1449
+ requestBody: {
1450
+ content: {
1451
+ "application/json": {
1452
+ quota: components["schemas"]["UpdateResourceSchema"];
1453
+ };
1454
+ };
1455
+ };
1456
+ responses: {
1457
+ /** @description Database update initiated successfully. */
1458
+ 204: {
1459
+ headers: {
1460
+ [name: string]: unknown;
1461
+ };
1462
+ content?: never;
1463
+ };
1464
+ /** @description Bad request — invalid resource values */
1465
+ 400: {
1466
+ headers: {
1467
+ [name: string]: unknown;
1468
+ };
1469
+ content: {
1470
+ "application/json": {
1471
+ /** @description Structured error object containing type, code, message, and optional details */
1472
+ error: {
1473
+ /**
1474
+ * @description High-level error type for categorization
1475
+ * @enum {string}
1476
+ */
1477
+ type: "validation_error";
1478
+ /**
1479
+ * @description Specific error code for programmatic handling and i18n
1480
+ * @enum {string}
1481
+ */
1482
+ code: "INVALID_PARAMETER" | "INVALID_VALUE";
1483
+ /** @description Human-readable error message */
1484
+ message: string;
1485
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
1486
+ details?: {
1487
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
1488
+ field: string;
1489
+ /** @description Validation error message for this field */
1490
+ message: string;
1491
+ }[] | string;
1492
+ };
1493
+ };
1494
+ };
1495
+ };
1496
+ /** @description Unauthorized — invalid or missing kubeconfig */
1497
+ 401: {
1498
+ headers: {
1499
+ [name: string]: unknown;
1500
+ };
1501
+ content: {
1502
+ "application/json": {
1503
+ /** @description Structured error object containing type, code, message, and optional details */
1504
+ error: {
1505
+ /**
1506
+ * @description High-level error type for categorization
1507
+ * @constant
1508
+ */
1509
+ type: "authentication_error";
1510
+ /**
1511
+ * @description Specific error code for programmatic handling and i18n
1512
+ * @constant
1513
+ */
1514
+ code: "AUTHENTICATION_REQUIRED";
1515
+ /** @description Human-readable error message */
1516
+ message: string;
1517
+ /** @description Typically omitted. May contain additional context in edge cases. */
1518
+ details?: string;
1519
+ };
1520
+ };
1521
+ };
1522
+ };
1523
+ /** @description Forbidden — insufficient permissions */
1524
+ 403: {
1525
+ headers: {
1526
+ [name: string]: unknown;
1527
+ };
1528
+ content: {
1529
+ "application/json": {
1530
+ /** @description Structured error object containing type, code, message, and optional details */
1531
+ error: {
1532
+ /**
1533
+ * @description High-level error type for categorization
1534
+ * @constant
1535
+ */
1536
+ type: "authorization_error";
1537
+ /**
1538
+ * @description Specific error code for programmatic handling and i18n
1539
+ * @enum {string}
1540
+ */
1541
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
1542
+ /** @description Human-readable error message */
1543
+ message: string;
1544
+ /** @description Typically omitted. May contain additional context in edge cases. */
1545
+ details?: string;
1546
+ };
1547
+ };
1548
+ };
1549
+ };
1550
+ /** @description Not found — database does not exist */
1551
+ 404: {
1552
+ headers: {
1553
+ [name: string]: unknown;
1554
+ };
1555
+ content: {
1556
+ "application/json": {
1557
+ /** @description Structured error object containing type, code, message, and optional details */
1558
+ error: {
1559
+ /**
1560
+ * @description High-level error type for categorization
1561
+ * @constant
1562
+ */
1563
+ type: "resource_error";
1564
+ /**
1565
+ * @description Specific error code for programmatic handling and i18n
1566
+ * @constant
1567
+ */
1568
+ code: "NOT_FOUND";
1569
+ /** @description Human-readable error message */
1570
+ message: string;
1571
+ /** @description Typically omitted. May contain additional context in edge cases. */
1572
+ details?: string;
1573
+ };
1574
+ };
1575
+ };
1576
+ };
1577
+ /** @description Conflict — database is currently being updated */
1578
+ 409: {
1579
+ headers: {
1580
+ [name: string]: unknown;
1581
+ };
1582
+ content: {
1583
+ "application/json": {
1584
+ /** @description Structured error object containing type, code, message, and optional details */
1585
+ error: {
1586
+ /**
1587
+ * @description High-level error type for categorization
1588
+ * @constant
1589
+ */
1590
+ type: "resource_error";
1591
+ /**
1592
+ * @description Specific error code for programmatic handling and i18n
1593
+ * @enum {string}
1594
+ */
1595
+ code: "ALREADY_EXISTS" | "CONFLICT";
1596
+ /** @description Human-readable error message */
1597
+ message: string;
1598
+ /** @description Typically omitted. May contain additional context in edge cases. */
1599
+ details?: string;
1600
+ };
1601
+ };
1602
+ };
1603
+ };
1604
+ /** @description Internal server error */
1605
+ 500: {
1606
+ headers: {
1607
+ [name: string]: unknown;
1608
+ };
1609
+ content: {
1610
+ "application/json": {
1611
+ /** @description Structured error object containing type, code, message, and optional details */
1612
+ error: {
1613
+ /**
1614
+ * @description High-level error type for categorization
1615
+ * @enum {string}
1616
+ */
1617
+ type: "operation_error" | "internal_error";
1618
+ /**
1619
+ * @description Specific error code for programmatic handling and i18n
1620
+ * @enum {string}
1621
+ */
1622
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
1623
+ /** @description Human-readable error message */
1624
+ message: string;
1625
+ /** @description Raw error string from the underlying system, for troubleshooting. */
1626
+ details?: string;
1627
+ };
1628
+ };
1629
+ };
1630
+ };
1631
+ /** @description Service unavailable — Kubernetes cluster unreachable */
1632
+ 503: {
1633
+ headers: {
1634
+ [name: string]: unknown;
1635
+ };
1636
+ content: {
1637
+ "application/json": {
1638
+ /** @description Structured error object containing type, code, message, and optional details */
1639
+ error: {
1640
+ /**
1641
+ * @description High-level error type for categorization
1642
+ * @constant
1643
+ */
1644
+ type: "internal_error";
1645
+ /**
1646
+ * @description Specific error code for programmatic handling and i18n
1647
+ * @constant
1648
+ */
1649
+ code: "SERVICE_UNAVAILABLE";
1650
+ /** @description Human-readable error message */
1651
+ message: string;
1652
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
1653
+ details?: string;
1654
+ };
1655
+ };
1656
+ };
1657
+ };
1658
+ };
1659
+ };
1660
+ startDatabase: {
1661
+ parameters: {
1662
+ query?: never;
1663
+ header?: never;
1664
+ path: {
1665
+ /** @description Name of the database to operate on (format: lowercase alphanumeric and hyphens) */
1666
+ databaseName: string;
1667
+ };
1668
+ cookie?: never;
1669
+ };
1670
+ requestBody?: never;
1671
+ responses: {
1672
+ /** @description Database start initiated (or was already running). */
1673
+ 204: {
1674
+ headers: {
1675
+ [name: string]: unknown;
1676
+ };
1677
+ content?: never;
1678
+ };
1679
+ /** @description Bad request — invalid path parameters */
1680
+ 400: {
1681
+ headers: {
1682
+ [name: string]: unknown;
1683
+ };
1684
+ content: {
1685
+ "application/json": {
1686
+ /** @description Structured error object containing type, code, message, and optional details */
1687
+ error: {
1688
+ /**
1689
+ * @description High-level error type for categorization
1690
+ * @enum {string}
1691
+ */
1692
+ type: "validation_error";
1693
+ /**
1694
+ * @description Specific error code for programmatic handling and i18n
1695
+ * @enum {string}
1696
+ */
1697
+ code: "INVALID_PARAMETER";
1698
+ /** @description Human-readable error message */
1699
+ message: string;
1700
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
1701
+ details?: {
1702
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
1703
+ field: string;
1704
+ /** @description Validation error message for this field */
1705
+ message: string;
1706
+ }[] | string;
1707
+ };
1708
+ };
1709
+ };
1710
+ };
1711
+ /** @description Unauthorized — invalid or missing kubeconfig */
1712
+ 401: {
1713
+ headers: {
1714
+ [name: string]: unknown;
1715
+ };
1716
+ content: {
1717
+ "application/json": {
1718
+ /** @description Structured error object containing type, code, message, and optional details */
1719
+ error: {
1720
+ /**
1721
+ * @description High-level error type for categorization
1722
+ * @constant
1723
+ */
1724
+ type: "authentication_error";
1725
+ /**
1726
+ * @description Specific error code for programmatic handling and i18n
1727
+ * @constant
1728
+ */
1729
+ code: "AUTHENTICATION_REQUIRED";
1730
+ /** @description Human-readable error message */
1731
+ message: string;
1732
+ /** @description Typically omitted. May contain additional context in edge cases. */
1733
+ details?: string;
1734
+ };
1735
+ };
1736
+ };
1737
+ };
1738
+ /** @description Forbidden — insufficient permissions */
1739
+ 403: {
1740
+ headers: {
1741
+ [name: string]: unknown;
1742
+ };
1743
+ content: {
1744
+ "application/json": {
1745
+ /** @description Structured error object containing type, code, message, and optional details */
1746
+ error: {
1747
+ /**
1748
+ * @description High-level error type for categorization
1749
+ * @constant
1750
+ */
1751
+ type: "authorization_error";
1752
+ /**
1753
+ * @description Specific error code for programmatic handling and i18n
1754
+ * @enum {string}
1755
+ */
1756
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
1757
+ /** @description Human-readable error message */
1758
+ message: string;
1759
+ /** @description Typically omitted. May contain additional context in edge cases. */
1760
+ details?: string;
1761
+ };
1762
+ };
1763
+ };
1764
+ };
1765
+ /** @description Not found — database does not exist */
1766
+ 404: {
1767
+ headers: {
1768
+ [name: string]: unknown;
1769
+ };
1770
+ content: {
1771
+ "application/json": {
1772
+ /** @description Structured error object containing type, code, message, and optional details */
1773
+ error: {
1774
+ /**
1775
+ * @description High-level error type for categorization
1776
+ * @constant
1777
+ */
1778
+ type: "resource_error";
1779
+ /**
1780
+ * @description Specific error code for programmatic handling and i18n
1781
+ * @constant
1782
+ */
1783
+ code: "NOT_FOUND";
1784
+ /** @description Human-readable error message */
1785
+ message: string;
1786
+ /** @description Typically omitted. May contain additional context in edge cases. */
1787
+ details?: string;
1788
+ };
1789
+ };
1790
+ };
1791
+ };
1792
+ /** @description Internal server error */
1793
+ 500: {
1794
+ headers: {
1795
+ [name: string]: unknown;
1796
+ };
1797
+ content: {
1798
+ "application/json": {
1799
+ /** @description Structured error object containing type, code, message, and optional details */
1800
+ error: {
1801
+ /**
1802
+ * @description High-level error type for categorization
1803
+ * @enum {string}
1804
+ */
1805
+ type: "operation_error" | "internal_error";
1806
+ /**
1807
+ * @description Specific error code for programmatic handling and i18n
1808
+ * @enum {string}
1809
+ */
1810
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
1811
+ /** @description Human-readable error message */
1812
+ message: string;
1813
+ /** @description Raw error string from the underlying system, for troubleshooting. */
1814
+ details?: string;
1815
+ };
1816
+ };
1817
+ };
1818
+ };
1819
+ /** @description Service unavailable — Kubernetes cluster unreachable */
1820
+ 503: {
1821
+ headers: {
1822
+ [name: string]: unknown;
1823
+ };
1824
+ content: {
1825
+ "application/json": {
1826
+ /** @description Structured error object containing type, code, message, and optional details */
1827
+ error: {
1828
+ /**
1829
+ * @description High-level error type for categorization
1830
+ * @constant
1831
+ */
1832
+ type: "internal_error";
1833
+ /**
1834
+ * @description Specific error code for programmatic handling and i18n
1835
+ * @constant
1836
+ */
1837
+ code: "SERVICE_UNAVAILABLE";
1838
+ /** @description Human-readable error message */
1839
+ message: string;
1840
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
1841
+ details?: string;
1842
+ };
1843
+ };
1844
+ };
1845
+ };
1846
+ };
1847
+ };
1848
+ pauseDatabase: {
1849
+ parameters: {
1850
+ query?: never;
1851
+ header?: never;
1852
+ path: {
1853
+ /** @description Name of the database to operate on (format: lowercase alphanumeric and hyphens) */
1854
+ databaseName: string;
1855
+ };
1856
+ cookie?: never;
1857
+ };
1858
+ requestBody?: never;
1859
+ responses: {
1860
+ /** @description Database pause initiated successfully. */
1861
+ 204: {
1862
+ headers: {
1863
+ [name: string]: unknown;
1864
+ };
1865
+ content?: never;
1866
+ };
1867
+ /** @description Bad request — invalid path parameters */
1868
+ 400: {
1869
+ headers: {
1870
+ [name: string]: unknown;
1871
+ };
1872
+ content: {
1873
+ "application/json": {
1874
+ /** @description Structured error object containing type, code, message, and optional details */
1875
+ error: {
1876
+ /**
1877
+ * @description High-level error type for categorization
1878
+ * @enum {string}
1879
+ */
1880
+ type: "validation_error";
1881
+ /**
1882
+ * @description Specific error code for programmatic handling and i18n
1883
+ * @enum {string}
1884
+ */
1885
+ code: "INVALID_PARAMETER";
1886
+ /** @description Human-readable error message */
1887
+ message: string;
1888
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
1889
+ details?: {
1890
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
1891
+ field: string;
1892
+ /** @description Validation error message for this field */
1893
+ message: string;
1894
+ }[] | string;
1895
+ };
1896
+ };
1897
+ };
1898
+ };
1899
+ /** @description Unauthorized — invalid or missing kubeconfig */
1900
+ 401: {
1901
+ headers: {
1902
+ [name: string]: unknown;
1903
+ };
1904
+ content: {
1905
+ "application/json": {
1906
+ /** @description Structured error object containing type, code, message, and optional details */
1907
+ error: {
1908
+ /**
1909
+ * @description High-level error type for categorization
1910
+ * @constant
1911
+ */
1912
+ type: "authentication_error";
1913
+ /**
1914
+ * @description Specific error code for programmatic handling and i18n
1915
+ * @constant
1916
+ */
1917
+ code: "AUTHENTICATION_REQUIRED";
1918
+ /** @description Human-readable error message */
1919
+ message: string;
1920
+ /** @description Typically omitted. May contain additional context in edge cases. */
1921
+ details?: string;
1922
+ };
1923
+ };
1924
+ };
1925
+ };
1926
+ /** @description Forbidden — insufficient permissions */
1927
+ 403: {
1928
+ headers: {
1929
+ [name: string]: unknown;
1930
+ };
1931
+ content: {
1932
+ "application/json": {
1933
+ /** @description Structured error object containing type, code, message, and optional details */
1934
+ error: {
1935
+ /**
1936
+ * @description High-level error type for categorization
1937
+ * @constant
1938
+ */
1939
+ type: "authorization_error";
1940
+ /**
1941
+ * @description Specific error code for programmatic handling and i18n
1942
+ * @enum {string}
1943
+ */
1944
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
1945
+ /** @description Human-readable error message */
1946
+ message: string;
1947
+ /** @description Typically omitted. May contain additional context in edge cases. */
1948
+ details?: string;
1949
+ };
1950
+ };
1951
+ };
1952
+ };
1953
+ /** @description Not found — database does not exist */
1954
+ 404: {
1955
+ headers: {
1956
+ [name: string]: unknown;
1957
+ };
1958
+ content: {
1959
+ "application/json": {
1960
+ /** @description Structured error object containing type, code, message, and optional details */
1961
+ error: {
1962
+ /**
1963
+ * @description High-level error type for categorization
1964
+ * @constant
1965
+ */
1966
+ type: "resource_error";
1967
+ /**
1968
+ * @description Specific error code for programmatic handling and i18n
1969
+ * @constant
1970
+ */
1971
+ code: "NOT_FOUND";
1972
+ /** @description Human-readable error message */
1973
+ message: string;
1974
+ /** @description Typically omitted. May contain additional context in edge cases. */
1975
+ details?: string;
1976
+ };
1977
+ };
1978
+ };
1979
+ };
1980
+ /** @description Conflict — database is already paused or a pause operation is in progress */
1981
+ 409: {
1982
+ headers: {
1983
+ [name: string]: unknown;
1984
+ };
1985
+ content: {
1986
+ "application/json": {
1987
+ /** @description Structured error object containing type, code, message, and optional details */
1988
+ error: {
1989
+ /**
1990
+ * @description High-level error type for categorization
1991
+ * @constant
1992
+ */
1993
+ type: "resource_error";
1994
+ /**
1995
+ * @description Specific error code for programmatic handling and i18n
1996
+ * @enum {string}
1997
+ */
1998
+ code: "ALREADY_EXISTS" | "CONFLICT";
1999
+ /** @description Human-readable error message */
2000
+ message: string;
2001
+ /** @description Typically omitted. May contain additional context in edge cases. */
2002
+ details?: string;
2003
+ };
2004
+ };
2005
+ };
2006
+ };
2007
+ /** @description Internal server error */
2008
+ 500: {
2009
+ headers: {
2010
+ [name: string]: unknown;
2011
+ };
2012
+ content: {
2013
+ "application/json": {
2014
+ /** @description Structured error object containing type, code, message, and optional details */
2015
+ error: {
2016
+ /**
2017
+ * @description High-level error type for categorization
2018
+ * @enum {string}
2019
+ */
2020
+ type: "operation_error" | "internal_error";
2021
+ /**
2022
+ * @description Specific error code for programmatic handling and i18n
2023
+ * @enum {string}
2024
+ */
2025
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
2026
+ /** @description Human-readable error message */
2027
+ message: string;
2028
+ /** @description Raw error string from the underlying system, for troubleshooting. */
2029
+ details?: string;
2030
+ };
2031
+ };
2032
+ };
2033
+ };
2034
+ /** @description Service unavailable — Kubernetes cluster unreachable */
2035
+ 503: {
2036
+ headers: {
2037
+ [name: string]: unknown;
2038
+ };
2039
+ content: {
2040
+ "application/json": {
2041
+ /** @description Structured error object containing type, code, message, and optional details */
2042
+ error: {
2043
+ /**
2044
+ * @description High-level error type for categorization
2045
+ * @constant
2046
+ */
2047
+ type: "internal_error";
2048
+ /**
2049
+ * @description Specific error code for programmatic handling and i18n
2050
+ * @constant
2051
+ */
2052
+ code: "SERVICE_UNAVAILABLE";
2053
+ /** @description Human-readable error message */
2054
+ message: string;
2055
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
2056
+ details?: string;
2057
+ };
2058
+ };
2059
+ };
2060
+ };
2061
+ };
2062
+ };
2063
+ restartDatabase: {
2064
+ parameters: {
2065
+ query?: never;
2066
+ header?: never;
2067
+ path: {
2068
+ /** @description Name of the database to operate on (format: lowercase alphanumeric and hyphens) */
2069
+ databaseName: string;
2070
+ };
2071
+ cookie?: never;
2072
+ };
2073
+ requestBody?: never;
2074
+ responses: {
2075
+ /** @description Database restart initiated (or was already restarting). */
2076
+ 204: {
2077
+ headers: {
2078
+ [name: string]: unknown;
2079
+ };
2080
+ content?: never;
2081
+ };
2082
+ /** @description Bad request — invalid path parameters */
2083
+ 400: {
2084
+ headers: {
2085
+ [name: string]: unknown;
2086
+ };
2087
+ content: {
2088
+ "application/json": {
2089
+ /** @description Structured error object containing type, code, message, and optional details */
2090
+ error: {
2091
+ /**
2092
+ * @description High-level error type for categorization
2093
+ * @enum {string}
2094
+ */
2095
+ type: "validation_error";
2096
+ /**
2097
+ * @description Specific error code for programmatic handling and i18n
2098
+ * @enum {string}
2099
+ */
2100
+ code: "INVALID_PARAMETER";
2101
+ /** @description Human-readable error message */
2102
+ message: string;
2103
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
2104
+ details?: {
2105
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
2106
+ field: string;
2107
+ /** @description Validation error message for this field */
2108
+ message: string;
2109
+ }[] | string;
2110
+ };
2111
+ };
2112
+ };
2113
+ };
2114
+ /** @description Unauthorized — invalid or missing kubeconfig */
2115
+ 401: {
2116
+ headers: {
2117
+ [name: string]: unknown;
2118
+ };
2119
+ content: {
2120
+ "application/json": {
2121
+ /** @description Structured error object containing type, code, message, and optional details */
2122
+ error: {
2123
+ /**
2124
+ * @description High-level error type for categorization
2125
+ * @constant
2126
+ */
2127
+ type: "authentication_error";
2128
+ /**
2129
+ * @description Specific error code for programmatic handling and i18n
2130
+ * @constant
2131
+ */
2132
+ code: "AUTHENTICATION_REQUIRED";
2133
+ /** @description Human-readable error message */
2134
+ message: string;
2135
+ /** @description Typically omitted. May contain additional context in edge cases. */
2136
+ details?: string;
2137
+ };
2138
+ };
2139
+ };
2140
+ };
2141
+ /** @description Forbidden — insufficient permissions */
2142
+ 403: {
2143
+ headers: {
2144
+ [name: string]: unknown;
2145
+ };
2146
+ content: {
2147
+ "application/json": {
2148
+ /** @description Structured error object containing type, code, message, and optional details */
2149
+ error: {
2150
+ /**
2151
+ * @description High-level error type for categorization
2152
+ * @constant
2153
+ */
2154
+ type: "authorization_error";
2155
+ /**
2156
+ * @description Specific error code for programmatic handling and i18n
2157
+ * @enum {string}
2158
+ */
2159
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
2160
+ /** @description Human-readable error message */
2161
+ message: string;
2162
+ /** @description Typically omitted. May contain additional context in edge cases. */
2163
+ details?: string;
2164
+ };
2165
+ };
2166
+ };
2167
+ };
2168
+ /** @description Not found — database does not exist */
2169
+ 404: {
2170
+ headers: {
2171
+ [name: string]: unknown;
2172
+ };
2173
+ content: {
2174
+ "application/json": {
2175
+ /** @description Structured error object containing type, code, message, and optional details */
2176
+ error: {
2177
+ /**
2178
+ * @description High-level error type for categorization
2179
+ * @constant
2180
+ */
2181
+ type: "resource_error";
2182
+ /**
2183
+ * @description Specific error code for programmatic handling and i18n
2184
+ * @constant
2185
+ */
2186
+ code: "NOT_FOUND";
2187
+ /** @description Human-readable error message */
2188
+ message: string;
2189
+ /** @description Typically omitted. May contain additional context in edge cases. */
2190
+ details?: string;
2191
+ };
2192
+ };
2193
+ };
2194
+ };
2195
+ /** @description Internal server error */
2196
+ 500: {
2197
+ headers: {
2198
+ [name: string]: unknown;
2199
+ };
2200
+ content: {
2201
+ "application/json": {
2202
+ /** @description Structured error object containing type, code, message, and optional details */
2203
+ error: {
2204
+ /**
2205
+ * @description High-level error type for categorization
2206
+ * @enum {string}
2207
+ */
2208
+ type: "operation_error" | "internal_error";
2209
+ /**
2210
+ * @description Specific error code for programmatic handling and i18n
2211
+ * @enum {string}
2212
+ */
2213
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
2214
+ /** @description Human-readable error message */
2215
+ message: string;
2216
+ /** @description Raw error string from the underlying system, for troubleshooting. */
2217
+ details?: string;
2218
+ };
2219
+ };
2220
+ };
2221
+ };
2222
+ /** @description Service unavailable — Kubernetes cluster unreachable */
2223
+ 503: {
2224
+ headers: {
2225
+ [name: string]: unknown;
2226
+ };
2227
+ content: {
2228
+ "application/json": {
2229
+ /** @description Structured error object containing type, code, message, and optional details */
2230
+ error: {
2231
+ /**
2232
+ * @description High-level error type for categorization
2233
+ * @constant
2234
+ */
2235
+ type: "internal_error";
2236
+ /**
2237
+ * @description Specific error code for programmatic handling and i18n
2238
+ * @constant
2239
+ */
2240
+ code: "SERVICE_UNAVAILABLE";
2241
+ /** @description Human-readable error message */
2242
+ message: string;
2243
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
2244
+ details?: string;
2245
+ };
2246
+ };
2247
+ };
2248
+ };
2249
+ };
2250
+ };
2251
+ listDatabaseBackups: {
2252
+ parameters: {
2253
+ query?: never;
2254
+ header?: never;
2255
+ path: {
2256
+ /** @description Name of the database to operate on (format: lowercase alphanumeric and hyphens) */
2257
+ databaseName: string;
2258
+ };
2259
+ cookie?: never;
2260
+ };
2261
+ requestBody?: never;
2262
+ responses: {
2263
+ /** @description Backups retrieved successfully */
2264
+ 200: {
2265
+ headers: {
2266
+ [name: string]: unknown;
2267
+ };
2268
+ content: {
2269
+ "application/json": {
2270
+ /**
2271
+ * @description Backup resource name
2272
+ * @example my-postgres-db-backup-20240115
2273
+ */
2274
+ name: string;
2275
+ /**
2276
+ * @description Optional description decoded from backup annotations. Empty string if none was provided.
2277
+ * @example weekly backup before schema migration
2278
+ */
2279
+ description: string;
2280
+ /**
2281
+ * Format: date-time
2282
+ * @description Creation timestamp of the backup resource
2283
+ * @example 2024-01-15T02:00:00Z
2284
+ */
2285
+ createdAt: string;
2286
+ /**
2287
+ * @description Current backup status as reported by Kubeblocks (lowercase)
2288
+ * @example completed
2289
+ * @enum {string}
2290
+ */
2291
+ status: "completed" | "inprogress" | "failed" | "unknown" | "running" | "deleting";
2292
+ }[];
2293
+ };
2294
+ };
2295
+ /** @description Bad request — invalid path parameters */
2296
+ 400: {
2297
+ headers: {
2298
+ [name: string]: unknown;
2299
+ };
2300
+ content: {
2301
+ "application/json": {
2302
+ /** @description Structured error object containing type, code, message, and optional details */
2303
+ error: {
2304
+ /**
2305
+ * @description High-level error type for categorization
2306
+ * @enum {string}
2307
+ */
2308
+ type: "validation_error";
2309
+ /**
2310
+ * @description Specific error code for programmatic handling and i18n
2311
+ * @enum {string}
2312
+ */
2313
+ code: "INVALID_PARAMETER";
2314
+ /** @description Human-readable error message */
2315
+ message: string;
2316
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
2317
+ details?: {
2318
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
2319
+ field: string;
2320
+ /** @description Validation error message for this field */
2321
+ message: string;
2322
+ }[] | string;
2323
+ };
2324
+ };
2325
+ };
2326
+ };
2327
+ /** @description Unauthorized — invalid or missing kubeconfig */
2328
+ 401: {
2329
+ headers: {
2330
+ [name: string]: unknown;
2331
+ };
2332
+ content: {
2333
+ "application/json": {
2334
+ /** @description Structured error object containing type, code, message, and optional details */
2335
+ error: {
2336
+ /**
2337
+ * @description High-level error type for categorization
2338
+ * @constant
2339
+ */
2340
+ type: "authentication_error";
2341
+ /**
2342
+ * @description Specific error code for programmatic handling and i18n
2343
+ * @constant
2344
+ */
2345
+ code: "AUTHENTICATION_REQUIRED";
2346
+ /** @description Human-readable error message */
2347
+ message: string;
2348
+ /** @description Typically omitted. May contain additional context in edge cases. */
2349
+ details?: string;
2350
+ };
2351
+ };
2352
+ };
2353
+ };
2354
+ /** @description Forbidden — insufficient permissions */
2355
+ 403: {
2356
+ headers: {
2357
+ [name: string]: unknown;
2358
+ };
2359
+ content: {
2360
+ "application/json": {
2361
+ /** @description Structured error object containing type, code, message, and optional details */
2362
+ error: {
2363
+ /**
2364
+ * @description High-level error type for categorization
2365
+ * @constant
2366
+ */
2367
+ type: "authorization_error";
2368
+ /**
2369
+ * @description Specific error code for programmatic handling and i18n
2370
+ * @enum {string}
2371
+ */
2372
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
2373
+ /** @description Human-readable error message */
2374
+ message: string;
2375
+ /** @description Typically omitted. May contain additional context in edge cases. */
2376
+ details?: string;
2377
+ };
2378
+ };
2379
+ };
2380
+ };
2381
+ /** @description Internal server error */
2382
+ 500: {
2383
+ headers: {
2384
+ [name: string]: unknown;
2385
+ };
2386
+ content: {
2387
+ "application/json": {
2388
+ /** @description Structured error object containing type, code, message, and optional details */
2389
+ error: {
2390
+ /**
2391
+ * @description High-level error type for categorization
2392
+ * @enum {string}
2393
+ */
2394
+ type: "operation_error" | "internal_error";
2395
+ /**
2396
+ * @description Specific error code for programmatic handling and i18n
2397
+ * @enum {string}
2398
+ */
2399
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
2400
+ /** @description Human-readable error message */
2401
+ message: string;
2402
+ /** @description Raw error string from the underlying system, for troubleshooting. */
2403
+ details?: string;
2404
+ };
2405
+ };
2406
+ };
2407
+ };
2408
+ /** @description Service unavailable — Kubernetes cluster unreachable */
2409
+ 503: {
2410
+ headers: {
2411
+ [name: string]: unknown;
2412
+ };
2413
+ content: {
2414
+ "application/json": {
2415
+ /** @description Structured error object containing type, code, message, and optional details */
2416
+ error: {
2417
+ /**
2418
+ * @description High-level error type for categorization
2419
+ * @constant
2420
+ */
2421
+ type: "internal_error";
2422
+ /**
2423
+ * @description Specific error code for programmatic handling and i18n
2424
+ * @constant
2425
+ */
2426
+ code: "SERVICE_UNAVAILABLE";
2427
+ /** @description Human-readable error message */
2428
+ message: string;
2429
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
2430
+ details?: string;
2431
+ };
2432
+ };
2433
+ };
2434
+ };
2435
+ };
2436
+ };
2437
+ createDatabaseBackup: {
2438
+ parameters: {
2439
+ query?: never;
2440
+ header?: never;
2441
+ path: {
2442
+ /** @description Name of the database to operate on (format: lowercase alphanumeric and hyphens) */
2443
+ databaseName: string;
2444
+ };
2445
+ cookie?: never;
2446
+ };
2447
+ /** @description Optional backup configuration including description annotation and explicit backup name */
2448
+ requestBody?: {
2449
+ content: {
2450
+ "application/json": {
2451
+ /** @description Optional description for the backup. Stored as label on the Backup resource (max 31 characters due to Kubernetes label value limit of 63 characters when hex-encoded) */
2452
+ description?: string;
2453
+ /** @description Optional custom backup name. If omitted, a name will be auto-generated using the database name prefix */
2454
+ name?: string;
2455
+ };
2456
+ };
2457
+ };
2458
+ responses: {
2459
+ /** @description Backup creation initiated successfully. */
2460
+ 204: {
2461
+ headers: {
2462
+ [name: string]: unknown;
2463
+ };
2464
+ content?: never;
2465
+ };
2466
+ /** @description Bad request — invalid body, description too long, or unsupported database type */
2467
+ 400: {
2468
+ headers: {
2469
+ [name: string]: unknown;
2470
+ };
2471
+ content: {
2472
+ "application/json": {
2473
+ /** @description Structured error object containing type, code, message, and optional details */
2474
+ error: {
2475
+ /**
2476
+ * @description High-level error type for categorization
2477
+ * @enum {string}
2478
+ */
2479
+ type: "validation_error";
2480
+ /**
2481
+ * @description Specific error code for programmatic handling and i18n
2482
+ * @enum {string}
2483
+ */
2484
+ code: "INVALID_PARAMETER" | "INVALID_VALUE";
2485
+ /** @description Human-readable error message */
2486
+ message: string;
2487
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
2488
+ details?: {
2489
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
2490
+ field: string;
2491
+ /** @description Validation error message for this field */
2492
+ message: string;
2493
+ }[] | string;
2494
+ };
2495
+ };
2496
+ };
2497
+ };
2498
+ /** @description Unauthorized — invalid or missing kubeconfig */
2499
+ 401: {
2500
+ headers: {
2501
+ [name: string]: unknown;
2502
+ };
2503
+ content: {
2504
+ "application/json": {
2505
+ /** @description Structured error object containing type, code, message, and optional details */
2506
+ error: {
2507
+ /**
2508
+ * @description High-level error type for categorization
2509
+ * @constant
2510
+ */
2511
+ type: "authentication_error";
2512
+ /**
2513
+ * @description Specific error code for programmatic handling and i18n
2514
+ * @constant
2515
+ */
2516
+ code: "AUTHENTICATION_REQUIRED";
2517
+ /** @description Human-readable error message */
2518
+ message: string;
2519
+ /** @description Typically omitted. May contain additional context in edge cases. */
2520
+ details?: string;
2521
+ };
2522
+ };
2523
+ };
2524
+ };
2525
+ /** @description Forbidden — insufficient permissions */
2526
+ 403: {
2527
+ headers: {
2528
+ [name: string]: unknown;
2529
+ };
2530
+ content: {
2531
+ "application/json": {
2532
+ /** @description Structured error object containing type, code, message, and optional details */
2533
+ error: {
2534
+ /**
2535
+ * @description High-level error type for categorization
2536
+ * @constant
2537
+ */
2538
+ type: "authorization_error";
2539
+ /**
2540
+ * @description Specific error code for programmatic handling and i18n
2541
+ * @enum {string}
2542
+ */
2543
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
2544
+ /** @description Human-readable error message */
2545
+ message: string;
2546
+ /** @description Typically omitted. May contain additional context in edge cases. */
2547
+ details?: string;
2548
+ };
2549
+ };
2550
+ };
2551
+ };
2552
+ /** @description Not found — database does not exist */
2553
+ 404: {
2554
+ headers: {
2555
+ [name: string]: unknown;
2556
+ };
2557
+ content: {
2558
+ "application/json": {
2559
+ /** @description Structured error object containing type, code, message, and optional details */
2560
+ error: {
2561
+ /**
2562
+ * @description High-level error type for categorization
2563
+ * @constant
2564
+ */
2565
+ type: "resource_error";
2566
+ /**
2567
+ * @description Specific error code for programmatic handling and i18n
2568
+ * @constant
2569
+ */
2570
+ code: "NOT_FOUND";
2571
+ /** @description Human-readable error message */
2572
+ message: string;
2573
+ /** @description Typically omitted. May contain additional context in edge cases. */
2574
+ details?: string;
2575
+ };
2576
+ };
2577
+ };
2578
+ };
2579
+ /** @description Conflict — a backup is currently in progress */
2580
+ 409: {
2581
+ headers: {
2582
+ [name: string]: unknown;
2583
+ };
2584
+ content: {
2585
+ "application/json": {
2586
+ /** @description Structured error object containing type, code, message, and optional details */
2587
+ error: {
2588
+ /**
2589
+ * @description High-level error type for categorization
2590
+ * @constant
2591
+ */
2592
+ type: "resource_error";
2593
+ /**
2594
+ * @description Specific error code for programmatic handling and i18n
2595
+ * @enum {string}
2596
+ */
2597
+ code: "ALREADY_EXISTS" | "CONFLICT";
2598
+ /** @description Human-readable error message */
2599
+ message: string;
2600
+ /** @description Typically omitted. May contain additional context in edge cases. */
2601
+ details?: string;
2602
+ };
2603
+ };
2604
+ };
2605
+ };
2606
+ /** @description Internal server error */
2607
+ 500: {
2608
+ headers: {
2609
+ [name: string]: unknown;
2610
+ };
2611
+ content: {
2612
+ "application/json": {
2613
+ /** @description Structured error object containing type, code, message, and optional details */
2614
+ error: {
2615
+ /**
2616
+ * @description High-level error type for categorization
2617
+ * @enum {string}
2618
+ */
2619
+ type: "operation_error" | "internal_error";
2620
+ /**
2621
+ * @description Specific error code for programmatic handling and i18n
2622
+ * @enum {string}
2623
+ */
2624
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
2625
+ /** @description Human-readable error message */
2626
+ message: string;
2627
+ /** @description Raw error string from the underlying system, for troubleshooting. */
2628
+ details?: string;
2629
+ };
2630
+ };
2631
+ };
2632
+ };
2633
+ /** @description Service unavailable — Kubernetes cluster unreachable */
2634
+ 503: {
2635
+ headers: {
2636
+ [name: string]: unknown;
2637
+ };
2638
+ content: {
2639
+ "application/json": {
2640
+ /** @description Structured error object containing type, code, message, and optional details */
2641
+ error: {
2642
+ /**
2643
+ * @description High-level error type for categorization
2644
+ * @constant
2645
+ */
2646
+ type: "internal_error";
2647
+ /**
2648
+ * @description Specific error code for programmatic handling and i18n
2649
+ * @constant
2650
+ */
2651
+ code: "SERVICE_UNAVAILABLE";
2652
+ /** @description Human-readable error message */
2653
+ message: string;
2654
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
2655
+ details?: string;
2656
+ };
2657
+ };
2658
+ };
2659
+ };
2660
+ };
2661
+ };
2662
+ deleteDatabaseBackup: {
2663
+ parameters: {
2664
+ query?: never;
2665
+ header?: never;
2666
+ path: {
2667
+ /** @description Name of the database that owns the backup (format: lowercase alphanumeric and hyphens) */
2668
+ databaseName: string;
2669
+ /** @description Name of the backup to delete (format: lowercase alphanumeric and hyphens) */
2670
+ backupName: string;
2671
+ };
2672
+ cookie?: never;
2673
+ };
2674
+ requestBody?: never;
2675
+ responses: {
2676
+ /** @description Backup deleted (or did not exist). */
2677
+ 204: {
2678
+ headers: {
2679
+ [name: string]: unknown;
2680
+ };
2681
+ content?: never;
2682
+ };
2683
+ /** @description Bad request — missing or invalid parameters */
2684
+ 400: {
2685
+ headers: {
2686
+ [name: string]: unknown;
2687
+ };
2688
+ content: {
2689
+ "application/json": {
2690
+ /** @description Structured error object containing type, code, message, and optional details */
2691
+ error: {
2692
+ /**
2693
+ * @description High-level error type for categorization
2694
+ * @enum {string}
2695
+ */
2696
+ type: "validation_error";
2697
+ /**
2698
+ * @description Specific error code for programmatic handling and i18n
2699
+ * @enum {string}
2700
+ */
2701
+ code: "INVALID_PARAMETER";
2702
+ /** @description Human-readable error message */
2703
+ message: string;
2704
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
2705
+ details?: {
2706
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
2707
+ field: string;
2708
+ /** @description Validation error message for this field */
2709
+ message: string;
2710
+ }[] | string;
2711
+ };
2712
+ };
2713
+ };
2714
+ };
2715
+ /** @description Unauthorized — invalid or missing kubeconfig */
2716
+ 401: {
2717
+ headers: {
2718
+ [name: string]: unknown;
2719
+ };
2720
+ content: {
2721
+ "application/json": {
2722
+ /** @description Structured error object containing type, code, message, and optional details */
2723
+ error: {
2724
+ /**
2725
+ * @description High-level error type for categorization
2726
+ * @constant
2727
+ */
2728
+ type: "authentication_error";
2729
+ /**
2730
+ * @description Specific error code for programmatic handling and i18n
2731
+ * @constant
2732
+ */
2733
+ code: "AUTHENTICATION_REQUIRED";
2734
+ /** @description Human-readable error message */
2735
+ message: string;
2736
+ /** @description Typically omitted. May contain additional context in edge cases. */
2737
+ details?: string;
2738
+ };
2739
+ };
2740
+ };
2741
+ };
2742
+ /** @description Forbidden — insufficient permissions */
2743
+ 403: {
2744
+ headers: {
2745
+ [name: string]: unknown;
2746
+ };
2747
+ content: {
2748
+ "application/json": {
2749
+ /** @description Structured error object containing type, code, message, and optional details */
2750
+ error: {
2751
+ /**
2752
+ * @description High-level error type for categorization
2753
+ * @constant
2754
+ */
2755
+ type: "authorization_error";
2756
+ /**
2757
+ * @description Specific error code for programmatic handling and i18n
2758
+ * @enum {string}
2759
+ */
2760
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
2761
+ /** @description Human-readable error message */
2762
+ message: string;
2763
+ /** @description Typically omitted. May contain additional context in edge cases. */
2764
+ details?: string;
2765
+ };
2766
+ };
2767
+ };
2768
+ };
2769
+ /** @description Internal server error */
2770
+ 500: {
2771
+ headers: {
2772
+ [name: string]: unknown;
2773
+ };
2774
+ content: {
2775
+ "application/json": {
2776
+ /** @description Structured error object containing type, code, message, and optional details */
2777
+ error: {
2778
+ /**
2779
+ * @description High-level error type for categorization
2780
+ * @enum {string}
2781
+ */
2782
+ type: "operation_error" | "internal_error";
2783
+ /**
2784
+ * @description Specific error code for programmatic handling and i18n
2785
+ * @enum {string}
2786
+ */
2787
+ code: "KUBERNETES_ERROR" | "INTERNAL_ERROR";
2788
+ /** @description Human-readable error message */
2789
+ message: string;
2790
+ /** @description Raw error string from the underlying system, for troubleshooting. */
2791
+ details?: string;
2792
+ };
2793
+ };
2794
+ };
2795
+ };
2796
+ /** @description Service unavailable — Kubernetes cluster unreachable */
2797
+ 503: {
2798
+ headers: {
2799
+ [name: string]: unknown;
2800
+ };
2801
+ content: {
2802
+ "application/json": {
2803
+ /** @description Structured error object containing type, code, message, and optional details */
2804
+ error: {
2805
+ /**
2806
+ * @description High-level error type for categorization
2807
+ * @constant
2808
+ */
2809
+ type: "internal_error";
2810
+ /**
2811
+ * @description Specific error code for programmatic handling and i18n
2812
+ * @constant
2813
+ */
2814
+ code: "SERVICE_UNAVAILABLE";
2815
+ /** @description Human-readable error message */
2816
+ message: string;
2817
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
2818
+ details?: string;
2819
+ };
2820
+ };
2821
+ };
2822
+ };
2823
+ };
2824
+ };
2825
+ restoreDatabase: {
2826
+ parameters: {
2827
+ query?: never;
2828
+ header?: never;
2829
+ path: {
2830
+ /** @description Name of the source database (format: lowercase alphanumeric and hyphens) */
2831
+ databaseName: string;
2832
+ /** @description Name of the backup to restore from (format: lowercase alphanumeric and hyphens) */
2833
+ backupName: string;
2834
+ };
2835
+ cookie?: never;
2836
+ };
2837
+ /** @description Optional configuration for the restored database instance */
2838
+ requestBody?: {
2839
+ content: {
2840
+ "application/json": {
2841
+ /**
2842
+ * @description Name for the new restored database instance. Must be a valid Kubernetes resource name. If omitted, a name is auto-generated using the source database name as a prefix.
2843
+ * @example my-postgres-db-restored
2844
+ */
2845
+ name?: string;
2846
+ /**
2847
+ * @description Number of replicas for the restored cluster. If omitted, inherits the source cluster replica count.
2848
+ * @example 1
2849
+ */
2850
+ replicas?: number;
2851
+ };
2852
+ };
2853
+ };
2854
+ responses: {
2855
+ /** @description Database restore initiated successfully. */
2856
+ 204: {
2857
+ headers: {
2858
+ [name: string]: unknown;
2859
+ };
2860
+ content?: never;
2861
+ };
2862
+ /** @description Bad request — missing path parameters or invalid request body */
2863
+ 400: {
2864
+ headers: {
2865
+ [name: string]: unknown;
2866
+ };
2867
+ content: {
2868
+ "application/json": {
2869
+ /** @description Structured error object containing type, code, message, and optional details */
2870
+ error: {
2871
+ /**
2872
+ * @description High-level error type for categorization
2873
+ * @enum {string}
2874
+ */
2875
+ type: "validation_error";
2876
+ /**
2877
+ * @description Specific error code for programmatic handling and i18n
2878
+ * @enum {string}
2879
+ */
2880
+ code: "INVALID_PARAMETER";
2881
+ /** @description Human-readable error message */
2882
+ message: string;
2883
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
2884
+ details?: {
2885
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
2886
+ field: string;
2887
+ /** @description Validation error message for this field */
2888
+ message: string;
2889
+ }[] | string;
2890
+ };
2891
+ };
2892
+ };
2893
+ };
2894
+ /** @description Unauthorized — invalid or missing kubeconfig */
2895
+ 401: {
2896
+ headers: {
2897
+ [name: string]: unknown;
2898
+ };
2899
+ content: {
2900
+ "application/json": {
2901
+ /** @description Structured error object containing type, code, message, and optional details */
2902
+ error: {
2903
+ /**
2904
+ * @description High-level error type for categorization
2905
+ * @constant
2906
+ */
2907
+ type: "authentication_error";
2908
+ /**
2909
+ * @description Specific error code for programmatic handling and i18n
2910
+ * @constant
2911
+ */
2912
+ code: "AUTHENTICATION_REQUIRED";
2913
+ /** @description Human-readable error message */
2914
+ message: string;
2915
+ /** @description Typically omitted. May contain additional context in edge cases. */
2916
+ details?: string;
2917
+ };
2918
+ };
2919
+ };
2920
+ };
2921
+ /** @description Forbidden — insufficient permissions */
2922
+ 403: {
2923
+ headers: {
2924
+ [name: string]: unknown;
2925
+ };
2926
+ content: {
2927
+ "application/json": {
2928
+ /** @description Structured error object containing type, code, message, and optional details */
2929
+ error: {
2930
+ /**
2931
+ * @description High-level error type for categorization
2932
+ * @constant
2933
+ */
2934
+ type: "authorization_error";
2935
+ /**
2936
+ * @description Specific error code for programmatic handling and i18n
2937
+ * @enum {string}
2938
+ */
2939
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
2940
+ /** @description Human-readable error message */
2941
+ message: string;
2942
+ /** @description Typically omitted. May contain additional context in edge cases. */
2943
+ details?: string;
2944
+ };
2945
+ };
2946
+ };
2947
+ };
2948
+ /** @description Not found — backup or source database not found */
2949
+ 404: {
2950
+ headers: {
2951
+ [name: string]: unknown;
2952
+ };
2953
+ content: {
2954
+ "application/json": {
2955
+ /** @description Structured error object containing type, code, message, and optional details */
2956
+ error: {
2957
+ /**
2958
+ * @description High-level error type for categorization
2959
+ * @constant
2960
+ */
2961
+ type: "resource_error";
2962
+ /**
2963
+ * @description Specific error code for programmatic handling and i18n
2964
+ * @constant
2965
+ */
2966
+ code: "NOT_FOUND";
2967
+ /** @description Human-readable error message */
2968
+ message: string;
2969
+ /** @description Typically omitted. May contain additional context in edge cases. */
2970
+ details?: string;
2971
+ };
2972
+ };
2973
+ };
2974
+ };
2975
+ /** @description Conflict — a database with the target name already exists */
2976
+ 409: {
2977
+ headers: {
2978
+ [name: string]: unknown;
2979
+ };
2980
+ content: {
2981
+ "application/json": {
2982
+ /** @description Structured error object containing type, code, message, and optional details */
2983
+ error: {
2984
+ /**
2985
+ * @description High-level error type for categorization
2986
+ * @constant
2987
+ */
2988
+ type: "resource_error";
2989
+ /**
2990
+ * @description Specific error code for programmatic handling and i18n
2991
+ * @enum {string}
2992
+ */
2993
+ code: "ALREADY_EXISTS" | "CONFLICT";
2994
+ /** @description Human-readable error message */
2995
+ message: string;
2996
+ /** @description Typically omitted. May contain additional context in edge cases. */
2997
+ details?: string;
2998
+ };
2999
+ };
3000
+ };
3001
+ };
3002
+ /** @description Internal server error */
3003
+ 500: {
3004
+ headers: {
3005
+ [name: string]: unknown;
3006
+ };
3007
+ content: {
3008
+ "application/json": {
3009
+ /** @description Structured error object containing type, code, message, and optional details */
3010
+ error: {
3011
+ /**
3012
+ * @description High-level error type for categorization
3013
+ * @enum {string}
3014
+ */
3015
+ type: "operation_error" | "internal_error";
3016
+ /**
3017
+ * @description Specific error code for programmatic handling and i18n
3018
+ * @enum {string}
3019
+ */
3020
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
3021
+ /** @description Human-readable error message */
3022
+ message: string;
3023
+ /** @description Raw error string from the underlying system, for troubleshooting. */
3024
+ details?: string;
3025
+ };
3026
+ };
3027
+ };
3028
+ };
3029
+ /** @description Service unavailable — Kubernetes cluster unreachable */
3030
+ 503: {
3031
+ headers: {
3032
+ [name: string]: unknown;
3033
+ };
3034
+ content: {
3035
+ "application/json": {
3036
+ /** @description Structured error object containing type, code, message, and optional details */
3037
+ error: {
3038
+ /**
3039
+ * @description High-level error type for categorization
3040
+ * @constant
3041
+ */
3042
+ type: "internal_error";
3043
+ /**
3044
+ * @description Specific error code for programmatic handling and i18n
3045
+ * @constant
3046
+ */
3047
+ code: "SERVICE_UNAVAILABLE";
3048
+ /** @description Human-readable error message */
3049
+ message: string;
3050
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
3051
+ details?: string;
3052
+ };
3053
+ };
3054
+ };
3055
+ };
3056
+ };
3057
+ };
3058
+ enablePublicAccess: {
3059
+ parameters: {
3060
+ query?: never;
3061
+ header?: never;
3062
+ path: {
3063
+ /** @description Name of the database to operate on (format: lowercase alphanumeric and hyphens) */
3064
+ databaseName: string;
3065
+ };
3066
+ cookie?: never;
3067
+ };
3068
+ requestBody?: never;
3069
+ responses: {
3070
+ /** @description Public access enabled successfully. */
3071
+ 204: {
3072
+ headers: {
3073
+ [name: string]: unknown;
3074
+ };
3075
+ content?: never;
3076
+ };
3077
+ /** @description Bad request — invalid database name */
3078
+ 400: {
3079
+ headers: {
3080
+ [name: string]: unknown;
3081
+ };
3082
+ content: {
3083
+ "application/json": {
3084
+ /** @description Structured error object containing type, code, message, and optional details */
3085
+ error: {
3086
+ /**
3087
+ * @description High-level error type for categorization
3088
+ * @enum {string}
3089
+ */
3090
+ type: "validation_error";
3091
+ /**
3092
+ * @description Specific error code for programmatic handling and i18n
3093
+ * @enum {string}
3094
+ */
3095
+ code: "INVALID_PARAMETER";
3096
+ /** @description Human-readable error message */
3097
+ message: string;
3098
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
3099
+ details?: {
3100
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
3101
+ field: string;
3102
+ /** @description Validation error message for this field */
3103
+ message: string;
3104
+ }[] | string;
3105
+ };
3106
+ };
3107
+ };
3108
+ };
3109
+ /** @description Unauthorized — invalid or missing kubeconfig */
3110
+ 401: {
3111
+ headers: {
3112
+ [name: string]: unknown;
3113
+ };
3114
+ content: {
3115
+ "application/json": {
3116
+ /** @description Structured error object containing type, code, message, and optional details */
3117
+ error: {
3118
+ /**
3119
+ * @description High-level error type for categorization
3120
+ * @constant
3121
+ */
3122
+ type: "authentication_error";
3123
+ /**
3124
+ * @description Specific error code for programmatic handling and i18n
3125
+ * @constant
3126
+ */
3127
+ code: "AUTHENTICATION_REQUIRED";
3128
+ /** @description Human-readable error message */
3129
+ message: string;
3130
+ /** @description Typically omitted. May contain additional context in edge cases. */
3131
+ details?: string;
3132
+ };
3133
+ };
3134
+ };
3135
+ };
3136
+ /** @description Forbidden — insufficient permissions */
3137
+ 403: {
3138
+ headers: {
3139
+ [name: string]: unknown;
3140
+ };
3141
+ content: {
3142
+ "application/json": {
3143
+ /** @description Structured error object containing type, code, message, and optional details */
3144
+ error: {
3145
+ /**
3146
+ * @description High-level error type for categorization
3147
+ * @constant
3148
+ */
3149
+ type: "authorization_error";
3150
+ /**
3151
+ * @description Specific error code for programmatic handling and i18n
3152
+ * @enum {string}
3153
+ */
3154
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
3155
+ /** @description Human-readable error message */
3156
+ message: string;
3157
+ /** @description Typically omitted. May contain additional context in edge cases. */
3158
+ details?: string;
3159
+ };
3160
+ };
3161
+ };
3162
+ };
3163
+ /** @description Not found — database does not exist */
3164
+ 404: {
3165
+ headers: {
3166
+ [name: string]: unknown;
3167
+ };
3168
+ content: {
3169
+ "application/json": {
3170
+ /** @description Structured error object containing type, code, message, and optional details */
3171
+ error: {
3172
+ /**
3173
+ * @description High-level error type for categorization
3174
+ * @constant
3175
+ */
3176
+ type: "resource_error";
3177
+ /**
3178
+ * @description Specific error code for programmatic handling and i18n
3179
+ * @constant
3180
+ */
3181
+ code: "NOT_FOUND";
3182
+ /** @description Human-readable error message */
3183
+ message: string;
3184
+ /** @description Typically omitted. May contain additional context in edge cases. */
3185
+ details?: string;
3186
+ };
3187
+ };
3188
+ };
3189
+ };
3190
+ /** @description Conflict — public access is already enabled */
3191
+ 409: {
3192
+ headers: {
3193
+ [name: string]: unknown;
3194
+ };
3195
+ content: {
3196
+ "application/json": {
3197
+ /** @description Structured error object containing type, code, message, and optional details */
3198
+ error: {
3199
+ /**
3200
+ * @description High-level error type for categorization
3201
+ * @constant
3202
+ */
3203
+ type: "resource_error";
3204
+ /**
3205
+ * @description Specific error code for programmatic handling and i18n
3206
+ * @enum {string}
3207
+ */
3208
+ code: "ALREADY_EXISTS" | "CONFLICT";
3209
+ /** @description Human-readable error message */
3210
+ message: string;
3211
+ /** @description Typically omitted. May contain additional context in edge cases. */
3212
+ details?: string;
3213
+ };
3214
+ };
3215
+ };
3216
+ };
3217
+ /** @description Internal server error */
3218
+ 500: {
3219
+ headers: {
3220
+ [name: string]: unknown;
3221
+ };
3222
+ content: {
3223
+ "application/json": {
3224
+ /** @description Structured error object containing type, code, message, and optional details */
3225
+ error: {
3226
+ /**
3227
+ * @description High-level error type for categorization
3228
+ * @enum {string}
3229
+ */
3230
+ type: "operation_error" | "internal_error";
3231
+ /**
3232
+ * @description Specific error code for programmatic handling and i18n
3233
+ * @enum {string}
3234
+ */
3235
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
3236
+ /** @description Human-readable error message */
3237
+ message: string;
3238
+ /** @description Raw error string from the underlying system, for troubleshooting. */
3239
+ details?: string;
3240
+ };
3241
+ };
3242
+ };
3243
+ };
3244
+ /** @description Service unavailable — Kubernetes cluster unreachable */
3245
+ 503: {
3246
+ headers: {
3247
+ [name: string]: unknown;
3248
+ };
3249
+ content: {
3250
+ "application/json": {
3251
+ /** @description Structured error object containing type, code, message, and optional details */
3252
+ error: {
3253
+ /**
3254
+ * @description High-level error type for categorization
3255
+ * @constant
3256
+ */
3257
+ type: "internal_error";
3258
+ /**
3259
+ * @description Specific error code for programmatic handling and i18n
3260
+ * @constant
3261
+ */
3262
+ code: "SERVICE_UNAVAILABLE";
3263
+ /** @description Human-readable error message */
3264
+ message: string;
3265
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
3266
+ details?: string;
3267
+ };
3268
+ };
3269
+ };
3270
+ };
3271
+ };
3272
+ };
3273
+ disablePublicAccess: {
3274
+ parameters: {
3275
+ query?: never;
3276
+ header?: never;
3277
+ path: {
3278
+ /** @description Name of the database to operate on (format: lowercase alphanumeric and hyphens) */
3279
+ databaseName: string;
3280
+ };
3281
+ cookie?: never;
3282
+ };
3283
+ requestBody?: never;
3284
+ responses: {
3285
+ /** @description Public access disabled successfully. */
3286
+ 204: {
3287
+ headers: {
3288
+ [name: string]: unknown;
3289
+ };
3290
+ content?: never;
3291
+ };
3292
+ /** @description Bad request — invalid path parameters */
3293
+ 400: {
3294
+ headers: {
3295
+ [name: string]: unknown;
3296
+ };
3297
+ content: {
3298
+ "application/json": {
3299
+ /** @description Structured error object containing type, code, message, and optional details */
3300
+ error: {
3301
+ /**
3302
+ * @description High-level error type for categorization
3303
+ * @enum {string}
3304
+ */
3305
+ type: "validation_error";
3306
+ /**
3307
+ * @description Specific error code for programmatic handling and i18n
3308
+ * @enum {string}
3309
+ */
3310
+ code: "INVALID_PARAMETER";
3311
+ /** @description Human-readable error message */
3312
+ message: string;
3313
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
3314
+ details?: {
3315
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
3316
+ field: string;
3317
+ /** @description Validation error message for this field */
3318
+ message: string;
3319
+ }[] | string;
3320
+ };
3321
+ };
3322
+ };
3323
+ };
3324
+ /** @description Unauthorized — invalid or missing kubeconfig */
3325
+ 401: {
3326
+ headers: {
3327
+ [name: string]: unknown;
3328
+ };
3329
+ content: {
3330
+ "application/json": {
3331
+ /** @description Structured error object containing type, code, message, and optional details */
3332
+ error: {
3333
+ /**
3334
+ * @description High-level error type for categorization
3335
+ * @constant
3336
+ */
3337
+ type: "authentication_error";
3338
+ /**
3339
+ * @description Specific error code for programmatic handling and i18n
3340
+ * @constant
3341
+ */
3342
+ code: "AUTHENTICATION_REQUIRED";
3343
+ /** @description Human-readable error message */
3344
+ message: string;
3345
+ /** @description Typically omitted. May contain additional context in edge cases. */
3346
+ details?: string;
3347
+ };
3348
+ };
3349
+ };
3350
+ };
3351
+ /** @description Forbidden — insufficient permissions */
3352
+ 403: {
3353
+ headers: {
3354
+ [name: string]: unknown;
3355
+ };
3356
+ content: {
3357
+ "application/json": {
3358
+ /** @description Structured error object containing type, code, message, and optional details */
3359
+ error: {
3360
+ /**
3361
+ * @description High-level error type for categorization
3362
+ * @constant
3363
+ */
3364
+ type: "authorization_error";
3365
+ /**
3366
+ * @description Specific error code for programmatic handling and i18n
3367
+ * @enum {string}
3368
+ */
3369
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
3370
+ /** @description Human-readable error message */
3371
+ message: string;
3372
+ /** @description Typically omitted. May contain additional context in edge cases. */
3373
+ details?: string;
3374
+ };
3375
+ };
3376
+ };
3377
+ };
3378
+ /** @description Not found — database or public service not found */
3379
+ 404: {
3380
+ headers: {
3381
+ [name: string]: unknown;
3382
+ };
3383
+ content: {
3384
+ "application/json": {
3385
+ /** @description Structured error object containing type, code, message, and optional details */
3386
+ error: {
3387
+ /**
3388
+ * @description High-level error type for categorization
3389
+ * @constant
3390
+ */
3391
+ type: "resource_error";
3392
+ /**
3393
+ * @description Specific error code for programmatic handling and i18n
3394
+ * @constant
3395
+ */
3396
+ code: "NOT_FOUND";
3397
+ /** @description Human-readable error message */
3398
+ message: string;
3399
+ /** @description Typically omitted. May contain additional context in edge cases. */
3400
+ details?: string;
3401
+ };
3402
+ };
3403
+ };
3404
+ };
3405
+ /** @description Internal server error */
3406
+ 500: {
3407
+ headers: {
3408
+ [name: string]: unknown;
3409
+ };
3410
+ content: {
3411
+ "application/json": {
3412
+ /** @description Structured error object containing type, code, message, and optional details */
3413
+ error: {
3414
+ /**
3415
+ * @description High-level error type for categorization
3416
+ * @enum {string}
3417
+ */
3418
+ type: "operation_error" | "internal_error";
3419
+ /**
3420
+ * @description Specific error code for programmatic handling and i18n
3421
+ * @enum {string}
3422
+ */
3423
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
3424
+ /** @description Human-readable error message */
3425
+ message: string;
3426
+ /** @description Raw error string from the underlying system, for troubleshooting. */
3427
+ details?: string;
3428
+ };
3429
+ };
3430
+ };
3431
+ };
3432
+ /** @description Service unavailable — Kubernetes cluster unreachable */
3433
+ 503: {
3434
+ headers: {
3435
+ [name: string]: unknown;
3436
+ };
3437
+ content: {
3438
+ "application/json": {
3439
+ /** @description Structured error object containing type, code, message, and optional details */
3440
+ error: {
3441
+ /**
3442
+ * @description High-level error type for categorization
3443
+ * @constant
3444
+ */
3445
+ type: "internal_error";
3446
+ /**
3447
+ * @description Specific error code for programmatic handling and i18n
3448
+ * @constant
3449
+ */
3450
+ code: "SERVICE_UNAVAILABLE";
3451
+ /** @description Human-readable error message */
3452
+ message: string;
3453
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
3454
+ details?: string;
3455
+ };
3456
+ };
3457
+ };
3458
+ };
3459
+ };
3460
+ };
3461
+ listDatabaseVersions: {
3462
+ parameters: {
3463
+ query?: never;
3464
+ header?: never;
3465
+ path?: never;
3466
+ cookie?: never;
3467
+ };
3468
+ requestBody?: never;
3469
+ responses: {
3470
+ /** @description Database versions retrieved successfully */
3471
+ 200: {
3472
+ headers: {
3473
+ [name: string]: unknown;
3474
+ };
3475
+ content: {
3476
+ "application/json": {
3477
+ code: number;
3478
+ message: string;
3479
+ data: {
3480
+ [key: string]: string[];
3481
+ };
3482
+ };
3483
+ };
3484
+ };
3485
+ /** @description Internal server error */
3486
+ 500: {
3487
+ headers: {
3488
+ [name: string]: unknown;
3489
+ };
3490
+ content: {
3491
+ "application/json": {
3492
+ /** @description Structured error object containing type, code, message, and optional details */
3493
+ error: {
3494
+ /**
3495
+ * @description High-level error type for categorization
3496
+ * @enum {string}
3497
+ */
3498
+ type: "operation_error" | "internal_error";
3499
+ /**
3500
+ * @description Specific error code for programmatic handling and i18n
3501
+ * @enum {string}
3502
+ */
3503
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
3504
+ /** @description Human-readable error message */
3505
+ message: string;
3506
+ /** @description Raw error string from the underlying system, for troubleshooting. */
3507
+ details?: string;
3508
+ };
3509
+ };
3510
+ };
3511
+ };
3512
+ /** @description Service unavailable — Kubernetes cluster unreachable */
3513
+ 503: {
3514
+ headers: {
3515
+ [name: string]: unknown;
3516
+ };
3517
+ content: {
3518
+ "application/json": {
3519
+ /** @description Structured error object containing type, code, message, and optional details */
3520
+ error: {
3521
+ /**
3522
+ * @description High-level error type for categorization
3523
+ * @constant
3524
+ */
3525
+ type: "internal_error";
3526
+ /**
3527
+ * @description Specific error code for programmatic handling and i18n
3528
+ * @constant
3529
+ */
3530
+ code: "SERVICE_UNAVAILABLE";
3531
+ /** @description Human-readable error message */
3532
+ message: string;
3533
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
3534
+ details?: string;
3535
+ };
3536
+ };
3537
+ };
3538
+ };
3539
+ };
3540
+ };
3541
+ getDatabaseLogsData: {
3542
+ parameters: {
3543
+ query: {
3544
+ /** @description Name of the pod to retrieve logs from */
3545
+ podName: string;
3546
+ /** @description Database engine type (determines log format and parsing) */
3547
+ dbType: "mysql" | "mongodb" | "redis" | "postgresql";
3548
+ /** @description Type of log to retrieve. Allowed values: "runtimeLog", "slowQuery", "errorLog" */
3549
+ logType: "runtimeLog" | "slowQuery" | "errorLog";
3550
+ /** @description Absolute path to the log file within the pod */
3551
+ logPath: string;
3552
+ /** @description Page number for pagination (starts at 1) */
3553
+ page?: number;
3554
+ /** @description Number of log entries per page (max 1000) */
3555
+ pageSize?: number;
3556
+ };
3557
+ header?: never;
3558
+ path?: never;
3559
+ cookie?: never;
3560
+ };
3561
+ requestBody?: never;
3562
+ responses: {
3563
+ /** @description Log entries retrieved successfully */
3564
+ 200: {
3565
+ headers: {
3566
+ [name: string]: unknown;
3567
+ };
3568
+ content: {
3569
+ "application/json": {
3570
+ code: number;
3571
+ message: string;
3572
+ data: {
3573
+ logs: {
3574
+ timestamp: string;
3575
+ level: string;
3576
+ content: string;
3577
+ }[];
3578
+ metadata: {
3579
+ total: number;
3580
+ page: number;
3581
+ pageSize: number;
3582
+ processingTime: string;
3583
+ hasMore: boolean;
3584
+ };
3585
+ };
3586
+ };
3587
+ };
3588
+ };
3589
+ /** @description Bad request — invalid query parameters */
3590
+ 400: {
3591
+ headers: {
3592
+ [name: string]: unknown;
3593
+ };
3594
+ content: {
3595
+ "application/json": {
3596
+ /** @description Structured error object containing type, code, message, and optional details */
3597
+ error: {
3598
+ /**
3599
+ * @description High-level error type for categorization
3600
+ * @enum {string}
3601
+ */
3602
+ type: "validation_error";
3603
+ /**
3604
+ * @description Specific error code for programmatic handling and i18n
3605
+ * @enum {string}
3606
+ */
3607
+ code: "INVALID_PARAMETER";
3608
+ /** @description Human-readable error message */
3609
+ message: string;
3610
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
3611
+ details?: {
3612
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
3613
+ field: string;
3614
+ /** @description Validation error message for this field */
3615
+ message: string;
3616
+ }[] | string;
3617
+ };
3618
+ };
3619
+ };
3620
+ };
3621
+ /** @description Unauthorized — invalid or missing kubeconfig */
3622
+ 401: {
3623
+ headers: {
3624
+ [name: string]: unknown;
3625
+ };
3626
+ content: {
3627
+ "application/json": {
3628
+ /** @description Structured error object containing type, code, message, and optional details */
3629
+ error: {
3630
+ /**
3631
+ * @description High-level error type for categorization
3632
+ * @constant
3633
+ */
3634
+ type: "authentication_error";
3635
+ /**
3636
+ * @description Specific error code for programmatic handling and i18n
3637
+ * @constant
3638
+ */
3639
+ code: "AUTHENTICATION_REQUIRED";
3640
+ /** @description Human-readable error message */
3641
+ message: string;
3642
+ /** @description Typically omitted. May contain additional context in edge cases. */
3643
+ details?: string;
3644
+ };
3645
+ };
3646
+ };
3647
+ };
3648
+ /** @description Forbidden — insufficient permissions */
3649
+ 403: {
3650
+ headers: {
3651
+ [name: string]: unknown;
3652
+ };
3653
+ content: {
3654
+ "application/json": {
3655
+ /** @description Structured error object containing type, code, message, and optional details */
3656
+ error: {
3657
+ /**
3658
+ * @description High-level error type for categorization
3659
+ * @constant
3660
+ */
3661
+ type: "authorization_error";
3662
+ /**
3663
+ * @description Specific error code for programmatic handling and i18n
3664
+ * @enum {string}
3665
+ */
3666
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
3667
+ /** @description Human-readable error message */
3668
+ message: string;
3669
+ /** @description Typically omitted. May contain additional context in edge cases. */
3670
+ details?: string;
3671
+ };
3672
+ };
3673
+ };
3674
+ };
3675
+ /** @description Not found — pod or log file not found */
3676
+ 404: {
3677
+ headers: {
3678
+ [name: string]: unknown;
3679
+ };
3680
+ content: {
3681
+ "application/json": {
3682
+ /** @description Structured error object containing type, code, message, and optional details */
3683
+ error: {
3684
+ /**
3685
+ * @description High-level error type for categorization
3686
+ * @constant
3687
+ */
3688
+ type: "resource_error";
3689
+ /**
3690
+ * @description Specific error code for programmatic handling and i18n
3691
+ * @constant
3692
+ */
3693
+ code: "NOT_FOUND";
3694
+ /** @description Human-readable error message */
3695
+ message: string;
3696
+ /** @description Typically omitted. May contain additional context in edge cases. */
3697
+ details?: string;
3698
+ };
3699
+ };
3700
+ };
3701
+ };
3702
+ /** @description Internal server error */
3703
+ 500: {
3704
+ headers: {
3705
+ [name: string]: unknown;
3706
+ };
3707
+ content: {
3708
+ "application/json": {
3709
+ /** @description Structured error object containing type, code, message, and optional details */
3710
+ error: {
3711
+ /**
3712
+ * @description High-level error type for categorization
3713
+ * @enum {string}
3714
+ */
3715
+ type: "operation_error" | "internal_error";
3716
+ /**
3717
+ * @description Specific error code for programmatic handling and i18n
3718
+ * @enum {string}
3719
+ */
3720
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
3721
+ /** @description Human-readable error message */
3722
+ message: string;
3723
+ /** @description Raw error string from the underlying system, for troubleshooting. */
3724
+ details?: string;
3725
+ };
3726
+ };
3727
+ };
3728
+ };
3729
+ /** @description Service unavailable — Kubernetes cluster unreachable */
3730
+ 503: {
3731
+ headers: {
3732
+ [name: string]: unknown;
3733
+ };
3734
+ content: {
3735
+ "application/json": {
3736
+ /** @description Structured error object containing type, code, message, and optional details */
3737
+ error: {
3738
+ /**
3739
+ * @description High-level error type for categorization
3740
+ * @constant
3741
+ */
3742
+ type: "internal_error";
3743
+ /**
3744
+ * @description Specific error code for programmatic handling and i18n
3745
+ * @constant
3746
+ */
3747
+ code: "SERVICE_UNAVAILABLE";
3748
+ /** @description Human-readable error message */
3749
+ message: string;
3750
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
3751
+ details?: string;
3752
+ };
3753
+ };
3754
+ };
3755
+ };
3756
+ };
3757
+ };
3758
+ listDatabaseLogFiles: {
3759
+ parameters: {
3760
+ query: {
3761
+ /** @description Name of the pod to list log files from */
3762
+ podName: string;
3763
+ /** @description Database engine type (determines where to look for log files) */
3764
+ dbType: "mysql" | "mongodb" | "redis" | "postgresql";
3765
+ /** @description Type of logs to list. Allowed values: "runtimeLog", "slowQuery", "errorLog" */
3766
+ logType: "runtimeLog" | "slowQuery" | "errorLog";
3767
+ };
3768
+ header?: never;
3769
+ path?: never;
3770
+ cookie?: never;
3771
+ };
3772
+ requestBody?: never;
3773
+ responses: {
3774
+ /** @description Log files retrieved successfully */
3775
+ 200: {
3776
+ headers: {
3777
+ [name: string]: unknown;
3778
+ };
3779
+ content: {
3780
+ "application/json": {
3781
+ code: number;
3782
+ message: string;
3783
+ data: {
3784
+ name: string;
3785
+ path: string;
3786
+ dir: string;
3787
+ kind: string;
3788
+ attr: string;
3789
+ hardLinks: number;
3790
+ owner: string;
3791
+ group: string;
3792
+ size: number;
3793
+ updateTime: string;
3794
+ linkTo?: string;
3795
+ processed?: boolean;
3796
+ }[];
3797
+ };
3798
+ };
3799
+ };
3800
+ /** @description Bad request — invalid query parameters */
3801
+ 400: {
3802
+ headers: {
3803
+ [name: string]: unknown;
3804
+ };
3805
+ content: {
3806
+ "application/json": {
3807
+ /** @description Structured error object containing type, code, message, and optional details */
3808
+ error: {
3809
+ /**
3810
+ * @description High-level error type for categorization
3811
+ * @enum {string}
3812
+ */
3813
+ type: "validation_error";
3814
+ /**
3815
+ * @description Specific error code for programmatic handling and i18n
3816
+ * @enum {string}
3817
+ */
3818
+ code: "INVALID_PARAMETER";
3819
+ /** @description Human-readable error message */
3820
+ message: string;
3821
+ /** @description For INVALID_PARAMETER: Array<{ field, message }>. For INVALID_VALUE: optional string. Omitted for other codes. */
3822
+ details?: {
3823
+ /** @description Field path using dot/bracket notation, e.g. "resource.cpu" */
3824
+ field: string;
3825
+ /** @description Validation error message for this field */
3826
+ message: string;
3827
+ }[] | string;
3828
+ };
3829
+ };
3830
+ };
3831
+ };
3832
+ /** @description Unauthorized — invalid or missing kubeconfig */
3833
+ 401: {
3834
+ headers: {
3835
+ [name: string]: unknown;
3836
+ };
3837
+ content: {
3838
+ "application/json": {
3839
+ /** @description Structured error object containing type, code, message, and optional details */
3840
+ error: {
3841
+ /**
3842
+ * @description High-level error type for categorization
3843
+ * @constant
3844
+ */
3845
+ type: "authentication_error";
3846
+ /**
3847
+ * @description Specific error code for programmatic handling and i18n
3848
+ * @constant
3849
+ */
3850
+ code: "AUTHENTICATION_REQUIRED";
3851
+ /** @description Human-readable error message */
3852
+ message: string;
3853
+ /** @description Typically omitted. May contain additional context in edge cases. */
3854
+ details?: string;
3855
+ };
3856
+ };
3857
+ };
3858
+ };
3859
+ /** @description Forbidden — insufficient permissions */
3860
+ 403: {
3861
+ headers: {
3862
+ [name: string]: unknown;
3863
+ };
3864
+ content: {
3865
+ "application/json": {
3866
+ /** @description Structured error object containing type, code, message, and optional details */
3867
+ error: {
3868
+ /**
3869
+ * @description High-level error type for categorization
3870
+ * @constant
3871
+ */
3872
+ type: "authorization_error";
3873
+ /**
3874
+ * @description Specific error code for programmatic handling and i18n
3875
+ * @enum {string}
3876
+ */
3877
+ code: "PERMISSION_DENIED" | "INSUFFICIENT_BALANCE";
3878
+ /** @description Human-readable error message */
3879
+ message: string;
3880
+ /** @description Typically omitted. May contain additional context in edge cases. */
3881
+ details?: string;
3882
+ };
3883
+ };
3884
+ };
3885
+ };
3886
+ /** @description Not found — pod not found or no log files available */
3887
+ 404: {
3888
+ headers: {
3889
+ [name: string]: unknown;
3890
+ };
3891
+ content: {
3892
+ "application/json": {
3893
+ /** @description Structured error object containing type, code, message, and optional details */
3894
+ error: {
3895
+ /**
3896
+ * @description High-level error type for categorization
3897
+ * @constant
3898
+ */
3899
+ type: "resource_error";
3900
+ /**
3901
+ * @description Specific error code for programmatic handling and i18n
3902
+ * @constant
3903
+ */
3904
+ code: "NOT_FOUND";
3905
+ /** @description Human-readable error message */
3906
+ message: string;
3907
+ /** @description Typically omitted. May contain additional context in edge cases. */
3908
+ details?: string;
3909
+ };
3910
+ };
3911
+ };
3912
+ };
3913
+ /** @description Internal server error */
3914
+ 500: {
3915
+ headers: {
3916
+ [name: string]: unknown;
3917
+ };
3918
+ content: {
3919
+ "application/json": {
3920
+ /** @description Structured error object containing type, code, message, and optional details */
3921
+ error: {
3922
+ /**
3923
+ * @description High-level error type for categorization
3924
+ * @enum {string}
3925
+ */
3926
+ type: "operation_error" | "internal_error";
3927
+ /**
3928
+ * @description Specific error code for programmatic handling and i18n
3929
+ * @enum {string}
3930
+ */
3931
+ code: "KUBERNETES_ERROR" | "OPERATION_FAILED" | "INTERNAL_ERROR";
3932
+ /** @description Human-readable error message */
3933
+ message: string;
3934
+ /** @description Raw error string from the underlying system, for troubleshooting. */
3935
+ details?: string;
3936
+ };
3937
+ };
3938
+ };
3939
+ };
3940
+ /** @description Service unavailable — Kubernetes cluster unreachable */
3941
+ 503: {
3942
+ headers: {
3943
+ [name: string]: unknown;
3944
+ };
3945
+ content: {
3946
+ "application/json": {
3947
+ /** @description Structured error object containing type, code, message, and optional details */
3948
+ error: {
3949
+ /**
3950
+ * @description High-level error type for categorization
3951
+ * @constant
3952
+ */
3953
+ type: "internal_error";
3954
+ /**
3955
+ * @description Specific error code for programmatic handling and i18n
3956
+ * @constant
3957
+ */
3958
+ code: "SERVICE_UNAVAILABLE";
3959
+ /** @description Human-readable error message */
3960
+ message: string;
3961
+ /** @description Raw connection error from the underlying system (e.g. ECONNREFUSED). */
3962
+ details?: string;
3963
+ };
3964
+ };
3965
+ };
3966
+ };
3967
+ };
3968
+ };
3969
+ }