openapi.d.ts•7.89 kB
/**
* 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 Database type
* @example postgres
* @enum {string}
*/
type: "postgres" | "mysql" | "mariadb" | "sqlserver" | "sqlite";
/**
* @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;
/**
* @description Whether this is the default data source
* @example true
*/
is_default: boolean;
/**
* @description Whether the connection is restricted to read-only operations
* @example true
*/
readonly?: boolean;
/**
* @description Maximum number of rows returned from SELECT queries (null means no limit)
* @example 1000
*/
max_rows?: number | null;
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 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",
* "is_default": true,
* "readonly": true,
* "max_rows": 1000
* }
*/
"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"];
};
};
};
};
}