react-semaphor 0.1.443 → 0.1.445
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/CHANGELOG.md +7 -0
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +123 -107
- package/dist/appearance/index.cjs +1 -1
- package/dist/brand-studio/index.cjs +2 -2
- package/dist/brand-studio/index.js +5 -4
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +526 -457
- package/dist/chunks/analyze-result-contract-BHb7sUUW.cjs +1 -0
- package/dist/chunks/analyze-result-contract-DUv3QnMl.js +29 -0
- package/dist/chunks/{braces-CbO-aIwH.js → braces-BKimshER.cjs} +1 -1
- package/dist/chunks/{code-editor-BpADiIlq.js → code-editor-B4gTfvc5.js} +6800 -6560
- package/dist/chunks/code-editor-BYVorgOf.cjs +138 -0
- package/dist/chunks/common-types-CQ6SHfLk.cjs +1 -0
- package/dist/chunks/{common-types-ClkOI-3O.js → common-types-DFsDdpH7.js} +22 -21
- package/dist/chunks/dashboard-CAiwJW3L.cjs +1397 -0
- package/dist/chunks/{dashboard-briefing-launcher-C60n8LqW.js → dashboard-briefing-launcher-2SLNOaTg.js} +26 -24
- package/dist/chunks/{dashboard-briefing-launcher-BYMLjZxG.js → dashboard-briefing-launcher-CHwjpUYz.cjs} +2 -2
- package/dist/chunks/{dashboard-controls-ti9Rcel2.js → dashboard-controls-BfL14aqO.js} +11 -9
- package/dist/chunks/{dashboard-controls-BH_fZYDU.js → dashboard-controls-BgGTg4yw.cjs} +2 -2
- package/dist/chunks/dashboard-date-comparison-definition-DZq0htjG.cjs +1 -0
- package/dist/chunks/dashboard-json-BOv8tCa9.cjs +1 -0
- package/dist/chunks/{dashboard-json-Bturr634.js → dashboard-json-BZwq3EcS.js} +14 -12
- package/dist/chunks/{dashboard-Bd1Quco-.js → dashboard-u61yfU6u.js} +50081 -47351
- package/dist/chunks/edit-dashboard-visual-BdVCH0DJ.cjs +182 -0
- package/dist/chunks/{edit-dashboard-visual-DglMds57.js → edit-dashboard-visual-njLPYip3.js} +6825 -6656
- package/dist/chunks/{editor-action-buttons-CRi0fhVW.js → editor-action-buttons-BhLX5Q6m.js} +24 -23
- package/dist/chunks/{editor-action-buttons-Cxo7_tNG.js → editor-action-buttons-CBVMFipA.cjs} +1 -1
- package/dist/chunks/{index-D7KJindZ.js → format-types-CSv0V7mm.cjs} +1 -1
- package/dist/chunks/{index-CnujJ3fa.js → format-types-CZH5w1lo.js} +23 -17
- package/dist/chunks/{layout-grid-B08pP7v6.js → layout-grid-3-HWzEwU.cjs} +1 -1
- package/dist/chunks/{metric-comparison-CPoDx56y.js → metric-comparison-BJ_Qu1ZF.js} +1 -1
- package/dist/chunks/metric-comparison-CUAJ8n4y.cjs +1 -0
- package/dist/chunks/{palette-C0yjT5Tv.js → palette-DW_l7Jr0.cjs} +1 -1
- package/dist/chunks/pivot-result-identity-B6QCWOSi.js +94 -0
- package/dist/chunks/pivot-result-identity-CDLRT-YG.cjs +1 -0
- package/dist/chunks/pivot-result-lifecycle-BM3Pl-D1.js +914 -0
- package/dist/chunks/pivot-result-lifecycle-DPc0ANwk.cjs +4 -0
- package/dist/chunks/presentation-execution-BTV-Q43g.cjs +1 -0
- package/dist/chunks/presentation-execution-CGlb7YZ6.js +637 -0
- package/dist/chunks/{report-preferences-dialog-TtwdAuNn.js → report-preferences-dialog-D_NJu2wU.js} +7 -6
- package/dist/chunks/report-preferences-dialog-r8QzOSFb.cjs +1 -0
- package/dist/chunks/report-runtime-context-C8LZFsqV.cjs +1 -0
- package/dist/chunks/report-runtime-context-Qzn11HQe.js +387 -0
- package/dist/chunks/{save-Xdc4pnys.js → save-4_uMnE6s.cjs} +1 -1
- package/dist/chunks/{search-Dcud9ajy.js → search-6ZmeMq55.cjs} +1 -1
- package/dist/chunks/temporal-bucket-BnPxGrAi.js +446 -0
- package/dist/chunks/temporal-bucket-authoring-BUZMuVca.js +205 -0
- package/dist/chunks/temporal-bucket-authoring-CPTwHzvs.cjs +1 -0
- package/dist/chunks/temporal-bucket-contract-B2bJ1oe4.js +108 -0
- package/dist/chunks/temporal-bucket-contract-ChDBWX8I.cjs +1 -0
- package/dist/chunks/temporal-bucket-pMnV-4Nj.cjs +1 -0
- package/dist/chunks/{comparison-document-migration-Dj6xZMCb.js → temporal-result-owner-Cb27SSG9.js} +152 -123
- package/dist/chunks/temporal-result-owner-f6-i65Fb.cjs +1 -0
- package/dist/chunks/token-types-BdQ8kHBm.cjs +1 -0
- package/dist/chunks/token-types-DLo91nOf.js +8 -0
- package/dist/chunks/{update-policy-DnF_74zC.js → update-policy-BxvYMYz0.cjs} +1 -1
- package/dist/chunks/{update-policy-De2NswtM.js → update-policy-eg59mQqv.js} +1 -1
- package/dist/chunks/validators-9D4KBqKD.cjs +1 -0
- package/dist/chunks/validators-wZ2WlNHc.js +4640 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +136 -126
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +1 -1
- package/dist/data-app-codegen-node/index.js +3 -3
- package/dist/data-app-sdk/index.cjs +2 -2
- package/dist/data-app-sdk/index.js +34 -35
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +5 -5
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +9 -10
- package/dist/format-utils/index.cjs +3 -3
- package/dist/format-utils/index.js +155 -176
- package/dist/index.cjs +1 -1
- package/dist/index.js +180 -174
- package/dist/report-runtime-context/index.cjs +1 -1
- package/dist/report-runtime-context/index.js +7 -392
- package/dist/shared/index.cjs +1 -1
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +3 -3
- package/dist/types/analytics-protocol.d.ts +257 -48
- package/dist/types/briefings.d.ts +138 -50
- package/dist/types/dashboard-assistant.d.ts +207 -52
- package/dist/types/dashboard-authoring.d.ts +182 -50
- package/dist/types/dashboard.d.ts +290 -48
- package/dist/types/data-app-builder.d.ts +48 -42
- package/dist/types/data-app-codegen-node.d.ts +50 -44
- package/dist/types/data-app-codegen.d.ts +50 -44
- package/dist/types/data-app-sdk-adapters.d.ts +48 -42
- package/dist/types/data-app-sdk-validation.d.ts +81 -43
- package/dist/types/data-app-sdk.d.ts +83 -45
- package/dist/types/format-utils.d.ts +645 -67
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +19 -19
- package/dist/types/main.d.ts +298 -94
- package/dist/types/report-runtime-context.d.ts +3 -0
- package/dist/types/shared.d.ts +116 -41
- package/dist/types/surfboard.d.ts +290 -48
- package/dist/types/types.d.ts +455 -65
- package/package.json +3 -1
- package/dist/chunks/analyze-result-contract-BswhsmWT.js +0 -1
- package/dist/chunks/analyze-result-contract-CfOBEwaC.js +0 -1998
- package/dist/chunks/code-editor-M7HTUhdF.js +0 -138
- package/dist/chunks/common-types-C73-Ud1-.js +0 -1
- package/dist/chunks/comparison-document-migration-DbU_BTxR.js +0 -1
- package/dist/chunks/csv-utils-BZDvO2Fw.js +0 -376
- package/dist/chunks/csv-utils-Co0WxHke.js +0 -4
- package/dist/chunks/dashboard-cB3xmTNn.js +0 -1402
- package/dist/chunks/dashboard-date-comparison-definition-DGZr3m-b.js +0 -1
- package/dist/chunks/dashboard-json-Dw_55vSZ.js +0 -1
- package/dist/chunks/edit-dashboard-visual-BUc3NBQ4.js +0 -182
- package/dist/chunks/metric-comparison-DVy3fll_.js +0 -1
- package/dist/chunks/numeric-presentation-BJs5lSar.js +0 -517
- package/dist/chunks/numeric-presentation-Dlb-Dk4c.js +0 -1
- package/dist/chunks/report-preferences-dialog-CCvFqH4Q.js +0 -1
- package/dist/chunks/source-identity-5OPV4gvg.js +0 -92
- package/dist/chunks/source-identity-Cbo2LOHQ.js +0 -1
- package/dist/chunks/validators-B2vUAqTf.js +0 -1
- package/dist/chunks/validators-Bce_J7Vd.js +0 -2448
- /package/dist/chunks/{card-config-utils-15sRtebL.js → card-config-utils-15sRtebL.cjs} +0 -0
- /package/dist/chunks/{catalog-field-grounding-Bnx-3tE0.js → catalog-field-grounding-Bnx-3tE0.cjs} +0 -0
- /package/dist/chunks/{dashboard-input-contract-DV3cshjz.js → dashboard-input-contract-DV3cshjz.cjs} +0 -0
- /package/dist/chunks/{index-Dpm_VET4.js → index-Dpm_VET4.cjs} +0 -0
- /package/dist/chunks/{index-jSrCwPQz.js → index-jSrCwPQz.cjs} +0 -0
- /package/dist/chunks/{normalize-dashboard-for-dirty-check-BXRUMVb2.js → normalize-dashboard-for-dirty-check-BXRUMVb2.cjs} +0 -0
- /package/dist/chunks/{operators-DrTQsJXv.js → operators-DrTQsJXv.cjs} +0 -0
- /package/dist/chunks/{use-debounced-dirty-check-XHSwAefL.js → use-debounced-dirty-check-XHSwAefL.cjs} +0 -0
package/dist/types/types.d.ts
CHANGED
|
@@ -147,8 +147,16 @@ declare type BaseFilter = {
|
|
|
147
147
|
dataType?: string;
|
|
148
148
|
fieldMeta?: FilterFieldMeta;
|
|
149
149
|
semanticContext?: FilterSemanticContext;
|
|
150
|
+
/** Governed meaning for canonical grouped-temporal filter values. */
|
|
151
|
+
temporalBucket?: TemporalBucketMetadata;
|
|
150
152
|
};
|
|
151
153
|
|
|
154
|
+
declare interface BaseInteractionEvent {
|
|
155
|
+
sourceCardId: string;
|
|
156
|
+
filterGroups: ClickFilterConditionGroup[];
|
|
157
|
+
metric?: ClickedMetricValue;
|
|
158
|
+
}
|
|
159
|
+
|
|
152
160
|
declare type BaseSurfaceAppearance = {
|
|
153
161
|
background?: string;
|
|
154
162
|
foreground?: string;
|
|
@@ -339,6 +347,7 @@ declare type BriefingFragments = {
|
|
|
339
347
|
export declare type BriefingJobConfig = {
|
|
340
348
|
kind: BriefingKind;
|
|
341
349
|
reportContext: ReportRuntimeContext;
|
|
350
|
+
resolvedFormats?: ResolvedPresentationEntry[];
|
|
342
351
|
source: BriefingSource;
|
|
343
352
|
body: BriefingBody;
|
|
344
353
|
attachments: BriefingAttachment[];
|
|
@@ -693,7 +702,17 @@ export declare type CancelBriefingRunResponse = {
|
|
|
693
702
|
|
|
694
703
|
declare type CanonicalDurationUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
695
704
|
|
|
696
|
-
export declare type CanonicalFormatSpec = NumericCanonicalFormat | DateCanonicalFormat | DurationCanonicalFormat | StringCanonicalFormat;
|
|
705
|
+
export declare type CanonicalFormatSpec = NumericCanonicalFormat | DateCanonicalFormat | DurationCanonicalFormat | StringCanonicalFormat | TemporalBucketFormat;
|
|
706
|
+
|
|
707
|
+
declare type CanonicalPivotResultContract = {
|
|
708
|
+
version: 1;
|
|
709
|
+
expectedRoleFieldIds: PivotResultExpectedRoleFieldIds;
|
|
710
|
+
expectedMetricAliases: readonly string[];
|
|
711
|
+
columnKinds: Readonly<Record<string, PivotResultColumnKind>>;
|
|
712
|
+
columnClassifications: Readonly<Record<string, PivotResultColumnClassification | undefined>>;
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
declare type CanonicalPivotResultState = 'loaded_empty' | 'loaded_valid';
|
|
697
716
|
|
|
698
717
|
export declare interface CardConfig {
|
|
699
718
|
/**
|
|
@@ -756,9 +775,6 @@ export declare interface CardConfig {
|
|
|
756
775
|
* Configuration for on-click dashboard filters triggered by this card.
|
|
757
776
|
*/
|
|
758
777
|
clickFilterInteractions?: ClickFilterInteraction[];
|
|
759
|
-
showTrendline?: boolean;
|
|
760
|
-
trendlineWindow?: number;
|
|
761
|
-
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
762
778
|
summary?: {
|
|
763
779
|
enabled?: boolean;
|
|
764
780
|
showOnCard?: boolean;
|
|
@@ -815,6 +831,38 @@ declare type ChartAppearance = {
|
|
|
815
831
|
axisColor?: string;
|
|
816
832
|
};
|
|
817
833
|
|
|
834
|
+
declare interface ClickedMetricValue {
|
|
835
|
+
field: Field;
|
|
836
|
+
value: number;
|
|
837
|
+
formattedValue?: string;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
declare interface ClickFilterCondition {
|
|
841
|
+
field: Field;
|
|
842
|
+
operator: Operator;
|
|
843
|
+
value: string | number | null;
|
|
844
|
+
label?: string;
|
|
845
|
+
/** Governed meaning for a canonical grouped-temporal scalar. */
|
|
846
|
+
temporalBucket?: TemporalBucketMetadata;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
declare interface ClickFilterConditionGroup {
|
|
850
|
+
filters: ClickFilterCondition[];
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
declare interface ClickFilterEvent extends BaseInteractionEvent {
|
|
854
|
+
interactionMode: 'clickFilter';
|
|
855
|
+
applyToCardIds?: string[];
|
|
856
|
+
excludeCardIds?: string[];
|
|
857
|
+
/**
|
|
858
|
+
* Whether the source card should receive its own filter.
|
|
859
|
+
* When true, the source card will be filtered (not just blurred).
|
|
860
|
+
* Used when user selects from multiple interactions popup.
|
|
861
|
+
* @default false
|
|
862
|
+
*/
|
|
863
|
+
filterSourceCard?: boolean;
|
|
864
|
+
}
|
|
865
|
+
|
|
818
866
|
declare interface ClickFilterInteraction {
|
|
819
867
|
mode: 'clickFilter';
|
|
820
868
|
/**
|
|
@@ -1095,7 +1143,10 @@ export declare type ControlOption = {
|
|
|
1095
1143
|
label: string;
|
|
1096
1144
|
presentation?: {
|
|
1097
1145
|
granularity?: TimeGranularity;
|
|
1146
|
+
format?: TemporalBucketFormat;
|
|
1147
|
+
/** Saved-dashboard compatibility only. New authoring writes `format`. */
|
|
1098
1148
|
dateFormat?: DateFormatValue;
|
|
1149
|
+
/** Saved-dashboard compatibility only. New authoring writes `format`. */
|
|
1099
1150
|
customFormat?: string;
|
|
1100
1151
|
};
|
|
1101
1152
|
};
|
|
@@ -1131,6 +1182,7 @@ export declare type CreateBriefingRequest = {
|
|
|
1131
1182
|
presentation: BriefingPresentation;
|
|
1132
1183
|
limits?: BriefingLimits;
|
|
1133
1184
|
deliveryConfig: BriefingDeliveryConfig | null;
|
|
1185
|
+
resolvedFormats?: ResolvedPresentationEntry[];
|
|
1134
1186
|
};
|
|
1135
1187
|
|
|
1136
1188
|
export declare type CurrencyPresentationBinding = {
|
|
@@ -1351,6 +1403,11 @@ export declare type DashboardProps = {
|
|
|
1351
1403
|
* inputs instead of documentInputValues.
|
|
1352
1404
|
*/
|
|
1353
1405
|
dashboardInputExecutionSnapshot?: DashboardInputExecutionSnapshot;
|
|
1406
|
+
/**
|
|
1407
|
+
* Runtime interaction state captured for deterministic print/replay entry
|
|
1408
|
+
* points. Ordinary dashboard consumers should leave this unset.
|
|
1409
|
+
*/
|
|
1410
|
+
interactionExecutionSnapshot?: Record<string, InteractionState>;
|
|
1354
1411
|
/**
|
|
1355
1412
|
* Render target for print entry points. Generic dashboard PDF exports also
|
|
1356
1413
|
* use cardDisplay.mode="print"; document-specific print handling must only
|
|
@@ -1719,7 +1776,9 @@ export declare type DocumentVariableRef = {
|
|
|
1719
1776
|
key: 'generatedAt' | 'pageNumber' | 'pageCount';
|
|
1720
1777
|
};
|
|
1721
1778
|
|
|
1722
|
-
export declare
|
|
1779
|
+
export declare type DomainCalculatedDimension = SemanticGroupedTemporalInput<DomainCalculatedDimensionBase>;
|
|
1780
|
+
|
|
1781
|
+
declare type DomainCalculatedDimensionBase = {
|
|
1723
1782
|
name: string;
|
|
1724
1783
|
label: string;
|
|
1725
1784
|
description?: string;
|
|
@@ -1727,7 +1786,7 @@ export declare interface DomainCalculatedDimension {
|
|
|
1727
1786
|
inputs: Record<string, DimensionInputReference>;
|
|
1728
1787
|
dataType?: DataType;
|
|
1729
1788
|
tags?: string[];
|
|
1730
|
-
}
|
|
1789
|
+
};
|
|
1731
1790
|
|
|
1732
1791
|
export declare interface DomainCalculatedMetric {
|
|
1733
1792
|
name: string;
|
|
@@ -1736,12 +1795,49 @@ export declare interface DomainCalculatedMetric {
|
|
|
1736
1795
|
expression: string;
|
|
1737
1796
|
inputs: Record<string, InputReference>;
|
|
1738
1797
|
metricType?: 'base' | 'derived' | 'calculated';
|
|
1739
|
-
format?:
|
|
1798
|
+
format?: ScalarFormatSpec;
|
|
1740
1799
|
tags?: string[];
|
|
1741
1800
|
isCertified?: boolean;
|
|
1742
1801
|
aggregationStrategy?: AggregationStrategy;
|
|
1743
1802
|
}
|
|
1744
1803
|
|
|
1804
|
+
declare interface DrillBreadcrumb {
|
|
1805
|
+
/**
|
|
1806
|
+
* The user clicked one or more segments. Each group of filters represents
|
|
1807
|
+
* a single segment (i.e., a single click interaction).
|
|
1808
|
+
*
|
|
1809
|
+
* - Filters within a group are AND-ed (e.g., state = 'NY' AND ship_mode = 'Standard').
|
|
1810
|
+
* - Across groups, they are OR-ed (e.g., ... OR state = 'CA' AND ship_mode = 'First Class').
|
|
1811
|
+
*/
|
|
1812
|
+
sourceFilterGroups: ClickFilterConditionGroup[];
|
|
1813
|
+
/**
|
|
1814
|
+
* The next (group by) field the user is drilling into (e.g., 'city' after 'state').
|
|
1815
|
+
*/
|
|
1816
|
+
toField?: Field;
|
|
1817
|
+
/**
|
|
1818
|
+
* Optional: If the drill target is a time field, this describes the granularity (e.g., month, year).
|
|
1819
|
+
*/
|
|
1820
|
+
granularity?: TimeGranularity;
|
|
1821
|
+
/**
|
|
1822
|
+
* Optional: Indicates whether the drill is for time comparison (e.g., YoY).
|
|
1823
|
+
*/
|
|
1824
|
+
timeComparison?: TimeComparison;
|
|
1825
|
+
/**
|
|
1826
|
+
* Optional: The metric the user clicked (e.g., '123 Orders'), used for display only.
|
|
1827
|
+
*/
|
|
1828
|
+
metric?: ClickedMetricValue;
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
declare interface DrillDownEvent extends BaseInteractionEvent {
|
|
1832
|
+
interactionMode: 'drillDown';
|
|
1833
|
+
hierarchyId: string;
|
|
1834
|
+
filterGroups: ClickFilterConditionGroup[];
|
|
1835
|
+
metric?: ClickedMetricValue;
|
|
1836
|
+
toField: Field;
|
|
1837
|
+
granularity?: TimeGranularity;
|
|
1838
|
+
timeComparison?: TimeComparison;
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1745
1841
|
declare interface DrillDownInteraction {
|
|
1746
1842
|
mode: 'drillDown';
|
|
1747
1843
|
/**
|
|
@@ -1773,6 +1869,12 @@ declare interface DrillHierarchyStep {
|
|
|
1773
1869
|
linkedInsightId?: string;
|
|
1774
1870
|
}
|
|
1775
1871
|
|
|
1872
|
+
declare interface DrillThroughEvent extends BaseInteractionEvent {
|
|
1873
|
+
interactionMode: 'drillThrough';
|
|
1874
|
+
targetDashboardId: string;
|
|
1875
|
+
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1776
1878
|
declare interface DrillThroughInteraction {
|
|
1777
1879
|
mode: 'drillThrough';
|
|
1778
1880
|
/**
|
|
@@ -1790,6 +1892,17 @@ declare interface DrillThroughInteraction {
|
|
|
1790
1892
|
label?: string;
|
|
1791
1893
|
}
|
|
1792
1894
|
|
|
1895
|
+
declare interface DrillToDetailEvent extends BaseInteractionEvent {
|
|
1896
|
+
interactionMode: 'drillToDetail';
|
|
1897
|
+
detailFields: Field[];
|
|
1898
|
+
sortBy?: SortByField[];
|
|
1899
|
+
limit?: number;
|
|
1900
|
+
detailTitle?: string;
|
|
1901
|
+
targetInsightId?: string;
|
|
1902
|
+
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
1903
|
+
displayMode?: 'modal' | 'replace-card';
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1793
1906
|
declare interface DrillToDetailInteraction {
|
|
1794
1907
|
mode: 'drillToDetail';
|
|
1795
1908
|
/**
|
|
@@ -1819,6 +1932,11 @@ declare interface DrillToDetailInteraction {
|
|
|
1819
1932
|
label?: string;
|
|
1820
1933
|
}
|
|
1821
1934
|
|
|
1935
|
+
declare interface DrillToURLEvent extends BaseInteractionEvent {
|
|
1936
|
+
interactionMode: 'drillToURL';
|
|
1937
|
+
url: string;
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1822
1940
|
declare interface DrillToURLInteraction {
|
|
1823
1941
|
mode: 'drillToURL';
|
|
1824
1942
|
/**
|
|
@@ -1874,6 +1992,15 @@ declare type DurationCanonicalFormat = {
|
|
|
1874
1992
|
negativeStyle?: 'minus' | 'parentheses';
|
|
1875
1993
|
};
|
|
1876
1994
|
|
|
1995
|
+
declare interface DynamicDrillEvent extends BaseInteractionEvent {
|
|
1996
|
+
interactionMode: 'dynamicDrill';
|
|
1997
|
+
filterGroups: ClickFilterConditionGroup[];
|
|
1998
|
+
metric?: ClickedMetricValue;
|
|
1999
|
+
toField: Field;
|
|
2000
|
+
granularity?: TimeGranularity;
|
|
2001
|
+
timeComparison?: TimeComparison;
|
|
2002
|
+
}
|
|
2003
|
+
|
|
1877
2004
|
declare interface DynamicDrillInteraction {
|
|
1878
2005
|
mode: 'dynamicDrill';
|
|
1879
2006
|
/**
|
|
@@ -1929,8 +2056,9 @@ export declare type ExportDataPayload = {
|
|
|
1929
2056
|
|
|
1930
2057
|
export declare interface Field {
|
|
1931
2058
|
/**
|
|
1932
|
-
*
|
|
1933
|
-
*
|
|
2059
|
+
* Stable authored/semantic field identifier (for joins, UI state, etc.).
|
|
2060
|
+
* It is normally unique within a role, but one saved query may reuse it in
|
|
2061
|
+
* different roles; result bindings must therefore include the role.
|
|
1934
2062
|
* Example: 'orders.customer_id', 'expr_12345', etc.
|
|
1935
2063
|
*/
|
|
1936
2064
|
id: string;
|
|
@@ -1972,6 +2100,12 @@ export declare interface Field {
|
|
|
1972
2100
|
*/
|
|
1973
2101
|
derivedField?: SemaphorDerivedFieldDefinition;
|
|
1974
2102
|
format?: FormatSpec;
|
|
2103
|
+
/**
|
|
2104
|
+
* Source-level temporal presentation keeps the semantic grain that authored
|
|
2105
|
+
* the format. The card's mutable `granularity` remains the active query
|
|
2106
|
+
* grain, so changing it cannot accidentally retarget a semantic default.
|
|
2107
|
+
*/
|
|
2108
|
+
semanticTemporalPresentation?: SemanticTemporalPresentation;
|
|
1975
2109
|
aggregate?: AggregateFunction;
|
|
1976
2110
|
fieldScope?: FieldScope;
|
|
1977
2111
|
}
|
|
@@ -2015,6 +2149,10 @@ export declare interface FilterCondition {
|
|
|
2015
2149
|
field: Field;
|
|
2016
2150
|
operator: Operator;
|
|
2017
2151
|
value: FilterValue;
|
|
2152
|
+
/** Display-only label for canonical grouped-temporal values. */
|
|
2153
|
+
label?: string;
|
|
2154
|
+
/** Governed meaning for a canonical grouped-temporal scalar. */
|
|
2155
|
+
temporalBucket?: TemporalBucketMetadata;
|
|
2018
2156
|
}
|
|
2019
2157
|
|
|
2020
2158
|
export declare type FilterDashboardInput = DashboardInputBase & {
|
|
@@ -2189,7 +2327,7 @@ export declare type FormatSpec = {
|
|
|
2189
2327
|
type: 'string';
|
|
2190
2328
|
prefix?: string;
|
|
2191
2329
|
suffix?: string;
|
|
2192
|
-
};
|
|
2330
|
+
} | TemporalBucketFormat;
|
|
2193
2331
|
|
|
2194
2332
|
export declare type GetDashboardResponse = {
|
|
2195
2333
|
dashboard: TDashboard;
|
|
@@ -2220,7 +2358,7 @@ declare type GlobalDateComparisonSelection = {
|
|
|
2220
2358
|
spec: ViewerPeriodComparisonSpec;
|
|
2221
2359
|
};
|
|
2222
2360
|
|
|
2223
|
-
declare type Granularity =
|
|
2361
|
+
declare type Granularity = SemaphorTimeGrain;
|
|
2224
2362
|
|
|
2225
2363
|
declare interface GroupByColumn extends BaseColumn {
|
|
2226
2364
|
role: 'groupby';
|
|
@@ -2231,6 +2369,11 @@ declare interface GroupByColumn extends BaseColumn {
|
|
|
2231
2369
|
export declare interface GroupByField extends Field {
|
|
2232
2370
|
role: 'groupby';
|
|
2233
2371
|
granularity?: TimeGranularity;
|
|
2372
|
+
/**
|
|
2373
|
+
* Query transport policy for grouped temporal values. This is projected
|
|
2374
|
+
* into executable card config and is not persisted authoring state.
|
|
2375
|
+
*/
|
|
2376
|
+
dateValueMode?: 'canonical' | 'formatted';
|
|
2234
2377
|
/**
|
|
2235
2378
|
* Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
|
|
2236
2379
|
* If present, used in SELECT and GROUP BY instead of just the column name.
|
|
@@ -2240,6 +2383,17 @@ export declare interface GroupByField extends Field {
|
|
|
2240
2383
|
calculatedFormula?: CalculatedFieldFormula;
|
|
2241
2384
|
}
|
|
2242
2385
|
|
|
2386
|
+
/**
|
|
2387
|
+
* Authoring boundary for a dashboard field that is known to be grouped by a
|
|
2388
|
+
* temporal grain. The broad persisted field types remain intentionally
|
|
2389
|
+
* compatible with unmigrated/non-temporal fields; new temporal writers use
|
|
2390
|
+
* this boundary instead.
|
|
2391
|
+
*/
|
|
2392
|
+
declare type GroupedTemporalAuthoringInput<TBase extends object> = Omit<TBase, 'granularity' | 'format'> & {
|
|
2393
|
+
granularity: SemaphorTimeGrain;
|
|
2394
|
+
format?: TemporalBucketFormat;
|
|
2395
|
+
};
|
|
2396
|
+
|
|
2243
2397
|
export declare function hasCalculatedFieldMarker(field: Pick<Field, 'entityName' | 'entityId'> | null | undefined): boolean;
|
|
2244
2398
|
|
|
2245
2399
|
export declare function hasCalculatedFormulaInputs(field: Field | null | undefined): boolean;
|
|
@@ -2248,6 +2402,12 @@ export declare type HtmlOptions = {
|
|
|
2248
2402
|
html: string;
|
|
2249
2403
|
};
|
|
2250
2404
|
|
|
2405
|
+
declare interface InlineDrillEvent extends BaseInteractionEvent {
|
|
2406
|
+
interactionMode: 'inlineDrill';
|
|
2407
|
+
fetchMode?: 'lazy' | 'preloaded';
|
|
2408
|
+
inlineLimit?: number;
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2251
2411
|
declare interface InlineDrillInteraction {
|
|
2252
2412
|
mode: 'inlineDrill';
|
|
2253
2413
|
/**
|
|
@@ -2300,6 +2460,60 @@ export declare type InputReference = {
|
|
|
2300
2460
|
*/
|
|
2301
2461
|
declare type Interaction = ClickFilterInteraction | DrillDownInteraction | DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction | DrillUpInteraction | DynamicDrillInteraction;
|
|
2302
2462
|
|
|
2463
|
+
declare type InteractionEvent = DrillDownEvent | DynamicDrillEvent | DrillToURLEvent | DrillThroughEvent | DrillToDetailEvent | InlineDrillEvent | ClickFilterEvent;
|
|
2464
|
+
|
|
2465
|
+
declare interface InteractionState {
|
|
2466
|
+
/**
|
|
2467
|
+
* If user is in a drill hierarchy (static or dynamic), this tracks which one.
|
|
2468
|
+
* Undefined if not currently in a drill path.
|
|
2469
|
+
*/
|
|
2470
|
+
hierarchyId?: string;
|
|
2471
|
+
/**
|
|
2472
|
+
* Breadcrumb trail representing the user's drill path.
|
|
2473
|
+
* Empty if no drill-down steps have occurred.
|
|
2474
|
+
*/
|
|
2475
|
+
breadcrumbs: DrillBreadcrumb[];
|
|
2476
|
+
/**
|
|
2477
|
+
* All click filters applied from this card
|
|
2478
|
+
*/
|
|
2479
|
+
appliedClickFilters?: ClickFilterEvent[];
|
|
2480
|
+
/**
|
|
2481
|
+
* (Optional) Track last one-off interaction (e.g., drillToDetail, drillToURL).
|
|
2482
|
+
* Useful for things like modals or redirection handling.
|
|
2483
|
+
*/
|
|
2484
|
+
lastInteractionEvent?: InteractionEvent;
|
|
2485
|
+
/**
|
|
2486
|
+
* Context mode for drill-to-insight filtering.
|
|
2487
|
+
* Controls whether dashboard filters are applied alongside interaction filters.
|
|
2488
|
+
*
|
|
2489
|
+
* - 'interactionFilters': Only filters from the interaction event (no dashboard filters)
|
|
2490
|
+
* - 'full': Dashboard filters + interaction filters
|
|
2491
|
+
* - 'none': No filters applied
|
|
2492
|
+
*
|
|
2493
|
+
* Undefined for regular cards (not insights).
|
|
2494
|
+
*/
|
|
2495
|
+
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
2496
|
+
/**
|
|
2497
|
+
* Source dashboard ID for drill-through navigation.
|
|
2498
|
+
* Used for "Back" button navigation.
|
|
2499
|
+
* Only set for global drill context (interactionStates['__DRILL_CONTEXT__']).
|
|
2500
|
+
*/
|
|
2501
|
+
sourceDashboardId?: string;
|
|
2502
|
+
/**
|
|
2503
|
+
* Source dashboard title for drill-through navigation.
|
|
2504
|
+
* Used for "Back to [X]" UI display.
|
|
2505
|
+
* Only set for global drill context (interactionStates['__DRILL_CONTEXT__']).
|
|
2506
|
+
*/
|
|
2507
|
+
sourceDashboardTitle?: string;
|
|
2508
|
+
/**
|
|
2509
|
+
* Target dashboard ID for drill-through navigation.
|
|
2510
|
+
* Filters only apply when current dashboard matches this ID.
|
|
2511
|
+
* Prevents filters from applying to source dashboard during navigation.
|
|
2512
|
+
* Only set for global drill context (interactionStates['__DRILL_CONTEXT__']).
|
|
2513
|
+
*/
|
|
2514
|
+
targetDashboardId?: string;
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2303
2517
|
declare interface InteractionTargetOverride {
|
|
2304
2518
|
applyToCardIds?: string[] | null;
|
|
2305
2519
|
excludeCardIds?: string[] | null;
|
|
@@ -2439,7 +2653,7 @@ declare type MatrixAxisLevelDescriptor = {
|
|
|
2439
2653
|
fieldKey: string;
|
|
2440
2654
|
label: string;
|
|
2441
2655
|
field: SemaphorFieldRef;
|
|
2442
|
-
grain?:
|
|
2656
|
+
grain?: SemaphorMatrixTimeGrain;
|
|
2443
2657
|
subtotal?: SemaphorMatrixSubtotalOptions;
|
|
2444
2658
|
};
|
|
2445
2659
|
|
|
@@ -2554,7 +2768,7 @@ declare type MatrixMeasureDescriptor = {
|
|
|
2554
2768
|
label: string;
|
|
2555
2769
|
field: SemaphorFieldRef;
|
|
2556
2770
|
aggregate?: SemaphorAggregateFunction;
|
|
2557
|
-
format?:
|
|
2771
|
+
format?: SemaphorScalarValueFormat;
|
|
2558
2772
|
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
2559
2773
|
};
|
|
2560
2774
|
|
|
@@ -2568,7 +2782,7 @@ declare type MatrixMeasureSemantics = {
|
|
|
2568
2782
|
} | {
|
|
2569
2783
|
kind: 'semiAdditive';
|
|
2570
2784
|
aggregate?: SemaphorAggregateFunction;
|
|
2571
|
-
grain?:
|
|
2785
|
+
grain?: SemaphorMatrixTimeGrain;
|
|
2572
2786
|
} | {
|
|
2573
2787
|
kind: 'nonAdditive';
|
|
2574
2788
|
aggregate?: SemaphorAggregateFunction;
|
|
@@ -2762,15 +2976,6 @@ export declare type NumberOptions = {
|
|
|
2762
2976
|
colorRanges?: ColorRange[];
|
|
2763
2977
|
};
|
|
2764
2978
|
|
|
2765
|
-
/**
|
|
2766
|
-
* Shared format types for export system
|
|
2767
|
-
* IMPORTANT: No React imports allowed in this file
|
|
2768
|
-
*
|
|
2769
|
-
* These types are used by:
|
|
2770
|
-
* - react-semaphor (browser) for client-side exports
|
|
2771
|
-
* - semaphor-app (Next.js) for API routes
|
|
2772
|
-
* - Lambda (Node.js) for async export processing
|
|
2773
|
-
*/
|
|
2774
2979
|
declare type NumericCanonicalFormat = {
|
|
2775
2980
|
type: 'number' | 'currency' | 'percent' | 'scientific';
|
|
2776
2981
|
locale?: string;
|
|
@@ -2786,6 +2991,17 @@ declare type NumericCanonicalFormat = {
|
|
|
2786
2991
|
percentValueMode?: 'fraction' | 'whole';
|
|
2787
2992
|
};
|
|
2788
2993
|
|
|
2994
|
+
declare type NumericPresentationTarget = {
|
|
2995
|
+
kind: 'metric';
|
|
2996
|
+
metricId: string;
|
|
2997
|
+
} | {
|
|
2998
|
+
kind: 'column';
|
|
2999
|
+
columnKey: string;
|
|
3000
|
+
} | {
|
|
3001
|
+
kind: 'matrix_measure';
|
|
3002
|
+
measureId: string;
|
|
3003
|
+
};
|
|
3004
|
+
|
|
2789
3005
|
declare type OldFilterValue = string | number | null | (string | number)[] | RangeValue;
|
|
2790
3006
|
|
|
2791
3007
|
export declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
@@ -2841,6 +3057,11 @@ declare type PersistedInteraction = Interaction & {
|
|
|
2841
3057
|
|
|
2842
3058
|
export declare interface PivotByField extends Field {
|
|
2843
3059
|
role: 'pivotby';
|
|
3060
|
+
/**
|
|
3061
|
+
* Query transport policy for grouped temporal pivot members. This is
|
|
3062
|
+
* projected into executable config and is never persisted authoring state.
|
|
3063
|
+
*/
|
|
3064
|
+
dateValueMode?: 'canonical' | 'formatted';
|
|
2844
3065
|
}
|
|
2845
3066
|
|
|
2846
3067
|
export declare interface PivotColumnSchema {
|
|
@@ -2849,7 +3070,8 @@ export declare interface PivotColumnSchema {
|
|
|
2849
3070
|
metricId: string;
|
|
2850
3071
|
metricName: string;
|
|
2851
3072
|
metricLabel?: string;
|
|
2852
|
-
pivotValues:
|
|
3073
|
+
pivotValues: SemaphorPivotValue[];
|
|
3074
|
+
pivotFieldIds?: string[];
|
|
2853
3075
|
pivotFields?: string[];
|
|
2854
3076
|
displayLabel?: string;
|
|
2855
3077
|
isPivotColumn?: boolean;
|
|
@@ -2883,6 +3105,15 @@ export declare enum PivotMarkerEnum {
|
|
|
2883
3105
|
ALL = "__ALL__"
|
|
2884
3106
|
}
|
|
2885
3107
|
|
|
3108
|
+
declare type PivotResultColumnClassification = {
|
|
3109
|
+
isSubtotal?: boolean;
|
|
3110
|
+
subtotalScope?: 'base' | 'pivot-value' | 'grand-total';
|
|
3111
|
+
};
|
|
3112
|
+
|
|
3113
|
+
declare type PivotResultColumnKind = 'row' | 'pivot_metric' | 'value';
|
|
3114
|
+
|
|
3115
|
+
declare type PivotResultExpectedRoleFieldIds = Readonly<Partial<Record<QueryColumnKeyRole, readonly string[]>>>;
|
|
3116
|
+
|
|
2886
3117
|
export declare type Placeholders = {
|
|
2887
3118
|
/**
|
|
2888
3119
|
* Placeholder for the card when there are no records to display.
|
|
@@ -2896,16 +3127,27 @@ export declare type Placeholders = {
|
|
|
2896
3127
|
|
|
2897
3128
|
export declare type PluginType = 'custom' | 'standard';
|
|
2898
3129
|
|
|
3130
|
+
declare type PresentationScope = {
|
|
3131
|
+
dashboardId: string;
|
|
3132
|
+
cardId?: string;
|
|
3133
|
+
attachmentIndex?: number;
|
|
3134
|
+
};
|
|
3135
|
+
|
|
2899
3136
|
export declare type PreviewBriefingPlanResponse = {
|
|
2900
3137
|
plan: BriefingPreviewPlan;
|
|
2901
3138
|
};
|
|
2902
3139
|
|
|
2903
|
-
export declare
|
|
3140
|
+
export declare type QueryColumnKeyMap = QueryColumnKeyMap_2;
|
|
3141
|
+
|
|
3142
|
+
declare interface QueryColumnKeyMap_2 {
|
|
2904
3143
|
version: 1;
|
|
2905
3144
|
source: 'explorer';
|
|
2906
|
-
|
|
3145
|
+
byRole: QueryColumnKeyMapByRole;
|
|
3146
|
+
byMetricAlias?: Record<string, QueryColumnKeyMapEntry>;
|
|
2907
3147
|
}
|
|
2908
3148
|
|
|
3149
|
+
export declare type QueryColumnKeyMapByRole = Partial<Record<QueryColumnKeyRole, Record<string, QueryColumnKeyMapEntry>>>;
|
|
3150
|
+
|
|
2909
3151
|
export declare interface QueryColumnKeyMapEntry {
|
|
2910
3152
|
role: QueryColumnKeyRole;
|
|
2911
3153
|
rawKey: string;
|
|
@@ -2929,6 +3171,11 @@ declare interface QueryConfig {
|
|
|
2929
3171
|
*/
|
|
2930
3172
|
export declare interface QueryExecutionResponse {
|
|
2931
3173
|
records: any[];
|
|
3174
|
+
/** Execution owner captured with these exact result rows. */
|
|
3175
|
+
resultOwner?: TemporalResultOwner;
|
|
3176
|
+
pivotResultState?: CanonicalPivotResultState;
|
|
3177
|
+
pivotResultContract?: CanonicalPivotResultContract;
|
|
3178
|
+
columns?: SemaphorResultColumn[];
|
|
2932
3179
|
output: string;
|
|
2933
3180
|
rowLimitExceeded: boolean;
|
|
2934
3181
|
sql?: string;
|
|
@@ -3060,7 +3307,23 @@ export declare type ResolvedDocumentInput = {
|
|
|
3060
3307
|
exports: Record<string, string | number | boolean | null>;
|
|
3061
3308
|
};
|
|
3062
3309
|
|
|
3063
|
-
declare type
|
|
3310
|
+
declare type ResolvedNumericPresentationEntry = {
|
|
3311
|
+
scope: PresentationScope;
|
|
3312
|
+
target: NumericPresentationTarget;
|
|
3313
|
+
format: NumericCanonicalFormat;
|
|
3314
|
+
};
|
|
3315
|
+
|
|
3316
|
+
declare type ResolvedPresentationEntry = ResolvedNumericPresentationEntry | ResolvedTemporalBucketPresentationEntry;
|
|
3317
|
+
|
|
3318
|
+
declare type ResolvedPrimaryDateField = (ResolvedPrimaryDateFieldBase & ({
|
|
3319
|
+
defaultGranularity?: SemaphorTimeGrain;
|
|
3320
|
+
format?: undefined;
|
|
3321
|
+
} | {
|
|
3322
|
+
defaultGranularity: SemaphorTimeGrain;
|
|
3323
|
+
format: TemporalBucketFormat;
|
|
3324
|
+
})) | null;
|
|
3325
|
+
|
|
3326
|
+
declare type ResolvedPrimaryDateFieldBase = {
|
|
3064
3327
|
sourceDataset: string;
|
|
3065
3328
|
sourceField: string;
|
|
3066
3329
|
name: string;
|
|
@@ -3070,13 +3333,20 @@ declare type ResolvedPrimaryDateField = {
|
|
|
3070
3333
|
entityName: string;
|
|
3071
3334
|
entityType: string;
|
|
3072
3335
|
dataType: string;
|
|
3073
|
-
/** Canonical dataset coordinates stamped by the
|
|
3336
|
+
/** Canonical dataset coordinates stamped by the semantic grounding boundary. */
|
|
3074
3337
|
source?: SemaphorSourceRef;
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3338
|
+
supportedGranularities?: SemaphorTimeGrain[];
|
|
3339
|
+
};
|
|
3340
|
+
|
|
3341
|
+
declare type ResolvedTemporalBucketFormat = TemporalBucketFormat & {
|
|
3342
|
+
locale: string;
|
|
3343
|
+
};
|
|
3344
|
+
|
|
3345
|
+
declare type ResolvedTemporalBucketPresentationEntry = {
|
|
3346
|
+
scope: PresentationScope;
|
|
3347
|
+
target: TemporalBucketPresentationTarget;
|
|
3348
|
+
format: ResolvedTemporalBucketFormat;
|
|
3349
|
+
};
|
|
3080
3350
|
|
|
3081
3351
|
declare type ResolvedValueFormatPreferences = {
|
|
3082
3352
|
locale: string;
|
|
@@ -3098,6 +3368,10 @@ declare type ResolvedValueFormatPreferenceSources = {
|
|
|
3098
3368
|
defaultCurrency: ReportPreferenceSource;
|
|
3099
3369
|
};
|
|
3100
3370
|
|
|
3371
|
+
export declare function resolveQueryColumnKeyMapEntry(columnKeyMap: QueryColumnKeyMap_2 | undefined, fieldId: string, role: QueryColumnKeyRole): QueryColumnKeyMapEntry | undefined;
|
|
3372
|
+
|
|
3373
|
+
export declare function resolveUniqueQueryColumnKeyMapEntry(columnKeyMap: QueryColumnKeyMap_2 | undefined, fieldId: string): QueryColumnKeyMapEntry | undefined;
|
|
3374
|
+
|
|
3101
3375
|
export declare type RunBriefingNowRequest = {
|
|
3102
3376
|
requestId: string;
|
|
3103
3377
|
};
|
|
@@ -3121,6 +3395,8 @@ export declare type RunBriefingPreviewResponse = {
|
|
|
3121
3395
|
dispatch: BriefingDispatchResult | null;
|
|
3122
3396
|
};
|
|
3123
3397
|
|
|
3398
|
+
export declare type ScalarFormatSpec = Exclude<FormatSpec, TemporalBucketFormat>;
|
|
3399
|
+
|
|
3124
3400
|
export declare type SelectedEntities = SelectedEntity[];
|
|
3125
3401
|
|
|
3126
3402
|
export declare type SelectedEntity = DatabaseEntityReference | DataModelEntityReference | DatasetEntityReference | FileEntityReference;
|
|
@@ -3155,6 +3431,24 @@ declare type SemanticExecutionPayload = {
|
|
|
3155
3431
|
}>;
|
|
3156
3432
|
};
|
|
3157
3433
|
|
|
3434
|
+
/**
|
|
3435
|
+
* Semantic temporal input permits total omission, but a format can only exist
|
|
3436
|
+
* in the branch that declares its grain.
|
|
3437
|
+
*/
|
|
3438
|
+
declare type SemanticGroupedTemporalInput<TBase extends object> = (Omit<TBase, 'granularity' | 'format'> & {
|
|
3439
|
+
granularity?: undefined;
|
|
3440
|
+
format?: undefined;
|
|
3441
|
+
}) | GroupedTemporalAuthoringInput<TBase>;
|
|
3442
|
+
|
|
3443
|
+
export declare type SemanticTemporalPresentation = {
|
|
3444
|
+
granularity: SemaphorTimeGrain;
|
|
3445
|
+
format: TemporalBucketFormat;
|
|
3446
|
+
};
|
|
3447
|
+
|
|
3448
|
+
declare const SEMAPHOR_MATRIX_TIME_GRAINS: ["hour", "day", "week", "month", "quarter", "year"];
|
|
3449
|
+
|
|
3450
|
+
declare const SEMAPHOR_TIME_GRAINS: readonly ["second", "minute", "hour", "day", "week", "month", "quarter", "year"];
|
|
3451
|
+
|
|
3158
3452
|
declare type SemaphorAggregateFunction = 'SUM' | 'COUNT' | 'AVG' | 'MIN' | 'MAX' | 'MEDIAN' | 'DISTINCT';
|
|
3159
3453
|
|
|
3160
3454
|
declare type SemaphorAnalyticsFilter = SemaphorAnalyticsValueFilter | SemaphorAnalyticsNullFilter;
|
|
@@ -3218,7 +3512,7 @@ declare type SemaphorDerivedFieldDefinition = {
|
|
|
3218
3512
|
defaultAggregate?: SemaphorAggregateFunction;
|
|
3219
3513
|
aggregationBehavior?: SemaphorDerivedFieldAggregationBehavior;
|
|
3220
3514
|
aggregationStrategy?: SemaphorDerivedFieldAggregationStrategy;
|
|
3221
|
-
format?:
|
|
3515
|
+
format?: SemaphorScalarValueFormat;
|
|
3222
3516
|
tags?: string[];
|
|
3223
3517
|
};
|
|
3224
3518
|
|
|
@@ -3269,7 +3563,7 @@ declare type SemaphorMatrixAxisExpansionOptions = {
|
|
|
3269
3563
|
declare type SemaphorMatrixAxisLevel = {
|
|
3270
3564
|
id?: string;
|
|
3271
3565
|
field: SemaphorFieldRef;
|
|
3272
|
-
grain?:
|
|
3566
|
+
grain?: SemaphorMatrixTimeGrain;
|
|
3273
3567
|
label?: string;
|
|
3274
3568
|
subtotal?: boolean | SemaphorMatrixSubtotalOptions;
|
|
3275
3569
|
sortBy?: SemaphorMatrixAxisSortRule;
|
|
@@ -3385,6 +3679,8 @@ declare type SemaphorMatrixSubtotalOptions = {
|
|
|
3385
3679
|
label?: string;
|
|
3386
3680
|
};
|
|
3387
3681
|
|
|
3682
|
+
declare type SemaphorMatrixTimeGrain = (typeof SEMAPHOR_MATRIX_TIME_GRAINS)[number];
|
|
3683
|
+
|
|
3388
3684
|
declare type SemaphorMatrixTotalCalculation = {
|
|
3389
3685
|
kind: 'defaultAggregate';
|
|
3390
3686
|
} | {
|
|
@@ -3420,7 +3716,7 @@ declare type SemaphorMatrixValueField = {
|
|
|
3420
3716
|
field: SemaphorFieldRef;
|
|
3421
3717
|
aggregate?: SemaphorAggregateFunction;
|
|
3422
3718
|
label?: string;
|
|
3423
|
-
format?:
|
|
3719
|
+
format?: SemaphorScalarValueFormat;
|
|
3424
3720
|
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
3425
3721
|
};
|
|
3426
3722
|
|
|
@@ -3433,6 +3729,30 @@ declare type SemaphorPaginationMetadata = {
|
|
|
3433
3729
|
hasPrevPage: boolean;
|
|
3434
3730
|
};
|
|
3435
3731
|
|
|
3732
|
+
declare type SemaphorPivotResultColumnIdentity = {
|
|
3733
|
+
metricId: string;
|
|
3734
|
+
/** Collision-safe identity for this configured metric instance. */
|
|
3735
|
+
metricAlias: string;
|
|
3736
|
+
/**
|
|
3737
|
+
* Sole transported tuple identity in configured pivot-axis order. A leaf
|
|
3738
|
+
* carries the complete tuple, a subtotal carries its explicit prefix, and a
|
|
3739
|
+
* metric-only or grand-total column carries an empty tuple.
|
|
3740
|
+
*/
|
|
3741
|
+
members: SemaphorPivotResultMember[];
|
|
3742
|
+
};
|
|
3743
|
+
|
|
3744
|
+
declare type SemaphorPivotResultMember = {
|
|
3745
|
+
/** Stable identity of the configured pivot field. */
|
|
3746
|
+
fieldId: string;
|
|
3747
|
+
/** Canonical pivot member value; labels are resolved only at presentation. */
|
|
3748
|
+
value: SemaphorPivotValue;
|
|
3749
|
+
/** Present when this member is an activated governed temporal bucket. */
|
|
3750
|
+
temporalBucket?: TemporalBucketMetadata;
|
|
3751
|
+
};
|
|
3752
|
+
|
|
3753
|
+
/** Stable canonical scalar transported for one physical pivot member. */
|
|
3754
|
+
declare type SemaphorPivotValue = string | null;
|
|
3755
|
+
|
|
3436
3756
|
declare type SemaphorProtocolVersion = 1;
|
|
3437
3757
|
|
|
3438
3758
|
declare type SemaphorQueryPath = 'query_spec' | 'sql' | 'sql_python';
|
|
@@ -3441,36 +3761,30 @@ declare type SemaphorRelationshipHint = {
|
|
|
3441
3761
|
relationshipIds?: string[];
|
|
3442
3762
|
};
|
|
3443
3763
|
|
|
3444
|
-
declare type
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
kind: 'sql';
|
|
3466
|
-
connectionId: string;
|
|
3467
|
-
dialect?: SemaphorDialect;
|
|
3468
|
-
label?: string;
|
|
3764
|
+
declare type SemaphorResultColumn = {
|
|
3765
|
+
/**
|
|
3766
|
+
* Stable row accessor for this result. Consumers should read values with
|
|
3767
|
+
* `row[column.key]`; labels are display-only and may change.
|
|
3768
|
+
*/
|
|
3769
|
+
key: string;
|
|
3770
|
+
/**
|
|
3771
|
+
* Semantic/source field name before result-key disambiguation.
|
|
3772
|
+
*/
|
|
3773
|
+
name: string;
|
|
3774
|
+
/**
|
|
3775
|
+
* Human-facing display label.
|
|
3776
|
+
*/
|
|
3777
|
+
label: string;
|
|
3778
|
+
role?: SemaphorFieldRef['role'];
|
|
3779
|
+
dataType?: SemaphorFieldRef['dataType'];
|
|
3780
|
+
aggregate?: SemaphorFieldRef['aggregate'];
|
|
3781
|
+
source?: SemaphorFieldRef['source'];
|
|
3782
|
+
derivedField?: SemaphorDerivedFieldDefinition;
|
|
3783
|
+
temporalBucket?: TemporalBucketMetadata;
|
|
3784
|
+
pivotIdentity?: SemaphorPivotResultColumnIdentity;
|
|
3469
3785
|
};
|
|
3470
3786
|
|
|
3471
|
-
declare type
|
|
3472
|
-
|
|
3473
|
-
declare type SemaphorValueFormat = {
|
|
3787
|
+
declare type SemaphorScalarValueFormat = {
|
|
3474
3788
|
type: 'number' | 'currency' | 'percent' | 'percentage' | 'scientific';
|
|
3475
3789
|
minimumFractionDigits?: number;
|
|
3476
3790
|
maximumFractionDigits?: number;
|
|
@@ -3507,6 +3821,35 @@ declare type SemaphorValueFormat = {
|
|
|
3507
3821
|
suffix?: string;
|
|
3508
3822
|
};
|
|
3509
3823
|
|
|
3824
|
+
declare type SemaphorSemanticSourceRef = Extract<SemaphorSourceRef, {
|
|
3825
|
+
kind: 'semantic';
|
|
3826
|
+
}>;
|
|
3827
|
+
|
|
3828
|
+
declare type SemaphorSourceRef = {
|
|
3829
|
+
kind: 'semantic';
|
|
3830
|
+
domainId: string;
|
|
3831
|
+
datasetName: string;
|
|
3832
|
+
datasetId?: string;
|
|
3833
|
+
label?: string;
|
|
3834
|
+
connectionId?: string;
|
|
3835
|
+
} | {
|
|
3836
|
+
kind: 'physical';
|
|
3837
|
+
connectionId: string;
|
|
3838
|
+
connectionType?: string;
|
|
3839
|
+
tableName: string;
|
|
3840
|
+
databaseName?: string;
|
|
3841
|
+
schemaName?: string;
|
|
3842
|
+
label?: string;
|
|
3843
|
+
dialect?: SemaphorDialect;
|
|
3844
|
+
} | {
|
|
3845
|
+
kind: 'sql';
|
|
3846
|
+
connectionId: string;
|
|
3847
|
+
dialect?: SemaphorDialect;
|
|
3848
|
+
label?: string;
|
|
3849
|
+
};
|
|
3850
|
+
|
|
3851
|
+
declare type SemaphorTimeGrain = (typeof SEMAPHOR_TIME_GRAINS)[number];
|
|
3852
|
+
|
|
3510
3853
|
export declare interface SortByField extends Field {
|
|
3511
3854
|
role: 'sortby';
|
|
3512
3855
|
direction: 'asc' | 'desc';
|
|
@@ -4139,6 +4482,7 @@ export declare type TDataColumn = {
|
|
|
4139
4482
|
calculatedFormula?: CalculatedFieldFormula;
|
|
4140
4483
|
derivedField?: SemaphorDerivedFieldDefinition;
|
|
4141
4484
|
format?: FormatSpec;
|
|
4485
|
+
granularity?: TimeGranularity;
|
|
4142
4486
|
sourceField?: string;
|
|
4143
4487
|
aggregate?: AggregateFunction;
|
|
4144
4488
|
};
|
|
@@ -4241,8 +4585,48 @@ export declare type TDynamicVisualIntent = {
|
|
|
4241
4585
|
includesKpis: boolean;
|
|
4242
4586
|
};
|
|
4243
4587
|
|
|
4588
|
+
declare const TEMPORAL_BUCKET_PRESETS: readonly ["week_of_short", "week_of_long", "quarter_short", "quarter_long", "fiscal_quarter_short", "fiscal_year"];
|
|
4589
|
+
|
|
4590
|
+
declare type TemporalBucketFormat = {
|
|
4591
|
+
type: 'temporal_bucket';
|
|
4592
|
+
presentation: TemporalBucketPresentation;
|
|
4593
|
+
};
|
|
4594
|
+
|
|
4595
|
+
declare type TemporalBucketMetadata = {
|
|
4596
|
+
kind: 'temporal_bucket';
|
|
4597
|
+
granularity: SemaphorTimeGrain;
|
|
4598
|
+
calendar: Pick<CalendarContext, 'tz' | 'weekStart' | 'fiscalCalendar'>;
|
|
4599
|
+
};
|
|
4600
|
+
|
|
4601
|
+
declare type TemporalBucketPresentation = {
|
|
4602
|
+
mode: 'auto';
|
|
4603
|
+
} | {
|
|
4604
|
+
mode: 'preset';
|
|
4605
|
+
preset: TemporalBucketPreset;
|
|
4606
|
+
} | {
|
|
4607
|
+
mode: 'pattern';
|
|
4608
|
+
pattern: string;
|
|
4609
|
+
};
|
|
4610
|
+
|
|
4611
|
+
declare type TemporalBucketPresentationTarget = {
|
|
4612
|
+
kind: 'field';
|
|
4613
|
+
fieldId: string;
|
|
4614
|
+
/** Distinguishes one semantic field used on both pivot axes. */
|
|
4615
|
+
role?: 'groupby' | 'pivotby';
|
|
4616
|
+
} | {
|
|
4617
|
+
kind: 'column';
|
|
4618
|
+
columnKey: string;
|
|
4619
|
+
} | {
|
|
4620
|
+
kind: 'matrix_axis';
|
|
4621
|
+
axisInstanceId: string;
|
|
4622
|
+
};
|
|
4623
|
+
|
|
4624
|
+
declare type TemporalBucketPreset = (typeof TEMPORAL_BUCKET_PRESETS)[number];
|
|
4625
|
+
|
|
4244
4626
|
declare type TemporalPrecision = 'minute';
|
|
4245
4627
|
|
|
4628
|
+
declare type TemporalResultOwner = 'config' | 'freeform' | 'none';
|
|
4629
|
+
|
|
4246
4630
|
export declare type TEvent = {
|
|
4247
4631
|
type: 'success' | 'error' | 'info' | 'warning';
|
|
4248
4632
|
message: any;
|
|
@@ -4428,6 +4812,12 @@ export declare type THeatmapConfig = {
|
|
|
4428
4812
|
|
|
4429
4813
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
4430
4814
|
|
|
4815
|
+
declare interface TimeComparison {
|
|
4816
|
+
type: 'previous_year' | 'previous_period';
|
|
4817
|
+
offset: number;
|
|
4818
|
+
granularity: TimeGranularity;
|
|
4819
|
+
}
|
|
4820
|
+
|
|
4431
4821
|
declare interface TimeDrillStep {
|
|
4432
4822
|
granularity: TimeGranularity;
|
|
4433
4823
|
next?: TimeGranularity;
|
|
@@ -4435,7 +4825,7 @@ declare interface TimeDrillStep {
|
|
|
4435
4825
|
rollingWindow?: number;
|
|
4436
4826
|
}
|
|
4437
4827
|
|
|
4438
|
-
export declare type TimeGranularity =
|
|
4828
|
+
export declare type TimeGranularity = SemaphorTimeGrain;
|
|
4439
4829
|
|
|
4440
4830
|
/**
|
|
4441
4831
|
* Inline filter definition stored on a card.
|