semaphor 0.0.103 → 0.0.104

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.
@@ -62,8 +62,43 @@ declare interface CardConfig {
62
62
  filters?: FilterGroup;
63
63
  joinPlan?: JoinPlan;
64
64
  rowLimit?: number;
65
+ /**
66
+ * One or more hierarchies that define drillable paths through dimensions.
67
+ */
68
+ drillHierarchies?: DrillHierarchy[];
69
+ /**
70
+ * Optional list of dimensions allowed for dynamic drill-down across this card.
71
+ * Used only when drill steps contain `mode: 'dynamicDrill'` or `type: 'dynamic'`.
72
+ */
73
+ allowedDrillTargets?: Field[];
74
+ /**
75
+ * NOT UOptional preload settings for inline drill previews
76
+ */
77
+ inlineDrillPreview?: {
78
+ enabled: boolean;
79
+ limit: number;
80
+ mode: 'lazy' | 'preloaded';
81
+ };
82
+ /**
83
+ * Configuration for on-click dashboard filters triggered by this card.
84
+ */
85
+ clickFilterInteractions?: ClickFilterInteraction[];
86
+ comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target';
87
+ targetValue?: number;
88
+ showTrendline?: boolean;
89
+ trendlineWindow?: number;
90
+ trendlineGranularity?: 'day' | 'week' | 'month';
91
+ }
92
+
93
+ declare interface CardInteractionConfig {
94
+ allowedDrillTargets?: Field[];
95
+ drillHierarchies?: DrillHierarchy[];
96
+ drillInteractions?: DrillInteraction[];
97
+ clickFilterInteractions?: ClickFilterInteraction[];
65
98
  }
66
99
 
