@querypanel/node-sdk 1.3.5 → 1.3.7
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.
- package/README.md +24 -0
- package/dist/index.cjs +525 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +183 -8
- package/dist/index.d.ts +183 -8
- package/dist/index.js +524 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -38,6 +38,26 @@ interface IntrospectOptions {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
type DatabaseDialect = "bigquery" | "clickhouse" | "postgres" | "redshift" | "mysql";
|
|
41
|
+
/** A schema (or ClickHouse database / BigQuery dataset) in the catalog. */
|
|
42
|
+
interface CatalogSchema {
|
|
43
|
+
schema: string;
|
|
44
|
+
tableCount: number;
|
|
45
|
+
}
|
|
46
|
+
type CatalogTableType = "table" | "view" | "materialized_view";
|
|
47
|
+
/** A table or view in the catalog (no columns; cheap to list). */
|
|
48
|
+
interface CatalogTable {
|
|
49
|
+
schema: string;
|
|
50
|
+
name: string;
|
|
51
|
+
type: CatalogTableType;
|
|
52
|
+
}
|
|
53
|
+
interface ListTablesOptions {
|
|
54
|
+
/** Only list tables in this schema. */
|
|
55
|
+
schema?: string;
|
|
56
|
+
/** Case-insensitive substring match on the table name. */
|
|
57
|
+
search?: string;
|
|
58
|
+
/** Max rows to return. Default 500, capped at 5000. */
|
|
59
|
+
limit?: number;
|
|
60
|
+
}
|
|
41
61
|
interface DatabaseExecutionResult {
|
|
42
62
|
fields: string[];
|
|
43
63
|
rows: Array<Record<string, unknown>>;
|
|
@@ -68,6 +88,14 @@ interface DatabaseAdapter {
|
|
|
68
88
|
* Get the database dialect/type
|
|
69
89
|
*/
|
|
70
90
|
getDialect(): DatabaseDialect;
|
|
91
|
+
/**
|
|
92
|
+
* Optional: List schemas with table counts (cheap catalog read for pickers).
|
|
93
|
+
*/
|
|
94
|
+
listSchemas?(): Promise<CatalogSchema[]>;
|
|
95
|
+
/**
|
|
96
|
+
* Optional: List tables/views without columns (cheap catalog read for pickers).
|
|
97
|
+
*/
|
|
98
|
+
listTables?(options?: ListTablesOptions): Promise<CatalogTable[]>;
|
|
71
99
|
/**
|
|
72
100
|
* Optional: Close/cleanup database connection
|
|
73
101
|
*/
|
|
@@ -108,6 +136,7 @@ interface BigQueryAdapterOptions {
|
|
|
108
136
|
kind?: SchemaIntrospection["db"]["kind"];
|
|
109
137
|
/**
|
|
110
138
|
* Optional allow-list of table names (dataset.table or bare table name).
|
|
139
|
+
* `*` or `<dataset>.*` allows every table in the dataset (same as no filter).
|
|
111
140
|
* When specified, introspection and queries are restricted to these tables only.
|
|
112
141
|
*/
|
|
113
142
|
allowedTables?: string[];
|
|
@@ -135,6 +164,14 @@ declare class BigQueryAdapter implements DatabaseAdapter {
|
|
|
135
164
|
* Restricts to the default dataset (or allowedTables) and returns tables/columns only.
|
|
136
165
|
*/
|
|
137
166
|
introspect(options?: IntrospectOptions): Promise<SchemaIntrospection>;
|
|
167
|
+
/** The adapter is bound to one dataset, so this returns a single row. */
|
|
168
|
+
listSchemas(): Promise<CatalogSchema[]>;
|
|
169
|
+
/**
|
|
170
|
+
* List tables in the bound dataset. Reads the full catalog (not restricted
|
|
171
|
+
* by `allowedTables`). Default limit 500, max 5000.
|
|
172
|
+
*/
|
|
173
|
+
listTables(options?: ListTablesOptions): Promise<CatalogTable[]>;
|
|
174
|
+
private informationSchema;
|
|
138
175
|
private validateQueryTables;
|
|
139
176
|
}
|
|
140
177
|
|
|
@@ -152,6 +189,7 @@ interface ClickHouseAdapterOptions {
|
|
|
152
189
|
* Optional allow-list of table names.
|
|
153
190
|
* When specified, introspection and queries are restricted to these tables only.
|
|
154
191
|
* ClickHouse tables are not schema-qualified, so just provide table names.
|
|
192
|
+
* `*` or `<database>.*` allows every table (same as no filter).
|
|
155
193
|
*/
|
|
156
194
|
allowedTables?: string[];
|
|
157
195
|
}
|
|
@@ -179,6 +217,13 @@ declare class ClickHouseAdapter implements DatabaseAdapter {
|
|
|
179
217
|
* No indexes, constraints, or statistics
|
|
180
218
|
*/
|
|
181
219
|
introspect(options?: IntrospectOptions): Promise<SchemaIntrospection>;
|
|
220
|
+
/** The adapter is bound to one database, so this returns a single row. */
|
|
221
|
+
listSchemas(): Promise<CatalogSchema[]>;
|
|
222
|
+
/**
|
|
223
|
+
* List tables in the bound database. Reads the full catalog (not restricted
|
|
224
|
+
* by `allowedTables`). Default limit 500, max 5000.
|
|
225
|
+
*/
|
|
226
|
+
listTables(options?: ListTablesOptions): Promise<CatalogTable[]>;
|
|
182
227
|
private validateQueryTables;
|
|
183
228
|
close(): Promise<void>;
|
|
184
229
|
private query;
|
|
@@ -207,7 +252,9 @@ interface PostgresAdapterOptions {
|
|
|
207
252
|
dialect?: PostgresWireDialect;
|
|
208
253
|
/**
|
|
209
254
|
* Optional allow-list of table names (schema-qualified or bare).
|
|
210
|
-
*
|
|
255
|
+
* Use `schema.*` to allow every table in a schema (a bare `*` means the
|
|
256
|
+
* default schema). When specified, introspection and queries are restricted
|
|
257
|
+
* to these tables only.
|
|
211
258
|
*/
|
|
212
259
|
allowedTables?: string[];
|
|
213
260
|
}
|
|
@@ -233,6 +280,17 @@ declare class PostgresAdapter implements DatabaseAdapter {
|
|
|
233
280
|
private convertNamedToPositionalParams;
|
|
234
281
|
validate(sql: string, params?: Record<string, string | number | boolean | string[] | number[]>): Promise<void>;
|
|
235
282
|
getDialect(): PostgresWireDialect;
|
|
283
|
+
/**
|
|
284
|
+
* List schemas with their table/view counts. Reads the full catalog (not
|
|
285
|
+
* restricted by `allowedTables`) so it can back an allowed-tables picker.
|
|
286
|
+
*/
|
|
287
|
+
listSchemas(): Promise<CatalogSchema[]>;
|
|
288
|
+
/**
|
|
289
|
+
* List tables/views, optionally filtered by schema and a case-insensitive
|
|
290
|
+
* substring of the table name. Reads the full catalog (not restricted by
|
|
291
|
+
* `allowedTables`). Default limit 500, max 5000.
|
|
292
|
+
*/
|
|
293
|
+
listTables(options?: ListTablesOptions): Promise<CatalogTable[]>;
|
|
236
294
|
/**
|
|
237
295
|
* Simplified introspection: only collect table/column metadata for IngestRequest
|
|
238
296
|
* No indexes, constraints, or statistics
|
|
@@ -341,6 +399,17 @@ declare class QueryPipelineError extends Error {
|
|
|
341
399
|
*/
|
|
342
400
|
isAiProviderError(): boolean;
|
|
343
401
|
}
|
|
402
|
+
/**
|
|
403
|
+
* Thrown by stageSchemaIngest / syncSchemaInBatches when the introspected schema
|
|
404
|
+
* has more columns than `maxColumns`. Raised before anything is uploaded; narrow
|
|
405
|
+
* the sync with `allowedTables` / `tables` (e.g. `schema.*`) and retry.
|
|
406
|
+
*/
|
|
407
|
+
declare class SchemaTooLargeError extends Error {
|
|
408
|
+
readonly tableCount: number;
|
|
409
|
+
readonly columnCount: number;
|
|
410
|
+
readonly maxColumns: number;
|
|
411
|
+
constructor(tableCount: number, columnCount: number, maxColumns: number);
|
|
412
|
+
}
|
|
344
413
|
|
|
345
414
|
type ParamValue = string | number | boolean | string[] | number[];
|
|
346
415
|
type ParamRecord = Record<string, ParamValue>;
|
|
@@ -548,6 +617,57 @@ interface SchemaSyncOptions {
|
|
|
548
617
|
tables?: string[];
|
|
549
618
|
forceReindex?: boolean;
|
|
550
619
|
}
|
|
620
|
+
/** Progress events emitted by stageSchemaIngest / syncSchemaInBatches. */
|
|
621
|
+
type SchemaSyncProgressEvent = {
|
|
622
|
+
phase: "introspecting";
|
|
623
|
+
} | {
|
|
624
|
+
phase: "introspected";
|
|
625
|
+
tableCount: number;
|
|
626
|
+
columnCount: number;
|
|
627
|
+
} | {
|
|
628
|
+
phase: "uploading";
|
|
629
|
+
done: number;
|
|
630
|
+
total: number;
|
|
631
|
+
} | {
|
|
632
|
+
phase: "committing";
|
|
633
|
+
} | {
|
|
634
|
+
phase: "embedding";
|
|
635
|
+
done: number;
|
|
636
|
+
total: number;
|
|
637
|
+
chunks: number;
|
|
638
|
+
} | {
|
|
639
|
+
phase: "finalizing";
|
|
640
|
+
};
|
|
641
|
+
interface SchemaIngestRequestOptions {
|
|
642
|
+
tenantId?: string;
|
|
643
|
+
userId?: string;
|
|
644
|
+
scopes?: string[];
|
|
645
|
+
}
|
|
646
|
+
interface StageSchemaIngestOptions extends SchemaSyncOptions {
|
|
647
|
+
/** Max docs per batch (1 per table + 1 per column). Default 1000. */
|
|
648
|
+
maxBatchDocs?: number;
|
|
649
|
+
/** Max serialized JSON bytes per batch. Default 2_000_000. */
|
|
650
|
+
maxBatchBytes?: number;
|
|
651
|
+
/** Throw SchemaTooLargeError (before uploading) above this many columns. */
|
|
652
|
+
maxColumns?: number;
|
|
653
|
+
onProgress?: (event: SchemaSyncProgressEvent) => void;
|
|
654
|
+
}
|
|
655
|
+
type SyncSchemaInBatchesOptions = StageSchemaIngestOptions;
|
|
656
|
+
interface StageSchemaIngestResult {
|
|
657
|
+
sessionId: string;
|
|
658
|
+
status: "skipped" | "embedding";
|
|
659
|
+
totalBatches: number;
|
|
660
|
+
tableCount: number;
|
|
661
|
+
columnCount: number;
|
|
662
|
+
/** Present when status is "skipped" (schema unchanged). */
|
|
663
|
+
skippedResult?: IngestResponse;
|
|
664
|
+
driftDetected?: boolean;
|
|
665
|
+
}
|
|
666
|
+
interface SchemaIngestBatchEmbedResponse {
|
|
667
|
+
index: number;
|
|
668
|
+
chunks: number;
|
|
669
|
+
chunks_with_annotations: number;
|
|
670
|
+
}
|
|
551
671
|
|
|
552
672
|
/**
|
|
553
673
|
* VizSpec types for flexible visualization specifications
|
|
@@ -582,7 +702,7 @@ interface SortSpec {
|
|
|
582
702
|
}
|
|
583
703
|
interface VizSpecBase {
|
|
584
704
|
version: '1.0';
|
|
585
|
-
kind: 'chart' | 'table' | 'metric';
|
|
705
|
+
kind: 'chart' | 'table' | 'metric' | 'map';
|
|
586
706
|
title?: string;
|
|
587
707
|
description?: string;
|
|
588
708
|
data: {
|
|
@@ -638,13 +758,32 @@ interface MetricSpec extends VizSpecBase {
|
|
|
638
758
|
kind: 'metric';
|
|
639
759
|
encoding: MetricEncoding;
|
|
640
760
|
}
|
|
641
|
-
type
|
|
761
|
+
type MapLocationMode = 'place' | 'latlng';
|
|
762
|
+
interface MapLocation {
|
|
763
|
+
mode: MapLocationMode;
|
|
764
|
+
postalCodeField?: string | null;
|
|
765
|
+
cityField?: string | null;
|
|
766
|
+
latField?: string | null;
|
|
767
|
+
lngField?: string | null;
|
|
768
|
+
}
|
|
769
|
+
interface MapEncoding {
|
|
770
|
+
location: MapLocation;
|
|
771
|
+
country: string;
|
|
772
|
+
colorField?: string | null;
|
|
773
|
+
labelField?: string | null;
|
|
774
|
+
tooltips?: string[] | null;
|
|
775
|
+
}
|
|
776
|
+
interface MapSpec extends VizSpecBase {
|
|
777
|
+
kind: 'map';
|
|
778
|
+
encoding: MapEncoding;
|
|
779
|
+
}
|
|
780
|
+
type VizSpec = ChartSpec | TableSpec | MetricSpec | MapSpec;
|
|
642
781
|
/**
|
|
643
782
|
* Encoding hints for vizspec modifications.
|
|
644
783
|
* These hints guide the LLM to generate specific visualization configurations.
|
|
645
784
|
*/
|
|
646
785
|
interface EncodingHints {
|
|
647
|
-
/** Preferred vizspec kind (
|
|
786
|
+
/** Preferred vizspec kind. A map is chosen by the question ("show them on a map"), not by a hint. */
|
|
648
787
|
kind?: 'chart' | 'table' | 'metric';
|
|
649
788
|
/** Preferred chart type (bar, line, area, scatter, pie) */
|
|
650
789
|
chartType?: ChartType;
|
|
@@ -910,8 +1049,8 @@ interface SqlModifications {
|
|
|
910
1049
|
* These changes only affect how the chart is rendered.
|
|
911
1050
|
*/
|
|
912
1051
|
interface VizModifications {
|
|
913
|
-
/** Change the VizSpec kind (chart, table, metric). Applies to vizspec only. */
|
|
914
|
-
kind?: VizSpecKind
|
|
1052
|
+
/** Change the VizSpec kind (chart, table, metric; a map cannot be switched to or from). Applies to vizspec only. */
|
|
1053
|
+
kind?: Exclude<VizSpecKind, "map">;
|
|
915
1054
|
/** Change the chart type (line, bar, area, scatter, pie) */
|
|
916
1055
|
chartType?: ChartType;
|
|
917
1056
|
/** Configure the X axis field and settings */
|
|
@@ -1283,6 +1422,17 @@ declare class QueryPanelSdkAPI {
|
|
|
1283
1422
|
}): void;
|
|
1284
1423
|
attachDatabase(name: string, adapter: DatabaseAdapter): void;
|
|
1285
1424
|
introspect(databaseName: string, tables?: string[]): Promise<SchemaIntrospection>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Lists schemas (ClickHouse: the database, BigQuery: the dataset) with table
|
|
1427
|
+
* counts. Cheap catalog read for building an allowed-tables picker; not
|
|
1428
|
+
* restricted by `allowedTables`.
|
|
1429
|
+
*/
|
|
1430
|
+
listSchemas(databaseName: string): Promise<CatalogSchema[]>;
|
|
1431
|
+
/**
|
|
1432
|
+
* Lists tables/views (no columns) filtered by schema and a case-insensitive
|
|
1433
|
+
* name substring. Default limit 500, max 5000. Not restricted by `allowedTables`.
|
|
1434
|
+
*/
|
|
1435
|
+
listTables(databaseName: string, options?: ListTablesOptions): Promise<CatalogTable[]>;
|
|
1286
1436
|
/**
|
|
1287
1437
|
* Syncs the database schema to QueryPanel for natural language query generation.
|
|
1288
1438
|
*
|
|
@@ -1308,6 +1458,31 @@ declare class QueryPanelSdkAPI {
|
|
|
1308
1458
|
* ```
|
|
1309
1459
|
*/
|
|
1310
1460
|
syncSchema(databaseName: string, options: SchemaSyncOptions, signal?: AbortSignal): Promise<IngestResponse>;
|
|
1461
|
+
/**
|
|
1462
|
+
* Introspects the schema, uploads it in batches to a new ingest session and
|
|
1463
|
+
* commits it. Returns `status: "skipped"` (with `skippedResult`) when the schema
|
|
1464
|
+
* is unchanged, otherwise `status: "embedding"`: call embedSchemaIngestBatch for
|
|
1465
|
+
* every index in [0, totalBatches) and then finalizeSchemaIngest.
|
|
1466
|
+
* Throws SchemaTooLargeError before uploading if `maxColumns` is exceeded.
|
|
1467
|
+
*/
|
|
1468
|
+
stageSchemaIngest(databaseName: string, options: StageSchemaIngestOptions, signal?: AbortSignal): Promise<StageSchemaIngestResult>;
|
|
1469
|
+
/** Embeds one batch of a staged ingest session. */
|
|
1470
|
+
embedSchemaIngestBatch(sessionId: string, index: number, options: SchemaIngestRequestOptions, signal?: AbortSignal): Promise<SchemaIngestBatchEmbedResponse>;
|
|
1471
|
+
/** Finalizes a staged ingest session after all batches are embedded. */
|
|
1472
|
+
finalizeSchemaIngest(sessionId: string, options: SchemaIngestRequestOptions, signal?: AbortSignal): Promise<IngestResponse>;
|
|
1473
|
+
/**
|
|
1474
|
+
* Batched alternative to syncSchema for large databases: stage, embed every
|
|
1475
|
+
* batch, and finalize in-process, reporting progress via `onProgress`.
|
|
1476
|
+
*
|
|
1477
|
+
* @example
|
|
1478
|
+
* ```typescript
|
|
1479
|
+
* await qp.syncSchemaInBatches("warehouse", {
|
|
1480
|
+
* tenantId: "tenant_123",
|
|
1481
|
+
* onProgress: (e) => console.log(e.phase, e),
|
|
1482
|
+
* });
|
|
1483
|
+
* ```
|
|
1484
|
+
*/
|
|
1485
|
+
syncSchemaInBatches(databaseName: string, options: SyncSchemaInBatchesOptions, signal?: AbortSignal): Promise<IngestResponse>;
|
|
1311
1486
|
/**
|
|
1312
1487
|
* Generates SQL from a natural language question and executes it.
|
|
1313
1488
|
*
|
|
@@ -1381,7 +1556,7 @@ declare class QueryPanelSdkAPI {
|
|
|
1381
1556
|
* @param input - VizSpec generation input with question, SQL, and result data
|
|
1382
1557
|
* @param options - Optional settings for tenant and retries
|
|
1383
1558
|
* @param signal - Optional AbortSignal for cancellation
|
|
1384
|
-
* @returns VizSpec specification for chart, table, or
|
|
1559
|
+
* @returns VizSpec specification for chart, table, metric, or map visualization
|
|
1385
1560
|
*
|
|
1386
1561
|
* @example
|
|
1387
1562
|
* ```typescript
|
|
@@ -2012,4 +2187,4 @@ declare class QueryPanelSdkAPI {
|
|
|
2012
2187
|
}, signal?: AbortSignal): Promise<SdkDashboard[]>;
|
|
2013
2188
|
}
|
|
2014
2189
|
|
|
2015
|
-
export { ALL_VIZ_CHART_TYPES, type ActiveChartBulkGetResponse, type ActiveChartCreateInput, type ActiveChartListOptions, type ActiveChartUpdateInput, type AggregateOp, type AskOptions, type AskResponse, type AxisField, type AxisFieldInput, BigQueryAdapter, type BigQueryAdapterOptions, type BigQueryClientFn, type BigQueryQueryRequest, type BigQueryQueryResult, CallbackApiClient, type ChartBulkGetResponse, type ChartCreateInput, type ChartEncoding, type ChartEnvelope, type ChartListAllOptions, type ChartListOptions, type ChartModifyInput, type ChartModifyOptions, type ChartModifyResponse, type ChartSpec, type ChartType, type ChartUpdateInput, ClickHouseAdapter, type ClickHouseAdapterOptions, type ClickHouseClientFn, type ContextDocument, type DashboardCreateInput, type DashboardForkInput, type DashboardForkUpdateInput, type DashboardListOptions, type DashboardUpdateInput, type DatabaseAdapter, type DatabaseDialect, type DateRangeInput, type EncodingHints, type FieldRef, type FieldRefInput, type FieldType, type IQueryPanelApi, type IngestResponse, type IntentResult, type MetricEncoding, type MetricField, type MetricSpec, type PaginatedResponse$1 as PaginatedResponse, type PaginationInfo$1 as PaginationInfo, type PaginationQuery$1 as PaginationQuery, type ParamRecord, type ParamValue, type PipelineTrace, PostgresAdapter, type PostgresAdapterOptions, type PostgresClientFn, type PostgresWireDialect, QueryErrorCode, QueryErrorCode as QueryErrorCodeType, QueryPanelSdkAPI, type QueryPanelSdkAPIOptions, QueryPipelineError, type RequestHandler, type RequestHandlerOptions, type RequestHandlerResult, type SchemaIntrospection, type SchemaSyncOptions, type SdkActiveChart, type SdkChart, type SdkDashboard, type SdkSession, type SdkSessionTurn, type SessionGetOptions, type SessionListOptions, type SessionUpdateInput, type SqlModifications, type StackingMode, type TableColumn, type TableEncoding, type TableSpec, type TimeUnit, type ValueFormat, type VizModifications, type VizSpec, type VizSpecGenerateInput, type VizSpecGenerateOptions, type VizSpecGeneratorInput, type VizSpecKind, type VizSpecResponse, type VizSpecResult, anonymizeResults, mapGeneratedParams, normalizeSqlParamsInput, resolveQueryPipeline };
|
|
2190
|
+
export { ALL_VIZ_CHART_TYPES, type ActiveChartBulkGetResponse, type ActiveChartCreateInput, type ActiveChartListOptions, type ActiveChartUpdateInput, type AggregateOp, type AskOptions, type AskResponse, type AxisField, type AxisFieldInput, BigQueryAdapter, type BigQueryAdapterOptions, type BigQueryClientFn, type BigQueryQueryRequest, type BigQueryQueryResult, CallbackApiClient, type CatalogSchema, type CatalogTable, type CatalogTableType, type ChartBulkGetResponse, type ChartCreateInput, type ChartEncoding, type ChartEnvelope, type ChartListAllOptions, type ChartListOptions, type ChartModifyInput, type ChartModifyOptions, type ChartModifyResponse, type ChartSpec, type ChartType, type ChartUpdateInput, ClickHouseAdapter, type ClickHouseAdapterOptions, type ClickHouseClientFn, type ContextDocument, type DashboardCreateInput, type DashboardForkInput, type DashboardForkUpdateInput, type DashboardListOptions, type DashboardUpdateInput, type DatabaseAdapter, type DatabaseDialect, type DateRangeInput, type EncodingHints, type FieldRef, type FieldRefInput, type FieldType, type IQueryPanelApi, type IngestResponse, type IntentResult, type ListTablesOptions, type MapEncoding, type MapLocation, type MapLocationMode, type MapSpec, type MetricEncoding, type MetricField, type MetricSpec, type PaginatedResponse$1 as PaginatedResponse, type PaginationInfo$1 as PaginationInfo, type PaginationQuery$1 as PaginationQuery, type ParamRecord, type ParamValue, type PipelineTrace, PostgresAdapter, type PostgresAdapterOptions, type PostgresClientFn, type PostgresWireDialect, QueryErrorCode, QueryErrorCode as QueryErrorCodeType, QueryPanelSdkAPI, type QueryPanelSdkAPIOptions, QueryPipelineError, type RequestHandler, type RequestHandlerOptions, type RequestHandlerResult, type SchemaIngestBatchEmbedResponse, type SchemaIngestRequestOptions, type SchemaIntrospection, type SchemaSyncOptions, type SchemaSyncProgressEvent, SchemaTooLargeError, type SdkActiveChart, type SdkChart, type SdkDashboard, type SdkSession, type SdkSessionTurn, type SessionGetOptions, type SessionListOptions, type SessionUpdateInput, type SqlModifications, type StackingMode, type StageSchemaIngestOptions, type StageSchemaIngestResult, type SyncSchemaInBatchesOptions, type TableColumn, type TableEncoding, type TableSpec, type TimeUnit, type ValueFormat, type VizModifications, type VizSpec, type VizSpecGenerateInput, type VizSpecGenerateOptions, type VizSpecGeneratorInput, type VizSpecKind, type VizSpecResponse, type VizSpecResult, anonymizeResults, mapGeneratedParams, normalizeSqlParamsInput, resolveQueryPipeline };
|
package/dist/index.d.ts
CHANGED
|
@@ -38,6 +38,26 @@ interface IntrospectOptions {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
type DatabaseDialect = "bigquery" | "clickhouse" | "postgres" | "redshift" | "mysql";
|
|
41
|
+
/** A schema (or ClickHouse database / BigQuery dataset) in the catalog. */
|
|
42
|
+
interface CatalogSchema {
|
|
43
|
+
schema: string;
|
|
44
|
+
tableCount: number;
|
|
45
|
+
}
|
|
46
|
+
type CatalogTableType = "table" | "view" | "materialized_view";
|
|
47
|
+
/** A table or view in the catalog (no columns; cheap to list). */
|
|
48
|
+
interface CatalogTable {
|
|
49
|
+
schema: string;
|
|
50
|
+
name: string;
|
|
51
|
+
type: CatalogTableType;
|
|
52
|
+
}
|
|
53
|
+
interface ListTablesOptions {
|
|
54
|
+
/** Only list tables in this schema. */
|
|
55
|
+
schema?: string;
|
|
56
|
+
/** Case-insensitive substring match on the table name. */
|
|
57
|
+
search?: string;
|
|
58
|
+
/** Max rows to return. Default 500, capped at 5000. */
|
|
59
|
+
limit?: number;
|
|
60
|
+
}
|
|
41
61
|
interface DatabaseExecutionResult {
|
|
42
62
|
fields: string[];
|
|
43
63
|
rows: Array<Record<string, unknown>>;
|
|
@@ -68,6 +88,14 @@ interface DatabaseAdapter {
|
|
|
68
88
|
* Get the database dialect/type
|
|
69
89
|
*/
|
|
70
90
|
getDialect(): DatabaseDialect;
|
|
91
|
+
/**
|
|
92
|
+
* Optional: List schemas with table counts (cheap catalog read for pickers).
|
|
93
|
+
*/
|
|
94
|
+
listSchemas?(): Promise<CatalogSchema[]>;
|
|
95
|
+
/**
|
|
96
|
+
* Optional: List tables/views without columns (cheap catalog read for pickers).
|
|
97
|
+
*/
|
|
98
|
+
listTables?(options?: ListTablesOptions): Promise<CatalogTable[]>;
|
|
71
99
|
/**
|
|
72
100
|
* Optional: Close/cleanup database connection
|
|
73
101
|
*/
|
|
@@ -108,6 +136,7 @@ interface BigQueryAdapterOptions {
|
|
|
108
136
|
kind?: SchemaIntrospection["db"]["kind"];
|
|
109
137
|
/**
|
|
110
138
|
* Optional allow-list of table names (dataset.table or bare table name).
|
|
139
|
+
* `*` or `<dataset>.*` allows every table in the dataset (same as no filter).
|
|
111
140
|
* When specified, introspection and queries are restricted to these tables only.
|
|
112
141
|
*/
|
|
113
142
|
allowedTables?: string[];
|
|
@@ -135,6 +164,14 @@ declare class BigQueryAdapter implements DatabaseAdapter {
|
|
|
135
164
|
* Restricts to the default dataset (or allowedTables) and returns tables/columns only.
|
|
136
165
|
*/
|
|
137
166
|
introspect(options?: IntrospectOptions): Promise<SchemaIntrospection>;
|
|
167
|
+
/** The adapter is bound to one dataset, so this returns a single row. */
|
|
168
|
+
listSchemas(): Promise<CatalogSchema[]>;
|
|
169
|
+
/**
|
|
170
|
+
* List tables in the bound dataset. Reads the full catalog (not restricted
|
|
171
|
+
* by `allowedTables`). Default limit 500, max 5000.
|
|
172
|
+
*/
|
|
173
|
+
listTables(options?: ListTablesOptions): Promise<CatalogTable[]>;
|
|
174
|
+
private informationSchema;
|
|
138
175
|
private validateQueryTables;
|
|
139
176
|
}
|
|
140
177
|
|
|
@@ -152,6 +189,7 @@ interface ClickHouseAdapterOptions {
|
|
|
152
189
|
* Optional allow-list of table names.
|
|
153
190
|
* When specified, introspection and queries are restricted to these tables only.
|
|
154
191
|
* ClickHouse tables are not schema-qualified, so just provide table names.
|
|
192
|
+
* `*` or `<database>.*` allows every table (same as no filter).
|
|
155
193
|
*/
|
|
156
194
|
allowedTables?: string[];
|
|
157
195
|
}
|
|
@@ -179,6 +217,13 @@ declare class ClickHouseAdapter implements DatabaseAdapter {
|
|
|
179
217
|
* No indexes, constraints, or statistics
|
|
180
218
|
*/
|
|
181
219
|
introspect(options?: IntrospectOptions): Promise<SchemaIntrospection>;
|
|
220
|
+
/** The adapter is bound to one database, so this returns a single row. */
|
|
221
|
+
listSchemas(): Promise<CatalogSchema[]>;
|
|
222
|
+
/**
|
|
223
|
+
* List tables in the bound database. Reads the full catalog (not restricted
|
|
224
|
+
* by `allowedTables`). Default limit 500, max 5000.
|
|
225
|
+
*/
|
|
226
|
+
listTables(options?: ListTablesOptions): Promise<CatalogTable[]>;
|
|
182
227
|
private validateQueryTables;
|
|
183
228
|
close(): Promise<void>;
|
|
184
229
|
private query;
|
|
@@ -207,7 +252,9 @@ interface PostgresAdapterOptions {
|
|
|
207
252
|
dialect?: PostgresWireDialect;
|
|
208
253
|
/**
|
|
209
254
|
* Optional allow-list of table names (schema-qualified or bare).
|
|
210
|
-
*
|
|
255
|
+
* Use `schema.*` to allow every table in a schema (a bare `*` means the
|
|
256
|
+
* default schema). When specified, introspection and queries are restricted
|
|
257
|
+
* to these tables only.
|
|
211
258
|
*/
|
|
212
259
|
allowedTables?: string[];
|
|
213
260
|
}
|
|
@@ -233,6 +280,17 @@ declare class PostgresAdapter implements DatabaseAdapter {
|
|
|
233
280
|
private convertNamedToPositionalParams;
|
|
234
281
|
validate(sql: string, params?: Record<string, string | number | boolean | string[] | number[]>): Promise<void>;
|
|
235
282
|
getDialect(): PostgresWireDialect;
|
|
283
|
+
/**
|
|
284
|
+
* List schemas with their table/view counts. Reads the full catalog (not
|
|
285
|
+
* restricted by `allowedTables`) so it can back an allowed-tables picker.
|
|
286
|
+
*/
|
|
287
|
+
listSchemas(): Promise<CatalogSchema[]>;
|
|
288
|
+
/**
|
|
289
|
+
* List tables/views, optionally filtered by schema and a case-insensitive
|
|
290
|
+
* substring of the table name. Reads the full catalog (not restricted by
|
|
291
|
+
* `allowedTables`). Default limit 500, max 5000.
|
|
292
|
+
*/
|
|
293
|
+
listTables(options?: ListTablesOptions): Promise<CatalogTable[]>;
|
|
236
294
|
/**
|
|
237
295
|
* Simplified introspection: only collect table/column metadata for IngestRequest
|
|
238
296
|
* No indexes, constraints, or statistics
|
|
@@ -341,6 +399,17 @@ declare class QueryPipelineError extends Error {
|
|
|
341
399
|
*/
|
|
342
400
|
isAiProviderError(): boolean;
|
|
343
401
|
}
|
|
402
|
+
/**
|
|
403
|
+
* Thrown by stageSchemaIngest / syncSchemaInBatches when the introspected schema
|
|
404
|
+
* has more columns than `maxColumns`. Raised before anything is uploaded; narrow
|
|
405
|
+
* the sync with `allowedTables` / `tables` (e.g. `schema.*`) and retry.
|
|
406
|
+
*/
|
|
407
|
+
declare class SchemaTooLargeError extends Error {
|
|
408
|
+
readonly tableCount: number;
|
|
409
|
+
readonly columnCount: number;
|
|
410
|
+
readonly maxColumns: number;
|
|
411
|
+
constructor(tableCount: number, columnCount: number, maxColumns: number);
|
|
412
|
+
}
|
|
344
413
|
|
|
345
414
|
type ParamValue = string | number | boolean | string[] | number[];
|
|
346
415
|
type ParamRecord = Record<string, ParamValue>;
|
|
@@ -548,6 +617,57 @@ interface SchemaSyncOptions {
|
|
|
548
617
|
tables?: string[];
|
|
549
618
|
forceReindex?: boolean;
|
|
550
619
|
}
|
|
620
|
+
/** Progress events emitted by stageSchemaIngest / syncSchemaInBatches. */
|
|
621
|
+
type SchemaSyncProgressEvent = {
|
|
622
|
+
phase: "introspecting";
|
|
623
|
+
} | {
|
|
624
|
+
phase: "introspected";
|
|
625
|
+
tableCount: number;
|
|
626
|
+
columnCount: number;
|
|
627
|
+
} | {
|
|
628
|
+
phase: "uploading";
|
|
629
|
+
done: number;
|
|
630
|
+
total: number;
|
|
631
|
+
} | {
|
|
632
|
+
phase: "committing";
|
|
633
|
+
} | {
|
|
634
|
+
phase: "embedding";
|
|
635
|
+
done: number;
|
|
636
|
+
total: number;
|
|
637
|
+
chunks: number;
|
|
638
|
+
} | {
|
|
639
|
+
phase: "finalizing";
|
|
640
|
+
};
|
|
641
|
+
interface SchemaIngestRequestOptions {
|
|
642
|
+
tenantId?: string;
|
|
643
|
+
userId?: string;
|
|
644
|
+
scopes?: string[];
|
|
645
|
+
}
|
|
646
|
+
interface StageSchemaIngestOptions extends SchemaSyncOptions {
|
|
647
|
+
/** Max docs per batch (1 per table + 1 per column). Default 1000. */
|
|
648
|
+
maxBatchDocs?: number;
|
|
649
|
+
/** Max serialized JSON bytes per batch. Default 2_000_000. */
|
|
650
|
+
maxBatchBytes?: number;
|
|
651
|
+
/** Throw SchemaTooLargeError (before uploading) above this many columns. */
|
|
652
|
+
maxColumns?: number;
|
|
653
|
+
onProgress?: (event: SchemaSyncProgressEvent) => void;
|
|
654
|
+
}
|
|
655
|
+
type SyncSchemaInBatchesOptions = StageSchemaIngestOptions;
|
|
656
|
+
interface StageSchemaIngestResult {
|
|
657
|
+
sessionId: string;
|
|
658
|
+
status: "skipped" | "embedding";
|
|
659
|
+
totalBatches: number;
|
|
660
|
+
tableCount: number;
|
|
661
|
+
columnCount: number;
|
|
662
|
+
/** Present when status is "skipped" (schema unchanged). */
|
|
663
|
+
skippedResult?: IngestResponse;
|
|
664
|
+
driftDetected?: boolean;
|
|
665
|
+
}
|
|
666
|
+
interface SchemaIngestBatchEmbedResponse {
|
|
667
|
+
index: number;
|
|
668
|
+
chunks: number;
|
|
669
|
+
chunks_with_annotations: number;
|
|
670
|
+
}
|
|
551
671
|
|
|
552
672
|
/**
|
|
553
673
|
* VizSpec types for flexible visualization specifications
|
|
@@ -582,7 +702,7 @@ interface SortSpec {
|
|
|
582
702
|
}
|
|
583
703
|
interface VizSpecBase {
|
|
584
704
|
version: '1.0';
|
|
585
|
-
kind: 'chart' | 'table' | 'metric';
|
|
705
|
+
kind: 'chart' | 'table' | 'metric' | 'map';
|
|
586
706
|
title?: string;
|
|
587
707
|
description?: string;
|
|
588
708
|
data: {
|
|
@@ -638,13 +758,32 @@ interface MetricSpec extends VizSpecBase {
|
|
|
638
758
|
kind: 'metric';
|
|
639
759
|
encoding: MetricEncoding;
|
|
640
760
|
}
|
|
641
|
-
type
|
|
761
|
+
type MapLocationMode = 'place' | 'latlng';
|
|
762
|
+
interface MapLocation {
|
|
763
|
+
mode: MapLocationMode;
|
|
764
|
+
postalCodeField?: string | null;
|
|
765
|
+
cityField?: string | null;
|
|
766
|
+
latField?: string | null;
|
|
767
|
+
lngField?: string | null;
|
|
768
|
+
}
|
|
769
|
+
interface MapEncoding {
|
|
770
|
+
location: MapLocation;
|
|
771
|
+
country: string;
|
|
772
|
+
colorField?: string | null;
|
|
773
|
+
labelField?: string | null;
|
|
774
|
+
tooltips?: string[] | null;
|
|
775
|
+
}
|
|
776
|
+
interface MapSpec extends VizSpecBase {
|
|
777
|
+
kind: 'map';
|
|
778
|
+
encoding: MapEncoding;
|
|
779
|
+
}
|
|
780
|
+
type VizSpec = ChartSpec | TableSpec | MetricSpec | MapSpec;
|
|
642
781
|
/**
|
|
643
782
|
* Encoding hints for vizspec modifications.
|
|
644
783
|
* These hints guide the LLM to generate specific visualization configurations.
|
|
645
784
|
*/
|
|
646
785
|
interface EncodingHints {
|
|
647
|
-
/** Preferred vizspec kind (
|
|
786
|
+
/** Preferred vizspec kind. A map is chosen by the question ("show them on a map"), not by a hint. */
|
|
648
787
|
kind?: 'chart' | 'table' | 'metric';
|
|
649
788
|
/** Preferred chart type (bar, line, area, scatter, pie) */
|
|
650
789
|
chartType?: ChartType;
|
|
@@ -910,8 +1049,8 @@ interface SqlModifications {
|
|
|
910
1049
|
* These changes only affect how the chart is rendered.
|
|
911
1050
|
*/
|
|
912
1051
|
interface VizModifications {
|
|
913
|
-
/** Change the VizSpec kind (chart, table, metric). Applies to vizspec only. */
|
|
914
|
-
kind?: VizSpecKind
|
|
1052
|
+
/** Change the VizSpec kind (chart, table, metric; a map cannot be switched to or from). Applies to vizspec only. */
|
|
1053
|
+
kind?: Exclude<VizSpecKind, "map">;
|
|
915
1054
|
/** Change the chart type (line, bar, area, scatter, pie) */
|
|
916
1055
|
chartType?: ChartType;
|
|
917
1056
|
/** Configure the X axis field and settings */
|
|
@@ -1283,6 +1422,17 @@ declare class QueryPanelSdkAPI {
|
|
|
1283
1422
|
}): void;
|
|
1284
1423
|
attachDatabase(name: string, adapter: DatabaseAdapter): void;
|
|
1285
1424
|
introspect(databaseName: string, tables?: string[]): Promise<SchemaIntrospection>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Lists schemas (ClickHouse: the database, BigQuery: the dataset) with table
|
|
1427
|
+
* counts. Cheap catalog read for building an allowed-tables picker; not
|
|
1428
|
+
* restricted by `allowedTables`.
|
|
1429
|
+
*/
|
|
1430
|
+
listSchemas(databaseName: string): Promise<CatalogSchema[]>;
|
|
1431
|
+
/**
|
|
1432
|
+
* Lists tables/views (no columns) filtered by schema and a case-insensitive
|
|
1433
|
+
* name substring. Default limit 500, max 5000. Not restricted by `allowedTables`.
|
|
1434
|
+
*/
|
|
1435
|
+
listTables(databaseName: string, options?: ListTablesOptions): Promise<CatalogTable[]>;
|
|
1286
1436
|
/**
|
|
1287
1437
|
* Syncs the database schema to QueryPanel for natural language query generation.
|
|
1288
1438
|
*
|
|
@@ -1308,6 +1458,31 @@ declare class QueryPanelSdkAPI {
|
|
|
1308
1458
|
* ```
|
|
1309
1459
|
*/
|
|
1310
1460
|
syncSchema(databaseName: string, options: SchemaSyncOptions, signal?: AbortSignal): Promise<IngestResponse>;
|
|
1461
|
+
/**
|
|
1462
|
+
* Introspects the schema, uploads it in batches to a new ingest session and
|
|
1463
|
+
* commits it. Returns `status: "skipped"` (with `skippedResult`) when the schema
|
|
1464
|
+
* is unchanged, otherwise `status: "embedding"`: call embedSchemaIngestBatch for
|
|
1465
|
+
* every index in [0, totalBatches) and then finalizeSchemaIngest.
|
|
1466
|
+
* Throws SchemaTooLargeError before uploading if `maxColumns` is exceeded.
|
|
1467
|
+
*/
|
|
1468
|
+
stageSchemaIngest(databaseName: string, options: StageSchemaIngestOptions, signal?: AbortSignal): Promise<StageSchemaIngestResult>;
|
|
1469
|
+
/** Embeds one batch of a staged ingest session. */
|
|
1470
|
+
embedSchemaIngestBatch(sessionId: string, index: number, options: SchemaIngestRequestOptions, signal?: AbortSignal): Promise<SchemaIngestBatchEmbedResponse>;
|
|
1471
|
+
/** Finalizes a staged ingest session after all batches are embedded. */
|
|
1472
|
+
finalizeSchemaIngest(sessionId: string, options: SchemaIngestRequestOptions, signal?: AbortSignal): Promise<IngestResponse>;
|
|
1473
|
+
/**
|
|
1474
|
+
* Batched alternative to syncSchema for large databases: stage, embed every
|
|
1475
|
+
* batch, and finalize in-process, reporting progress via `onProgress`.
|
|
1476
|
+
*
|
|
1477
|
+
* @example
|
|
1478
|
+
* ```typescript
|
|
1479
|
+
* await qp.syncSchemaInBatches("warehouse", {
|
|
1480
|
+
* tenantId: "tenant_123",
|
|
1481
|
+
* onProgress: (e) => console.log(e.phase, e),
|
|
1482
|
+
* });
|
|
1483
|
+
* ```
|
|
1484
|
+
*/
|
|
1485
|
+
syncSchemaInBatches(databaseName: string, options: SyncSchemaInBatchesOptions, signal?: AbortSignal): Promise<IngestResponse>;
|
|
1311
1486
|
/**
|
|
1312
1487
|
* Generates SQL from a natural language question and executes it.
|
|
1313
1488
|
*
|
|
@@ -1381,7 +1556,7 @@ declare class QueryPanelSdkAPI {
|
|
|
1381
1556
|
* @param input - VizSpec generation input with question, SQL, and result data
|
|
1382
1557
|
* @param options - Optional settings for tenant and retries
|
|
1383
1558
|
* @param signal - Optional AbortSignal for cancellation
|
|
1384
|
-
* @returns VizSpec specification for chart, table, or
|
|
1559
|
+
* @returns VizSpec specification for chart, table, metric, or map visualization
|
|
1385
1560
|
*
|
|
1386
1561
|
* @example
|
|
1387
1562
|
* ```typescript
|
|
@@ -2012,4 +2187,4 @@ declare class QueryPanelSdkAPI {
|
|
|
2012
2187
|
}, signal?: AbortSignal): Promise<SdkDashboard[]>;
|
|
2013
2188
|
}
|
|
2014
2189
|
|
|
2015
|
-
export { ALL_VIZ_CHART_TYPES, type ActiveChartBulkGetResponse, type ActiveChartCreateInput, type ActiveChartListOptions, type ActiveChartUpdateInput, type AggregateOp, type AskOptions, type AskResponse, type AxisField, type AxisFieldInput, BigQueryAdapter, type BigQueryAdapterOptions, type BigQueryClientFn, type BigQueryQueryRequest, type BigQueryQueryResult, CallbackApiClient, type ChartBulkGetResponse, type ChartCreateInput, type ChartEncoding, type ChartEnvelope, type ChartListAllOptions, type ChartListOptions, type ChartModifyInput, type ChartModifyOptions, type ChartModifyResponse, type ChartSpec, type ChartType, type ChartUpdateInput, ClickHouseAdapter, type ClickHouseAdapterOptions, type ClickHouseClientFn, type ContextDocument, type DashboardCreateInput, type DashboardForkInput, type DashboardForkUpdateInput, type DashboardListOptions, type DashboardUpdateInput, type DatabaseAdapter, type DatabaseDialect, type DateRangeInput, type EncodingHints, type FieldRef, type FieldRefInput, type FieldType, type IQueryPanelApi, type IngestResponse, type IntentResult, type MetricEncoding, type MetricField, type MetricSpec, type PaginatedResponse$1 as PaginatedResponse, type PaginationInfo$1 as PaginationInfo, type PaginationQuery$1 as PaginationQuery, type ParamRecord, type ParamValue, type PipelineTrace, PostgresAdapter, type PostgresAdapterOptions, type PostgresClientFn, type PostgresWireDialect, QueryErrorCode, QueryErrorCode as QueryErrorCodeType, QueryPanelSdkAPI, type QueryPanelSdkAPIOptions, QueryPipelineError, type RequestHandler, type RequestHandlerOptions, type RequestHandlerResult, type SchemaIntrospection, type SchemaSyncOptions, type SdkActiveChart, type SdkChart, type SdkDashboard, type SdkSession, type SdkSessionTurn, type SessionGetOptions, type SessionListOptions, type SessionUpdateInput, type SqlModifications, type StackingMode, type TableColumn, type TableEncoding, type TableSpec, type TimeUnit, type ValueFormat, type VizModifications, type VizSpec, type VizSpecGenerateInput, type VizSpecGenerateOptions, type VizSpecGeneratorInput, type VizSpecKind, type VizSpecResponse, type VizSpecResult, anonymizeResults, mapGeneratedParams, normalizeSqlParamsInput, resolveQueryPipeline };
|
|
2190
|
+
export { ALL_VIZ_CHART_TYPES, type ActiveChartBulkGetResponse, type ActiveChartCreateInput, type ActiveChartListOptions, type ActiveChartUpdateInput, type AggregateOp, type AskOptions, type AskResponse, type AxisField, type AxisFieldInput, BigQueryAdapter, type BigQueryAdapterOptions, type BigQueryClientFn, type BigQueryQueryRequest, type BigQueryQueryResult, CallbackApiClient, type CatalogSchema, type CatalogTable, type CatalogTableType, type ChartBulkGetResponse, type ChartCreateInput, type ChartEncoding, type ChartEnvelope, type ChartListAllOptions, type ChartListOptions, type ChartModifyInput, type ChartModifyOptions, type ChartModifyResponse, type ChartSpec, type ChartType, type ChartUpdateInput, ClickHouseAdapter, type ClickHouseAdapterOptions, type ClickHouseClientFn, type ContextDocument, type DashboardCreateInput, type DashboardForkInput, type DashboardForkUpdateInput, type DashboardListOptions, type DashboardUpdateInput, type DatabaseAdapter, type DatabaseDialect, type DateRangeInput, type EncodingHints, type FieldRef, type FieldRefInput, type FieldType, type IQueryPanelApi, type IngestResponse, type IntentResult, type ListTablesOptions, type MapEncoding, type MapLocation, type MapLocationMode, type MapSpec, type MetricEncoding, type MetricField, type MetricSpec, type PaginatedResponse$1 as PaginatedResponse, type PaginationInfo$1 as PaginationInfo, type PaginationQuery$1 as PaginationQuery, type ParamRecord, type ParamValue, type PipelineTrace, PostgresAdapter, type PostgresAdapterOptions, type PostgresClientFn, type PostgresWireDialect, QueryErrorCode, QueryErrorCode as QueryErrorCodeType, QueryPanelSdkAPI, type QueryPanelSdkAPIOptions, QueryPipelineError, type RequestHandler, type RequestHandlerOptions, type RequestHandlerResult, type SchemaIngestBatchEmbedResponse, type SchemaIngestRequestOptions, type SchemaIntrospection, type SchemaSyncOptions, type SchemaSyncProgressEvent, SchemaTooLargeError, type SdkActiveChart, type SdkChart, type SdkDashboard, type SdkSession, type SdkSessionTurn, type SessionGetOptions, type SessionListOptions, type SessionUpdateInput, type SqlModifications, type StackingMode, type StageSchemaIngestOptions, type StageSchemaIngestResult, type SyncSchemaInBatchesOptions, type TableColumn, type TableEncoding, type TableSpec, type TimeUnit, type ValueFormat, type VizModifications, type VizSpec, type VizSpecGenerateInput, type VizSpecGenerateOptions, type VizSpecGeneratorInput, type VizSpecKind, type VizSpecResponse, type VizSpecResult, anonymizeResults, mapGeneratedParams, normalizeSqlParamsInput, resolveQueryPipeline };
|