forked from bytebase/dbhub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.d.ts
More file actions
260 lines (259 loc) · 7.87 KB
/
Copy pathopenapi.d.ts
File metadata and controls
260 lines (259 loc) · 7.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export interface paths {
"/api/sources": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* List all data sources
* @description Returns an array of all configured database data sources
*/
get: operations["listSources"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
"/api/sources/{sourceId}": {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
/**
* Get a specific data source
* @description Returns details of a single data source by ID
*/
get: operations["getSource"];
put?: never;
post?: never;
delete?: never;
options?: never;
head?: never;
patch?: never;
trace?: never;
};
}
export type webhooks = Record<string, never>;
export interface components {
schemas: {
DataSource: {
/**
* @description Unique identifier for the data source
* @example prod_pg
*/
id: string;
/**
* @description Human-readable description of the data source
* @example Production read replica for analytics queries
*/
description?: string;
/**
* @description Database type
* @example postgres
* @enum {string}
*/
type: "postgres" | "mysql" | "mariadb" | "sqlserver" | "sqlite" | "oracle";
/**
* @description Database host (not present for SQLite)
* @example localhost
*/
host?: string;
/**
* @description Database port (not present for SQLite)
* @example 5432
*/
port?: number;
/**
* @description Database name or file path (for SQLite)
* @example production
*/
database?: string;
/**
* @description Database username (not present for SQLite)
* @example dbuser
*/
user?: string;
ssh_tunnel?: components["schemas"]["SSHTunnel"];
/** @description Available MCP tools for this data source */
tools: components["schemas"]["Tool"][];
};
/** @description SSH tunnel configuration (credentials excluded for security) */
SSHTunnel: {
/**
* @description Whether SSH tunneling is enabled
* @example true
*/
enabled: boolean;
/**
* @description SSH bastion host
* @example bastion.example.com
*/
ssh_host?: string;
/**
* @description SSH port
* @example 22
*/
ssh_port?: number;
/**
* @description SSH username
* @example deploy
*/
ssh_user?: string;
};
/** @description MCP tool available for a data source */
Tool: {
/**
* @description Tool name
* @example execute_sql_prod_pg
*/
name: string;
/**
* @description Tool description
* @example Execute a SQL query on the 'prod_pg' postgres database (default)
*/
description: string;
/** @description Tool input parameters */
parameters: components["schemas"]["ToolParameter"][];
/**
* @description SQL statement template for custom tools (with parameter placeholders)
* @example SELECT * FROM users WHERE id = $1
*/
statement?: string;
/**
* @description Whether the tool is restricted to read-only operations (execute_sql and custom tools only)
* @example true
*/
readonly?: boolean;
/**
* @description Maximum number of rows returned by SELECT queries (execute_sql and custom tools only)
* @example 1000
*/
max_rows?: number;
};
/** @description Parameter definition for a tool */
ToolParameter: {
/**
* @description Parameter name
* @example sql
*/
name: string;
/**
* @description Parameter type
* @example string
*/
type: string;
/**
* @description Whether the parameter is required
* @example true
*/
required: boolean;
/**
* @description Parameter description
* @example SQL query or multiple SQL statements to execute (separated by semicolons)
*/
description: string;
};
Error: {
/**
* @description Error message
* @example Source not found
*/
error: string;
/**
* @description The source ID that was not found (when applicable)
* @example unknown-id
*/
source_id?: string;
};
};
responses: never;
parameters: never;
requestBodies: never;
headers: never;
pathItems: never;
}
export type $defs = Record<string, never>;
export interface operations {
listSources: {
parameters: {
query?: never;
header?: never;
path?: never;
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful response with array of data sources */
200: {
headers: {
[name: string]: unknown;
};
content: {
"application/json": components["schemas"]["DataSource"][];
};
};
};
};
getSource: {
parameters: {
query?: never;
header?: never;
path: {
/**
* @description Unique identifier of the data source
* @example prod_pg
*/
sourceId: string;
};
cookie?: never;
};
requestBody?: never;
responses: {
/** @description Successful response with data source details */
200: {
headers: {
[name: string]: unknown;
};
content: {
/**
* @example {
* "id": "prod_pg",
* "type": "postgres",
* "host": "localhost",
* "port": 5432,
* "database": "production",
* "user": "dbuser"
* }
*/
"application/json": components["schemas"]["DataSource"];
};
};
/** @description Data source not found */
404: {
headers: {
[name: string]: unknown;
};
content: {
/**
* @example {
* "error": "Source not found",
* "source_id": "unknown-id"
* }
*/
"application/json": components["schemas"]["Error"];
};
};
};
};
}