react-semaphor 0.1.444 → 0.1.446

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.
Files changed (136) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/analytics-protocol/index.cjs +1 -1
  3. package/dist/analytics-protocol/index.js +123 -107
  4. package/dist/appearance/index.cjs +1 -1
  5. package/dist/brand-studio/index.cjs +2 -2
  6. package/dist/brand-studio/index.js +5 -4
  7. package/dist/briefings/index.cjs +1 -1
  8. package/dist/briefings/index.js +526 -457
  9. package/dist/chunks/analyze-result-contract-BHb7sUUW.cjs +1 -0
  10. package/dist/chunks/analyze-result-contract-DUv3QnMl.js +29 -0
  11. package/dist/chunks/{braces-CbO-aIwH.js → braces-BKimshER.cjs} +1 -1
  12. package/dist/chunks/{code-editor-BpADiIlq.js → code-editor-B4gTfvc5.js} +6800 -6560
  13. package/dist/chunks/code-editor-BYVorgOf.cjs +138 -0
  14. package/dist/chunks/common-types-CQ6SHfLk.cjs +1 -0
  15. package/dist/chunks/{common-types-ClkOI-3O.js → common-types-DFsDdpH7.js} +22 -21
  16. package/dist/chunks/dashboard-DGX9b3T-.cjs +1402 -0
  17. package/dist/chunks/{dashboard-CJNVq8XI.js → dashboard-ECv6p6DC.js} +50511 -47720
  18. package/dist/chunks/{dashboard-briefing-launcher-Bg_SeBV8.js → dashboard-briefing-launcher-BpWq3shh.js} +190 -187
  19. package/dist/chunks/dashboard-briefing-launcher-C2kEWFgy.cjs +26 -0
  20. package/dist/chunks/{dashboard-controls-CYBi_mes.js → dashboard-controls-DNoMwxMy.cjs} +2 -2
  21. package/dist/chunks/{dashboard-controls-Da9MkPaf.js → dashboard-controls-DPLepxZy.js} +14 -13
  22. package/dist/chunks/dashboard-date-comparison-definition-DZq0htjG.cjs +1 -0
  23. package/dist/chunks/{dashboard-json-BtrdGo1U.js → dashboard-json-0Etvlp57.js} +14 -12
  24. package/dist/chunks/dashboard-json-4LbKuMSm.cjs +1 -0
  25. package/dist/chunks/{edit-dashboard-visual-kE6_3R3j.js → edit-dashboard-visual-0uKSZPPa.js} +8302 -8123
  26. package/dist/chunks/edit-dashboard-visual-C1uVqhI5.cjs +182 -0
  27. package/dist/chunks/{editor-action-buttons-8_CQa8Hb.js → editor-action-buttons-DKXO5aK7.cjs} +1 -1
  28. package/dist/chunks/{editor-action-buttons-DROkx4PS.js → editor-action-buttons-DpA5PdEo.js} +24 -23
  29. package/dist/chunks/{index-D7KJindZ.js → format-types-CSv0V7mm.cjs} +1 -1
  30. package/dist/chunks/{index-CnujJ3fa.js → format-types-CZH5w1lo.js} +23 -17
  31. package/dist/chunks/{layout-grid-B08pP7v6.js → layout-grid-3-HWzEwU.cjs} +1 -1
  32. package/dist/chunks/{metric-comparison-CPoDx56y.js → metric-comparison-BJ_Qu1ZF.js} +1 -1
  33. package/dist/chunks/metric-comparison-CUAJ8n4y.cjs +1 -0
  34. package/dist/chunks/mouse-pointer-2-BOL92ext.cjs +6 -0
  35. package/dist/chunks/mouse-pointer-2-DXNw3_3o.js +19 -0
  36. package/dist/chunks/{palette-C0yjT5Tv.js → palette-DW_l7Jr0.cjs} +1 -1
  37. package/dist/chunks/pivot-result-identity-B6QCWOSi.js +94 -0
  38. package/dist/chunks/pivot-result-identity-CDLRT-YG.cjs +1 -0
  39. package/dist/chunks/pivot-result-lifecycle-BM3Pl-D1.js +914 -0
  40. package/dist/chunks/pivot-result-lifecycle-DPc0ANwk.cjs +4 -0
  41. package/dist/chunks/presentation-execution-BTV-Q43g.cjs +1 -0
  42. package/dist/chunks/presentation-execution-CGlb7YZ6.js +637 -0
  43. package/dist/chunks/report-preferences-dialog-CBMox_qt.cjs +1 -0
  44. package/dist/chunks/{report-preferences-dialog-Dq7rmN93.js → report-preferences-dialog-CkZ2KHWX.js} +7 -6
  45. package/dist/chunks/report-runtime-context-C8LZFsqV.cjs +1 -0
  46. package/dist/chunks/report-runtime-context-Qzn11HQe.js +387 -0
  47. package/dist/chunks/{save-Xdc4pnys.js → save-4_uMnE6s.cjs} +1 -1
  48. package/dist/chunks/{search-Dcud9ajy.js → search-6ZmeMq55.cjs} +1 -1
  49. package/dist/chunks/temporal-bucket-BnPxGrAi.js +446 -0
  50. package/dist/chunks/temporal-bucket-authoring-BUZMuVca.js +205 -0
  51. package/dist/chunks/temporal-bucket-authoring-CPTwHzvs.cjs +1 -0
  52. package/dist/chunks/temporal-bucket-contract-B2bJ1oe4.js +108 -0
  53. package/dist/chunks/temporal-bucket-contract-ChDBWX8I.cjs +1 -0
  54. package/dist/chunks/temporal-bucket-pMnV-4Nj.cjs +1 -0
  55. package/dist/chunks/{comparison-document-migration-Dj6xZMCb.js → temporal-result-owner-Cb27SSG9.js} +152 -123
  56. package/dist/chunks/temporal-result-owner-f6-i65Fb.cjs +1 -0
  57. package/dist/chunks/token-types-BdQ8kHBm.cjs +1 -0
  58. package/dist/chunks/token-types-DLo91nOf.js +8 -0
  59. package/dist/chunks/{update-policy-DnF_74zC.js → update-policy-BxvYMYz0.cjs} +1 -1
  60. package/dist/chunks/{update-policy-De2NswtM.js → update-policy-eg59mQqv.js} +1 -1
  61. package/dist/chunks/validators-9D4KBqKD.cjs +1 -0
  62. package/dist/chunks/validators-wZ2WlNHc.js +4640 -0
  63. package/dist/dashboard/index.cjs +1 -1
  64. package/dist/dashboard/index.js +2 -2
  65. package/dist/dashboard-authoring/index.cjs +3 -3
  66. package/dist/dashboard-authoring/index.js +136 -126
  67. package/dist/data-app-builder/index.cjs +13 -18
  68. package/dist/data-app-builder/index.js +91 -105
  69. package/dist/data-app-codegen/index.cjs +1 -1
  70. package/dist/data-app-codegen/index.js +2 -2
  71. package/dist/data-app-codegen-node/index.cjs +1 -1
  72. package/dist/data-app-codegen-node/index.js +3 -3
  73. package/dist/data-app-sdk/index.cjs +2 -2
  74. package/dist/data-app-sdk/index.js +34 -35
  75. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  76. package/dist/data-app-sdk-adapters/index.js +5 -5
  77. package/dist/data-app-sdk-validation/index.cjs +1 -1
  78. package/dist/data-app-sdk-validation/index.js +9 -10
  79. package/dist/format-utils/index.cjs +3 -3
  80. package/dist/format-utils/index.js +155 -176
  81. package/dist/index.cjs +1 -1
  82. package/dist/index.js +180 -174
  83. package/dist/report-runtime-context/index.cjs +1 -1
  84. package/dist/report-runtime-context/index.js +7 -392
  85. package/dist/shared/index.cjs +1 -1
  86. package/dist/style.css +1 -1
  87. package/dist/surfboard/index.cjs +1 -1
  88. package/dist/surfboard/index.js +3 -3
  89. package/dist/types/analytics-protocol.d.ts +257 -48
  90. package/dist/types/briefings.d.ts +138 -50
  91. package/dist/types/dashboard-assistant.d.ts +207 -52
  92. package/dist/types/dashboard-authoring.d.ts +182 -50
  93. package/dist/types/dashboard.d.ts +290 -48
  94. package/dist/types/data-app-builder.d.ts +48 -42
  95. package/dist/types/data-app-codegen-node.d.ts +50 -44
  96. package/dist/types/data-app-codegen.d.ts +50 -44
  97. package/dist/types/data-app-sdk-adapters.d.ts +48 -42
  98. package/dist/types/data-app-sdk-validation.d.ts +81 -43
  99. package/dist/types/data-app-sdk.d.ts +83 -45
  100. package/dist/types/format-utils.d.ts +645 -67
  101. package/dist/types/index.cjs +1 -1
  102. package/dist/types/index.js +19 -19
  103. package/dist/types/main.d.ts +305 -100
  104. package/dist/types/report-runtime-context.d.ts +3 -0
  105. package/dist/types/shared.d.ts +116 -41
  106. package/dist/types/surfboard.d.ts +290 -48
  107. package/dist/types/types.d.ts +455 -65
  108. package/package.json +3 -1
  109. package/dist/chunks/analyze-result-contract-BswhsmWT.js +0 -1
  110. package/dist/chunks/analyze-result-contract-CfOBEwaC.js +0 -1998
  111. package/dist/chunks/code-editor-M7HTUhdF.js +0 -138
  112. package/dist/chunks/common-types-C73-Ud1-.js +0 -1
  113. package/dist/chunks/comparison-document-migration-DbU_BTxR.js +0 -1
  114. package/dist/chunks/csv-utils-BZDvO2Fw.js +0 -376
  115. package/dist/chunks/csv-utils-Co0WxHke.js +0 -4
  116. package/dist/chunks/dashboard-DxZuqe8t.js +0 -1402
  117. package/dist/chunks/dashboard-briefing-launcher-Do6ZcOj4.js +0 -26
  118. package/dist/chunks/dashboard-date-comparison-definition-DGZr3m-b.js +0 -1
  119. package/dist/chunks/dashboard-json-ezLyW7AK.js +0 -1
  120. package/dist/chunks/edit-dashboard-visual-DEb9MeSM.js +0 -182
  121. package/dist/chunks/metric-comparison-DVy3fll_.js +0 -1
  122. package/dist/chunks/numeric-presentation-BJs5lSar.js +0 -517
  123. package/dist/chunks/numeric-presentation-Dlb-Dk4c.js +0 -1
  124. package/dist/chunks/report-preferences-dialog-D5sIaFnb.js +0 -1
  125. package/dist/chunks/source-identity-5OPV4gvg.js +0 -92
  126. package/dist/chunks/source-identity-Cbo2LOHQ.js +0 -1
  127. package/dist/chunks/validators-B2vUAqTf.js +0 -1
  128. package/dist/chunks/validators-Bce_J7Vd.js +0 -2448
  129. /package/dist/chunks/{card-config-utils-15sRtebL.js → card-config-utils-15sRtebL.cjs} +0 -0
  130. /package/dist/chunks/{catalog-field-grounding-Bnx-3tE0.js → catalog-field-grounding-Bnx-3tE0.cjs} +0 -0
  131. /package/dist/chunks/{dashboard-input-contract-DV3cshjz.js → dashboard-input-contract-DV3cshjz.cjs} +0 -0
  132. /package/dist/chunks/{index-Dpm_VET4.js → index-Dpm_VET4.cjs} +0 -0
  133. /package/dist/chunks/{index-jSrCwPQz.js → index-jSrCwPQz.cjs} +0 -0
  134. /package/dist/chunks/{normalize-dashboard-for-dirty-check-BXRUMVb2.js → normalize-dashboard-for-dirty-check-BXRUMVb2.cjs} +0 -0
  135. /package/dist/chunks/{operators-DrTQsJXv.js → operators-DrTQsJXv.cjs} +0 -0
  136. /package/dist/chunks/{use-debounced-dirty-check-XHSwAefL.js → use-debounced-dirty-check-XHSwAefL.cjs} +0 -0
