react-semaphor 0.0.3932 → 0.0.5321

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.
@@ -1,24 +1,39 @@
1
+ import { AIContext as AIContext_2 } from '../../lib/types/assistant-types';
1
2
  import { AIScopeTable as AIScopeTable_2 } from '..';
2
3
  import { CacheConfig as CacheConfig_2 } from '..';
3
4
  import { Chart } from 'chart.js';
4
5
  import { ChartConfiguration } from 'chart.js';
6
+ import { ComboBoxOption as ComboBoxOption_2 } from '../../components/surfboard/filter/types';
5
7
  import { CustomCard as CustomCard_2 } from '..';
6
8
  import { DateRange } from 'react-day-picker';
7
9
  import { default as default_2 } from 'react-grid-layout';
10
+ import { Dialect as Dialect_2 } from '../types/explorer-types';
11
+ import { DropdownItem as DropdownItem_2 } from '../types/dropdown-types';
12
+ import { EmailSettings as EmailSettings_2 } from '..';
8
13
  import { FontSpec } from 'chart.js';
14
+ import { GroupByField as GroupByField_2 } from '../types/explorer-types';
9
15
  import { JSX as JSX_2 } from 'react/jsx-runtime';
16
+ import { MetricField as MetricField_2 } from '../types/explorer-types';
17
+ import { PivotByField as PivotByField_2 } from '../types/explorer-types';
10
18
  import { QueryObserverResult } from '@tanstack/query-core';
11
19
  import { RefetchOptions } from '@tanstack/query-core';
12
20
  import { StoreApi } from 'zustand';
13
21
  import { TBaseQuery as TBaseQuery_2 } from '..';
22
+ import { TDbCapabilities as TDbCapabilities_2 } from '../types';
14
23
  import { TFilter as TFilter_2 } from '../surfboard/filter/types';
24
+ import { TFilterValue as TFilterValue_2 } from '..';
15
25
  import { TStyle as TStyle_2 } from '..';
16
26
  import { UseBoundStore } from 'zustand';
17
27
  import { WritableDraft } from 'immer';
18
28
 
