@querypanel/node-sdk 1.3.6 → 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/dist/index.d.cts CHANGED
@@ -702,7 +702,7 @@ interface SortSpec {
702
702
  }
703
703
  interface VizSpecBase {
704
704
  version: '1.0';
705
- kind: 'chart' | 'table' | 'metric';
705
+ kind: 'chart' | 'table' | 'metric' | 'map';
706
706
  title?: string;
707
707
  description?: string;
708
708
  data: {
@@ -758,13 +758,32 @@ interface MetricSpec extends VizSpecBase {
758
758
  kind: 'metric';
759
759
  encoding: MetricEncoding;
760
760
  }
761
- type VizSpec = ChartSpec | TableSpec | MetricSpec;
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;
762
781
  /**
763
782
  * Encoding hints for vizspec modifications.
764
783
  * These hints guide the LLM to generate specific visualization configurations.
765
784
  */
766
785
  interface EncodingHints {
767
- /** Preferred vizspec kind (chart, table, metric) */
786
+ /** Preferred vizspec kind. A map is chosen by the question ("show them on a map"), not by a hint. */
768
787
  kind?: 'chart' | 'table' | 'metric';
769
788
  /** Preferred chart type (bar, line, area, scatter, pie) */
770
789
  chartType?: ChartType;
@@ -1030,8 +1049,8 @@ interface SqlModifications {
1030
1049
  * These changes only affect how the chart is rendered.
1031
1050
  */
1032
1051
  interface VizModifications {
1033
- /** Change the VizSpec kind (chart, table, metric). Applies to vizspec only. */
1034
- 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">;
1035
1054
  /** Change the chart type (line, bar, area, scatter, pie) */
1036
1055
  chartType?: ChartType;
1037
1056
  /** Configure the X axis field and settings */
@@ -1537,7 +1556,7 @@ declare class QueryPanelSdkAPI {
1537
1556
  * @param input - VizSpec generation input with question, SQL, and result data
1538
1557
  * @param options - Optional settings for tenant and retries
1539
1558
  * @param signal - Optional AbortSignal for cancellation
1540
- * @returns VizSpec specification for chart, table, or metric visualization
1559
+ * @returns VizSpec specification for chart, table, metric, or map visualization
1541
1560
  *
1542
1561
  * @example
1543
1562
  * ```typescript
@@ -2168,4 +2187,4 @@ declare class QueryPanelSdkAPI {
2168
2187
  }, signal?: AbortSignal): Promise<SdkDashboard[]>;
2169
2188
  }
2170
2189
 
2171
- 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 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 };
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
@@ -702,7 +702,7 @@ interface SortSpec {
702
702
  }
703
703
  interface VizSpecBase {
704
704
  version: '1.0';
705
- kind: 'chart' | 'table' | 'metric';
705
+ kind: 'chart' | 'table' | 'metric' | 'map';
706
706
  title?: string;
707
707
  description?: string;
708
708
  data: {
@@ -758,13 +758,32 @@ interface MetricSpec extends VizSpecBase {
758
758
  kind: 'metric';
759
759
  encoding: MetricEncoding;
760
760
  }
761
- type VizSpec = ChartSpec | TableSpec | MetricSpec;
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;
762
781
  /**
763
782
  * Encoding hints for vizspec modifications.
764
783
  * These hints guide the LLM to generate specific visualization configurations.
765
784
  */
766
785
  interface EncodingHints {
767
- /** Preferred vizspec kind (chart, table, metric) */
786
+ /** Preferred vizspec kind. A map is chosen by the question ("show them on a map"), not by a hint. */
768
787
  kind?: 'chart' | 'table' | 'metric';
769
788
  /** Preferred chart type (bar, line, area, scatter, pie) */
770
789
  chartType?: ChartType;
@@ -1030,8 +1049,8 @@ interface SqlModifications {
1030
1049
  * These changes only affect how the chart is rendered.
1031
1050
  */
1032
1051
  interface VizModifications {
1033
- /** Change the VizSpec kind (chart, table, metric). Applies to vizspec only. */
1034
- 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">;
1035
1054
  /** Change the chart type (line, bar, area, scatter, pie) */
1036
1055
  chartType?: ChartType;
1037
1056
  /** Configure the X axis field and settings */
@@ -1537,7 +1556,7 @@ declare class QueryPanelSdkAPI {
1537
1556
  * @param input - VizSpec generation input with question, SQL, and result data
1538
1557
  * @param options - Optional settings for tenant and retries
1539
1558
  * @param signal - Optional AbortSignal for cancellation
1540
- * @returns VizSpec specification for chart, table, or metric visualization
1559
+ * @returns VizSpec specification for chart, table, metric, or map visualization
1541
1560
  *
1542
1561
  * @example
1543
1562
  * ```typescript
@@ -2168,4 +2187,4 @@ declare class QueryPanelSdkAPI {
2168
2187
  }, signal?: AbortSignal): Promise<SdkDashboard[]>;
2169
2188
  }
2170
2189
 
2171
- 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 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 };
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.js CHANGED
@@ -3612,7 +3612,7 @@ var QueryPanelSdkAPI = class _QueryPanelSdkAPI {
3612
3612
  * @param input - VizSpec generation input with question, SQL, and result data
3613
3613
  * @param options - Optional settings for tenant and retries
3614
3614
  * @param signal - Optional AbortSignal for cancellation
3615
- * @returns VizSpec specification for chart, table, or metric visualization
3615
+ * @returns VizSpec specification for chart, table, metric, or map visualization
3616
3616
  *
3617
3617
  * @example
3618
3618
  * ```typescript