100
+ declare type CardMode = 'explorer' | 'dev';
101
+
67
102
  declare type CardWithContent = BaseCustomCard & {
68
103
  content: React.FC<{
69
104
  card: TCard;
@@ -82,6 +117,33 @@ declare type CardWithFooter = BaseCustomCard & {
82
117
  }>;
83
118
  };
84
119
 
120
+ declare interface ClickFilterInteraction {
121
+ mode: 'clickFilter';
122
+ /**
123
+ * Fields from the chart element that should be used as filters.
124
+ * e.g., [region, ship_mode] from a stacked bar chart
125
+ */
126
+ filterFields: Field[];
127
+ /**
128
+ * Should this card visually highlight when clicked?
129
+ */
130
+ highlightSelf?: boolean;
131
+ /**
132
+ * Cards this filter applies to (inclusive).
133
+ * If omitted and `excludeCardIds` is also omitted → applies to all cards except self.
134
+ */
135
+ applyToCardIds?: string[];
136
+ /**
137
+ * Cards to explicitly exclude from receiving this filter.
138
+ * Takes effect only if `applyToCardIds` is undefined (acts as override).
139
+ */
140
+ excludeCardIds?: string[];
141
+ /**
142
+ * Optional UI label or tooltip.
143
+ */
144
+ label?: string;
145
+ }
146
+
85
147
  export declare type ColorRange = {
86
148
  start: number;
87
149
  end: number;
@@ -207,7 +269,7 @@ declare interface DataSource {
207
269
  selectedEntities: SelectedEntities;
208
270
  }
209
271
 
210
- declare const DATE_FORMAT_VALUES: readonly ["YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "MMMM DD, YYYY", "MMM DD, YYYY", "DD MMM YYYY", "YYYY-MM", "MMMM YYYY", "custom"];
272
+ 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"];
211
273
 
212
274
  declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
213
275
 
@@ -221,6 +283,50 @@ declare type Dialect = 'mysql' | 'postgresql' | 'bigquery' | 'redshift' | 'snowf
221
283
 
222
284
  export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
223
285
 
286
+ declare interface DrillHierarchy {
287
+ id: string;
288
+ label?: string;
289
+ type: 'static';
290
+ steps: DrillHierarchyStep[];
291
+ default?: boolean;
292
+ }
293
+
294
+ declare interface DrillHierarchyStep {
295
+ field: Field;
296
+ mode: 'drillDown';
297
+ preferredChartType?: TChartType;
298
+ breadcrumbLabelTemplate?: string;
299
+ retainFilters?: boolean;
300
+ label?: string;
301
+ linkedInsightId?: string;
302
+ }
303
+
304
+ declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
305
+
306
+ declare interface DrillThroughInteraction {
307
+ mode: 'drillThrough';
308
+ filterFields: Field[];
309
+ targetSheetId: string;
310
+ label?: string;
311
+ }
312
+
313
+ declare interface DrillToDetailInteraction {
314
+ mode: 'drillToDetail';
315
+ filterFields: Field[];
316
+ detailFields?: Field[];
317
+ sortBy?: SortByField[];
318
+ limit?: number;
319
+ detailTitle?: string;
320
+ label?: string;
321
+ }
322
+
323
+ declare interface DrillToURLInteraction {
324
+ mode: 'drillToURL';
325
+ filterFields: Field[];
326
+ urlTemplate: string;
327
+ label?: string;
328
+ }
329
+
224
330
  export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
225
331
 
226
332
  export declare type EmailSettings = {
@@ -383,12 +489,21 @@ declare interface GroupByField extends Field {
383
489
  * If present, used in SELECT and GROUP BY instead of just the column name.
384
490
  */
385
491
  expression?: string;
492
+ timeDrillPath?: TimeDrillStep[];
386
493
  }
387
494
 
388
495
  export declare type HtmlOptions = {
389
496
  html: string;
390
497
  };
391
498
 
499
+ declare interface InlineDrillInteraction {
500
+ mode: 'inlineDrill';
501
+ filterFields: Field[];
502
+ fetchMode?: 'lazy' | 'preloaded';
503
+ inlineLimit?: number;
504
+ label?: string;
505
+ }
506
+
392
507
  declare interface Join {
393
508
  id: string;
394
509
  source: DatabaseEntityReference;
@@ -488,7 +603,7 @@ declare type OldFilterValue = string | number | null | (string | number)[] | Ran
488
603
 
489
604
  declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
490
605
 
491
- declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in';
606
+ declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between';
492
607
 
493
608
  declare type OptionsMap = {
494
609
  number: NumberOptions;
@@ -623,6 +738,7 @@ export declare type TBaseQuery = {
623
738
  };
624
739
 
625
740
  export declare type TCard = {
741
+ mode?: CardMode;
626
742
  id: string;
627
743
  title: string;
628
744
  tabTitle?: string;
@@ -636,6 +752,7 @@ export declare type TCard = {
636
752
  python?: string;
637
753
  dataSource?: DataSource;
638
754
  config?: CardConfig;
755
+ interactionConfig?: CardInteractionConfig;
639
756
  queryConfig?: QueryConfig;
640
757
  customCfg?: any;
641
758
  preferences?: TCardPreferences;
@@ -690,6 +807,7 @@ export declare type TCardPreferences = {
690
807
  };
691
808
  kpiVisualOptions?: {
692
809
  lowerIsBetter?: boolean;
810
+ countryLogoId?: string;
693
811
  };
694
812
  };
695
813
 
@@ -833,6 +951,13 @@ export declare type TFrame = {
833
951
 
834
952
  export declare type Theme = 'dark' | 'light' | 'system';
835
953
 
954
+ declare interface TimeDrillStep {
955
+ granularity: TimeGranularity;
956
+ next?: TimeGranularity;
957
+ comparison?: 'previous_year' | 'previous_period';
958
+ rollingWindow?: number;
959
+ }
960
+
836
961
  declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
837
962
 
838
963
  export declare type TLegendOptions = {
@@ -11,7 +11,10 @@ import { Dialect as Dialect_2 } from '../types/explorer-types';
11
11
  import { DropdownItem as DropdownItem_2 } from '../types/dropdown-types';
12
12
  import { EmailSettings as EmailSettings_2 } from '..';
13
13
  import { FontSpec } from 'chart.js';
14
+ import { GroupByField as GroupByField_2 } from '../types/explorer-types';
14
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';
15
18
  import { QueryObserverResult } from '@tanstack/query-core';
16
19
  import { RefetchOptions } from '@tanstack/query-core';
17
20
  import { StoreApi } from 'zustand';
@@ -67,6 +70,7 @@ declare type Actions = {
67
70
  updateFrame: (sheetId: string, frame: TFrame) => void;
68
71
  updateCard: (sheetId: string, card: TCard) => void;
69
72
  updateFrameCard?: (sheetId: string, frameId: string, card: TCard) => void;
73
+ updateCurrentDashboardCard: (card: TCard) => void;
70
74
  removeFrame: (sheetId: string, frameId: string) => void;
71
75
  removeCard: (sheetId: string, card: TCard) => void;
72
76
  setIsDashboardEditing: (editing: boolean) => void;
@@ -105,7 +109,8 @@ declare type Actions = {
105
109
  setBaseQueries: (baseQueries: TBaseQuery[]) => void;
106
110
  };
107
111
 
108
- declare type Actions_2 = TableActions & ExplorerActions & {
112
+ declare type Actions_2 = TableActions & ExplorerActions & DrillActions & {
113
+ setCardMode: (mode: CardMode) => void;
109
114
  setEditorFilterMode: (filterColumnName: string, filterMode: 'include' | 'exclude') => void;
110
115
  setLowerIsBetter: (lowerIsBetter: boolean) => void;
111
116
  clearEditorFilter: (filterColumn: FilterByColumn) => void;
@@ -117,6 +122,9 @@ declare type Actions_2 = TableActions & ExplorerActions & {
117
122
  }) => void;
118
123
  clearQueryConfig: () => void;
119
124
  setQueryConfig: (queryConfig: QueryConfig | undefined) => void;
125
+ setCardTitle: (title: string) => void;
126
+ setCardDescription: (description: string) => void;
127
+ setCountryLogo: (countryLogoId: string | null) => void;
120
128
  setIsDevMode: (isDevMode: boolean) => void;
121
129
  setOrderByColumns: (orderByColumns: OrderBy[]) => void;
122
130
  addOrderByColumn: (orderByColumn: OrderBy) => void;
@@ -250,8 +258,43 @@ export declare interface CardConfig {
250
258
  filters?: FilterGroup;
251
259
  joinPlan?: JoinPlan;
252
260
  rowLimit?: number;
261
+ /**
262
+ * One or more hierarchies that define drillable paths through dimensions.
263
+ */
264
+ drillHierarchies?: DrillHierarchy[];
265
+ /**
266
+ * Optional list of dimensions allowed for dynamic drill-down across this card.
267
+ * Used only when drill steps contain `mode: 'dynamicDrill'` or `type: 'dynamic'`.
268
+ */
269
+ allowedDrillTargets?: Field[];
270
+ /**
271
+ * NOT UOptional preload settings for inline drill previews
272
+ */
273
+ inlineDrillPreview?: {
274
+ enabled: boolean;
275
+ limit: number;
276
+ mode: 'lazy' | 'preloaded';
277
+ };
278
+ /**
279
+ * Configuration for on-click dashboard filters triggered by this card.
280
+ */
281
+ clickFilterInteractions?: ClickFilterInteraction[];
282
+ comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target';
283
+ targetValue?: number;
284
+ showTrendline?: boolean;
285
+ trendlineWindow?: number;
286
+ trendlineGranularity?: 'day' | 'week' | 'month';
287
+ }
288
+
289
+ declare interface CardInteractionConfig {
290
+ allowedDrillTargets?: Field[];
291
+ drillHierarchies?: DrillHierarchy[];
292
+ drillInteractions?: DrillInteraction[];
293
+ clickFilterInteractions?: ClickFilterInteraction[];
253
294
  }
254
295
 
296
+ export declare type CardMode = 'explorer' | 'dev';
297
+
255
298
  declare type CardWithContent = BaseCustomCard & {
256
299
  content: React.FC<{
257
300
  card: TCard;
@@ -272,6 +315,33 @@ declare type CardWithFooter = BaseCustomCard & {
272
315
 
273
316
  export declare function cleanCard(card: TCard): TCard;
274
317
 
318
+ declare interface ClickFilterInteraction {
319
+ mode: 'clickFilter';
320
+ /**
321
+ * Fields from the chart element that should be used as filters.
322
+ * e.g., [region, ship_mode] from a stacked bar chart
323
+ */
324
+ filterFields: Field[];
325
+ /**
326
+ * Should this card visually highlight when clicked?
327
+ */
328
+ highlightSelf?: boolean;
329
+ /**
330
+ * Cards this filter applies to (inclusive).
331
+ * If omitted and `excludeCardIds` is also omitted → applies to all cards except self.
332
+ */
333
+ applyToCardIds?: string[];
334
+ /**
335
+ * Cards to explicitly exclude from receiving this filter.
336
+ * Takes effect only if `applyToCardIds` is undefined (acts as override).
337
+ */
338
+ excludeCardIds?: string[];
339
+ /**
340
+ * Optional UI label or tooltip.
341
+ */
342
+ label?: string;
343
+ }
344
+
275
345
  export declare type ColorRange = {
276
346
  start: number;
277
347
  end: number;
@@ -463,7 +533,7 @@ export declare interface DataSource {
463
533
 
464
534
  export declare type DataType = 'string' | 'number' | 'date' | 'datetime' | 'boolean' | 'json' | 'geo';
465
535
 
466
- export declare const DATE_FORMAT_VALUES: readonly ["YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "MMMM DD, YYYY", "MMM DD, YYYY", "DD MMM YYYY", "YYYY-MM", "MMMM YYYY", "custom"];
536
+ 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"];
467
537
 
468
538
  export declare type DateFormatOption = {
469
539
  value: DateFormatValue;
@@ -486,6 +556,75 @@ export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'n
486
556
 
487
557
  export declare function downloadPdf(): Promise<void>;
488
558
 
559
+ declare interface DrillActions {
560
+ updateDrillHierarchies: (h: DrillHierarchy[]) => void;
561
+ addDrillHierarchy: (h: DrillHierarchy) => void;
562
+ removeDrillHierarchy: (hierarchyId: string) => void;
563
+ updateDrillHierarchy: (hierarchyId: string, updates: Partial<DrillHierarchy>) => void;
564
+ setDefaultHierarchy: (hierarchyId: string) => void;
565
+ updateAllowedDrillTargets: (t: Field[]) => void;
566
+ addDrillTarget: (t: Field) => void;
567
+ removeDrillTarget: (targetId: string) => void;
568
+ updateDrillInteractions: (i: DrillInteraction[]) => void;
569
+ addDrillInteraction: (i: DrillInteraction) => void;
570
+ removeDrillInteraction: (index: number) => void;
571
+ updateClickFilterInteractions: (i: ClickFilterInteraction[]) => void;
572
+ addClickFilterInteraction: (i: ClickFilterInteraction) => void;
573
+ removeClickFilterInteraction: (fieldId: string) => void;
574
+ updateInlineDrillPreview: (s: {
575
+ enabled: boolean;
576
+ limit: number;
577
+ mode: 'lazy' | 'preloaded';
578
+ }) => void;
579
+ toggleInlineDrillPreview: (enabled: boolean) => void;
580
+ updateInteractionConfig: (c: Partial<CardInteractionConfig>) => void;
581
+ resetDrillConfiguration: () => void;
582
+ }
583
+
584
+ declare interface DrillHierarchy {
585
+ id: string;
586
+ label?: string;
587
+ type: 'static';
588
+ steps: DrillHierarchyStep[];
589
+ default?: boolean;
590
+ }
591
+
592
+ declare interface DrillHierarchyStep {
593
+ field: Field;
594
+ mode: 'drillDown';
595
+ preferredChartType?: TChartType;
596
+ breadcrumbLabelTemplate?: string;
597
+ retainFilters?: boolean;
598
+ label?: string;
599
+ linkedInsightId?: string;
600
+ }
601
+
602
+ declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
603
+
604
+ declare interface DrillThroughInteraction {
605
+ mode: 'drillThrough';
606
+ filterFields: Field[];
607
+ targetSheetId: string;
608
+ label?: string;
609
+ }
610
+
611
+ declare interface DrillToDetailInteraction {
612
+ mode: 'drillToDetail';
613
+ filterFields: Field[];
614
+ detailFields?: Field[];
615
+ sortBy?: SortByField[];
616
+ limit?: number;
617
+ detailTitle?: string;
618
+ label?: string;
619
+ }
620
+
621
+ declare interface DrillToURLInteraction {
622
+ mode: 'drillToURL';
623
+ filterFields: Field[];
624
+ urlTemplate: string;
625
+ label?: string;
626
+ }
627
+
489
628
  export declare type DropdownItem = {
490
629
  id: string;
491
630
  name: string;
@@ -796,12 +935,21 @@ export declare interface GroupByField extends Field {
796
935
  * If present, used in SELECT and GROUP BY instead of just the column name.
797
936
  */
798
937
  expression?: string;
938
+ timeDrillPath?: TimeDrillStep[];
799
939
  }
800
940
 
801
941
  export declare type HtmlOptions = {
802
942
  html: string;
803
943
  };
804
944
 
945
+ declare interface InlineDrillInteraction {
946
+ mode: 'inlineDrill';
947
+ filterFields: Field[];
948
+ fetchMode?: 'lazy' | 'preloaded';
949
+ inlineLimit?: number;
950
+ label?: string;
951
+ }
952
+
805
953
  export declare function invalidateToken(): Promise<any>;
806
954
 
807
955
  export declare function isBooleanDataType(dataType: string): boolean;
@@ -915,7 +1063,7 @@ export declare type OldFilterValue = string | number | null | (string | number)[
915
1063
 
916
1064
  declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
917
1065
 
918
- export declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in';
1066
+ export declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between';
919
1067
 
920
1068
  declare type OptionsMap = {
921
1069
  number: NumberOptions;
@@ -1113,6 +1261,7 @@ export declare type TBaseQuery = {
1113
1261
  };
1114
1262
 
1115
1263
  export declare type TCard = {
1264
+ mode?: CardMode;
1116
1265
  id: string;
1117
1266
  title: string;
1118
1267
  tabTitle?: string;
@@ -1126,6 +1275,7 @@ export declare type TCard = {
1126
1275
  python?: string;
1127
1276
  dataSource?: DataSource;
1128
1277
  config?: CardConfig;
1278
+ interactionConfig?: CardInteractionConfig;
1129
1279
  queryConfig?: QueryConfig;
1130
1280
  customCfg?: any;
1131
1281
  preferences?: TCardPreferences;
@@ -1180,6 +1330,7 @@ export declare type TCardPreferences = {
1180
1330
  };
1181
1331
  kpiVisualOptions?: {
1182
1332
  lowerIsBetter?: boolean;
1333
+ countryLogoId?: string;
1183
1334
  };
1184
1335
  };
1185
1336
 
@@ -1325,6 +1476,13 @@ export declare type TFrame = {
1325
1476
 
1326
1477
  export declare type Theme = 'dark' | 'light' | 'system';
1327
1478
 
1479
+ declare interface TimeDrillStep {
1480
+ granularity: TimeGranularity;
1481
+ next?: TimeGranularity;
1482
+ comparison?: 'previous_year' | 'previous_period';
1483
+ rollingWindow?: number;
1484
+ }
1485
+
1328
1486
  export declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
1329
1487
 
1330
1488
  export declare type TLegendOptions = {
@@ -1490,6 +1648,16 @@ export declare function useCard(cardId: string): {
1490
1648
  queryKey: string[];
1491
1649
  };
1492
1650
 
1651
+ export declare const useCurrentActiveCard: () => TCard | undefined;
1652
+
1653
+ export declare const useCurrentCardConfig: () => {
1654
+ metricFields: MetricField_2[];
1655
+ groupByFields: GroupByField_2[];
1656
+ pivotByFields: PivotByField_2[];
1657
+ };
1658
+
1659
+ export declare const useCurrentSheetActiveCards: () => TCard[];
1660
+
1493
1661
  export declare const useDashboardActions: () => Actions;
1494
1662
 
1495
1663
  export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardStore>, "setState"> & {
@@ -62,8 +62,43 @@ declare interface CardConfig {
62
62
  filters?: FilterGroup;
63
63
  joinPlan?: JoinPlan;
64
64
  rowLimit?: number;
65
+ /**
66
+ * One or more hierarchies that define drillable paths through dimensions.
67
+ */
68
+ drillHierarchies?: DrillHierarchy[];
69
+ /**
70
+ * Optional list of dimensions allowed for dynamic drill-down across this card.
71
+ * Used only when drill steps contain `mode: 'dynamicDrill'` or `type: 'dynamic'`.
72
+ */
73
+ allowedDrillTargets?: Field[];
74
+ /**
75
+ * NOT UOptional preload settings for inline drill previews
76
+ */
77
+ inlineDrillPreview?: {
78
+ enabled: boolean;
79
+ limit: number;
80
+ mode: 'lazy' | 'preloaded';
81
+ };
82
+ /**
83
+ * Configuration for on-click dashboard filters triggered by this card.
84
+ */
85
+ clickFilterInteractions?: ClickFilterInteraction[];
86
+ comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target';
87
+ targetValue?: number;
88
+ showTrendline?: boolean;
89
+ trendlineWindow?: number;
90
+ trendlineGranularity?: 'day' | 'week' | 'month';
91
+ }
92
+
93
+ declare interface CardInteractionConfig {
94
+ allowedDrillTargets?: Field[];
95
+ drillHierarchies?: DrillHierarchy[];
96
+ drillInteractions?: DrillInteraction[];
97
+ clickFilterInteractions?: ClickFilterInteraction[];
65
98
  }
66
99
 
100
+ declare type CardMode = 'explorer' | 'dev';
101
+
67
102
  declare type CardWithContent = BaseCustomCard & {
68
103
  content: React.FC<{
69
104
  card: TCard;
@@ -82,6 +117,33 @@ declare type CardWithFooter = BaseCustomCard & {
82
117
  }>;
83
118
  };
84
119
 
120
+ declare interface ClickFilterInteraction {
121
+ mode: 'clickFilter';
122
+ /**
123
+ * Fields from the chart element that should be used as filters.
124
+ * e.g., [region, ship_mode] from a stacked bar chart
125
+ */
126
+ filterFields: Field[];
127
+ /**
128
+ * Should this card visually highlight when clicked?
129
+ */
130
+ highlightSelf?: boolean;
131
+ /**
132
+ * Cards this filter applies to (inclusive).
133
+ * If omitted and `excludeCardIds` is also omitted → applies to all cards except self.
134
+ */
135
+ applyToCardIds?: string[];
136
+ /**
137
+ * Cards to explicitly exclude from receiving this filter.
138
+ * Takes effect only if `applyToCardIds` is undefined (acts as override).
139
+ */
140
+ excludeCardIds?: string[];
141
+ /**
142
+ * Optional UI label or tooltip.
143
+ */
144
+ label?: string;
145
+ }
146
+
85
147
  export declare type ColorRange = {
86
148
  start: number;
87
149
  end: number;
@@ -210,7 +272,7 @@ declare interface DataSource {
210
272
  selectedEntities: SelectedEntities;
211
273
  }
212
274
 
213
- declare const DATE_FORMAT_VALUES: readonly ["YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "MMMM DD, YYYY", "MMM DD, YYYY", "DD MMM YYYY", "YYYY-MM", "MMMM YYYY", "custom"];
275
+ 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"];
214
276
 
215
277
  declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
216
278
 
@@ -224,6 +286,50 @@ declare type Dialect = 'mysql' | 'postgresql' | 'bigquery' | 'redshift' | 'snowf
224
286
 
225
287
  export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
226
288
 
289
+ declare interface DrillHierarchy {
290
+ id: string;
291
+ label?: string;
292
+ type: 'static';
293
+ steps: DrillHierarchyStep[];
294
+ default?: boolean;
295
+ }
296
+
297
+ declare interface DrillHierarchyStep {
298
+ field: Field;
299
+ mode: 'drillDown';
300
+ preferredChartType?: TChartType;
301
+ breadcrumbLabelTemplate?: string;
302
+ retainFilters?: boolean;
303
+ label?: string;
304
+ linkedInsightId?: string;
305
+ }
306
+
307
+ declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
308
+
309
+ declare interface DrillThroughInteraction {
310
+ mode: 'drillThrough';
311
+ filterFields: Field[];
312
+ targetSheetId: string;
313
+ label?: string;
314
+ }
315
+
316
+ declare interface DrillToDetailInteraction {
317
+ mode: 'drillToDetail';
318
+ filterFields: Field[];
319
+ detailFields?: Field[];
320
+ sortBy?: SortByField[];
321
+ limit?: number;
322
+ detailTitle?: string;
323
+ label?: string;
324
+ }
325
+
326
+ declare interface DrillToURLInteraction {
327
+ mode: 'drillToURL';
328
+ filterFields: Field[];
329
+ urlTemplate: string;
330
+ label?: string;
331
+ }
332
+
227
333
  export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
228
334
 
229
335
  export declare type EmailSettings = {
@@ -386,12 +492,21 @@ declare interface GroupByField extends Field {
386
492
  * If present, used in SELECT and GROUP BY instead of just the column name.
387
493
  */
388
494
  expression?: string;
495
+ timeDrillPath?: TimeDrillStep[];
389
496
  }
390
497
 
391
498
  export declare type HtmlOptions = {
392
499
  html: string;
393
500
  };
394
501
 
502
+ declare interface InlineDrillInteraction {
503
+ mode: 'inlineDrill';
504
+ filterFields: Field[];
505
+ fetchMode?: 'lazy' | 'preloaded';
506
+ inlineLimit?: number;
507
+ label?: string;
508
+ }
509
+
395
510
  declare interface Join {
396
511
  id: string;
397
512
  source: DatabaseEntityReference;
@@ -491,7 +606,7 @@ declare type OldFilterValue = string | number | null | (string | number)[] | Ran
491
606
 
492
607
  declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
493
608
 
494
- declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in';
609
+ declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between';
495
610
 
496
611
  declare type OptionsMap = {
497
612
  number: NumberOptions;
@@ -628,6 +743,7 @@ export declare type TBaseQuery = {
628
743
  };
629
744
 
630
745
  export declare type TCard = {
746
+ mode?: CardMode;
631
747
  id: string;
632
748
  title: string;
633
749
  tabTitle?: string;
@@ -641,6 +757,7 @@ export declare type TCard = {
641
757
  python?: string;
642
758
  dataSource?: DataSource;
643
759
  config?: CardConfig;
760
+ interactionConfig?: CardInteractionConfig;
644
761
  queryConfig?: QueryConfig;
645
762
  customCfg?: any;
646
763
  preferences?: TCardPreferences;
@@ -695,6 +812,7 @@ export declare type TCardPreferences = {
695
812
  };
696
813
  kpiVisualOptions?: {
697
814
  lowerIsBetter?: boolean;
815
+ countryLogoId?: string;
698
816
  };
699
817
  };
700
818
 
@@ -838,6 +956,13 @@ export declare type TFrame = {
838
956
 
839
957
  export declare type Theme = 'dark' | 'light' | 'system';
840
958
 
959
+ declare interface TimeDrillStep {
960
+ granularity: TimeGranularity;
961
+ next?: TimeGranularity;
962
+ comparison?: 'previous_year' | 'previous_period';
963
+ rollingWindow?: number;
964
+ }
965
+
841
966
  declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
842
967
 
843
968
  export declare type TLegendOptions = {