@@ -1,5 +1,4 @@
1
1
  import { Chart as Chart_2 } from 'chart.js';
2
- import { ChartConfiguration } from 'chart.js';
3
2
  import { ColumnSizingState } from '@tanstack/react-table';
4
3
  import { DateRange } from 'react-day-picker';
5
4
  import { default as default_2 } from 'react';
@@ -349,9 +348,13 @@ declare type AddFrameOptions = {
349
348
 
350
349
  /**
351
350
  * Single-button mode toggle (action pattern). The label reflects where
352
- * a click will take you, not where you currently are — e.g. while in
353
- * drag-and-drop mode the button shows `</> SQL`. Compact, matches the
351
+ * a click will take you, not where you currently are — e.g. while in the
352
+ * visual editor the button shows `</> SQL editor`. Compact, matches the
354
353
  * "Edit / Done" toggle convention.
354
+ *
355
+ * Both labels name a destination surface, in parallel. The old pair mixed
356
+ * categories — "SQL" named a language, "Drag & drop" named a gesture — so
357
+ * neither read as the place the click would take you.
355
358
  */
356
359
  export declare function AdvancedModeToggle({ className }: AdvancedModeToggleProps): JSX.Element | null;
357
360
 
@@ -468,7 +471,7 @@ declare type AsyncMutation<TInput, TOutput> = {
468
471
 
469
472
  export declare type AuthoritativeExportFormattingConfig = ExportFormattingConfig & {
470
473
  comparisonPresentation: ComparisonPresentationSpec;
471
- resolvedNumericFormats: NumericPresentationSnapshotEntry[];
474
+ resolvedFormats: ResolvedPresentationEntry[];
472
475
  };
473
476
 
474
477
  export declare type AuthToken = {
@@ -537,6 +540,8 @@ declare type BaseFilter = {
537
540
  dataType?: string;
538
541
  fieldMeta?: FilterFieldMeta;
539
542
  semanticContext?: FilterSemanticContext;
543
+ /** Governed meaning for canonical grouped-temporal filter values. */
544
+ temporalBucket?: TemporalBucketMetadata;
540
545
  };
541
546
 
542
547
  export declare interface BaseInteractionEvent {
@@ -846,9 +851,9 @@ export declare type BriefingFormDraft = {
846
851
  limits: BriefingLimits;
847
852
  };
848
853
 
849
- export declare function briefingFormDraftToCreateRequest(draft: BriefingFormDraft): CreateBriefingRequest;
854
+ export declare function briefingFormDraftToCreateRequest(draft: BriefingFormDraft, resolvedFormats?: ResolvedPresentationEntry[]): CreateBriefingRequest;
850
855
 
851
- export declare function briefingFormDraftToUpdateRequest(draft: BriefingFormDraft): UpdateBriefingRequest;
856
+ export declare function briefingFormDraftToUpdateRequest(draft: BriefingFormDraft, resolvedFormats?: ResolvedPresentationEntry[]): UpdateBriefingRequest;
852
857
 
853
858
  export declare type BriefingFormOutputDraft = {
854
859
  artifactFormats: BriefingArtifactFormat[];
@@ -895,6 +900,7 @@ declare type BriefingFragments = {
895
900
  export declare type BriefingJobConfig = {
896
901
  kind: BriefingKind;
897
902
  reportContext: ReportRuntimeContext;
903
+ resolvedFormats?: ResolvedPresentationEntry[];
898
904
  source: BriefingSource;
899
905
  body: BriefingBody;
900
906
  attachments: BriefingAttachment[];
@@ -1296,7 +1302,17 @@ export declare function cancelExport(apiServiceUrl: string, token: string, expor
1296
1302
 
1297
1303
  declare type CanonicalDurationUnit = 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
1298
1304
 
1299
- export declare type CanonicalFormatSpec = NumericCanonicalFormat | DateCanonicalFormat | DurationCanonicalFormat | StringCanonicalFormat;
1305
+ export declare type CanonicalFormatSpec = NumericCanonicalFormat | DateCanonicalFormat | DurationCanonicalFormat | StringCanonicalFormat | TemporalBucketFormat;
1306
+
1307
+ declare type CanonicalPivotResultContract = {
1308
+ version: 1;
1309
+ expectedRoleFieldIds: PivotResultExpectedRoleFieldIds;
1310
+ expectedMetricAliases: readonly string[];
1311
+ columnKinds: Readonly<Record<string, PivotResultColumnKind>>;
1312
+ columnClassifications: Readonly<Record<string, PivotResultColumnClassification | undefined>>;
1313
+ };
1314
+
1315
+ declare type CanonicalPivotResultState = 'loaded_empty' | 'loaded_valid';
1300
1316
 
1301
1317
  export declare interface CardConfig {
1302
1318
  /**
@@ -1359,9 +1375,6 @@ export declare interface CardConfig {
1359
1375
  * Configuration for on-click dashboard filters triggered by this card.
1360
1376
  */
1361
1377
  clickFilterInteractions?: ClickFilterInteraction[];
1362
- showTrendline?: boolean;
1363
- trendlineWindow?: number;
1364
- trendlineGranularity?: 'day' | 'week' | 'month';
1365
1378
  summary?: {
1366
1379
  enabled?: boolean;
1367
1380
  showOnCard?: boolean;
@@ -1437,8 +1450,10 @@ export declare interface ClickedMetricValue {
1437
1450
  export declare interface ClickFilterCondition {
1438
1451
  field: Field;
1439
1452
  operator: Operator;
1440
- value: string | number;
1453
+ value: string | number | null;
1441
1454
  label?: string;
1455
+ /** Governed meaning for a canonical grouped-temporal scalar. */
1456
+ temporalBucket?: TemporalBucketMetadata;
1442
1457
  }
1443
1458
 
1444
1459
  export declare interface ClickFilterConditionGroup {
@@ -1785,7 +1800,10 @@ export declare type ControlOption = {
1785
1800
  label: string;
1786
1801
  presentation?: {
1787
1802
  granularity?: TimeGranularity;
1803
+ format?: TemporalBucketFormat;
1804
+ /** Saved-dashboard compatibility only. New authoring writes `format`. */
1788
1805
  dateFormat?: DateFormatValue;
1806
+ /** Saved-dashboard compatibility only. New authoring writes `format`. */
1789
1807
  customFormat?: string;
1790
1808
  };
1791
1809
  };
@@ -1827,6 +1845,7 @@ export declare type CreateBriefingRequest = {
1827
1845
  presentation: BriefingPresentation;
1828
1846
  limits?: BriefingLimits;
1829
1847
  deliveryConfig: BriefingDeliveryConfig | null;
1848
+ resolvedFormats?: ResolvedPresentationEntry[];
1830
1849
  };
1831
1850
 
1832
1851
  /**
@@ -1850,6 +1869,9 @@ export declare interface CreateExportRequest {
1850
1869
  title?: string;
1851
1870
  connection_id: string;
1852
1871
  cardType: string;
1872
+ sql: string;
1873
+ python: string;
1874
+ resultOwner: TemporalResultOwner;
1853
1875
  cardConfig: CardConfig;
1854
1876
  cardDataSource: DataSource;
1855
1877
  active_filters: TFilterValue[];
@@ -2352,6 +2374,11 @@ export declare type DashboardProps = {
2352
2374
  * inputs instead of documentInputValues.
2353
2375
  */
2354
2376
  dashboardInputExecutionSnapshot?: DashboardInputExecutionSnapshot;
2377
+ /**
2378
+ * Runtime interaction state captured for deterministic print/replay entry
2379
+ * points. Ordinary dashboard consumers should leave this unset.
2380
+ */
2381
+ interactionExecutionSnapshot?: Record<string, InteractionState>;
2355
2382
  /**
2356
2383
  * Render target for print entry points. Generic dashboard PDF exports also
2357
2384
  * use cardDisplay.mode="print"; document-specific print handling must only
@@ -2867,7 +2894,9 @@ export declare type DocumentVariableRef = {
2867
2894
  key: 'generatedAt' | 'pageNumber' | 'pageCount';
2868
2895
  };
2869
2896
 
2870
- export declare interface DomainCalculatedDimension {
2897
+ export declare type DomainCalculatedDimension = SemanticGroupedTemporalInput<DomainCalculatedDimensionBase>;
2898
+
2899
+ declare type DomainCalculatedDimensionBase = {
2871
2900
  name: string;
2872
2901
  label: string;
2873
2902
  description?: string;
@@ -2875,7 +2904,7 @@ export declare interface DomainCalculatedDimension {
2875
2904
  inputs: Record<string, DimensionInputReference>;
2876
2905
  dataType?: DataType;
2877
2906
  tags?: string[];
2878
- }
2907
+ };
2879
2908
 
2880
2909
  export declare interface DomainCalculatedMetric {
2881
2910
  name: string;
@@ -2884,7 +2913,7 @@ export declare interface DomainCalculatedMetric {
2884
2913
  expression: string;
2885
2914
  inputs: Record<string, InputReference>;
2886
2915
  metricType?: 'base' | 'derived' | 'calculated';
2887
- format?: FormatSpec;
2916
+ format?: ScalarFormatSpec;
2888
2917
  tags?: string[];
2889
2918
  isCertified?: boolean;
2890
2919
  aggregationStrategy?: AggregationStrategy;
@@ -3352,7 +3381,7 @@ export declare interface ExportFormattingConfig {
3352
3381
  visibleColumns?: string[];
3353
3382
  columnLabels?: Record<string, string>;
3354
3383
  tableTotalsLabelColumnKey?: string;
3355
- resolvedNumericFormats?: NumericPresentationSnapshotEntry[];
3384
+ resolvedFormats?: ResolvedPresentationEntry[];
3356
3385
  comparisonPresentation?: ComparisonPresentationSpec;
3357
3386
  }
3358
3387
 
@@ -3444,8 +3473,9 @@ declare type ExportStoreState = {
3444
3473
 
3445
3474
  export declare interface Field {
3446
3475
  /**
3447
- * Unique identifier for this field instance (for joins, UI state, etc.).
3448
- * Should be unique within the context of the query or data model.
3476
+ * Stable authored/semantic field identifier (for joins, UI state, etc.).
3477
+ * It is normally unique within a role, but one saved query may reuse it in
3478
+ * different roles; result bindings must therefore include the role.
3449
3479
  * Example: 'orders.customer_id', 'expr_12345', etc.
3450
3480
  */
3451
3481
  id: string;
@@ -3487,6 +3517,12 @@ export declare interface Field {
3487
3517
  */
3488
3518
  derivedField?: SemaphorDerivedFieldDefinition;
3489
3519
  format?: FormatSpec;
3520
+ /**
3521
+ * Source-level temporal presentation keeps the semantic grain that authored
3522
+ * the format. The card's mutable `granularity` remains the active query
3523
+ * grain, so changing it cannot accidentally retarget a semantic default.
3524
+ */
3525
+ semanticTemporalPresentation?: SemanticTemporalPresentation;
3490
3526
  aggregate?: AggregateFunction;
3491
3527
  fieldScope?: FieldScope;
3492
3528
  }
@@ -3530,6 +3566,10 @@ export declare interface FilterCondition {
3530
3566
  field: Field;
3531
3567
  operator: Operator;
3532
3568
  value: FilterValue;
3569
+ /** Display-only label for canonical grouped-temporal values. */
3570
+ label?: string;
3571
+ /** Governed meaning for a canonical grouped-temporal scalar. */
3572
+ temporalBucket?: TemporalBucketMetadata;
3533
3573
  }
3534
3574
 
3535
3575
  export declare type FilterDashboardInput = DashboardInputBase & {
@@ -3711,7 +3751,7 @@ export declare type FormatSpec = {
3711
3751
  type: 'string';
3712
3752
  prefix?: string;
3713
3753
  suffix?: string;
3714
- };
3754
+ } | TemporalBucketFormat;
3715
3755
 
3716
3756
  export declare function getBriefing(apiServiceUrl: string, token: string, briefingId: string): Promise<{
3717
3757
  briefing: BriefingDetail;
@@ -3763,7 +3803,7 @@ export declare function getExportStatus(apiServiceUrl: string, token: string, ex
3763
3803
 
3764
3804
  export declare function getFieldRuntimeColumnName(field: Pick<Field, 'name' | 'sourceField'> | null | undefined): string;
3765
3805
 
3766
- export declare function getFilterValueType(filter: TFilter): "date" | "string" | "number" | "boolean";
3806
+ export declare function getFilterValueType(filter: TFilter): "string" | "boolean" | "number" | "date";
3767
3807
 
3768
3808
  export declare function getFormattedTableNameForQuery({ schemaName, tableName, modelName, databaseName, capabilities, connectionType, }: {
3769
3809
  schemaName: string;
@@ -3806,7 +3846,7 @@ declare type GlobalDateComparisonSelection = {
3806
3846
  spec: ViewerPeriodComparisonSpec;
3807
3847
  };
3808
3848
 
3809
- export declare type Granularity = 'day' | 'week' | 'month' | 'quarter' | 'year' | 'hour' | 'minute' | 'second';
3849
+ export declare type Granularity = SemaphorTimeGrain;
3810
3850
 
3811
3851
  export declare interface GroupByColumn extends BaseColumn {
3812
3852
  role: 'groupby';
@@ -3817,6 +3857,11 @@ export declare interface GroupByColumn extends BaseColumn {
3817
3857
  export declare interface GroupByField extends Field {
3818
3858
  role: 'groupby';
3819
3859
  granularity?: TimeGranularity;
3860
+ /**
3861
+ * Query transport policy for grouped temporal values. This is projected
3862
+ * into executable card config and is not persisted authoring state.
3863
+ */
3864
+ dateValueMode?: 'canonical' | 'formatted';
3820
3865
  /**
3821
3866
  * Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
3822
3867
  * If present, used in SELECT and GROUP BY instead of just the column name.
@@ -3826,6 +3871,17 @@ export declare interface GroupByField extends Field {
3826
3871
  calculatedFormula?: CalculatedFieldFormula;
3827
3872
  }
3828
3873
 
3874
+ /**
3875
+ * Authoring boundary for a dashboard field that is known to be grouped by a
3876
+ * temporal grain. The broad persisted field types remain intentionally
3877
+ * compatible with unmigrated/non-temporal fields; new temporal writers use
3878
+ * this boundary instead.
3879
+ */
3880
+ declare type GroupedTemporalAuthoringInput<TBase extends object> = Omit<TBase, 'granularity' | 'format'> & {
3881
+ granularity: SemaphorTimeGrain;
3882
+ format?: TemporalBucketFormat;
3883
+ };
3884
+
3829
3885
  export declare function hasCalculatedFieldMarker(field: Pick<Field, 'entityName' | 'entityId'> | null | undefined): boolean;
3830
3886
 
3831
3887
  export declare function hasCalculatedFormulaInputs(field: Field | null | undefined): boolean;
@@ -4139,7 +4195,7 @@ declare type MatrixAxisLevelDescriptor = {
4139
4195
  fieldKey: string;
4140
4196
  label: string;
4141
4197
  field: SemaphorFieldRef;
4142
- grain?: SemaphorTimeGrain;
4198
+ grain?: SemaphorMatrixTimeGrain;
4143
4199
  subtotal?: SemaphorMatrixSubtotalOptions;
4144
4200
  };
4145
4201
 
@@ -4351,7 +4407,7 @@ declare type MatrixMeasureDescriptor = {
4351
4407
  label: string;
4352
4408
  field: SemaphorFieldRef;
4353
4409
  aggregate?: SemaphorAggregateFunction;
4354
- format?: SemaphorValueFormat;
4410
+ format?: SemaphorScalarValueFormat;
4355
4411
  totalBehavior?: SemaphorMatrixTotalCalculation;
4356
4412
  };
4357
4413
 
@@ -4365,7 +4421,7 @@ declare type MatrixMeasureSemantics = {
4365
4421
  } | {
4366
4422
  kind: 'semiAdditive';
4367
4423
  aggregate?: SemaphorAggregateFunction;
4368
- grain?: SemaphorTimeGrain;
4424
+ grain?: SemaphorMatrixTimeGrain;
4369
4425
  } | {
4370
4426
  kind: 'nonAdditive';
4371
4427
  aggregate?: SemaphorAggregateFunction;
@@ -4573,7 +4629,7 @@ declare type MetricComparisonSpec = {
4573
4629
  targetValue: number;
4574
4630
  };
4575
4631
 
4576
- declare type MetricComparisonWindowGrain = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
4632
+ declare type MetricComparisonWindowGrain = SemaphorTimeGrain;
4577
4633
 
4578
4634
  export declare interface MetricField extends Field {
4579
4635
  role: 'metric';
@@ -4698,15 +4754,6 @@ export declare type NumberOptions = {
4698
4754
  colorRanges?: ColorRange[];
4699
4755
  };
4700
4756
 
4701
- /**
4702
- * Shared format types for export system
4703
- * IMPORTANT: No React imports allowed in this file
4704
- *
4705
- * These types are used by:
4706
- * - react-semaphor (browser) for client-side exports
4707
- * - semaphor-app (Next.js) for API routes
4708
- * - Lambda (Node.js) for async export processing
4709
- */
4710
4757
  declare type NumericCanonicalFormat = {
4711
4758
  type: 'number' | 'currency' | 'percent' | 'scientific';
4712
4759
  locale?: string;
@@ -4722,16 +4769,6 @@ declare type NumericCanonicalFormat = {
4722
4769
  percentValueMode?: 'fraction' | 'whole';
4723
4770
  };
4724
4771
 
4725
- declare type NumericPresentationSnapshotEntry = {
4726
- scope: {
4727
- dashboardId: string;
4728
- cardId?: string;
4729
- attachmentIndex?: number;
4730
- };
4731
- target: NumericPresentationTarget;
4732
- format: NumericCanonicalFormat;
4733
- };
4734
-
4735
4772
  declare type NumericPresentationTarget = {
4736
4773
  kind: 'metric';
4737
4774
  metricId: string;
@@ -4802,6 +4839,11 @@ export declare type PersistedInteraction = Interaction & {
4802
4839
 
4803
4840
  export declare interface PivotByField extends Field {
4804
4841
  role: 'pivotby';
4842
+ /**
4843
+ * Query transport policy for grouped temporal pivot members. This is
4844
+ * projected into executable config and is never persisted authoring state.
4845
+ */
4846
+ dateValueMode?: 'canonical' | 'formatted';
4805
4847
  }
4806
4848
 
4807
4849
  export declare interface PivotColumnSchema {
@@ -4810,7 +4852,8 @@ export declare interface PivotColumnSchema {
4810
4852
  metricId: string;
4811
4853
  metricName: string;
4812
4854
  metricLabel?: string;
4813
- pivotValues: string[];
4855
+ pivotValues: SemaphorPivotValue[];
4856
+ pivotFieldIds?: string[];
4814
4857
  pivotFields?: string[];
4815
4858
  displayLabel?: string;
4816
4859
  isPivotColumn?: boolean;
@@ -4844,6 +4887,15 @@ export declare enum PivotMarkerEnum {
4844
4887
  ALL = "__ALL__"
4845
4888
  }
4846
4889
 
4890
+ declare type PivotResultColumnClassification = {
4891
+ isSubtotal?: boolean;
4892
+ subtotalScope?: 'base' | 'pivot-value' | 'grand-total';
4893
+ };
4894
+
4895
+ declare type PivotResultColumnKind = 'row' | 'pivot_metric' | 'value';
4896
+
4897
+ declare type PivotResultExpectedRoleFieldIds = Readonly<Partial<Record<QueryColumnKeyRole, readonly string[]>>>;
4898
+
4847
4899
  export declare type Placeholders = {
4848
4900
  /**
4849
4901
  * Placeholder for the card when there are no records to display.
@@ -4859,6 +4911,12 @@ export declare type PluginType = 'custom' | 'standard';
4859
4911
 
4860
4912
  export declare function polishBriefingText(apiServiceUrl: string, token: string, text: string): Promise<string>;
4861
4913
 
4914
+ declare type PresentationScope = {
4915
+ dashboardId: string;
4916
+ cardId?: string;
4917
+ attachmentIndex?: number;
4918
+ };
4919
+
4862
4920
  export declare function previewBriefingPlan(apiServiceUrl: string, token: string, payload: CreateBriefingRequest): Promise<PreviewBriefingPlanResponse>;
4863
4921
 
4864
4922
  export declare type PreviewBriefingPlanResponse = {
@@ -4874,12 +4932,17 @@ export declare type PrintState = {
4874
4932
 
4875
4933
  export declare type QueryColumn = GroupByColumn | MetricColumn | FilterByColumn;
4876
4934
 
4877
- export declare interface QueryColumnKeyMap {
4935
+ export declare type QueryColumnKeyMap = QueryColumnKeyMap_2;
4936
+
4937
+ declare interface QueryColumnKeyMap_2 {
4878
4938
  version: 1;
4879
4939
  source: 'explorer';
4880
- byFieldId: Record<string, QueryColumnKeyMapEntry>;
4940
+ byRole: QueryColumnKeyMapByRole;
4941
+ byMetricAlias?: Record<string, QueryColumnKeyMapEntry>;
4881
4942
  }
4882
4943
 
4944
+ export declare type QueryColumnKeyMapByRole = Partial<Record<QueryColumnKeyRole, Record<string, QueryColumnKeyMapEntry>>>;
4945
+
4883
4946
  export declare interface QueryColumnKeyMapEntry {
4884
4947
  role: QueryColumnKeyRole;
4885
4948
  rawKey: string;
@@ -4903,6 +4966,11 @@ export declare interface QueryConfig {
4903
4966
  */
4904
4967
  export declare interface QueryExecutionResponse {
4905
4968
  records: any[];
4969
+ /** Execution owner captured with these exact result rows. */
4970
+ resultOwner?: TemporalResultOwner;
4971
+ pivotResultState?: CanonicalPivotResultState;
4972
+ pivotResultContract?: CanonicalPivotResultContract;
4973
+ columns?: SemaphorResultColumn[];
4906
4974
  output: string;
4907
4975
  rowLimitExceeded: boolean;
4908
4976
  sql?: string;
@@ -5063,7 +5131,23 @@ declare type ResolvedMetricComparisonRequest = {
5063
5131
  owner?: DashboardDateComparisonOwner;
5064
5132
  };
5065
5133
 
5066
- declare type ResolvedPrimaryDateField = {
5134
+ declare type ResolvedNumericPresentationEntry = {
5135
+ scope: PresentationScope;
5136
+ target: NumericPresentationTarget;
5137
+ format: NumericCanonicalFormat;
5138
+ };
5139
+
5140
+ declare type ResolvedPresentationEntry = ResolvedNumericPresentationEntry | ResolvedTemporalBucketPresentationEntry;
5141
+
5142
+ declare type ResolvedPrimaryDateField = (ResolvedPrimaryDateFieldBase & ({
5143
+ defaultGranularity?: SemaphorTimeGrain;
5144
+ format?: undefined;
5145
+ } | {
5146
+ defaultGranularity: SemaphorTimeGrain;
5147
+ format: TemporalBucketFormat;
5148
+ })) | null;
5149
+
5150
+ declare type ResolvedPrimaryDateFieldBase = {
5067
5151
  sourceDataset: string;
5068
5152
  sourceField: string;
5069
5153
  name: string;
@@ -5073,13 +5157,20 @@ declare type ResolvedPrimaryDateField = {
5073
5157
  entityName: string;
5074
5158
  entityType: string;
5075
5159
  dataType: string;
5076
- /** Canonical dataset coordinates stamped by the temporal grounding boundary. */
5160
+ /** Canonical dataset coordinates stamped by the semantic grounding boundary. */
5077
5161
  source?: SemaphorSourceRef;
5078
- dateFormat?: string;
5079
- customFormat?: string;
5080
- defaultGranularity?: TimeGranularity;
5081
- supportedGranularities?: TimeGranularity[];
5082
- } | null;
5162
+ supportedGranularities?: SemaphorTimeGrain[];
5163
+ };
5164
+
5165
+ declare type ResolvedTemporalBucketFormat = TemporalBucketFormat & {
5166
+ locale: string;
5167
+ };
5168
+
5169
+ declare type ResolvedTemporalBucketPresentationEntry = {
5170
+ scope: PresentationScope;
5171
+ target: TemporalBucketPresentationTarget;
5172
+ format: ResolvedTemporalBucketFormat;
5173
+ };
5083
5174
 
5084
5175
  declare type ResolvedValueFormatPreferences = {
5085
5176
  locale: string;
@@ -5101,6 +5192,10 @@ declare type ResolvedValueFormatPreferenceSources = {
5101
5192
  defaultCurrency: ReportPreferenceSource;
5102
5193
  };
5103
5194
 
5195
+ export declare function resolveQueryColumnKeyMapEntry(columnKeyMap: QueryColumnKeyMap_2 | undefined, fieldId: string, role: QueryColumnKeyRole): QueryColumnKeyMapEntry | undefined;
5196
+
5197
+ export declare function resolveUniqueQueryColumnKeyMapEntry(columnKeyMap: QueryColumnKeyMap_2 | undefined, fieldId: string): QueryColumnKeyMapEntry | undefined;
5198
+
5104
5199
  export declare interface ResourceListItem {
5105
5200
  id: string;
5106
5201
  title: string;
@@ -5177,6 +5272,8 @@ export declare type RunBriefingPreviewResponse = {
5177
5272
  dispatch: BriefingDispatchResult | null;
5178
5273
  };
5179
5274
 
5275
+ export declare type ScalarFormatSpec = Exclude<FormatSpec, TemporalBucketFormat>;
5276
+
5180
5277
  export declare type SchemaItem = DropdownItem;
5181
5278
 
5182
5279
  export declare type SelectedEntities = SelectedEntity[];
@@ -5213,6 +5310,24 @@ declare type SemanticExecutionPayload = {
5213
5310
  }>;
5214
5311
  };
5215
5312
 
5313
+ /**
5314
+ * Semantic temporal input permits total omission, but a format can only exist
5315
+ * in the branch that declares its grain.
5316
+ */
5317
+ declare type SemanticGroupedTemporalInput<TBase extends object> = (Omit<TBase, 'granularity' | 'format'> & {
5318
+ granularity?: undefined;
5319
+ format?: undefined;
5320
+ }) | GroupedTemporalAuthoringInput<TBase>;
5321
+
5322
+ export declare type SemanticTemporalPresentation = {
5323
+ granularity: SemaphorTimeGrain;
5324
+ format: TemporalBucketFormat;
5325
+ };
5326
+
5327
+ declare const SEMAPHOR_MATRIX_TIME_GRAINS: ["hour", "day", "week", "month", "quarter", "year"];
5328
+
5329
+ declare const SEMAPHOR_TIME_GRAINS: readonly ["second", "minute", "hour", "day", "week", "month", "quarter", "year"];
5330
+
5216
5331
  declare type SemaphorAbsoluteTimeWindow = {
5217
5332
  kind: 'absolute';
5218
5333
  start: string;
@@ -5289,7 +5404,7 @@ declare type SemaphorDerivedFieldDefinition = {
5289
5404
  defaultAggregate?: SemaphorAggregateFunction;
5290
5405
  aggregationBehavior?: SemaphorDerivedFieldAggregationBehavior;
5291
5406
  aggregationStrategy?: SemaphorDerivedFieldAggregationStrategy;
5292
- format?: SemaphorValueFormat;
5407
+ format?: SemaphorScalarValueFormat;
5293
5408
  tags?: string[];
5294
5409
  };
5295
5410
 
@@ -5359,7 +5474,7 @@ declare type SemaphorMatrixAxisExpansionOptions = {
5359
5474
  declare type SemaphorMatrixAxisLevel = {
5360
5475
  id?: string;
5361
5476
  field: SemaphorFieldRef;
5362
- grain?: SemaphorTimeGrain;
5477
+ grain?: SemaphorMatrixTimeGrain;
5363
5478
  label?: string;
5364
5479
  subtotal?: boolean | SemaphorMatrixSubtotalOptions;
5365
5480
  sortBy?: SemaphorMatrixAxisSortRule;
@@ -5475,6 +5590,8 @@ declare type SemaphorMatrixSubtotalOptions = {
5475
5590
  label?: string;
5476
5591
  };
5477
5592
 
5593
+ declare type SemaphorMatrixTimeGrain = (typeof SEMAPHOR_MATRIX_TIME_GRAINS)[number];
5594
+
5478
5595
  declare type SemaphorMatrixTotalCalculation = {
5479
5596
  kind: 'defaultAggregate';
5480
5597
  } | {
@@ -5510,7 +5627,7 @@ declare type SemaphorMatrixValueField = {
5510
5627
  field: SemaphorFieldRef;
5511
5628
  aggregate?: SemaphorAggregateFunction;
5512
5629
  label?: string;
5513
- format?: SemaphorValueFormat;
5630
+ format?: SemaphorScalarValueFormat;
5514
5631
  totalBehavior?: SemaphorMatrixTotalCalculation;
5515
5632
  };
5516
5633
 
@@ -5578,6 +5695,30 @@ declare type SemaphorPaginationRequest = {
5578
5695
  pageSize: number;
5579
5696
  };
5580
5697
 
5698
+ declare type SemaphorPivotResultColumnIdentity = {
5699
+ metricId: string;
5700
+ /** Collision-safe identity for this configured metric instance. */
5701
+ metricAlias: string;
5702
+ /**
5703
+ * Sole transported tuple identity in configured pivot-axis order. A leaf
5704
+ * carries the complete tuple, a subtotal carries its explicit prefix, and a
5705
+ * metric-only or grand-total column carries an empty tuple.
5706
+ */
5707
+ members: SemaphorPivotResultMember[];
5708
+ };
5709
+
5710
+ declare type SemaphorPivotResultMember = {
5711
+ /** Stable identity of the configured pivot field. */
5712
+ fieldId: string;
5713
+ /** Canonical pivot member value; labels are resolved only at presentation. */
5714
+ value: SemaphorPivotValue;
5715
+ /** Present when this member is an activated governed temporal bucket. */
5716
+ temporalBucket?: TemporalBucketMetadata;
5717
+ };
5718
+
5719
+ /** Stable canonical scalar transported for one physical pivot member. */
5720
+ declare type SemaphorPivotValue = string | null;
5721
+
5581
5722
  declare type SemaphorProtocolVersion = 1;
5582
5723
 
5583
5724
  declare function SemaphorQueryClient({ children, }: {
@@ -5622,12 +5763,72 @@ declare type SemaphorRelationshipHint = {
5622
5763
 
5623
5764
  declare type SemaphorRelativeTimeWindow = {
5624
5765
  kind?: 'relative';
5625
- unit: 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
5766
+ unit: SemaphorTimeGrain;
5626
5767
  value: number;
5627
5768
  anchor?: 'now' | 'latest_available';
5628
5769
  completeness?: 'include_partial' | 'complete_periods';
5629
5770
  };
5630
5771
 
5772
+ declare type SemaphorResultColumn = {
5773
+ /**
5774
+ * Stable row accessor for this result. Consumers should read values with
5775
+ * `row[column.key]`; labels are display-only and may change.
5776
+ */
5777
+ key: string;
5778
+ /**
5779
+ * Semantic/source field name before result-key disambiguation.
5780
+ */
5781
+ name: string;
5782
+ /**
5783
+ * Human-facing display label.
5784
+ */
5785
+ label: string;
5786
+ role?: SemaphorFieldRef['role'];
5787
+ dataType?: SemaphorFieldRef['dataType'];
5788
+ aggregate?: SemaphorFieldRef['aggregate'];
5789
+ source?: SemaphorFieldRef['source'];
5790
+ derivedField?: SemaphorDerivedFieldDefinition;
5791
+ temporalBucket?: TemporalBucketMetadata;
5792
+ pivotIdentity?: SemaphorPivotResultColumnIdentity;
5793
+ };
5794
+
5795
+ declare type SemaphorScalarValueFormat = {
5796
+ type: 'number' | 'currency' | 'percent' | 'percentage' | 'scientific';
5797
+ minimumFractionDigits?: number;
5798
+ maximumFractionDigits?: number;
5799
+ useGrouping?: boolean;
5800
+ prefix?: string;
5801
+ suffix?: string;
5802
+ negativeStyle?: 'minus' | 'parentheses';
5803
+ compact?: boolean;
5804
+ scale?: number;
5805
+ currency?: string;
5806
+ percentValueMode?: 'fraction' | 'whole';
5807
+ } | {
5808
+ type: 'date' | 'datetime';
5809
+ locale?: string;
5810
+ pattern?: string;
5811
+ relative?: boolean;
5812
+ timezone?: string;
5813
+ sourceTimezone?: string;
5814
+ prefix?: string;
5815
+ suffix?: string;
5816
+ } | {
5817
+ type: 'duration';
5818
+ inputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
5819
+ outputStyle?: 'compact' | 'digital' | 'long';
5820
+ largestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
5821
+ smallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
5822
+ maxUnits?: number;
5823
+ prefix?: string;
5824
+ suffix?: string;
5825
+ negativeStyle?: 'minus' | 'parentheses';
5826
+ } | {
5827
+ type: 'string';
5828
+ prefix?: string;
5829
+ suffix?: string;
5830
+ };
5831
+
5631
5832
  declare type SemaphorSemanticSourceRef = Extract<SemaphorSourceRef, {
5632
5833
  kind: 'semantic';
5633
5834
  }>;
@@ -5673,47 +5874,10 @@ declare type SemaphorSqlIntent = {
5673
5874
  inputs?: SemaphorInputBinding[];
5674
5875
  };
5675
5876
 
5676
- declare type SemaphorTimeGrain = 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
5877
+ declare type SemaphorTimeGrain = (typeof SEMAPHOR_TIME_GRAINS)[number];
5677
5878
 
5678
5879
  declare type SemaphorTimeWindow = SemaphorRelativeTimeWindow | SemaphorAbsoluteTimeWindow;
5679
5880
 
5680
- declare type SemaphorValueFormat = {
5681
- type: 'number' | 'currency' | 'percent' | 'percentage' | 'scientific';
5682
- minimumFractionDigits?: number;
5683
- maximumFractionDigits?: number;
5684
- useGrouping?: boolean;
5685
- prefix?: string;
5686
- suffix?: string;
5687
- negativeStyle?: 'minus' | 'parentheses';
5688
- compact?: boolean;
5689
- scale?: number;
5690
- currency?: string;
5691
- percentValueMode?: 'fraction' | 'whole';
5692
- } | {
5693
- type: 'date' | 'datetime';
5694
- locale?: string;
5695
- pattern?: string;
5696
- relative?: boolean;
5697
- timezone?: string;
5698
- sourceTimezone?: string;
5699
- prefix?: string;
5700
- suffix?: string;
5701
- } | {
5702
- type: 'duration';
5703
- inputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
5704
- outputStyle?: 'compact' | 'digital' | 'long';
5705
- largestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
5706
- smallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
5707
- maxUnits?: number;
5708
- prefix?: string;
5709
- suffix?: string;
5710
- negativeStyle?: 'minus' | 'parentheses';
5711
- } | {
5712
- type: 'string';
5713
- prefix?: string;
5714
- suffix?: string;
5715
- };
5716
-
5717
5881
  /**
5718
5882
  * Stable serializer for dashboard dirty checks.
5719
5883
  * This consolidates normalization + serialization into one call site, so
@@ -6356,8 +6520,6 @@ export declare type TCardPreferences = {
6356
6520
  };
6357
6521
  };
6358
6522
 
6359
- declare type TChartConfiguration = ChartConfiguration;
6360
-
6361
6523
  export declare type TChartOptions = {
6362
6524
  type?: TChartType;
6363
6525
  scales?: {
@@ -6477,6 +6639,7 @@ export declare type TDataColumn = {
6477
6639
  calculatedFormula?: CalculatedFieldFormula;
6478
6640
  derivedField?: SemaphorDerivedFieldDefinition;
6479
6641
  format?: FormatSpec;
6642
+ granularity?: TimeGranularity;
6480
6643
  sourceField?: string;
6481
6644
  aggregate?: AggregateFunction;
6482
6645
  };
@@ -6579,8 +6742,48 @@ export declare type TDynamicVisualIntent = {
6579
6742
  includesKpis: boolean;
6580
6743
  };
6581
6744
 
6745
+ declare const TEMPORAL_BUCKET_PRESETS: readonly ["week_of_short", "week_of_long", "quarter_short", "quarter_long", "fiscal_quarter_short", "fiscal_year"];
6746
+
6747
+ declare type TemporalBucketFormat = {
6748
+ type: 'temporal_bucket';
6749
+ presentation: TemporalBucketPresentation;
6750
+ };
6751
+
6752
+ declare type TemporalBucketMetadata = {
6753
+ kind: 'temporal_bucket';
6754
+ granularity: SemaphorTimeGrain;
6755
+ calendar: Pick<CalendarContext, 'tz' | 'weekStart' | 'fiscalCalendar'>;
6756
+ };
6757
+
6758
+ declare type TemporalBucketPresentation = {
6759
+ mode: 'auto';
6760
+ } | {
6761
+ mode: 'preset';
6762
+ preset: TemporalBucketPreset;
6763
+ } | {
6764
+ mode: 'pattern';
6765
+ pattern: string;
6766
+ };
6767
+
6768
+ declare type TemporalBucketPresentationTarget = {
6769
+ kind: 'field';
6770
+ fieldId: string;
6771
+ /** Distinguishes one semantic field used on both pivot axes. */
6772
+ role?: 'groupby' | 'pivotby';
6773
+ } | {
6774
+ kind: 'column';
6775
+ columnKey: string;
6776
+ } | {
6777
+ kind: 'matrix_axis';
6778
+ axisInstanceId: string;
6779
+ };
6780
+
6781
+ declare type TemporalBucketPreset = (typeof TEMPORAL_BUCKET_PRESETS)[number];
6782
+
6582
6783
  declare type TemporalPrecision = 'minute';
6583
6784
 
6785
+ declare type TemporalResultOwner = 'config' | 'freeform' | 'none';
6786
+
6584
6787
  export declare type TEvent = {
6585
6788
  type: 'success' | 'error' | 'info' | 'warning';
6586
6789
  message: any;
@@ -6779,7 +6982,7 @@ export declare interface TimeDrillStep {
6779
6982
  rollingWindow?: number;
6780
6983
  }
6781
6984
 
6782
- export declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year' | 'hour' | 'minute' | 'second';
6985
+ export declare type TimeGranularity = SemaphorTimeGrain;
6783
6986
 
6784
6987
  /**
6785
6988
  * Inline filter definition stored on a card.
@@ -7262,12 +7465,14 @@ export declare function useCard(cardId: string): {
7262
7465
  fetchStatus: FetchStatus;
7263
7466
  visualKey: number;
7264
7467
  handleDatapointClick: (chart: Chart_2, datasetIndex: number, clickIndex: number, value: number) => void;
7265
- cfg: TChartConfiguration | undefined;
7468
+ cfg: any;
7266
7469
  queryKey: string[];
7267
7470
  queryRequestPayload: Record<string, unknown> | undefined;
7268
7471
  pagination: PaginationMetadata | undefined;
7269
7472
  comparisonMetadata: MetricComparisonMetadataMap | undefined;
7270
7473
  resolvedPrimaryDateField: ResolvedPrimaryDateField | undefined;
7474
+ effectiveCardConfig: CardConfig | undefined;
7475
+ isCurrentQueryResult: boolean;
7271
7476
  };
7272
7477
 
7273
7478
  export declare function useCardSummary(card: TCard, options?: UseCardSummaryOptions): {
@@ -7583,7 +7788,7 @@ export declare function useTextFilterHook(filterId: string): {
7583
7788
  activeFilterValue: TFilterValue | undefined;
7584
7789
  isSearching: boolean;
7585
7790
  searchError: boolean;
7586
- resultSource: "both" | "server" | "local";
7791
+ resultSource: "server" | "both" | "local";
7587
7792
  };
7588
7793
 
7589
7794
  export declare function validateBriefingFormDraft(draft: BriefingFormDraft): BriefingFormValidationResult;