@erdoai/ui 0.1.49 → 0.1.50

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
@@ -37,9 +37,14 @@ interface DataFetcher {
37
37
  getDatasetDetails?: (slug: string, threadId: string) => Promise<DatasetDetails | null>;
38
38
  /**
39
39
  * Download a dataset file by ID.
40
+ * If sqlQuery is provided, the query is executed and results returned as CSV.
41
+ * If no query is provided, the raw dataset file is returned.
42
+ * @param datasetId - Dataset UUID
43
+ * @param sqlQuery - Optional SQL query to execute
44
+ * @param resourceKey - Optional resource key for sheet/range metadata
40
45
  * Returns a Blob that can be saved as a file.
41
46
  */
42
- downloadDataset?: (datasetId: string) => Promise<Blob>;
47
+ downloadDataset?: (datasetId: string, sqlQuery?: string, resourceKey?: string) => Promise<Blob>;
43
48
  }
44
49
  /**
45
50
  * Configuration for the ErdoProvider.
@@ -1210,6 +1215,10 @@ interface DatasetDownloadProps {
1210
1215
  invocationId?: string;
1211
1216
  /** Optional thread ID override (falls back to provider's threadId) */
1212
1217
  threadId?: string;
1218
+ /** Optional SQL query - if provided, query is executed and results returned as CSV */
1219
+ sqlQuery?: string;
1220
+ /** Optional resource key for sheet/range metadata (Excel files) */
1221
+ resourceKey?: string;
1213
1222
  /** Optional class name for styling */
1214
1223
  className?: string;
1215
1224
  }
@@ -1224,7 +1233,7 @@ interface DatasetDownloadProps {
1224
1233
  * <DatasetDownload slug="my-dataset" invocationId="abc123" />
1225
1234
  * ```
1226
1235
  */
1227
- declare function DatasetDownload({ slug, invocationId: _invocationId, threadId: threadIdProp, className, }: DatasetDownloadProps): react_jsx_runtime.JSX.Element | null;
1236
+ declare function DatasetDownload({ slug, invocationId: _invocationId, threadId: threadIdProp, sqlQuery, resourceKey, className, }: DatasetDownloadProps): react_jsx_runtime.JSX.Element | null;
1228
1237
 
1229
1238
  interface Memory {
1230
1239
  id: string;
package/dist/index.d.ts CHANGED
@@ -37,9 +37,14 @@ interface DataFetcher {
37
37
  getDatasetDetails?: (slug: string, threadId: string) => Promise<DatasetDetails | null>;
38
38
  /**
39
39
  * Download a dataset file by ID.
40
+ * If sqlQuery is provided, the query is executed and results returned as CSV.
41
+ * If no query is provided, the raw dataset file is returned.
42
+ * @param datasetId - Dataset UUID
43
+ * @param sqlQuery - Optional SQL query to execute
44
+ * @param resourceKey - Optional resource key for sheet/range metadata
40
45
  * Returns a Blob that can be saved as a file.
41
46
  */
42
- downloadDataset?: (datasetId: string) => Promise<Blob>;
47
+ downloadDataset?: (datasetId: string, sqlQuery?: string, resourceKey?: string) => Promise<Blob>;
43
48
  }
44
49
  /**
45
50
  * Configuration for the ErdoProvider.
@@ -1210,6 +1215,10 @@ interface DatasetDownloadProps {
1210
1215
  invocationId?: string;
1211
1216
  /** Optional thread ID override (falls back to provider's threadId) */
1212
1217
  threadId?: string;
1218
+ /** Optional SQL query - if provided, query is executed and results returned as CSV */
1219
+ sqlQuery?: string;
1220
+ /** Optional resource key for sheet/range metadata (Excel files) */
1221
+ resourceKey?: string;
1213
1222
  /** Optional class name for styling */
1214
1223
  className?: string;
1215
1224
  }
@@ -1224,7 +1233,7 @@ interface DatasetDownloadProps {
1224
1233
  * <DatasetDownload slug="my-dataset" invocationId="abc123" />
1225
1234
  * ```
1226
1235
  */
1227
- declare function DatasetDownload({ slug, invocationId: _invocationId, threadId: threadIdProp, className, }: DatasetDownloadProps): react_jsx_runtime.JSX.Element | null;
1236
+ declare function DatasetDownload({ slug, invocationId: _invocationId, threadId: threadIdProp, sqlQuery, resourceKey, className, }: DatasetDownloadProps): react_jsx_runtime.JSX.Element | null;
1228
1237
 
1229
1238
  interface Memory {
1230
1239
  id: string;