react-semaphor 0.1.369 → 0.1.370

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.
@@ -39,6 +39,289 @@ export declare function defineSemaphorInput<TValue extends SemaphorInputValue =
39
39
 
40
40
  export declare function hasSemaphorInputValue(value: unknown): boolean;
41
41
 
42
+ declare type MatrixAxisLevelDescriptor = {
43
+ instanceId: string;
44
+ fieldKey: string;
45
+ label: string;
46
+ field: SemaphorFieldRef;
47
+ grain?: SemaphorTimeGrain;
48
+ subtotal?: SemaphorMatrixSubtotalOptions;
49
+ };
50
+
51
+ declare type MatrixAxisPayload = {
52
+ id: 'rows' | 'columns';
53
+ levels: MatrixAxisLevelDescriptor[];
54
+ nodes: MatrixNode[];
55
+ };
56
+
57
+ declare type MatrixCapability = 'rowHierarchy' | 'columnHierarchy' | 'rowSubtotals' | 'columnSubtotals' | 'grandTotals' | 'lazyRows' | 'lazyColumns' | 'conditionalFormatting' | 'visualExport' | (string & {});
58
+
59
+ declare type MatrixCell = {
60
+ id: string;
61
+ rowNodeId: string;
62
+ columnNodeId?: string;
63
+ measureInstanceId: string;
64
+ rowPath: MatrixMemberPathSegment[];
65
+ columnPath: MatrixMemberPathSegment[];
66
+ rawValue: unknown;
67
+ presence: MatrixCellPresence;
68
+ formattedValue?: string;
69
+ role: MatrixCellRole;
70
+ aggregateFunction?: SemaphorAggregateFunction;
71
+ formattingScope: MatrixCellFormattingScope;
72
+ actions?: MatrixCellAction[];
73
+ };
74
+
75
+ declare type MatrixCellAction = {
76
+ kind: 'requestSubgoal' | 'filter' | 'copyValue' | 'explainCalculation' | 'inspectContributingRows' | 'drillThrough' | (string & {});
77
+ label?: string;
78
+ payload?: Record<string, unknown>;
79
+ };
80
+
81
+ declare type MatrixCellFormattingScope = {
82
+ rowNodeId: string;
83
+ columnNodeId?: string;
84
+ measureInstanceId: string;
85
+ role: MatrixCellRole;
86
+ rowPath: MatrixMemberPathSegment[];
87
+ columnPath: MatrixMemberPathSegment[];
88
+ };
89
+
90
+ declare type MatrixCellPresence = 'present' | 'presentNull' | 'missing' | 'densified';
91
+
92
+ declare type MatrixCellRole = 'value' | 'rowSubtotal' | 'columnSubtotal' | 'subtotalIntersection' | 'rowGrandTotal' | 'columnGrandTotal' | 'matrixGrandTotal';
93
+
94
+ declare type MatrixExecutionMetadata = {
95
+ strategy?: MatrixQueryStrategy;
96
+ dialect?: SemaphorDialect;
97
+ rowNodeCount?: number;
98
+ columnNodeCount?: number;
99
+ cellCount?: number;
100
+ groupingSetCount?: number;
101
+ queryDurationMs?: number;
102
+ budgetRejected?: boolean;
103
+ cacheStatus?: 'hit' | 'miss' | 'bypass';
104
+ [key: string]: unknown;
105
+ };
106
+
107
+ declare type MatrixExpansionRequest = {
108
+ axis: 'row' | 'column';
109
+ path: MatrixMemberPathSegment[];
110
+ depth?: number;
111
+ };
112
+
113
+ export declare type MatrixExpansionResponseHints = {
114
+ rowLazyLoading?: boolean;
115
+ columnLazyLoading?: boolean;
116
+ expandableRowNodeIds?: string[];
117
+ expandableColumnNodeIds?: string[];
118
+ nextRequests?: MatrixExpansionRequest[];
119
+ };
120
+
121
+ declare type MatrixFieldDescriptor = {
122
+ instanceId: string;
123
+ fieldKey: string;
124
+ field: SemaphorFieldRef;
125
+ role: 'row' | 'column' | 'measure' | 'sort' | 'filter';
126
+ label?: string;
127
+ };
128
+
129
+ declare type MatrixFieldDirectory = {
130
+ fieldsByInstanceId: Record<string, MatrixFieldDescriptor>;
131
+ };
132
+
133
+ declare type MatrixFormattingContext = {
134
+ domains?: Record<string, {
135
+ min?: number;
136
+ max?: number;
137
+ }>;
138
+ rules?: Array<Record<string, unknown>>;
139
+ };
140
+
141
+ declare type MatrixGridCell = {
142
+ id: string;
143
+ columnId: string;
144
+ cellId?: string;
145
+ rawValue: unknown;
146
+ formattedValue?: string;
147
+ presence: MatrixCellPresence;
148
+ role: MatrixCellRole;
149
+ measureInstanceId: string;
150
+ rowPath: MatrixMemberPathSegment[];
151
+ columnPath: MatrixMemberPathSegment[];
152
+ };
153
+
154
+ declare type MatrixGridColumn = {
155
+ id: string;
156
+ label: string;
157
+ columnNodeId?: string;
158
+ columnPath: MatrixMemberPathSegment[];
159
+ measureInstanceId: string;
160
+ role: 'value' | 'columnSubtotal' | 'columnGrandTotal';
161
+ };
162
+
163
+ declare type MatrixGridHeaderCell = {
164
+ id: string;
165
+ label: string;
166
+ role: 'rowHeader' | 'columnHeader' | 'measureHeader' | 'subtotal' | 'grandTotal';
167
+ colSpan: number;
168
+ rowSpan: number;
169
+ columnPath: MatrixMemberPathSegment[];
170
+ measureInstanceId?: string;
171
+ };
172
+
173
+ declare type MatrixGridHeaderRow = {
174
+ id: string;
175
+ cells: MatrixGridHeaderCell[];
176
+ };
177
+
178
+ export declare type MatrixGridProjection = {
179
+ schemaVersion: 1;
180
+ shape: MatrixShape;
181
+ rowHeaderLevels: MatrixGridRowHeaderLevel[];
182
+ columnHeaderRows: MatrixGridHeaderRow[];
183
+ columns: MatrixGridColumn[];
184
+ rows: MatrixGridRow[];
185
+ };
186
+
187
+ declare type MatrixGridRow = {
188
+ id: string;
189
+ rowNodeId: string;
190
+ rowPath: MatrixMemberPathSegment[];
191
+ depth: number;
192
+ label: string;
193
+ role: 'value' | 'rowSubtotal' | 'rowGrandTotal';
194
+ isExpanded?: boolean;
195
+ hasChildren?: boolean;
196
+ cells: MatrixGridCell[];
197
+ };
198
+
199
+ declare type MatrixGridRowHeaderLevel = {
200
+ id: string;
201
+ label: string;
202
+ fieldInstanceId: string;
203
+ };
204
+
205
+ declare type MatrixMeasureDescriptor = {
206
+ instanceId: string;
207
+ fieldKey: string;
208
+ label: string;
209
+ field: SemaphorFieldRef;
210
+ aggregate?: SemaphorAggregateFunction;
211
+ totalBehavior?: SemaphorMatrixTotalCalculation;
212
+ };
213
+
214
+ declare type MatrixMeasureSemantics = {
215
+ kind: 'additive';
216
+ aggregate?: SemaphorAggregateFunction;
217
+ } | {
218
+ kind: 'semiAdditive';
219
+ aggregate?: SemaphorAggregateFunction;
220
+ grain?: SemaphorTimeGrain;
221
+ } | {
222
+ kind: 'nonAdditive';
223
+ aggregate?: SemaphorAggregateFunction;
224
+ } | {
225
+ kind: 'ratio';
226
+ numeratorMeasureInstanceId?: string;
227
+ denominatorMeasureInstanceId?: string;
228
+ } | {
229
+ kind: 'custom';
230
+ expressionId?: string;
231
+ };
232
+
233
+ declare type MatrixMemberPathSegment = {
234
+ instanceId: string;
235
+ fieldKey: string;
236
+ value: unknown;
237
+ label: string;
238
+ };
239
+
240
+ declare type MatrixNode = {
241
+ id: string;
242
+ axis: 'row' | 'column';
243
+ path: MatrixMemberPathSegment[];
244
+ level: number;
245
+ label: string;
246
+ value: unknown;
247
+ parentId?: string;
248
+ hasChildren: boolean;
249
+ isExpanded?: boolean;
250
+ isSubtotal?: boolean;
251
+ isGrandTotal?: boolean;
252
+ subtotalFunction?: SemaphorAggregateFunction;
253
+ childCount?: number;
254
+ actions?: MatrixNodeAction[];
255
+ };
256
+
257
+ declare type MatrixNodeAction = {
258
+ kind: 'expand' | 'collapse' | 'requestSubgoal' | 'filter' | 'drillThrough' | 'openRelatedRecords' | (string & {});
259
+ label?: string;
260
+ payload?: Record<string, unknown>;
261
+ };
262
+
263
+ declare type MatrixPageInfo = {
264
+ rowOffset?: number;
265
+ rowLimit?: number;
266
+ columnOffset?: number;
267
+ columnLimit?: number;
268
+ hasMoreRows?: boolean;
269
+ hasMoreColumns?: boolean;
270
+ };
271
+
272
+ export declare type MatrixPayload = {
273
+ kind: 'matrixPayload';
274
+ schemaVersion: 1;
275
+ shape: MatrixShape;
276
+ capabilities: MatrixCapability[];
277
+ executionMetadata: MatrixExecutionMetadata;
278
+ axes: {
279
+ rows: MatrixAxisPayload;
280
+ columns: MatrixAxisPayload;
281
+ };
282
+ measures: MatrixMeasureDescriptor[];
283
+ measureSemantics: Record<string, MatrixMeasureSemantics>;
284
+ fieldDirectory: MatrixFieldDirectory;
285
+ rowNodes: MatrixNode[];
286
+ columnNodes: MatrixNode[];
287
+ cells: MatrixCell[];
288
+ totals: MatrixTotals;
289
+ sort: MatrixResolvedSort[];
290
+ formattingContext: MatrixFormattingContext;
291
+ pageInfo?: MatrixPageInfo;
292
+ warnings?: MatrixWarning[];
293
+ };
294
+
295
+ declare type MatrixQueryStrategy = 'tall' | 'wide' | 'lazy' | 'export';
296
+
297
+ declare type MatrixResolvedSort = {
298
+ id: string;
299
+ axis: 'row' | 'column';
300
+ targetInstanceId?: string;
301
+ direction: 'asc' | 'desc';
302
+ nulls?: 'warehouseDefault' | 'first' | 'last';
303
+ scope?: 'global' | 'withinParent';
304
+ by: SemaphorMatrixSortRule['by'];
305
+ };
306
+
307
+ declare type MatrixShape = 'hierarchical' | 'pivot';
308
+
309
+ declare type MatrixTotals = {
310
+ rows?: boolean;
311
+ columns?: boolean;
312
+ grandTotal?: boolean | {
313
+ rows?: boolean;
314
+ columns?: boolean;
315
+ };
316
+ };
317
+
318
+ declare type MatrixWarning = {
319
+ code: string;
320
+ message: string;
321
+ path?: string;
322
+ severity?: 'info' | 'warning' | 'error';
323
+ };
324
+
42
325
  export declare function normalizeSemaphorAnalysisPayload(payload: SemaphorAnalysisPayload | undefined | null): SemaphorAnalysisPayload;
