@erdoai/ui 0.1.48 → 0.1.49

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
@@ -22,7 +22,14 @@ interface DatasetDetails {
22
22
  * recreating on every render.
23
23
  */
24
24
  interface DataFetcher {
25
- fetchDatasetContents: (slug: string, invocationId: string) => Promise<any[]>;
25
+ /**
26
+ * Fetch dataset contents for charts/tables.
27
+ * @param slug - Dataset slug to query
28
+ * @param invocationId - Thread/invocation ID for context
29
+ * @param sqlQuery - Optional SQL query to run against the dataset
30
+ * @param resourceKey - Optional resource key to look up range/sheet metadata for Excel files
31
+ */
32
+ fetchDatasetContents: (slug: string, invocationId: string, sqlQuery?: string, resourceKey?: string) => Promise<any[]>;
26
33
  /**
27
34
  * Get dataset details (id and name) by slug.
28
35
  * Used by DatasetDownload component to resolve slug to downloadable dataset.
@@ -295,6 +302,10 @@ interface Series$1 {
295
302
  key: string;
296
303
  color: string;
297
304
  datasetSlug: string;
305
+ /** Optional SQL query to run against the dataset */
306
+ sqlQuery?: string;
307
+ /** Optional resource key for Excel files with headers not on row 1 */
308
+ resourceKey?: string;
298
309
  axisIndex?: number;
299
310
  filters?: Filter$1[];
300
311
  }
@@ -344,6 +355,10 @@ interface DatasetTableProps {
344
355
  title?: string;
345
356
  invocationId: string;
346
357
  datasetSlug: string;
358
+ /** Optional SQL query to run against the dataset */
359
+ sqlQuery?: string;
360
+ /** Optional resource key for Excel files with headers not on row 1 */
361
+ resourceKey?: string;
347
362
  columns?: TableColumn$1[];
348
363
  maxRows?: number;
349
364
  /** Class for the outer container */
@@ -363,7 +378,7 @@ interface DatasetTableProps {
363
378
  * A table component that fetches data from a dataset and renders it.
364
379
  * Requires ErdoProvider to be set up with data fetching capabilities.
365
380
  */
366
- declare function DatasetTable({ title, invocationId, datasetSlug, columns, maxRows, className, tableWrapperClassName, headerClassName, loadingClassName, emptyClassName, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
381
+ declare function DatasetTable({ title, invocationId, datasetSlug, sqlQuery, resourceKey, columns, maxRows, className, tableWrapperClassName, headerClassName, loadingClassName, emptyClassName, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
367
382
 
368
383
  /**
369
384
  * JSON streaming parser utilities.
@@ -442,7 +457,7 @@ declare function isParsingInProgress(value: any): boolean;
442
457
  * They represent the structure of entities that can be built from SSE events.
443
458
  */
444
459
 
445
- type ContentType = 'text' | 'json' | 'xml' | 'thinking' | 'redacted_thinking';
460
+ type ContentType = 'text' | 'json' | 'xml' | 'thinking' | 'redacted_thinking' | 'bot_invocation' | 'bot_invocation_result' | 'tool_invocation' | 'tool_result';
446
461
  declare function isJsonLike(contentType: ContentType, uiContentType: string): boolean;
447
462
  type EntityType = 'message' | 'message_content' | 'invocation' | 'output' | 'output_content' | 'step' | 'result_handler' | 'status' | 'log';
448
463
  type MessageStreamingState = 'in_progress' | 'completed';
@@ -492,7 +507,7 @@ interface MessageContent extends BaseContentFields {
492
507
  id: string;
493
508
  message_id: string;
494
509
  content_type: ContentType;
495
- content: string;
510
+ content: string | Record<string, unknown>;
496
511
  created_by_invocation_id?: string;
497
512
  user_visibility: string;
498
513
  bot_visibility: string;
@@ -530,7 +545,7 @@ interface OutputContent extends BaseContentFields {
530
545
  _type: 'output_content';
531
546
  id: string;
532
547
  output_id: string;
533
- content: string;
548
+ content: string | Record<string, unknown>;
534
549
  content_type: ContentType;
535
550
  user_visibility: string;
536
551
  bot_visibility: string;
@@ -581,6 +596,7 @@ interface Step {
581
596
  Valid: boolean;
582
597
  };
583
598
  bot_id?: string;
599
+ bot_name?: string;
584
600
  result_handler_id: string;
585
601
  step_order: {
586
602
  Int32: number;
@@ -612,6 +628,7 @@ interface Step {
612
628
  Valid: boolean;
613
629
  };
614
630
  depends_on: string[];
631
+ history_content_type?: string;
615
632
  eventsByID: Record<string, InvocationEvent$1>;
616
633
  currentStatus: Status | null;
617
634
  }
@@ -925,6 +942,10 @@ interface Series {
925
942
  key: string;
926
943
  color: string;
927
944
  dataset_slug?: string;
945
+ /** Optional SQL query to run against the dataset */
946
+ sql_query?: string;
947
+ /** Optional resource key for Excel files with headers not on row 1 */
948
+ resource_key?: string;
928
949
  axis_index?: number;
929
950
  filters?: Filter[];
930
951
  }
@@ -1205,6 +1226,30 @@ interface DatasetDownloadProps {
1205
1226
  */
1206
1227
  declare function DatasetDownload({ slug, invocationId: _invocationId, threadId: threadIdProp, className, }: DatasetDownloadProps): react_jsx_runtime.JSX.Element | null;
1207
1228
 
1229
+ interface Memory {
1230
+ id: string;
1231
+ content: string;
1232
+ description: string;
1233
+ type: string;
1234
+ tags?: string[];
1235
+ created_at?: string;
1236
+ extra?: Record<string, unknown>;
1237
+ }
1238
+ interface MemoryContentProps {
1239
+ /** Array of memories or object with memories array */
1240
+ content: Memory[] | {
1241
+ memories: Memory[];
1242
+ };
1243
+ className?: string;
1244
+ }
1245
+ /**
1246
+ * Renders memory search results with proper formatting for different memory types.
1247
+ *
1248
+ * Snippets are shown with truncated descriptions and expandable content.
1249
+ * Other memory types show their content directly.
1250
+ */
1251
+ declare function MemoryContent({ content, className }: MemoryContentProps): react_jsx_runtime.JSX.Element;
1252
+
1208
1253
  /** Node structure from UI generation content */
1209
1254
  interface UINode {
1210
1255
  _type: string;
@@ -1237,6 +1282,10 @@ interface ChartNodeContent {
1237
1282
  interface TableNodeContent {
1238
1283
  table_title: string;
1239
1284
  dataset_slug?: string;
1285
+ /** Optional SQL query to run against the dataset */
1286
+ sql_query?: string;
1287
+ /** Optional resource key for Excel files with headers not on row 1 */
1288
+ resource_key?: string;
1240
1289
  columns: TableColumn[];
1241
1290
  }
1242
1291
  /** Text markdown node content structure */
@@ -1355,6 +1404,7 @@ interface UseDatasetContentsResult {
1355
1404
  *
1356
1405
  * @param datasetSlug - The slug/identifier of the dataset
1357
1406
  * @param invocationId - The invocation ID context
1407
+ * @param sqlQuery - Optional SQL query to run against the dataset
1358
1408
  * @returns Object with data, isLoading, error, and refetch function
1359
1409
  *
1360
1410
  * @example
@@ -1364,14 +1414,34 @@ interface UseDatasetContentsResult {
1364
1414
  * if (error) return <Error message={error.message} />;
1365
1415
  * return <Chart data={data} />;
1366
1416
  * ```
1417
+ *
1418
+ * @example With SQL query
1419
+ * ```tsx
1420
+ * const { data } = useDatasetContents(
1421
+ * 'my-database',
1422
+ * invocationId,
1423
+ * 'SELECT * FROM users ORDER BY created_at DESC LIMIT 10'
1424
+ * );
1425
+ * ```
1426
+ *
1427
+ * @example With resource key (for Excel files with headers not on row 1)
1428
+ * ```tsx
1429
+ * const { data } = useDatasetContents(
1430
+ * 'my-excel-dataset',
1431
+ * invocationId,
1432
+ * undefined,
1433
+ * 'abc123::Sheet1::table_1'
1434
+ * );
1435
+ * ```
1367
1436
  */
1368
- declare function useDatasetContents(datasetSlug: string, invocationId: string): UseDatasetContentsResult;
1437
+ declare function useDatasetContents(datasetSlug: string, invocationId: string, sqlQuery?: string, resourceKey?: string): UseDatasetContentsResult;
1369
1438
  /**
1370
1439
  * Hook to fetch contents of multiple datasets in parallel.
1371
1440
  * Uses the DataFetcher from ErdoProvider if available, otherwise falls back to REST API.
1372
1441
  *
1373
1442
  * @param datasetSlugs - Array of dataset slugs/identifiers
1374
1443
  * @param invocationId - The invocation ID context
1444
+ * @param sqlQueries - Optional map of dataset slug to SQL query
1375
1445
  * @returns Array of result objects, one per dataset
1376
1446
  *
1377
1447
  * @example
@@ -1380,8 +1450,27 @@ declare function useDatasetContents(datasetSlug: string, invocationId: string):
1380
1450
  * const isLoading = results.some(r => r.isLoading);
1381
1451
  * const allData = results.map(r => r.data || []);
1382
1452
  * ```
1453
+ *
1454
+ * @example With SQL queries
1455
+ * ```tsx
1456
+ * const results = useMultipleDatasetContents(
1457
+ * ['my-db', 'other-db'],
1458
+ * invocationId,
1459
+ * { 'my-db': 'SELECT * FROM users LIMIT 10' }
1460
+ * );
1461
+ * ```
1462
+ *
1463
+ * @example With resource keys
1464
+ * ```tsx
1465
+ * const results = useMultipleDatasetContents(
1466
+ * ['dataset-1', 'dataset-2'],
1467
+ * invocationId,
1468
+ * undefined,
1469
+ * { 'dataset-1': 'abc123::Sheet1::table_1' }
1470
+ * );
1471
+ * ```
1383
1472
  */
1384
- declare function useMultipleDatasetContents(datasetSlugs: string[], invocationId: string): UseDatasetContentsResult[];
1473
+ declare function useMultipleDatasetContents(datasetSlugs: string[], invocationId: string, sqlQueries?: Record<string, string>, resourceKeys?: Record<string, string>): UseDatasetContentsResult[];
1385
1474
 
1386
1475
  interface UseThreadOptions {
1387
1476
  /** Initial thread ID to use (if resuming an existing thread) */
@@ -1626,4 +1715,4 @@ declare function handleIncrementalMixedJsonParsing(outputContent: MessageContent
1626
1715
  */
1627
1716
  declare function handleSSEEvent(eventType: string, event: SSEEventData, path: string[], threadID: string, activeMessagesByID: Record<string, MessageWithContents>, currentEntity?: Entity | null, parents?: Entity[], entityIds?: Record<string, string>): Entity | null;
1628
1717
 
1629
- export { BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, cn, extractContentItems, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, unwrapNullString, unwrapNullStringOr, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useThread };
1718
+ export { BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Memory, MemoryContent, type MemoryContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, cn, extractContentItems, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, unwrapNullString, unwrapNullStringOr, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useThread };
package/dist/index.d.ts CHANGED
@@ -22,7 +22,14 @@ interface DatasetDetails {
22
22
  * recreating on every render.
23
23
  */
24
24
  interface DataFetcher {
25
- fetchDatasetContents: (slug: string, invocationId: string) => Promise<any[]>;
25
+ /**
26
+ * Fetch dataset contents for charts/tables.
27
+ * @param slug - Dataset slug to query
28
+ * @param invocationId - Thread/invocation ID for context
29
+ * @param sqlQuery - Optional SQL query to run against the dataset
30
+ * @param resourceKey - Optional resource key to look up range/sheet metadata for Excel files
31
+ */
32
+ fetchDatasetContents: (slug: string, invocationId: string, sqlQuery?: string, resourceKey?: string) => Promise<any[]>;
26
33
  /**
27
34
  * Get dataset details (id and name) by slug.
28
35
  * Used by DatasetDownload component to resolve slug to downloadable dataset.
@@ -295,6 +302,10 @@ interface Series$1 {
295
302
  key: string;
296
303
  color: string;
297
304
  datasetSlug: string;
305
+ /** Optional SQL query to run against the dataset */
306
+ sqlQuery?: string;
307
+ /** Optional resource key for Excel files with headers not on row 1 */
308
+ resourceKey?: string;
298
309
  axisIndex?: number;
299
310
  filters?: Filter$1[];
300
311
  }
@@ -344,6 +355,10 @@ interface DatasetTableProps {
344
355
  title?: string;
345
356
  invocationId: string;
346
357
  datasetSlug: string;
358
+ /** Optional SQL query to run against the dataset */
359
+ sqlQuery?: string;
360
+ /** Optional resource key for Excel files with headers not on row 1 */
361
+ resourceKey?: string;
347
362
  columns?: TableColumn$1[];
348
363
  maxRows?: number;
349
364
  /** Class for the outer container */
@@ -363,7 +378,7 @@ interface DatasetTableProps {
363
378
  * A table component that fetches data from a dataset and renders it.
364
379
  * Requires ErdoProvider to be set up with data fetching capabilities.
365
380
  */
366
- declare function DatasetTable({ title, invocationId, datasetSlug, columns, maxRows, className, tableWrapperClassName, headerClassName, loadingClassName, emptyClassName, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
381
+ declare function DatasetTable({ title, invocationId, datasetSlug, sqlQuery, resourceKey, columns, maxRows, className, tableWrapperClassName, headerClassName, loadingClassName, emptyClassName, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
367
382
 
368
383
  /**
369
384
  * JSON streaming parser utilities.
@@ -442,7 +457,7 @@ declare function isParsingInProgress(value: any): boolean;
442
457
  * They represent the structure of entities that can be built from SSE events.
443
458
  */
444
459
 
445
- type ContentType = 'text' | 'json' | 'xml' | 'thinking' | 'redacted_thinking';
460
+ type ContentType = 'text' | 'json' | 'xml' | 'thinking' | 'redacted_thinking' | 'bot_invocation' | 'bot_invocation_result' | 'tool_invocation' | 'tool_result';
446
461
  declare function isJsonLike(contentType: ContentType, uiContentType: string): boolean;
447
462
  type EntityType = 'message' | 'message_content' | 'invocation' | 'output' | 'output_content' | 'step' | 'result_handler' | 'status' | 'log';
448
463
  type MessageStreamingState = 'in_progress' | 'completed';
@@ -492,7 +507,7 @@ interface MessageContent extends BaseContentFields {
492
507
  id: string;
493
508
  message_id: string;
494
509
  content_type: ContentType;
495
- content: string;
510
+ content: string | Record<string, unknown>;
496
511
  created_by_invocation_id?: string;
497
512
  user_visibility: string;
498
513
  bot_visibility: string;
@@ -530,7 +545,7 @@ interface OutputContent extends BaseContentFields {
530
545
  _type: 'output_content';
531
546
  id: string;
532
547
  output_id: string;
533
- content: string;
548
+ content: string | Record<string, unknown>;
534
549
  content_type: ContentType;
535
550
  user_visibility: string;
536
551
  bot_visibility: string;
@@ -581,6 +596,7 @@ interface Step {
581
596
  Valid: boolean;
582
597
  };
583
598
  bot_id?: string;
599
+ bot_name?: string;
584
600
  result_handler_id: string;
585
601
  step_order: {
586
602
  Int32: number;
@@ -612,6 +628,7 @@ interface Step {
612
628
  Valid: boolean;
613
629
  };
614
630
  depends_on: string[];
631
+ history_content_type?: string;
615
632
  eventsByID: Record<string, InvocationEvent$1>;
616
633
  currentStatus: Status | null;
617
634
  }
@@ -925,6 +942,10 @@ interface Series {
925
942
  key: string;
926
943
  color: string;
927
944
  dataset_slug?: string;
945
+ /** Optional SQL query to run against the dataset */
946
+ sql_query?: string;
947
+ /** Optional resource key for Excel files with headers not on row 1 */
948
+ resource_key?: string;
928
949
  axis_index?: number;
929
950
  filters?: Filter[];
930
951
  }
@@ -1205,6 +1226,30 @@ interface DatasetDownloadProps {
1205
1226
  */
1206
1227
  declare function DatasetDownload({ slug, invocationId: _invocationId, threadId: threadIdProp, className, }: DatasetDownloadProps): react_jsx_runtime.JSX.Element | null;
1207
1228
 
1229
+ interface Memory {
1230
+ id: string;
1231
+ content: string;
1232
+ description: string;
1233
+ type: string;
1234
+ tags?: string[];
1235
+ created_at?: string;
1236
+ extra?: Record<string, unknown>;
1237
+ }
1238
+ interface MemoryContentProps {
1239
+ /** Array of memories or object with memories array */
1240
+ content: Memory[] | {
1241
+ memories: Memory[];
1242
+ };
1243
+ className?: string;
1244
+ }
1245
+ /**
1246
+ * Renders memory search results with proper formatting for different memory types.
1247
+ *
1248
+ * Snippets are shown with truncated descriptions and expandable content.
1249
+ * Other memory types show their content directly.
1250
+ */
1251
+ declare function MemoryContent({ content, className }: MemoryContentProps): react_jsx_runtime.JSX.Element;
1252
+
1208
1253
  /** Node structure from UI generation content */
1209
1254
  interface UINode {
1210
1255
  _type: string;
@@ -1237,6 +1282,10 @@ interface ChartNodeContent {
1237
1282
  interface TableNodeContent {
1238
1283
  table_title: string;
1239
1284
  dataset_slug?: string;
1285
+ /** Optional SQL query to run against the dataset */
1286
+ sql_query?: string;
1287
+ /** Optional resource key for Excel files with headers not on row 1 */
1288
+ resource_key?: string;
1240
1289
  columns: TableColumn[];
1241
1290
  }
1242
1291
  /** Text markdown node content structure */
@@ -1355,6 +1404,7 @@ interface UseDatasetContentsResult {
1355
1404
  *
1356
1405
  * @param datasetSlug - The slug/identifier of the dataset
1357
1406
  * @param invocationId - The invocation ID context
1407
+ * @param sqlQuery - Optional SQL query to run against the dataset
1358
1408
  * @returns Object with data, isLoading, error, and refetch function
1359
1409
  *
1360
1410
  * @example
@@ -1364,14 +1414,34 @@ interface UseDatasetContentsResult {
1364
1414
  * if (error) return <Error message={error.message} />;
1365
1415
  * return <Chart data={data} />;
1366
1416
  * ```
1417
+ *
1418
+ * @example With SQL query
1419
+ * ```tsx
1420
+ * const { data } = useDatasetContents(
1421
+ * 'my-database',
1422
+ * invocationId,
1423
+ * 'SELECT * FROM users ORDER BY created_at DESC LIMIT 10'
1424
+ * );
1425
+ * ```
1426
+ *
1427
+ * @example With resource key (for Excel files with headers not on row 1)
1428
+ * ```tsx
1429
+ * const { data } = useDatasetContents(
1430
+ * 'my-excel-dataset',
1431
+ * invocationId,
1432
+ * undefined,
1433
+ * 'abc123::Sheet1::table_1'
1434
+ * );
1435
+ * ```
1367
1436
  */
1368
- declare function useDatasetContents(datasetSlug: string, invocationId: string): UseDatasetContentsResult;
1437
+ declare function useDatasetContents(datasetSlug: string, invocationId: string, sqlQuery?: string, resourceKey?: string): UseDatasetContentsResult;
1369
1438
  /**
1370
1439
  * Hook to fetch contents of multiple datasets in parallel.
1371
1440
  * Uses the DataFetcher from ErdoProvider if available, otherwise falls back to REST API.
1372
1441
  *
1373
1442
  * @param datasetSlugs - Array of dataset slugs/identifiers
1374
1443
  * @param invocationId - The invocation ID context
1444
+ * @param sqlQueries - Optional map of dataset slug to SQL query
1375
1445
  * @returns Array of result objects, one per dataset
1376
1446
  *
1377
1447
  * @example
@@ -1380,8 +1450,27 @@ declare function useDatasetContents(datasetSlug: string, invocationId: string):
1380
1450
  * const isLoading = results.some(r => r.isLoading);
1381
1451
  * const allData = results.map(r => r.data || []);
1382
1452
  * ```
1453
+ *
1454
+ * @example With SQL queries
1455
+ * ```tsx
1456
+ * const results = useMultipleDatasetContents(
1457
+ * ['my-db', 'other-db'],
1458
+ * invocationId,
1459
+ * { 'my-db': 'SELECT * FROM users LIMIT 10' }
1460
+ * );
1461
+ * ```
1462
+ *
1463
+ * @example With resource keys
1464
+ * ```tsx
1465
+ * const results = useMultipleDatasetContents(
1466
+ * ['dataset-1', 'dataset-2'],
1467
+ * invocationId,
1468
+ * undefined,
1469
+ * { 'dataset-1': 'abc123::Sheet1::table_1' }
1470
+ * );
1471
+ * ```
1383
1472
  */
1384
- declare function useMultipleDatasetContents(datasetSlugs: string[], invocationId: string): UseDatasetContentsResult[];
1473
+ declare function useMultipleDatasetContents(datasetSlugs: string[], invocationId: string, sqlQueries?: Record<string, string>, resourceKeys?: Record<string, string>): UseDatasetContentsResult[];
1385
1474
 
1386
1475
  interface UseThreadOptions {
1387
1476
  /** Initial thread ID to use (if resuming an existing thread) */
@@ -1626,4 +1715,4 @@ declare function handleIncrementalMixedJsonParsing(outputContent: MessageContent
1626
1715
  */
1627
1716
  declare function handleSSEEvent(eventType: string, event: SSEEventData, path: string[], threadID: string, activeMessagesByID: Record<string, MessageWithContents>, currentEntity?: Entity | null, parents?: Entity[], entityIds?: Record<string, string>): Entity | null;
1628
1717
 
1629
- export { BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, cn, extractContentItems, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, unwrapNullString, unwrapNullStringOr, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useThread };
1718
+ export { BarChart, type BaseChartProps, type BotInvocation, BotInvocationContent, type BotInvocationContentData, type BotInvocationContentProps, type BotInvocationData, type BotInvocationEventInfo, type BotInvocationStatusInfo, Chart, type ChartConfig, ChartContainer, ChartContent, type ChartContentProps, ChartLegend, ChartLegendContent, ChartNode, type ChartNodeContent, ChartStyle, ChartTooltip, ChartTooltipContent, CodeexecContent, type CodeexecContentProps, CodegenContent, type CodegenContentProps, CollapsibleCodeBlock, type CollapsibleCodeBlockProps, Content, type ContentChartConfig, type ContentChunk, type ContentComponentProps, type ContentProps, type ContentType, type DataFetcher, DatasetChart, type DatasetChartProps, type DatasetDetails, DatasetDownload, type DatasetDownloadProps, DatasetTable, type DatasetTableProps, DownloadButtonNode, type DownloadButtonNodeContent, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErdoUI, type ErdoUIProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, InvocationEvent, type InvocationEventProps, InvocationEvents, type InvocationEventsProps, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Loader, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Memory, MemoryContent, type MemoryContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type NodeRendererProps, type NullString, Output, type OutputContent, type OutputProps, type OutputWithContents, PieChart, type ResolvedBotInvocation, type ResultHandler, type SSEEventData, ScatterChart, type SpinnerStatus, SqlContent, type SqlContentProps, type Status, type StatusEvent, StatusSpinner, type StatusSpinnerProps, StderrText, StdoutText, StdwarnText, type Step, StepInvocation, type StepInvocationProps, StepInvocationStatus, type StepInvocationStatusProps, SuggestionsNode, type SuggestionsNodeContent, TableContent, type TableContentProps, TableNode, type TableNodeContent, TextContent, type TextContentProps, TextMarkdownNode, type TextMarkdownNodeContent, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, UIGenerationNodes, type UIGenerationNodesProps, type UINode, type UseThreadOptions, type UseThreadReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, WritingLoader, cn, extractContentItems, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isNullString, isParsingComplete, isParsingInProgress, isWhitespaceChar, nodeComponents, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, unwrapNullString, unwrapNullStringOr, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useMultipleDatasetContents, useThread };