@erdoai/ui 0.1.11 → 0.1.13

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
@@ -34,17 +34,17 @@ interface ErdoProviderConfig {
34
34
  */
35
35
  authToken?: string;
36
36
  /**
37
- * Optional session token for B2B2C use cases.
38
- * When provided, uses the session-authenticated endpoint for dataset queries.
39
- * Session tokens are short-lived, scoped to specific datasets, and created
40
- * by B2B customers for their end users.
37
+ * Optional scoped token for B2B2C use cases.
38
+ * When provided, uses the token-authenticated endpoint for dataset queries.
39
+ * Tokens are short-lived, scoped to specific bots/datasets, and created
40
+ * by B2B customers for their end users via createToken().
41
41
  *
42
42
  * Example B2B2C flow:
43
- * 1. B2B backend creates session token via POST /dataset-sessions
44
- * 2. B2B frontend passes session token to ErdoProvider
45
- * 3. End user can query only the datasets scoped to that session
43
+ * 1. B2B backend creates token via ErdoClient.createToken()
44
+ * 2. B2B frontend passes token to ErdoProvider
45
+ * 3. End user can access only the bots/datasets scoped to that token
46
46
  */
47
- sessionToken?: string;
47
+ token?: string;
48
48
  /**
49
49
  * Optional ErdoClient for invoking bots.
50
50
  * Required if using useInvocation hook.
@@ -263,6 +263,28 @@ interface DatasetChartProps {
263
263
  }
264
264
  declare const DatasetChart: React__default.NamedExoticComponent<DatasetChartProps>;
265
265
 
266
+ interface TableColumn$1 {
267
+ name: string;
268
+ key: string;
269
+ format?: string;
270
+ value_type?: 'number' | 'category' | 'date';
271
+ }
272
+ interface DatasetTableProps {
273
+ title: string;
274
+ invocationId: string;
275
+ datasetSlug: string;
276
+ columns?: TableColumn$1[];
277
+ maxRows?: number;
278
+ className?: string;
279
+ /** Optional callback for scroll updates when table loads */
280
+ onScrollUpdate?: () => void;
281
+ }
282
+ /**
283
+ * A table component that fetches data from a dataset and renders it.
284
+ * Requires ErdoProvider to be set up with data fetching capabilities.
285
+ */
286
+ declare function DatasetTable({ title, invocationId, datasetSlug, columns, maxRows, className, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
287
+
266
288
  declare class ErrorBoundary extends React__default.Component<{
267
289
  fallback: React__default.ReactNode;
268
290
  children: React__default.ReactNode;
@@ -1171,4 +1193,4 @@ declare function handleIncrementalMixedJsonParsing(outputContent: MessageContent
1171
1193
  */
1172
1194
  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;
1173
1195
 
1174
- 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, 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 Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, type InvocationEvent, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type Output, type OutputContent, 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, TableContent, type TableContentProps, TextContent, type TextContentProps, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, type UseInvocationOptions, type UseInvocationReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, cn, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isParsingComplete, isParsingInProgress, isWhitespaceChar, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useInvocation, useMultipleDatasetContents };
1196
+ 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, 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, DatasetTable, type DatasetTableProps, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, type InvocationEvent, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type Output, type OutputContent, 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, TableContent, type TableContentProps, TextContent, type TextContentProps, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, type UseInvocationOptions, type UseInvocationReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, cn, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isParsingComplete, isParsingInProgress, isWhitespaceChar, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useInvocation, useMultipleDatasetContents };
package/dist/index.d.ts CHANGED
@@ -34,17 +34,17 @@ interface ErdoProviderConfig {
34
34
  */
35
35
  authToken?: string;
36
36
  /**
37
- * Optional session token for B2B2C use cases.
38
- * When provided, uses the session-authenticated endpoint for dataset queries.
39
- * Session tokens are short-lived, scoped to specific datasets, and created
40
- * by B2B customers for their end users.
37
+ * Optional scoped token for B2B2C use cases.
38
+ * When provided, uses the token-authenticated endpoint for dataset queries.
39
+ * Tokens are short-lived, scoped to specific bots/datasets, and created
40
+ * by B2B customers for their end users via createToken().
41
41
  *
42
42
  * Example B2B2C flow:
43
- * 1. B2B backend creates session token via POST /dataset-sessions
44
- * 2. B2B frontend passes session token to ErdoProvider
45
- * 3. End user can query only the datasets scoped to that session
43
+ * 1. B2B backend creates token via ErdoClient.createToken()
44
+ * 2. B2B frontend passes token to ErdoProvider
45
+ * 3. End user can access only the bots/datasets scoped to that token
46
46
  */
47
- sessionToken?: string;
47
+ token?: string;
48
48
  /**
49
49
  * Optional ErdoClient for invoking bots.
50
50
  * Required if using useInvocation hook.
@@ -263,6 +263,28 @@ interface DatasetChartProps {
263
263
  }
264
264
  declare const DatasetChart: React__default.NamedExoticComponent<DatasetChartProps>;
265
265
 
266
+ interface TableColumn$1 {
267
+ name: string;
268
+ key: string;
269
+ format?: string;
270
+ value_type?: 'number' | 'category' | 'date';
271
+ }
272
+ interface DatasetTableProps {
273
+ title: string;
274
+ invocationId: string;
275
+ datasetSlug: string;
276
+ columns?: TableColumn$1[];
277
+ maxRows?: number;
278
+ className?: string;
279
+ /** Optional callback for scroll updates when table loads */
280
+ onScrollUpdate?: () => void;
281
+ }
282
+ /**
283
+ * A table component that fetches data from a dataset and renders it.
284
+ * Requires ErdoProvider to be set up with data fetching capabilities.
285
+ */
286
+ declare function DatasetTable({ title, invocationId, datasetSlug, columns, maxRows, className, onScrollUpdate, }: DatasetTableProps): react_jsx_runtime.JSX.Element;
287
+
266
288
  declare class ErrorBoundary extends React__default.Component<{
267
289
  fallback: React__default.ReactNode;
268
290
  children: React__default.ReactNode;
@@ -1171,4 +1193,4 @@ declare function handleIncrementalMixedJsonParsing(outputContent: MessageContent
1171
1193
  */
1172
1194
  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;
1173
1195
 
1174
- 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, 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 Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, type InvocationEvent, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type Output, type OutputContent, 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, TableContent, type TableContentProps, TextContent, type TextContentProps, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, type UseInvocationOptions, type UseInvocationReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, cn, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isParsingComplete, isParsingInProgress, isWhitespaceChar, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useInvocation, useMultipleDatasetContents };
1196
+ 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, 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, DatasetTable, type DatasetTableProps, type Entity, type EntityType, ErdoProvider, type ErdoProviderConfig, type ErdoProviderProps, ErrorBoundary, ExecutionStatus, ExpandableOutputContent, type ExpandableOutputContentProps, HeatmapChart, type InvocationEvent, InvocationStatus, JSONStreamParser, type JSONValue, JsonContent, type JsonContentProps, LineChart, Log, LogContent, type LogContentProps, type LogProps, MarkdownContent, type MarkdownContentProps, type Message, type MessageContent, type MessageStreamingState, type MessageWithContents, type Output, type OutputContent, 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, TableContent, type TableContentProps, TextContent, type TextContentProps, ThinkingContent, type ThinkingContentProps, ToolGroupContent, type ToolGroupContentProps, type UseInvocationOptions, type UseInvocationReturn, WebParseContent, type WebParseContentProps, WebSearchContent, type WebSearchContentProps, type WrapperType, cn, formatValue, handleIncrementalMixedJsonParsing, handleSSEEvent, isJsonLike, isParsingComplete, isParsingInProgress, isWhitespaceChar, parseCompleteJson, parseMixedJson, parseToDate, resolveKeyFromData, toSnakeCase, useChartZoom, useDatasetContents, useErdoConfig, useErdoConfigOptional, useInvocation, useMultipleDatasetContents };