43
326
 
44
327
  export declare function normalizeSemaphorAnalysisQueryOptions(value: unknown, options?: {
@@ -65,6 +348,7 @@ export declare const semaphor: {
65
348
  records(spec: SemaphorRecordsQuerySpec): SemaphorRecordsQueryDefinition;
66
349
  inputOptions(spec: SemaphorInputOptionsQuerySpec): SemaphorInputOptionsQueryDefinition;
67
350
  sql(spec: SemaphorSqlQuerySpec): SemaphorSqlQueryDefinition;
351
+ matrix(spec: SemaphorMatrixQuerySpec): SemaphorMatrixQueryDefinition;
68
352
  };
69
353
 
70
354
  declare type SemaphorAbsoluteTimeWindow = {
@@ -197,7 +481,7 @@ declare type SemaphorAnalyticsFilterBase = {
197
481
 
198
482
  declare type SemaphorAnalyticsFilterOperator = SemaphorInputOperator | 'not_contains' | 'is_null' | 'is_not_null';
199
483
 
200
- declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent;
484
+ declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent | SemaphorMatrixIntent;
201
485
 
202
486
  declare type SemaphorAnalyticsNullFilter = SemaphorAnalyticsFilterBase & {
203
487
  operator: SemaphorAnalyticsNullFilterOperator;
@@ -222,7 +506,7 @@ declare type SemaphorAnalyticsRepairHint = {
222
506
  recommendedNextStep: string;
223
507
  };
224
508
 
225
- declare type SemaphorAnalyticsResult = SemaphorMetricResult | SemaphorRecordsResult | SemaphorInputOptionsResult | SemaphorSqlResult;
509
+ declare type SemaphorAnalyticsResult = SemaphorMetricResult | SemaphorRecordsResult | SemaphorInputOptionsResult | SemaphorSqlResult | SemaphorMatrixResult;
226
510
 
227
511
  declare type SemaphorAnalyticsResultBase = {
228
512
  intentId?: string;
@@ -381,6 +665,14 @@ declare type SemaphorExecutionFieldRef = SemaphorFieldRef & {
381
665
  aggregateSource?: SemaphorMetricAggregateSource;
382
666
  };
383
667
 
668
+ /**
669
+ * Explorer-backed table source. This is intentionally distinct from raw SQL:
670
+ * matrix planning needs stable source metadata, fields, and dialect context.
671
+ */
672
+ declare type SemaphorExplorerSourceRef = Extract<SemaphorSourceRef, {
673
+ kind: 'physical';
674
+ }>;
675
+
384
676
  export declare type SemaphorFieldRef = {
385
677
  name: string;
386
678
  label?: string;
@@ -493,6 +785,190 @@ export declare type SemaphorInputSpec<TValue extends SemaphorInputValue = Semaph
493
785
 
494
786
  export declare type SemaphorInputValue = SemaphorScalar | SemaphorScalar[];
495
787
 
788
+ declare type SemaphorMatrixAxisExpansionOptions = {
789
+ defaultDepth?: number;
790
+ lazy?: boolean;
791
+ expandedPaths?: SemaphorMatrixMemberPathSegment[][];
792
+ };
793
+
794
+ export declare type SemaphorMatrixAxisLevel = {
795
+ id?: string;
796
+ field: SemaphorFieldRef;
797
+ grain?: SemaphorTimeGrain;
798
+ label?: string;
799
+ subtotal?: boolean | SemaphorMatrixSubtotalOptions;
800
+ sortBy?: SemaphorMatrixAxisSortRule;
801
+ };
802
+
803
+ export declare type SemaphorMatrixAxisLevelInput = SemaphorQueryField | SemaphorMatrixAxisLevel;
804
+
805
+ declare type SemaphorMatrixAxisSortRule = {
806
+ direction: 'asc' | 'desc';
807
+ by: {
808
+ kind: 'label';
809
+ } | {
810
+ kind: 'field';
811
+ field: SemaphorFieldRef;
812
+ aggregate?: SemaphorAggregateFunction;
813
+ };
814
+ nulls?: 'warehouseDefault' | 'first' | 'last';
815
+ scope?: 'global' | 'withinParent';
816
+ };
817
+
818
+ export declare type SemaphorMatrixDisplayLimitOptions = {
819
+ rows?: SemaphorMatrixDisplayLimitRule;
820
+ columns?: SemaphorMatrixDisplayLimitRule;
821
+ };
822
+
823
+ declare type SemaphorMatrixDisplayLimitRule = {
824
+ limit: number;
825
+ by?: 'label' | 'value';
826
+ direction?: 'top' | 'bottom';
827
+ others?: boolean | {
828
+ label?: string;
829
+ };
830
+ };
831
+
832
+ export declare type SemaphorMatrixExpansionOptions = {
833
+ rows?: SemaphorMatrixAxisExpansionOptions;
834
+ columns?: SemaphorMatrixAxisExpansionOptions;
835
+ };
836
+
837
+ export declare type SemaphorMatrixIntent = {
838
+ kind: 'matrix';
839
+ version?: SemaphorProtocolVersion;
840
+ id?: string;
841
+ label?: string;
842
+ source: SemaphorMatrixSourceRef;
843
+ rows: SemaphorMatrixAxisLevel[];
844
+ columns?: SemaphorMatrixAxisLevel[];
845
+ values: SemaphorMatrixValueField[];
846
+ filters?: SemaphorAnalyticsFilter[];
847
+ inputs?: SemaphorInputBinding[];
848
+ totals?: SemaphorMatrixTotalOptions;
849
+ sort?: SemaphorMatrixSortRule[];
850
+ expansion?: SemaphorMatrixExpansionOptions;
851
+ layout?: SemaphorMatrixLayoutOptions;
852
+ displayLimits?: SemaphorMatrixDisplayLimitOptions;
853
+ };
854
+
855
+ declare type SemaphorMatrixLayoutOptions = {
856
+ hierarchy?: 'compact' | 'tabular' | 'outline';
857
+ valuesPlacement?: 'columns' | 'rows';
858
+ stickyRowHeaders?: boolean;
859
+ stickyColumnHeaders?: boolean;
860
+ };
861
+
862
+ declare type SemaphorMatrixMemberPathSegment = {
863
+ levelId: string;
864
+ value: unknown;
865
+ };
866
+
867
+ export declare type SemaphorMatrixPayload = {
868
+ payload?: MatrixPayload;
869
+ grid?: MatrixGridProjection;
870
+ expansion?: MatrixExpansionResponseHints;
871
+ executionResult?: SemaphorAnalyticsExecutionResult;
872
+ };
873
+
874
+ export declare type SemaphorMatrixQueryDefinition = SemaphorMatrixQuerySpec & {
875
+ queryKind: 'matrix';
876
+ };
877
+
878
+ export declare type SemaphorMatrixQueryResult = SemaphorQueryState & SemaphorMatrixPayload & {
879
+ id?: string;
880
+ intent?: SemaphorMatrixIntent;
881
+ };
882
+
883
+ export declare type SemaphorMatrixQuerySpec = Omit<SemaphorMatrixIntent, 'kind' | 'version' | 'rows' | 'columns' | 'values' | 'source' | 'inputs'> & {
884
+ source: SemaphorMatrixSourceRef;
885
+ rows: SemaphorNonEmptyArray<SemaphorMatrixAxisLevelInput>;
886
+ columns?: SemaphorMatrixAxisLevelInput[];
887
+ values: SemaphorNonEmptyArray<SemaphorMatrixValueFieldInput>;
888
+ inputs?: SemaphorInputReference[];
889
+ totals?: SemaphorMatrixTotalOptions;
890
+ sort?: SemaphorMatrixSortRule[];
891
+ expansion?: SemaphorMatrixExpansionOptions;
892
+ layout?: SemaphorMatrixIntent['layout'];
893
+ displayLimits?: SemaphorMatrixDisplayLimitOptions;
894
+ };
895
+
896
+ declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
897
+ kind: 'matrix';
898
+ intent: SemaphorMatrixIntent;
899
+ payload: MatrixPayload;
900
+ grid: MatrixGridProjection;
901
+ expansion?: MatrixExpansionResponseHints;
902
+ };
903
+
904
+ export declare type SemaphorMatrixSortRule = {
905
+ axis: 'row' | 'column';
906
+ targetId?: string;
907
+ direction: 'asc' | 'desc';
908
+ by: {
909
+ kind: 'label';
910
+ } | {
911
+ kind: 'field';
912
+ field: SemaphorFieldRef;
913
+ aggregate?: SemaphorAggregateFunction;
914
+ } | {
915
+ kind: 'value';
916
+ valueId: string;
917
+ rowPath?: SemaphorMatrixMemberPathSegment[];
918
+ columnPath?: SemaphorMatrixMemberPathSegment[];
919
+ };
920
+ nulls?: 'warehouseDefault' | 'first' | 'last';
921
+ scope?: 'global' | 'withinParent';
922
+ };
923
+
924
+ export declare type SemaphorMatrixSourceRef = SemaphorSemanticSourceRef | SemaphorExplorerSourceRef;
925
+
926
+ declare type SemaphorMatrixSubtotalOptions = {
927
+ enabled?: boolean;
928
+ position?: 'before' | 'after';
929
+ label?: string;
930
+ };
931
+
932
+ declare type SemaphorMatrixTotalCalculation = {
933
+ kind: 'defaultAggregate';
934
+ } | {
935
+ kind: 'blank';
936
+ } | {
937
+ kind: 'labelOnly';
938
+ label?: string;
939
+ } | {
940
+ kind: 'customAggregate';
941
+ aggregate: SemaphorAggregateFunction;
942
+ } | {
943
+ kind: 'percentOfParent';
944
+ } | {
945
+ kind: 'percentOfGrandTotal';
946
+ } | {
947
+ kind: 'customExpression';
948
+ expressionId: string;
949
+ };
950
+
951
+ export declare type SemaphorMatrixTotalOptions = {
952
+ rows?: boolean | 'perLevel';
953
+ columns?: boolean | 'perLevel';
954
+ grandTotal?: boolean | {
955
+ rows?: boolean;
956
+ columns?: boolean;
957
+ };
958
+ rowPosition?: 'top' | 'bottom';
959
+ columnPosition?: 'left' | 'right';
960
+ };
961
+
962
+ export declare type SemaphorMatrixValueField = {
963
+ id?: string;
964
+ field: SemaphorFieldRef;
965
+ aggregate?: SemaphorAggregateFunction;
966
+ label?: string;
967
+ totalBehavior?: SemaphorMatrixTotalCalculation;
968
+ };
969
+
970
+ export declare type SemaphorMatrixValueFieldInput = SemaphorQueryField | SemaphorMatrixValueField;
971
+
496
972
  declare type SemaphorMetricAggregateSource = 'semantic_model' | 'caller_override' | 'default_sum';
497
973
 
498
974
  declare type SemaphorMetricAnalysis = {
@@ -603,7 +1079,7 @@ declare type SemaphorProtocolIssue = {
603
1079
 
604
1080
  declare type SemaphorProtocolVersion = 1;
605
1081
 
606
- export declare type SemaphorQueryDefinition = SemaphorMetricQueryDefinition | SemaphorAnalysisQueryDefinition | SemaphorRecordsQueryDefinition | SemaphorInputOptionsQueryDefinition | SemaphorSqlQueryDefinition;
1082
+ export declare type SemaphorQueryDefinition = SemaphorMetricQueryDefinition | SemaphorAnalysisQueryDefinition | SemaphorRecordsQueryDefinition | SemaphorInputOptionsQueryDefinition | SemaphorSqlQueryDefinition | SemaphorMatrixQueryDefinition;
607
1083
 
608
1084
  export declare type SemaphorQueryExecutor = {
609
1085
  executeAnalysis?(intent: SemaphorMetricIntent, context: SemaphorQueryExecutorContext, options?: SemaphorAnalysisQueryOptions): Promise<SemaphorAnalysisPayload>;
@@ -613,6 +1089,7 @@ export declare type SemaphorQueryExecutor = {
613
1089
  kind: 'inputOptions';
614
1090
  }>, context: SemaphorQueryExecutorContext): Promise<SemaphorInputOptionsPayload>;
615
1091
  executeSql?<TRecord extends Record<string, unknown> = Record<string, unknown>>(intent: SemaphorSqlIntent, context: SemaphorQueryExecutorContext): Promise<SemaphorSqlPayload<TRecord>>;
1092
+ executeMatrix?(intent: SemaphorMatrixIntent, context: SemaphorQueryExecutorContext): Promise<SemaphorMatrixPayload>;
616
1093
  };
617
1094
 
618
1095
  export declare type SemaphorQueryExecutorContext = {
@@ -630,9 +1107,9 @@ export declare type SemaphorQueryOrderBy = {
630
1107
 
631
1108
  declare type SemaphorQueryPath = 'query_spec' | 'sql' | 'sql_python';
632
1109
 
633
- export declare type SemaphorQueryResult<TRecord extends Record<string, unknown> = Record<string, unknown>> = SemaphorMetricQueryResult | SemaphorAnalysisQueryResult | SemaphorRowsQueryResult<TRecord> | SemaphorInputOptionsQueryResult;
1110
+ export declare type SemaphorQueryResult<TRecord extends Record<string, unknown> = Record<string, unknown>> = SemaphorMetricQueryResult | SemaphorAnalysisQueryResult | SemaphorRowsQueryResult<TRecord> | SemaphorInputOptionsQueryResult | SemaphorMatrixQueryResult;
634
1111
 
635
- export declare type SemaphorQueryResultFor<TQuery extends SemaphorQueryDefinition, TRecord extends Record<string, unknown> = Record<string, unknown>> = TQuery extends SemaphorMetricQueryDefinition ? SemaphorMetricQueryResult : TQuery extends SemaphorAnalysisQueryDefinition ? SemaphorAnalysisQueryResult : TQuery extends SemaphorRecordsQueryDefinition ? SemaphorRecordsQueryResult<TRecord> : TQuery extends SemaphorInputOptionsQueryDefinition ? SemaphorInputOptionsQueryResult : TQuery extends SemaphorSqlQueryDefinition ? SemaphorSqlQueryResult<TRecord> : never;
1112
+ export declare type SemaphorQueryResultFor<TQuery extends SemaphorQueryDefinition, TRecord extends Record<string, unknown> = Record<string, unknown>> = TQuery extends SemaphorMetricQueryDefinition ? SemaphorMetricQueryResult : TQuery extends SemaphorAnalysisQueryDefinition ? SemaphorAnalysisQueryResult : TQuery extends SemaphorRecordsQueryDefinition ? SemaphorRecordsQueryResult<TRecord> : TQuery extends SemaphorInputOptionsQueryDefinition ? SemaphorInputOptionsQueryResult : TQuery extends SemaphorSqlQueryDefinition ? SemaphorSqlQueryResult<TRecord> : TQuery extends SemaphorMatrixQueryDefinition ? SemaphorMatrixQueryResult : never;
636
1113
 
637
1114
  export declare type SemaphorQueryRuntimeOptions = {
638
1115
  inputs?: SemaphorInputReference[];
@@ -771,6 +1248,10 @@ export declare type SemaphorRowsQueryResult<TRecord extends Record<string, unkno
771
1248
 
772
1249
  export declare type SemaphorScalar = string | number | boolean | null;
773
1250
 
1251
+ declare type SemaphorSemanticSourceRef = Extract<SemaphorSourceRef, {
1252
+ kind: 'semantic';
1253
+ }>;
1254
+
774
1255
  export declare type SemaphorSourceRef = {
775
1256
  kind: 'semantic';
776
1257
  domainId: string;
@@ -895,6 +1376,8 @@ export declare function toSemaphorInputSpec<TValue extends SemaphorInputValue =
895
1376
  controlRole?: SemaphorControlRole;
896
1377
  };
897
1378
 
1379
+ export declare function toSemaphorMatrixIntent(spec: SemaphorMatrixQuerySpec): SemaphorMatrixIntent;
1380
+
898
1381
  export declare function toSemaphorMetricIntent(spec: SemaphorMetricQuerySpec): SemaphorMetricIntent;
899
1382
 
900
1383
  export declare function toSemaphorRecordsIntent(spec: SemaphorRecordsQuerySpec): SemaphorRecordsIntent;
@@ -917,6 +1400,8 @@ export declare function useSemaphorQuery(spec: SemaphorInputOptionsQueryDefiniti
917
1400
 
918
1401
  export declare function useSemaphorQuery<TRecord extends Record<string, unknown> = Record<string, unknown>>(spec: SemaphorSqlQueryDefinition, options?: SemaphorQueryRuntimeOptions): SemaphorSqlQueryResult<TRecord>;
919
1402
 
1403
+ export declare function useSemaphorQuery(spec: SemaphorMatrixQueryDefinition, options?: SemaphorQueryRuntimeOptions): SemaphorMatrixQueryResult;
1404
+
920
1405
  export declare function validateSemaphorDataAppQuerySpecs(input: {
921
1406
  queries: SemaphorDataAppQuerySpecEnvelope[];
922
1407
  fieldCatalogs?: SemaphorDataAppFieldCatalog[];