19
29
  declare type Actions = {
30
+ setAiContext: (aiContext: AIContext) => void;
31
+ setHandleOpenAssistantProfile: (handleOpenAssistantProfile: () => void) => void;
32
+ setFilterMode: (filterId: string, filterMode: 'include' | 'exclude') => void;
20
33
  setInitStore: () => void;
21
34
  setGlobalStyle: (style: TStyle) => void;
35
+ setDefaultFilterValues: (filterValues: TFilterValue[] | undefined) => void;
36
+ updateEmailSettings: (emailSettings: EmailSettings) => void;
22
37
  setIsDownloadingPdf: (isDownloadingPdf: boolean) => void;
23
38
  setLenses: (lenses: TLens[]) => void;
24
39
  setSelectedLensId: (lensId: string) => void;
@@ -55,6 +70,7 @@ declare type Actions = {
55
70
  updateFrame: (sheetId: string, frame: TFrame) => void;
56
71
  updateCard: (sheetId: string, card: TCard) => void;
57
72
  updateFrameCard?: (sheetId: string, frameId: string, card: TCard) => void;
73
+ updateCurrentDashboardCard: (card: TCard) => void;
58
74
  removeFrame: (sheetId: string, frameId: string) => void;
59
75
  removeCard: (sheetId: string, card: TCard) => void;
60
76
  setIsDashboardEditing: (editing: boolean) => void;
@@ -93,7 +109,41 @@ declare type Actions = {
93
109
  setBaseQueries: (baseQueries: TBaseQuery[]) => void;
94
110
  };
95
111
 
96
- declare type Actions_2 = {
112
+ declare type Actions_2 = TableActions & ExplorerActions & DrillActions & {
113
+ setEditorFilterMode: (filterColumnName: string, filterMode: 'include' | 'exclude') => void;
114
+ setLowerIsBetter: (lowerIsBetter: boolean) => void;
115
+ clearEditorFilter: (filterColumn: FilterByColumn) => void;
116
+ removeEditorFilter: (filterColumn: FilterByColumn) => void;
117
+ updateEditorFilterValue: (filterColumnName: string, filterValue: OldFilterValue, clearFilter?: boolean) => void;
118
+ setTempQueryData: (tempQueryData: {
119
+ queryKey: string[];
120
+ queryData: any;
121
+ }) => void;
122
+ clearQueryConfig: () => void;
123
+ setQueryConfig: (queryConfig: QueryConfig | undefined) => void;
124
+ setCardTitle: (title: string) => void;
125
+ setCardDescription: (description: string) => void;
126
+ setCountryLogo: (countryLogoId: string | null) => void;
127
+ setIsDevMode: (isDevMode: boolean) => void;
128
+ setOrderByColumns: (orderByColumns: OrderBy[]) => void;
129
+ addOrderByColumn: (orderByColumn: OrderBy) => void;
130
+ removeOrderByColumn: (orderByColumn: OrderBy) => void;
131
+ updateOrderByColumn: (orderByColumn: OrderBy) => void;
132
+ setGroupByColumns: (groupByColumns: GroupByColumn[]) => void;
133
+ setMetricColumns: (metricColumns: MetricColumn[]) => void;
134
+ setPivotByColumns: (pivotColumns: GroupByColumn[]) => void;
135
+ removeColumnFromGroupBy: (columnId: string) => void;
136
+ removeColumnFromMetricColumns: (columnId: string) => void;
137
+ removeColumnFromPivotBy: (columnId: string) => void;
138
+ addColumnToGroupBy: (column: GroupByColumn) => void;
139
+ addColumnToMetricColumns: (column: MetricColumn) => void;
140
+ setFilterColumns: (filterColumns: FilterByColumn[]) => void;
141
+ addColumnToFilterColumns: (column: FilterByColumn) => void;
142
+ removeColumnFromFilterColumns: (columnId: string) => void;
143
+ updateMetricColumnOld: (columnId: string, column: MetricColumn) => void;
144
+ updateGroupByColumnOld: (columnId: string, column: GroupByColumn) => void;
145
+ updatePivotByColumnOld: (columnId: string, column: GroupByColumn) => void;
146
+ updateFilterColumn: (columnId: string, column: FilterByColumn) => void;
97
147
  setCurrentAssitantScope: (currentAssitantScope: AIScopeTable[]) => void;
98
148
  setChartGrid: (chartGrid: 'xy' | 'x' | 'y' | 'none') => void;
99
149
  setLegendOptions: (legendOptions: TLegendOptions) => void;
@@ -129,7 +179,7 @@ declare type Actions_2 = {
129
179
  setCardPython: (python: string | undefined) => void;
130
180
  setPythonStdOut: (pythonStdOut: string) => void;
131
181
  setCardCustomCfg: (cfg: any) => void;
132
- setCardCfg: (cfg: any) => void;
182
+ setCardConfig: (config: CardConfig | undefined) => void;
133
183
  setShowFilters: (showFilters: boolean) => void;
134
184
  setApplyFilters: (applyFilters: boolean) => void;
135
185
  setFilterValues: (filterValues: TFilterValue[]) => void;
@@ -138,7 +188,6 @@ declare type Actions_2 = {
138
188
  setSelectedDatabaseName: (databaseName: string) => void;
139
189
  setSelectedSchemaName: (schemaName: string) => void;
140
190
  setSelectedTableName: (tableName: string) => void;
141
- setCurrentColumns: (columns: TDataColumn[]) => void;
142
191
  setOnConnectionChange: (onConnectionChange: (connectionId: string) => void) => void;
143
192
  setOnDatabaseChange: (onDatabaseChange: (databaseName: string) => void) => void;
144
193
  setOnSchemaChange: (onSchemaChange: (schemaName: string) => void) => void;
@@ -149,6 +198,12 @@ declare type Actions_2 = {
149
198
 
150
199
  export declare type AggregateCalc = 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'COUNT' | 'COUNT_DISTINCT';
151
200
 
201
+ export declare type AggregateFunction = 'COUNT' | 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'MEDIAN' | 'DISTINCT';
202
+
203
+ declare type AIContext = {
204
+ selectedEntities: SelectedEntities;
205
+ };
206
+
152
207
  export declare type AIScopeTable = {
153
208
  connectionId: string;
154
209
  connectionType: string;
@@ -159,11 +214,21 @@ export declare type AIScopeTable = {
159
214
  datamodelName: string;
160
215
  };
161
216
 
217
+ export declare type AssistantId = 'dashboard-assistant' | 'editor-assistant';
218
+
162
219
  export declare type AuthToken = {
163
220
  accessToken: string;
164
221
  refreshToken?: string;
165
222
  };
166
223
 
224
+ export declare interface BaseColumn {
225
+ id: string;
226
+ name: string;
227
+ label?: string;
228
+ type: ColumnType;
229
+ table?: string;
230
+ }
231
+
167
232
  declare type BaseCustomCard = {
168
233
  cardId: string;
169
234
  replaceDefault?: boolean;
@@ -184,6 +249,51 @@ export declare type CacheConfig = {
184
249
  status: 'on' | 'on-refresh' | 'off';
185
250
  };
186
251
 
252
+ export declare interface CardConfig {
253
+ groupByColumns?: GroupByField[];
254
+ metricColumns?: MetricField[];
255
+ pivotByColumns?: PivotByField[];
256
+ sortByColumns?: SortByField[];
257
+ filters?: FilterGroup;
258
+ joinPlan?: JoinPlan;
259
+ rowLimit?: number;
260
+ /**
261
+ * One or more hierarchies that define drillable paths through dimensions.
262
+ */
263
+ drillHierarchies?: DrillHierarchy[];
264
+ /**
265
+ * Optional list of dimensions allowed for dynamic drill-down across this card.
266
+ * Used only when drill steps contain `mode: 'dynamicDrill'` or `type: 'dynamic'`.
267
+ */
268
+ allowedDrillTargets?: Field[];
269
+ /**
270
+ * NOT UOptional preload settings for inline drill previews
271
+ */
272
+ inlineDrillPreview?: {
273
+ enabled: boolean;
274
+ limit: number;
275
+ mode: 'lazy' | 'preloaded';
276
+ };
277
+ /**
278
+ * Configuration for on-click dashboard filters triggered by this card.
279
+ */
280
+ clickFilterInteractions?: ClickFilterInteraction[];
281
+ comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target';
282
+ targetValue?: number;
283
+ showTrendline?: boolean;
284
+ trendlineWindow?: number;
285
+ trendlineGranularity?: 'day' | 'week' | 'month';
286
+ }
287
+
288
+ declare interface CardInteractionConfig {
289
+ allowedDrillTargets?: Field[];
290
+ drillHierarchies?: DrillHierarchy[];
291
+ drillInteractions?: DrillInteraction[];
292
+ clickFilterInteractions?: ClickFilterInteraction[];
293
+ }
294
+
295
+ export declare type CardMode = 'explorer' | 'dev';
296
+
187
297
  declare type CardWithContent = BaseCustomCard & {
188
298
  content: React.FC<{
189
299
  card: TCard;
@@ -204,24 +314,107 @@ declare type CardWithFooter = BaseCustomCard & {
204
314
 
205
315
  export declare function cleanCard(card: TCard): TCard;
206
316
 
317
+ declare interface ClickFilterInteraction {
318
+ mode: 'clickFilter';
319
+ /**
320
+ * Fields from the chart element that should be used as filters.
321
+ * e.g., [region, ship_mode] from a stacked bar chart
322
+ */
323
+ filterFields: Field[];
324
+ /**
325
+ * Should this card visually highlight when clicked?
326
+ */
327
+ highlightSelf?: boolean;
328
+ /**
329
+ * Cards this filter applies to (inclusive).
330
+ * If omitted and `excludeCardIds` is also omitted → applies to all cards except self.
331
+ */
332
+ applyToCardIds?: string[];
333
+ /**
334
+ * Cards to explicitly exclude from receiving this filter.
335
+ * Takes effect only if `applyToCardIds` is undefined (acts as override).
336
+ */
337
+ excludeCardIds?: string[];
338
+ /**
339
+ * Optional UI label or tooltip.
340
+ */
341
+ label?: string;
342
+ }
343
+
207
344
  export declare type ColorRange = {
208
345
  start: number;
209
346
  end: number;
210
347
  color: string;
211
348
  };
212
349
 
350
+ declare interface ColorRange_2 {
351
+ min: number;
352
+ max: number;
353
+ color: string;
354
+ applyTo: 'cell' | 'row';
355
+ }
356
+
357
+ export declare type ColumnRole = 'groupby' | 'trendby' | 'metric' | 'filter';
358
+
359
+ declare interface ColumnSettings {
360
+ type: 'none' | 'text' | 'number' | 'date' | 'badge' | 'link' | 'progress';
361
+ textAlign: 'left' | 'center' | 'right';
362
+ width: string;
363
+ textWrap: 'wrap' | 'nowrap';
364
+ numberFormat: {
365
+ style: 'decimal' | 'currency' | 'percent';
366
+ currency: string;
367
+ locale: string;
368
+ minimumFractionDigits: number;
369
+ maximumFractionDigits: number;
370
+ showDataBar: boolean;
371
+ dataBarColor: string;
372
+ dataBarMinValue?: number;
373
+ dataBarMaxValue?: number;
374
+ };
375
+ dateFormat: {
376
+ format: string;
377
+ useCustomFormat: boolean;
378
+ customFormat: string;
379
+ useRelativeTime: boolean;
380
+ };
381
+ colorRanges: ColorRange_2[];
382
+ }
383
+
384
+ declare type ColumnSettingsMap = Record<string, ColumnSettings>;
385
+
386
+ export declare type ColumnType = 'string' | 'number' | 'date';
387
+
388
+ declare type ComboBoxOption = {
389
+ id: number | string;
390
+ value: string;
391
+ [key: string]: number | string;
392
+ };
393
+
394
+ export declare type ConnectionItem = DropdownItem & {
395
+ type: string;
396
+ };
397
+
213
398
  export declare type ConnectionPolicy = {
214
399
  connectionId?: string;
215
400
  name: string;
216
401
  params: Params;
217
402
  };
218
403
 
404
+ export declare type ConnectionType = 'GoogleSheets' | 'MySQL' | 'MSSQL' | 'PostgreSQL' | 'BigQuery' | 'Redshift' | 'Snowflake' | 'S3' | 'clickhouse' | 'S3Tables' | 'API' | 'none';
405
+
406
+ export declare type ContainerId = 'groupBy' | 'metrics' | 'pivotBy' | 'sortBy' | 'source';
407
+
219
408
  export declare function createSqlGenConfig(column: TDataColumn, preSqlGen: SqlGen, calc?: AggregateCalc): SqlGen;
220
409
 
221
410
  export declare type CustomCard = CardWithContent | CardWithFooter;
222
411
 
223
412
  export declare function Dashboard(props: DashboardProps): JSX_2.Element;
224
413
 
414
+ export declare type DashboardEventHandlers = {
415
+ onExportData?: (payload: ExportDataPayload) => void;
416
+ };
417
+
225
418
  declare type DashboardPlusProps = {
226
419
  showControls?: boolean;
227
420
  showFooter?: boolean;
@@ -251,6 +444,7 @@ export declare type DashboardProps = {
251
444
  onFilterValuesChange?: (filterValues: TFilterValue[]) => void;
252
445
  LoadingComponent?: (props: LoadingProps) => React.ReactNode;
253
446
  ErrorComponent?: (props: ErrorProps) => React.ReactNode;
447
+ eventHandlers?: DashboardEventHandlers;
254
448
  /**
255
449
  * Placeholders for the dashboard.
256
450
  */
@@ -262,6 +456,7 @@ export declare type DashboardProps = {
262
456
  };
263
457
 
264
458
  export declare type DashboardStore = {
459
+ handleOpenAssistantProfile?: () => void;
265
460
  isDownloadingPdf?: boolean;
266
461
  isSessionExpired: boolean;
267
462
  authToken?: AuthToken;
@@ -283,7 +478,7 @@ export declare type DashboardStore = {
283
478
  showFilters: boolean;
284
479
  filterValues?: TFilterValue[];
285
480
  onEvent?: (event: TEvent) => void;
286
- onSaveFunction?: (dashboard: TDashboard) => void;
481
+ onSaveFunction?: (dashboard: TDashboard, description?: string) => void;
287
482
  onAddFrame?: (card: TFrame, sheetId: string) => void;
288
483
  onAcceptChanges?: (frame: TFrame, dashboard: TDashboard) => void;
289
484
  onUpdateCard?: (card: TCard, sheetId: string) => void;
@@ -293,6 +488,59 @@ export declare type DashboardStore = {
293
488
 
294
489
  export declare const DashboardWC: CustomElementConstructor;
295
490
 
491
+ export declare interface DatabaseEntityReference {
492
+ connectionId: string;
493
+ connectionType: ConnectionType;
494
+ type: EntityType;
495
+ dialect?: Dialect;
496
+ database?: string;
497
+ schema?: string;
498
+ name: string;
499
+ }
500
+
501
+ export declare type DatabaseEntityType = 'table' | 'view';
502
+
503
+ export declare type DatabaseItem = DropdownItem;
504
+
505
+ export declare interface DataModelEntityReference extends DatabaseEntityReference {
506
+ type: 'model';
507
+ id: string;
508
+ label: string;
509
+ description: string;
510
+ }
511
+
512
+ export declare interface DatasetEntityReference extends DatabaseEntityReference {
513
+ type: 'dataset';
514
+ id: string;
515
+ domainId: string;
516
+ label: string;
517
+ description: string;
518
+ }
519
+
520
+ export declare interface DataSource {
521
+ connectionId: string;
522
+ semanticDomainId?: string;
523
+ connectionType: string;
524
+ mode: 'database' | 'upload' | 'url' | 'semanticDomain';
525
+ dbSelection?: {
526
+ database: string;
527
+ schema: string;
528
+ entityType: DatabaseEntityType;
529
+ };
530
+ selectedEntities: SelectedEntities;
531
+ }
532
+
533
+ export declare type DataType = 'string' | 'number' | 'date' | 'datetime' | 'boolean' | 'json' | 'geo';
534
+
535
+ export declare const DATE_FORMAT_VALUES: readonly ["MM-DD-YYYY", "YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "MMMM DD, YYYY", "MMM DD, YYYY", "DD MMM YYYY", "YYYY-MM", "MMMM YYYY", "custom"];
536
+
537
+ export declare type DateFormatOption = {
538
+ value: DateFormatValue;
539
+ label: string;
540
+ };
541
+
542
+ export declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
543
+
296
544
  export declare type DateOptions = {
297
545
  locale: string;
298
546
  format: string;
@@ -301,11 +549,94 @@ export declare type DateOptions = {
301
549
 
302
550
  export { DateRange }
303
551
 
552
+ export declare type Dialect = 'mysql' | 'postgresql' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb';
553
+
304
554
  export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
305
555
 
306
556
  export declare function downloadPdf(): Promise<void>;
307
557
 
308
- declare type EditorStore = {
558
+ declare interface DrillActions {
559
+ updateDrillHierarchies: (h: DrillHierarchy[]) => void;
560
+ addDrillHierarchy: (h: DrillHierarchy) => void;
561
+ removeDrillHierarchy: (hierarchyId: string) => void;
562
+ updateDrillHierarchy: (hierarchyId: string, updates: Partial<DrillHierarchy>) => void;
563
+ setDefaultHierarchy: (hierarchyId: string) => void;
564
+ updateAllowedDrillTargets: (t: Field[]) => void;
565
+ addDrillTarget: (t: Field) => void;
566
+ removeDrillTarget: (targetId: string) => void;
567
+ updateDrillInteractions: (i: DrillInteraction[]) => void;
568
+ addDrillInteraction: (i: DrillInteraction) => void;
569
+ removeDrillInteraction: (index: number) => void;
570
+ updateClickFilterInteractions: (i: ClickFilterInteraction[]) => void;
571
+ addClickFilterInteraction: (i: ClickFilterInteraction) => void;
572
+ removeClickFilterInteraction: (fieldId: string) => void;
573
+ updateInlineDrillPreview: (s: {
574
+ enabled: boolean;
575
+ limit: number;
576
+ mode: 'lazy' | 'preloaded';
577
+ }) => void;
578
+ toggleInlineDrillPreview: (enabled: boolean) => void;
579
+ updateInteractionConfig: (c: Partial<CardInteractionConfig>) => void;
580
+ resetDrillConfiguration: () => void;
581
+ }
582
+
583
+ declare interface DrillHierarchy {
584
+ id: string;
585
+ label?: string;
586
+ type: 'static';
587
+ steps: DrillHierarchyStep[];
588
+ default?: boolean;
589
+ }
590
+
591
+ declare interface DrillHierarchyStep {
592
+ field: Field;
593
+ mode: 'drillDown';
594
+ preferredChartType?: TChartType;
595
+ breadcrumbLabelTemplate?: string;
596
+ retainFilters?: boolean;
597
+ label?: string;
598
+ linkedInsightId?: string;
599
+ }
600
+
601
+ declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
602
+
603
+ declare interface DrillThroughInteraction {
604
+ mode: 'drillThrough';
605
+ filterFields: Field[];
606
+ targetSheetId: string;
607
+ label?: string;
608
+ }
609
+
610
+ declare interface DrillToDetailInteraction {
611
+ mode: 'drillToDetail';
612
+ filterFields: Field[];
613
+ detailFields?: Field[];
614
+ sortBy?: SortByField[];
615
+ limit?: number;
616
+ detailTitle?: string;
617
+ label?: string;
618
+ }
619
+
620
+ declare interface DrillToURLInteraction {
621
+ mode: 'drillToURL';
622
+ filterFields: Field[];
623
+ urlTemplate: string;
624
+ label?: string;
625
+ }
626
+
627
+ export declare type DropdownItem = {
628
+ id: string;
629
+ name: string;
630
+ };
631
+
632
+ export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
633
+
634
+ export declare type EditorStore = {
635
+ tempQueryData?: {
636
+ queryKey: string[];
637
+ queryData: any;
638
+ };
639
+ isDevMode: boolean;
309
640
  isShowingVisual: boolean;
310
641
  showAIDialog: boolean;
311
642
  userInputForAI: string;
@@ -328,7 +659,6 @@ declare type EditorStore = {
328
659
  selectedDatabaseName?: string;
329
660
  selectedSchemaName?: string;
330
661
  selectedTableName?: string;
331
- currentColumns?: TDataColumn[];
332
662
  currentAssitantScope?: AIScopeTable[];
333
663
  onConnectionChange?: (connectionId: string) => void;
334
664
  onDatamodelChange?: (datamodelId: string) => void;
@@ -339,10 +669,141 @@ declare type EditorStore = {
339
669
  onClose?: () => void;
340
670
  };
341
671
 
672
+ export declare type EmailSettings = {
673
+ companyName: string;
674
+ dashboardUrl: string;
675
+ supportEmail: string;
676
+ senderTitle: string;
677
+ };
678
+
679
+ export declare const EMPTY_SELECTION: SelectionState;
680
+
681
+ export declare type EntityColumnGroup = {
682
+ entityId: string;
683
+ entityType: EntityType;
684
+ entityName: string;
685
+ qualifiedEntityName: string;
686
+ label?: string;
687
+ description?: string;
688
+ columns: Field[];
689
+ };
690
+
691
+ export declare type EntityType = 'table' | 'view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
692
+
342
693
  export declare type ErrorProps = {
343
694
  message?: string;
344
695
  };
345
696
 
697
+ declare interface ExplorerActions {
698
+ updateFrame: (updates: Partial<TFrame>) => void;
699
+ setActiveCardInFrame: (cardId: string) => void;
700
+ addCard: () => void;
701
+ removeCard: (cardId: string) => void;
702
+ updateCard: (cardId: string, updates: Partial<TCard>) => void;
703
+ setActiveCard: (cardId: string) => void;
704
+ setActiveTabCard: (cardId: string | null) => void;
705
+ updateDataSource: (dataSource: DataSource) => void;
706
+ setDataSource: (dataSource: DataSource) => void;
707
+ updateSemanticDomain: (semanticDomainId: string) => void;
708
+ updateDirectSource: (updates: Partial<DataSource>) => void;
709
+ getAvailableFields: () => Array<{
710
+ id: string;
711
+ name: string;
712
+ label: string;
713
+ dataType: string;
714
+ icon: any;
715
+ qualifiedEntityName?: string;
716
+ }>;
717
+ updateCardConfig: (cardId: string, config: Partial<CardConfig>) => void;
718
+ updateRowLimit: (cardId: string, rowLimit: number) => void;
719
+ addGroupByColumn: (cardId: string, column: GroupByField) => void;
720
+ removeGroupByColumn: (cardId: string, columnId: string) => void;
721
+ updateGroupByColumn: (cardId: string, columnId: string, updates: Partial<GroupByField>) => void;
722
+ addMetricColumn: (cardId: string, column: MetricField) => void;
723
+ removeMetricColumn: (cardId: string, columnId: string) => void;
724
+ updateMetricColumn: (cardId: string, columnId: string, updates: Partial<MetricField>) => void;
725
+ addPivotByColumn: (cardId: string, column: PivotByField) => void;
726
+ removePivotByColumn: (cardId: string, columnId: string) => void;
727
+ updatePivotByColumn: (cardId: string, columnId: string, updates: Partial<PivotByField>) => void;
728
+ addSortByColumn: (cardId: string, column: SortByField) => void;
729
+ removeSortByColumn: (cardId: string, columnId: string) => void;
730
+ updateSortByColumn: (cardId: string, columnId: string, updates: Partial<SortByField>) => void;
731
+ updateFilters: (cardId: string, filters: FilterGroup) => void;
732
+ clearFilters: (cardId: string) => void;
733
+ addJoin: (cardId: string, join: Join) => void;
734
+ removeJoin: (cardId: string, joinId: string) => void;
735
+ updateJoin: (cardId: string, joinId: string, updates: Partial<Join>) => void;
736
+ reorderJoins: (cardId: string, joinIds: string[]) => void;
737
+ }
738
+
739
+ export declare type ExportDataPayload = {
740
+ cardId: string;
741
+ title: string;
742
+ data: Record<string, any>[];
743
+ sql: string;
744
+ };
745
+
746
+ export declare interface Field {
747
+ /**
748
+ * Unique identifier for this field instance (for joins, UI state, etc.).
749
+ * Should be unique within the context of the query or data model.
750
+ * Example: 'orders.customer_id', 'expr_12345', etc.
751
+ */
752
+ id: string;
753
+ /**
754
+ * The physical/source column name in the database or data source.
755
+ * Used for mapping to the underlying data model and SQL generation (unless overridden by expression).
756
+ */
757
+ name: string;
758
+ /**
759
+ * Human-friendly, localizable display name for the UI (table headers, chart axes, etc.).
760
+ */
761
+ label: string;
762
+ /**
763
+ * Unique, stable, machine-friendly reference name for SQL (AS alias), exports, and scripting.
764
+ * If not provided, should be auto-generated from label or name.
765
+ */
766
+ alias?: string;
767
+ dataType: string;
768
+ description?: string;
769
+ qualifiedEntityName?: string;
770
+ dateFormat?: DateFormatValue;
771
+ customFormat?: string;
772
+ granularity?: TimeGranularity;
773
+ entityId: string;
774
+ entityName: string;
775
+ entityType: EntityType;
776
+ role?: 'groupby' | 'metric' | 'sortby' | 'pivotby';
777
+ }
778
+
779
+ export declare interface FileEntityReference extends DatabaseEntityReference {
780
+ id: string;
781
+ type: 'file' | 'url' | 'upload';
782
+ label: string;
783
+ description: string;
784
+ originalName: string;
785
+ file?: File;
786
+ url?: string;
787
+ }
788
+
789
+ export declare interface FilterByColumn extends BaseColumn {
790
+ role: 'filter';
791
+ operators?: string[];
792
+ mode?: 'include' | 'exclude';
793
+ sql?: string;
794
+ fetchValues?: boolean;
795
+ fetchLimit?: number;
796
+ valueSource?: 'distinct' | 'static' | 'range';
797
+ staticValues?: string[];
798
+ }
799
+
800
+ export declare interface FilterCondition {
801
+ id: string;
802
+ field: Field;
803
+ operator: Operator;
804
+ value: FilterValue;
805
+ }
806
+
346
807
  declare type FilterForBetween = BaseFilter & {
347
808
  operation: 'between' | 'not between';
348
809
  values: [number, number];
@@ -373,6 +834,14 @@ declare type FilterForString = BaseFilter & {
373
834
  values: [string];
374
835
  };
375
836
 
837
+ export declare interface FilterGroup {
838
+ id: string;
839
+ logicalOperator: LogicalOperator;
840
+ negate: boolean;
841
+ conditions: FilterCondition[];
842
+ groups: FilterGroup[];
843
+ }
844
+
376
845
  declare type FilterLocation = 'dashboard' | 'frame' | undefined;
377
846
 
378
847
  declare type FilterOnClick = {
@@ -380,6 +849,8 @@ declare type FilterOnClick = {
380
849
  columnIndex: number;
381
850
  };
382
851
 
852
+ export declare type FilterValue = string | number | boolean | Date | [number, number] | [string, string] | string[] | number[];
853
+
383
854
  export declare function fmt(str: string): string;
384
855
 
385
856
  export declare function getColumnDataType(column: TDataColumn): string;
@@ -401,6 +872,7 @@ export declare function getDashbaordStateWithoutData(dashboardState: TDashboard)
401
872
  }[] | undefined;
402
873
  id: string;
403
874
  title?: string;
875
+ aiContext?: AIContext_2;
404
876
  description?: string;
405
877
  style?: TStyle_2;
406
878
  filters?: TFilter_2[];
@@ -409,6 +881,8 @@ export declare function getDashbaordStateWithoutData(dashboardState: TDashboard)
409
881
  aiScopeTables?: AIScopeTable_2[];
410
882
  globalStyle?: TStyle_2;
411
883
  globalCacheConfig?: CacheConfig_2;
884
+ emailSettings?: EmailSettings_2;
885
+ defaultFilterValues?: TFilterValue_2[];
412
886
  };
413
887
 
414
888
  export declare type GetDashboardResponse = {
@@ -420,28 +894,62 @@ export declare type GetDashboardResponse = {
420
894
 
421
895
  export declare function getFilterValueType(filter: TFilter): "string" | "number" | "date" | "boolean";
422
896
 
423
- export declare function getFormattedTableNameForQuery({ schemaName, tableName, modelName, connectionType, }: {
897
+ export declare function getFormattedTableNameForQuery({ schemaName, tableName, modelName, connectionType, databaseName, }: {
424
898
  schemaName: string;
425
899
  tableName: string;
426
900
  modelName: string | undefined;
427
- connectionType: string;
901
+ connectionType: string | undefined;
902
+ databaseName: string;
428
903
  }): string;
429
904
 
430
905
  export declare type GetPluginsResponse = {
431
906
  plugins: {
432
907
  label: string;
433
908
  value: string;
909
+ type: PluginType;
434
910
  }[];
435
911
  };
436
912
 
437
- export declare function getQualifiedTableName(schemaName: string, tableName: string, connectionType: string): string;
913
+ export declare function getQualifiedTableName({ schemaName, tableName, connectionType, databaseName, }: {
914
+ schemaName: string;
915
+ tableName: string;
916
+ connectionType: string | undefined;
917
+ databaseName: string;
918
+ }): string;
919
+
920
+ export declare function getSql(config: SqlGen, schemaName: string, tableName: string, modelName: string, connectionType: string | undefined, databaseName: string): string | undefined;
921
+
922
+ export declare type Granularity = 'day' | 'week' | 'month' | 'year';
438
923
 
439
- export declare function getSql(config: SqlGen, schemaName: string, tableName: string, modelName: string, connectionType: string): string | undefined;
924
+ export declare interface GroupByColumn extends BaseColumn {
925
+ role: 'groupby';
926
+ granularity?: Granularity;
927
+ format?: string;
928
+ }
929
+
930
+ export declare interface GroupByField extends Field {
931
+ role: 'groupby';
932
+ granularity?: 'day' | 'week' | 'month' | 'quarter' | 'year';
933
+ /**
934
+ * Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
935
+ * If present, used in SELECT and GROUP BY instead of just the column name.
936
+ */
937
+ expression?: string;
938
+ timeDrillPath?: TimeDrillStep[];
939
+ }
440
940
 
441
941
  export declare type HtmlOptions = {
442
942
  html: string;
443
943
  };
444
944
 
945
+ declare interface InlineDrillInteraction {
946
+ mode: 'inlineDrill';
947
+ filterFields: Field[];
948
+ fetchMode?: 'lazy' | 'preloaded';
949
+ inlineLimit?: number;
950
+ label?: string;
951
+ }
952
+
445
953
  export declare function invalidateToken(): Promise<any>;
446
954
 
447
955
  export declare function isBooleanDataType(dataType: string): boolean;
@@ -454,16 +962,87 @@ export declare function isNumberDataType(dataType: string): boolean;
454
962
 
455
963
  export declare function isTextDataType(dataType: string): boolean;
456
964
 
965
+ export declare interface Join {
966
+ id: string;
967
+ source: DatabaseEntityReference;
968
+ target: DatabaseEntityReference;
969
+ joinType: 'INNER' | 'LEFT' | 'RIGHT' | 'FULL';
970
+ joinKeyGroups: JoinKeyGroup[];
971
+ sequence: number;
972
+ }
973
+
974
+ export declare interface JoinKey {
975
+ id?: string;
976
+ source: Field;
977
+ target: Field;
978
+ operator: string;
979
+ }
980
+
981
+ export declare interface JoinKeyGroup {
982
+ id: string;
983
+ operator: string;
984
+ keys: JoinKey[];
985
+ }
986
+
987
+ export declare interface JoinPlan {
988
+ baseEntity: DatabaseEntityReference;
989
+ joins: Join[];
990
+ }
991
+
457
992
  export declare type KPICardProps = {
458
993
  card: TCard;
459
994
  isLoading?: boolean;
460
995
  renderFilterInfo?: () => JSX.Element | null;
461
996
  };
462
997
 
998
+ export declare type Level = 'database' | 'schema' | 'table';
999
+
463
1000
  export declare type LoadingProps = {
464
1001
  message?: string;
465
1002
  };
466
1003
 
1004
+ export declare type LogicalOperator = 'AND' | 'OR';
1005
+
1006
+ export declare interface MetricColumn extends BaseColumn {
1007
+ role: 'metric';
1008
+ aggregate: AggregateFunction;
1009
+ aliasTemplate?: string;
1010
+ }
1011
+
1012
+ export declare interface MetricField extends Field {
1013
+ role: 'metric';
1014
+ aggregate: AggregateFunction;
1015
+ /**
1016
+ * Optional SQL expression for the metric (e.g., ship_date - order_date).
1017
+ * If present, used as aggregate(expression) instead of aggregate(name).
1018
+ */
1019
+ expression?: string;
1020
+ /**
1021
+ * Optional parameters for future extensibility (e.g., window functions).
1022
+ * * Example:
1023
+ * {
1024
+ aggregate: "SUM",
1025
+ name: "sales",
1026
+ parameters: {
1027
+ window: "PARTITION BY region ORDER BY date ROWS BETWEEN 1 PRECEDING AND CURRENT ROW"
1028
+ }
1029
+ }
1030
+
1031
+ {
1032
+ aggregate: "COUNT",
1033
+ name: "order_id",
1034
+ parameters: {
1035
+ filter: "status = 'Active'"
1036
+ }
1037
+ }
1038
+ */
1039
+ parameters?: Record<string, any>;
1040
+ aliasTemplate?: string;
1041
+ valueAliases?: Record<string, string>;
1042
+ }
1043
+
1044
+ export declare type ModelItem = DropdownItem;
1045
+
467
1046
  declare type NoneOptions = {};
468
1047
 
469
1048
  export declare type NumberAxisFormat = {
@@ -480,8 +1059,12 @@ export declare type NumberOptions = {
480
1059
  colorRanges?: ColorRange[];
481
1060
  };
482
1061
 
1062
+ export declare type OldFilterValue = string | number | null | (string | number)[] | RangeValue;
1063
+
483
1064
  declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
484
1065
 
1066
+ export declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between';
1067
+
485
1068
  declare type OptionsMap = {
486
1069
  number: NumberOptions;
487
1070
  string: StringOptions;
@@ -490,10 +1073,19 @@ declare type OptionsMap = {
490
1073
  none: NoneOptions;
491
1074
  };
492
1075
 
1076
+ export declare interface OrderBy {
1077
+ columnId: string;
1078
+ direction: 'asc' | 'desc';
1079
+ }
1080
+
493
1081
  declare type Params = {
494
1082
  [key: string]: string | number | string[] | number[];
495
1083
  };
496
1084
 
1085
+ export declare interface PivotByField extends Field {
1086
+ role: 'pivotby';
1087
+ }
1088
+
497
1089
  export declare type Placeholders = {
498
1090
  /**
499
1091
  * Placeholder for the card when there are no records to display.
@@ -505,11 +1097,47 @@ export declare type Placeholders = {
505
1097
  SessionExpired?: React.ReactNode;
506
1098
  };
507
1099
 
1100
+ export declare type PluginType = 'custom' | 'standard';
1101
+
1102
+ export declare type QueryColumn = GroupByColumn | MetricColumn | FilterByColumn;
1103
+
1104
+ export declare interface QueryConfig {
1105
+ groupByColumns?: GroupByColumn[];
1106
+ pivotColumns?: GroupByColumn[];
1107
+ metricColumns?: MetricColumn[];
1108
+ filterColumns?: FilterByColumn[];
1109
+ filters?: QueryFilter[];
1110
+ limit?: number;
1111
+ orderBy?: OrderBy[];
1112
+ }
1113
+
1114
+ export declare type QueryFilter = {
1115
+ filterColumnName: string;
1116
+ filterValue: OldFilterValue;
1117
+ };
1118
+
1119
+ export declare type RangeValue = {
1120
+ gte?: string | number;
1121
+ lte?: string | number;
1122
+ lt?: string | number;
1123
+ gt?: string | number;
1124
+ };
1125
+
508
1126
  export declare function resolveDatamodelName(datamodelName: string): string;
509
1127
 
510
1128
  export declare const resolveDataType: (value: any) => string;
511
1129
 
512
- export declare function SelectComponent({ title, items, value, isLoading, isError, refetch, connectionTooltip, onChange, showNone, className, showIcon, disabled, type, }: SelectProps): JSX_2.Element;
1130
+ export declare function ScheduleDashboard({ triggerButtonClassName, }: {
1131
+ triggerButtonClassName?: string;
1132
+ }): JSX_2.Element;
1133
+
1134
+ export declare type SchemaItem = DropdownItem;
1135
+
1136
+ export declare function SelectComponent({ title, items, value, isLoading, isError, refetch, onChange, showNone, className, disabled, type, }: SelectProps): JSX_2.Element;
1137
+
1138
+ export declare type SelectedEntities = DatabaseEntityReference[] | DataModelEntityReference[] | FileEntityReference[];
1139
+
1140
+ export declare type SelectionState = Record<Level, string | null>;
513
1141
 
514
1142
  declare type SelectProps = {
515
1143
  title: string;
@@ -536,6 +1164,13 @@ declare function SemaphorQueryClient({ children, }: {
536
1164
  export { SemaphorQueryClient as SemaphorDataProvider }
537
1165
  export { SemaphorQueryClient }
538
1166
 
1167
+ export declare interface SortByField extends Field {
1168
+ role: 'sortby';
1169
+ direction: 'asc' | 'desc';
1170
+ }
1171
+
1172
+ export declare type SortDirection = 'asc' | 'desc';
1173
+
539
1174
  export declare type SqlGen = {
540
1175
  measures?: {
541
1176
  name: string;
@@ -563,6 +1198,14 @@ export declare type StyleProps = {
563
1198
  dashboardCardContainer?: string;
564
1199
  dashboardCard?: string;
565
1200
  /** grid-layout config */
1201
+ /**
1202
+ * Border radius for the control inputs such as filter input, tabs, date picker, etc.
1203
+ */
1204
+ controlInputRadius?: number;
1205
+ /**
1206
+ * Border radius for the cards
1207
+ */
1208
+ cardBorderRadius?: number;
566
1209
  gridLayout?: {
567
1210
  /** css class for `react-grid-layout` */
568
1211
  className?: string;
@@ -583,6 +1226,33 @@ export declare type StyleProps = {
583
1226
 
584
1227
  export declare function Surfboard({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element;
585
1228
 
1229
+ declare interface TableActions {
1230
+ updateColumnSettingsMap: (columnSettings: ColumnSettingsMap) => void;
1231
+ updateColumnVisibility: (columnId: string, isVisible: boolean) => void;
1232
+ updatePageSize: (pageSize: number) => void;
1233
+ showAllColumns: () => void;
1234
+ hideAllColumns: () => void;
1235
+ toggleSelectColumn: (isVisible: boolean) => void;
1236
+ initializeColumnVisibility: (columnIds: string[]) => void;
1237
+ updateAllColumnVisibility: (visibility: Record<string, boolean>) => void;
1238
+ }
1239
+
1240
+ export declare type TableConfig = {
1241
+ databaseName: string;
1242
+ schemaName: string;
1243
+ tableName: string;
1244
+ datamodelId: string;
1245
+ };
1246
+
1247
+ export declare type TableItem = DropdownItem;
1248
+
1249
+ declare type TablePreferences = {
1250
+ columnSettingsMap?: ColumnSettingsMap;
1251
+ selectColumnVisible?: boolean;
1252
+ columnVisibility?: Record<string, boolean>;
1253
+ pageSize?: number;
1254
+ };
1255
+
586
1256
  export declare type TBaseQuery = {
587
1257
  id: string;
588
1258
  name: string;
@@ -604,7 +1274,10 @@ export declare type TCard = {
604
1274
  type: TChartType;
605
1275
  sql?: string;
606
1276
  python?: string;
607
- cfg?: any;
1277
+ dataSource?: DataSource;
1278
+ config?: CardConfig;
1279
+ interactionConfig?: CardInteractionConfig;
1280
+ queryConfig?: QueryConfig;
608
1281
  customCfg?: any;
609
1282
  preferences?: TCardPreferences;
610
1283
  customCardPreferences?: TCustomCardPreferences;
@@ -640,6 +1313,7 @@ export declare type TCardPreferences = {
640
1313
  datasetOptions?: TDatasetOptions[];
641
1314
  chartOptions?: TChartOptions;
642
1315
  columnSettings?: TColumnSetting<DisplayDataType>[];
1316
+ tablePrefs?: TablePreferences;
643
1317
  allowDownload?: boolean;
644
1318
  customVisualCode?: string;
645
1319
  textVisualOptions?: {
@@ -655,6 +1329,10 @@ export declare type TCardPreferences = {
655
1329
  projectionOffset?: [number, number];
656
1330
  colorScale?: string;
657
1331
  };
1332
+ kpiVisualOptions?: {
1333
+ lowerIsBetter?: boolean;
1334
+ countryLogoId?: string;
1335
+ };
658
1336
  };
659
1337
 
660
1338
  declare type TChartConfiguration = ChartConfiguration;
@@ -688,10 +1366,13 @@ export declare type TChartOptions = {
688
1366
  indexAxis?: 'x' | 'y' | undefined;
689
1367
  plugins?: {
690
1368
  legend?: TLegendOptions;
1369
+ datalabels?: {
1370
+ anchor?: string;
1371
+ };
691
1372
  };
692
1373
  };
693
1374
 
694
- declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'range' | 'text' | 'map' | 'custom';
1375
+ declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
695
1376
 
696
1377
  export declare type TColumnSetting<T extends DisplayDataType> = {
697
1378
  columnIdx: number;
@@ -706,6 +1387,7 @@ export declare type TCustomCardPreferences = {
706
1387
  url: string;
707
1388
  componentName: string;
708
1389
  icon?: string;
1390
+ pluginChartType?: string;
709
1391
  type?: 'iframe' | 'component';
710
1392
  visualType?: 'single' | 'multiple';
711
1393
  settings?: any;
@@ -723,6 +1405,7 @@ export declare type TCustomCardPreferences = {
723
1405
  export declare type TDashboard = {
724
1406
  id: string;
725
1407
  title?: string;
1408
+ aiContext?: AIContext;
726
1409
  description?: string;
727
1410
  sheets?: TSheet[];
728
1411
  style?: TStyle;
@@ -732,12 +1415,16 @@ export declare type TDashboard = {
732
1415
  aiScopeTables?: AIScopeTable[];
733
1416
  globalStyle?: TStyle;
734
1417
  globalCacheConfig?: CacheConfig;
1418
+ emailSettings?: EmailSettings;
1419
+ defaultFilterValues?: TFilterValue[];
735
1420
  };
736
1421
 
737
1422
  export declare type TDataColumn = {
738
1423
  column_name: string;
739
1424
  data_type: string;
740
1425
  is_nullable?: string;
1426
+ label?: string;
1427
+ description?: string;
741
1428
  };
742
1429
 
743
1430
  export declare type TDatasetOptions = {
@@ -753,6 +1440,11 @@ export declare type TDatasetOptions = {
753
1440
  };
754
1441
  };
755
1442
 
1443
+ export declare type TDbCapabilities = {
1444
+ path: Level[];
1445
+ labels?: Partial<Record<Level, string>>;
1446
+ };
1447
+
756
1448
  export declare type TEvent = {
757
1449
  type: 'success' | 'error' | 'info' | 'warning';
758
1450
  message: any;
@@ -786,6 +1478,15 @@ export declare type TFrame = {
786
1478
 
787
1479
  export declare type Theme = 'dark' | 'light' | 'system';
788
1480
 
1481
+ declare interface TimeDrillStep {
1482
+ granularity: TimeGranularity;
1483
+ next?: TimeGranularity;
1484
+ comparison?: 'previous_year' | 'previous_period';
1485
+ rollingWindow?: number;
1486
+ }
1487
+
1488
+ export declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
1489
+
789
1490
  export declare type TLegendOptions = {
790
1491
  display?: boolean;
791
1492
  position?: 'top' | 'left' | 'bottom' | 'right';
@@ -801,12 +1502,103 @@ export declare type TLens = {
801
1502
  shared?: boolean;
802
1503
  };
803
1504
 
804
- export declare type TSelectedRecord = {
805
- id: number | string;
806
- value: string;
807
- [key: string]: number | string;
1505
+ /**
1506
+ * Parameters for customizing token behavior and formatting.
1507
+ */
1508
+ export declare type TokenParams = {
1509
+ currencyFormat: {
1510
+ /**
1511
+ * Locale identifier (e.g., 'en-US', 'fr-FR').
1512
+ */
1513
+ locale: string;
1514
+ /**
1515
+ * Currency code compliant with ISO 4217 (e.g., 'USD', 'EUR').
1516
+ */
1517
+ currency: string;
1518
+ };
1519
+ };
1520
+
1521
+ /**
1522
+ * Main payload for generating a secure access token for a dashboard.
1523
+ */
1524
+ export declare type TokenRequest = {
1525
+ /**
1526
+ * Identifier of the dashboard to be accessed.
1527
+ */
1528
+ dashboardId: string;
1529
+ /**
1530
+ * Secret key used for validating access to the dashboard.
1531
+ */
1532
+ dashboardSecret: string;
1533
+ /**
1534
+ * Token expiry duration in seconds.
1535
+ */
1536
+ tokenExpiry?: number;
1537
+ /**
1538
+ * Unique identifier of the tenant.
1539
+ */
1540
+ tenantId?: string;
1541
+ /**
1542
+ * Unique identifier of the end user accessing the dashboard.
1543
+ */
1544
+ endUserId?: string;
1545
+ /**
1546
+ * Email of the end user (for personalization, audit, or identification).
1547
+ */
1548
+ endUserEmail?: string;
1549
+ /**
1550
+ * Enables self-service editing and lens creation by the end user.
1551
+ */
1552
+ allowEdit?: boolean;
1553
+ /**
1554
+ * Connection-level security policies.
1555
+ * Can be a single policy or an array of policies.
1556
+ */
1557
+ cls?: TokenSecurityPolicy[] | TokenSecurityPolicy;
1558
+ /**
1559
+ * Row-level security policies.
1560
+ * Can be a single policy or an array of policies.
1561
+ */
1562
+ rcls?: TokenSecurityPolicy[] | TokenSecurityPolicy;
1563
+ /**
1564
+ * Parameter overrides and preferences (e.g., formatting).
1565
+ */
1566
+ params?: TokenParams;
1567
+ /**
1568
+ * UI behavior and feature flags.
1569
+ */
1570
+ config?: UIConfig;
1571
+ };
1572
+
1573
+ /**
1574
+ * Defines a security policy that can be applied at connection or row level.
1575
+ */
1576
+ export declare type TokenSecurityPolicy = {
1577
+ /**
1578
+ * Name of the policy (e.g., 'store_sales_primary', 'region_filter').
1579
+ */
1580
+ name: string;
1581
+ /**
1582
+ * Arbitrary parameters associated with the policy.
1583
+ * Examples:
1584
+ *
1585
+ * // Single value
1586
+ * {
1587
+ * tenant: 'tenant_abc_123'
1588
+ * }
1589
+ *
1590
+ * // Multiple values
1591
+ * {
1592
+ * state: ['California', 'Nevada', 'Washington']
1593
+ * }
1594
+ */
1595
+ params: {
1596
+ [key: string]: string | number | string[] | number[];
1597
+ };
808
1598
  };
809
1599
 
1600
+ export declare type TSelectedRecord = ComboBoxOption;
1601
+
810
1602
  export declare type TSheet = {
811
1603
  id: string;
812
1604
  title?: string;
@@ -825,9 +1617,30 @@ export declare type TStyle = {
825
1617
  dark?: StyleProps;
826
1618
  };
827
1619
 
1620
+ /**
1621
+ * UI and behavior configuration for the embedded dashboard.
1622
+ */
1623
+ export declare type UIConfig = {
1624
+ /**
1625
+ * Enables self-service editing and lens creation by the end user. Legacy field. Use config.allowEdit instead.
1626
+ */
1627
+ allowEdit?: boolean;
1628
+ /**
1629
+ * Enables advanced mode features in the dashboard.
1630
+ * Defaults to true unless explicitly disabled.
1631
+ */
1632
+ showAdvancedMode?: boolean;
1633
+ /**
1634
+ * Enables the AI-powered dashboard assistant.
1635
+ * Defaults to true unless explicitly disabled.
1636
+ */
1637
+ showDashboardAssistant?: boolean;
1638
+ };
1639
+
828
1640
  export declare function useCard(cardId: string): {
829
1641
  data: any;
830
1642
  card: TCard;
1643
+ isPending: boolean;
831
1644
  isError: boolean;
832
1645
  isLoading: boolean;
833
1646
  isFetching: boolean;
@@ -837,12 +1650,30 @@ export declare function useCard(cardId: string): {
837
1650
  queryKey: string[];
838
1651
  };
839
1652
 
1653
+ export declare const useCurrentActiveCard: () => TCard | undefined;
1654
+
1655
+ export declare const useCurrentCardConfig: () => {
1656
+ metricFields: MetricField_2[];
1657
+ groupByFields: GroupByField_2[];
1658
+ pivotByFields: PivotByField_2[];
1659
+ };
1660
+
1661
+ export declare const useCurrentSheetActiveCards: () => TCard[];
1662
+
840
1663
  export declare const useDashboardActions: () => Actions;
841
1664
 
842
1665
  export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardStore>, "setState"> & {
843
1666
  setState(nextStateOrUpdater: DashboardStore | Partial<DashboardStore> | ((state: WritableDraft<DashboardStore>) => void), shouldReplace?: boolean | undefined): void;
844
1667
  }>;
845
1668
 
1669
+ export declare function useDataColumns(token?: AuthToken): {
1670
+ columns: TDataColumn[];
1671
+ isColumnsLoading: boolean;
1672
+ isColumnsFetching: boolean;
1673
+ isColumnsError: boolean;
1674
+ refetchColumns: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
1675
+ };
1676
+
846
1677
  export declare function useDateFilterHook(filterId: string): {
847
1678
  records: any;
848
1679
  isLoading: boolean;
@@ -852,34 +1683,48 @@ export declare function useDateFilterHook(filterId: string): {
852
1683
  dateRange: DateRange | undefined;
853
1684
  handleClear: () => void;
854
1685
  handleChange: (date: DateRange | undefined) => void;
1686
+ handleReset: () => void;
855
1687
  };
856
1688
 
857
1689
  export declare const useEditorActions: () => Actions_2;
858
1690
 
859
1691
  export declare function useEditorAside(token?: AuthToken, _connectionQueryKey?: string): {
860
- connectionItems: any;
1692
+ connectionItems: ConnectionItem[];
1693
+ selectedConnectionId: string | undefined;
1694
+ selectedConnection: {
1695
+ id: string;
1696
+ name: string;
1697
+ type: string;
1698
+ dialect?: Dialect_2;
1699
+ uiType?: "database" | "api" | "s3";
1700
+ capabilities: TDbCapabilities_2;
1701
+ } | undefined;
861
1702
  isConnectionsLoading: boolean;
862
1703
  isConnectionsError: boolean;
863
- modelItems: any;
1704
+ modelItems: DropdownItem_2[];
864
1705
  selectedDatamodelId: string | undefined;
865
1706
  selectedDatamodelName: any;
866
1707
  isModelsLoading: boolean;
867
1708
  isModelsError: boolean;
868
- databaseItems: any;
1709
+ selectedDatabaseName: string | undefined;
1710
+ databaseItems: DropdownItem_2[];
869
1711
  isDatabasesLoadingOrFetching: boolean;
870
1712
  isDatabaseError: boolean;
871
- schemaItems: any;
1713
+ schemaItems: DropdownItem_2[];
1714
+ selectedSchemaName: string | undefined;
872
1715
  isSchemaLoadingOrFetching: boolean;
873
1716
  isSchemaError: boolean;
874
- tableItems: any;
1717
+ tableItems: DropdownItem_2[];
1718
+ selectedTableName: string | undefined;
875
1719
  isTableLoadingOrFetching: boolean;
876
1720
  isTableError: boolean;
877
1721
  columns: TDataColumn[];
878
1722
  isColumnsLoadingOrFetching: boolean;
879
1723
  isColumnsError: boolean;
880
1724
  isNonDbConnection: boolean;
881
- connectionType: any;
882
- tableName: any;
1725
+ connectionType: string | undefined;
1726
+ tableName: string;
1727
+ formattedTableName: string;
883
1728
  schemaName: string;
884
1729
  refetchConnections: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
885
1730
  refetchModels: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
@@ -891,6 +1736,7 @@ export declare function useEditorAside(token?: AuthToken, _connectionQueryKey?:
891
1736
  handleDatamodelChange: (value: string) => void;
892
1737
  handleDatabaseChange: (value: string) => void;
893
1738
  handleSchemaChange: (value: string) => void;
1739
+ handleTableChange: (value: string) => void;
894
1740
  };
895
1741
 
896
1742
  export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "setState"> & {
@@ -901,12 +1747,12 @@ export declare function useTextFilterHook(filterId: string): {
901
1747
  isLoading: boolean;
902
1748
  isFetching: boolean;
903
1749
  isError: boolean;
904
- records: TSelectedRecord[];
905
- selectedRecords: TSelectedRecord[];
1750
+ records: ComboBoxOption_2[];
1751
+ selectedRecords: ComboBoxOption_2[];
906
1752
  handleChange: (selectedRecords: TSelectedRecord[]) => void;
907
1753
  handleClear: () => void;
908
1754
  handleSelectAll: (checked: boolean) => void;
909
- filteredRecords: TSelectedRecord[];
1755
+ filteredRecords: ComboBoxOption_2[];
910
1756
  isSingleSelect: boolean;
911
1757
  allSelected: boolean;
912
1758
  };