react-semaphor 0.1.369 → 0.1.371
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/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +40 -38
- package/dist/chunks/{calendar-preferences-dialog-6q51A6XC.js → calendar-preferences-dialog-ClBAkMmF.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-CUGzkNcE.js → calendar-preferences-dialog-Dn6o2r2Y.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BEZnvIla.js → dashboard-briefing-launcher-BO-kXtEd.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-ptERmNJr.js → dashboard-briefing-launcher-D3Xfc_26.js} +3 -3
- package/dist/chunks/{dashboard-controls-CqKC5oEk.js → dashboard-controls-B3sdy_Zx.js} +3 -3
- package/dist/chunks/{dashboard-controls-CGt6_hMf.js → dashboard-controls-DcXMFgGR.js} +1 -1
- package/dist/chunks/{dashboard-json-6SgPm_QW.js → dashboard-json-BWfkEy48.js} +1 -1
- package/dist/chunks/{dashboard-json-CYSbOdmE.js → dashboard-json-CFURS_OR.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-w6hKbjlw.js → edit-dashboard-visual-BD2AJLiT.js} +1 -1
- package/dist/chunks/{edit-dashboard-visual-ByQx_M2i.js → edit-dashboard-visual-DjdhKiP2.js} +3 -3
- package/dist/chunks/{index-CPyEi9gS.js → index-C0Qnfr_7.js} +5 -4
- package/dist/chunks/{index-BtqYNH_S.js → index-DlLvzmJF.js} +2 -2
- package/dist/chunks/{resource-management-panel-Bf8-3eUf.js → resource-management-panel-DytUMSGA.js} +1 -1
- package/dist/chunks/{resource-management-panel-mJ84NxzC.js → resource-management-panel-YvIfaphX.js} +2 -2
- package/dist/chunks/{use-create-flow-overlay-state-BfoXDDrd.js → use-create-flow-overlay-state-BETXykC9.js} +2 -2
- package/dist/chunks/{use-create-flow-overlay-state-c6rCm36x.js → use-create-flow-overlay-state-CwIG1Ekp.js} +1 -1
- package/dist/chunks/{use-visual-utils-NN0e3fBP.js → use-visual-utils-Bk135OgA.js} +1 -1
- package/dist/chunks/{use-visual-utils-C_c-aiqi.js → use-visual-utils-BzFjIykb.js} +1 -1
- package/dist/chunks/{validation-nOPr0mTk.js → validation-CQFpcSSP.js} +446 -246
- package/dist/chunks/validation-D4Zz6WPD.js +1 -0
- package/dist/chunks/validators-CuKnUZFO.js +2171 -0
- package/dist/chunks/validators-DHee9kM2.js +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +1 -1
- package/dist/dashboard-authoring/index.js +1 -1
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +1 -1
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +261 -183
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +4 -3
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +542 -2
- package/dist/types/dashboard-assistant.d.ts +508 -4
- package/dist/types/dashboard-authoring.d.ts +217 -3
- package/dist/types/dashboard.d.ts +67 -2
- package/dist/types/data-app-builder.d.ts +197 -1
- package/dist/types/data-app-sdk-validation.d.ts +520 -6
- package/dist/types/data-app-sdk.d.ts +543 -8
- package/dist/types/main.d.ts +215 -3
- package/dist/types/shared.d.ts +66 -2
- package/dist/types/surfboard.d.ts +67 -2
- package/dist/types/types.d.ts +67 -2
- package/package.json +1 -1
- package/dist/chunks/validation-Dsf7PydY.js +0 -1
- package/dist/chunks/validators-CVuWOHYv.js +0 -1032
- package/dist/chunks/validators-oc8qtP4q.js +0 -1
|
@@ -76,6 +76,289 @@ export declare function isAnalyticsMetricIdentifierField(field: AnalyticsCatalog
|
|
|
76
76
|
|
|
77
77
|
export declare function isAnalyticsTechnicalIdentifierField(field: AnalyticsCatalogField): boolean;
|
|
78
78
|
|
|
79
|
+
export declare type MatrixAxisLevelDescriptor = {
|
|
80
|
+
instanceId: string;
|
|
81
|
+
fieldKey: string;
|
|
82
|
+
label: string;
|
|
83
|
+
field: SemaphorFieldRef;
|
|
84
|
+
grain?: SemaphorTimeGrain;
|
|
85
|
+
subtotal?: SemaphorMatrixSubtotalOptions;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export declare type MatrixAxisPayload = {
|
|
89
|
+
id: 'rows' | 'columns';
|
|
90
|
+
levels: MatrixAxisLevelDescriptor[];
|
|
91
|
+
nodes: MatrixNode[];
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export declare type MatrixCapability = 'rowHierarchy' | 'columnHierarchy' | 'rowSubtotals' | 'columnSubtotals' | 'grandTotals' | 'lazyRows' | 'lazyColumns' | 'conditionalFormatting' | 'visualExport' | (string & {});
|
|
95
|
+
|
|
96
|
+
export declare type MatrixCell = {
|
|
97
|
+
id: string;
|
|
98
|
+
rowNodeId: string;
|
|
99
|
+
columnNodeId?: string;
|
|
100
|
+
measureInstanceId: string;
|
|
101
|
+
rowPath: MatrixMemberPathSegment[];
|
|
102
|
+
columnPath: MatrixMemberPathSegment[];
|
|
103
|
+
rawValue: unknown;
|
|
104
|
+
presence: MatrixCellPresence;
|
|
105
|
+
formattedValue?: string;
|
|
106
|
+
role: MatrixCellRole;
|
|
107
|
+
aggregateFunction?: SemaphorAggregateFunction;
|
|
108
|
+
formattingScope: MatrixCellFormattingScope;
|
|
109
|
+
actions?: MatrixCellAction[];
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export declare type MatrixCellAction = {
|
|
113
|
+
kind: 'requestSubgoal' | 'filter' | 'copyValue' | 'explainCalculation' | 'inspectContributingRows' | 'drillThrough' | (string & {});
|
|
114
|
+
label?: string;
|
|
115
|
+
payload?: Record<string, unknown>;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export declare type MatrixCellFormattingScope = {
|
|
119
|
+
rowNodeId: string;
|
|
120
|
+
columnNodeId?: string;
|
|
121
|
+
measureInstanceId: string;
|
|
122
|
+
role: MatrixCellRole;
|
|
123
|
+
rowPath: MatrixMemberPathSegment[];
|
|
124
|
+
columnPath: MatrixMemberPathSegment[];
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export declare type MatrixCellPresence = 'present' | 'presentNull' | 'missing' | 'densified';
|
|
128
|
+
|
|
129
|
+
export declare type MatrixCellRole = 'value' | 'rowSubtotal' | 'columnSubtotal' | 'subtotalIntersection' | 'rowGrandTotal' | 'columnGrandTotal' | 'matrixGrandTotal';
|
|
130
|
+
|
|
131
|
+
export declare type MatrixExecutionMetadata = {
|
|
132
|
+
strategy?: MatrixQueryStrategy;
|
|
133
|
+
dialect?: SemaphorDialect;
|
|
134
|
+
rowNodeCount?: number;
|
|
135
|
+
columnNodeCount?: number;
|
|
136
|
+
cellCount?: number;
|
|
137
|
+
groupingSetCount?: number;
|
|
138
|
+
queryDurationMs?: number;
|
|
139
|
+
budgetRejected?: boolean;
|
|
140
|
+
cacheStatus?: 'hit' | 'miss' | 'bypass';
|
|
141
|
+
[key: string]: unknown;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
export declare type MatrixExpansionRequest = {
|
|
145
|
+
axis: 'row' | 'column';
|
|
146
|
+
path: MatrixMemberPathSegment[];
|
|
147
|
+
depth?: number;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export declare type MatrixExpansionResponseHints = {
|
|
151
|
+
rowLazyLoading?: boolean;
|
|
152
|
+
columnLazyLoading?: boolean;
|
|
153
|
+
expandableRowNodeIds?: string[];
|
|
154
|
+
expandableColumnNodeIds?: string[];
|
|
155
|
+
nextRequests?: MatrixExpansionRequest[];
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export declare type MatrixFieldDescriptor = {
|
|
159
|
+
instanceId: string;
|
|
160
|
+
fieldKey: string;
|
|
161
|
+
field: SemaphorFieldRef;
|
|
162
|
+
role: 'row' | 'column' | 'measure' | 'sort' | 'filter';
|
|
163
|
+
label?: string;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export declare type MatrixFieldDirectory = {
|
|
167
|
+
fieldsByInstanceId: Record<string, MatrixFieldDescriptor>;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export declare type MatrixFormattingContext = {
|
|
171
|
+
domains?: Record<string, {
|
|
172
|
+
min?: number;
|
|
173
|
+
max?: number;
|
|
174
|
+
}>;
|
|
175
|
+
rules?: Array<Record<string, unknown>>;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export declare type MatrixGridCell = {
|
|
179
|
+
id: string;
|
|
180
|
+
columnId: string;
|
|
181
|
+
cellId?: string;
|
|
182
|
+
rawValue: unknown;
|
|
183
|
+
formattedValue?: string;
|
|
184
|
+
presence: MatrixCellPresence;
|
|
185
|
+
role: MatrixCellRole;
|
|
186
|
+
measureInstanceId: string;
|
|
187
|
+
rowPath: MatrixMemberPathSegment[];
|
|
188
|
+
columnPath: MatrixMemberPathSegment[];
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export declare type MatrixGridColumn = {
|
|
192
|
+
id: string;
|
|
193
|
+
label: string;
|
|
194
|
+
columnNodeId?: string;
|
|
195
|
+
columnPath: MatrixMemberPathSegment[];
|
|
196
|
+
measureInstanceId: string;
|
|
197
|
+
role: 'value' | 'columnSubtotal' | 'columnGrandTotal';
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
export declare type MatrixGridHeaderCell = {
|
|
201
|
+
id: string;
|
|
202
|
+
label: string;
|
|
203
|
+
role: 'rowHeader' | 'columnHeader' | 'measureHeader' | 'subtotal' | 'grandTotal';
|
|
204
|
+
colSpan: number;
|
|
205
|
+
rowSpan: number;
|
|
206
|
+
columnPath: MatrixMemberPathSegment[];
|
|
207
|
+
measureInstanceId?: string;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
export declare type MatrixGridHeaderRow = {
|
|
211
|
+
id: string;
|
|
212
|
+
cells: MatrixGridHeaderCell[];
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
export declare type MatrixGridProjection = {
|
|
216
|
+
schemaVersion: 1;
|
|
217
|
+
shape: MatrixShape;
|
|
218
|
+
rowHeaderLevels: MatrixGridRowHeaderLevel[];
|
|
219
|
+
columnHeaderRows: MatrixGridHeaderRow[];
|
|
220
|
+
columns: MatrixGridColumn[];
|
|
221
|
+
rows: MatrixGridRow[];
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
export declare type MatrixGridRow = {
|
|
225
|
+
id: string;
|
|
226
|
+
rowNodeId: string;
|
|
227
|
+
rowPath: MatrixMemberPathSegment[];
|
|
228
|
+
depth: number;
|
|
229
|
+
label: string;
|
|
230
|
+
role: 'value' | 'rowSubtotal' | 'rowGrandTotal';
|
|
231
|
+
isExpanded?: boolean;
|
|
232
|
+
hasChildren?: boolean;
|
|
233
|
+
cells: MatrixGridCell[];
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
export declare type MatrixGridRowHeaderLevel = {
|
|
237
|
+
id: string;
|
|
238
|
+
label: string;
|
|
239
|
+
fieldInstanceId: string;
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
export declare type MatrixMeasureDescriptor = {
|
|
243
|
+
instanceId: string;
|
|
244
|
+
fieldKey: string;
|
|
245
|
+
label: string;
|
|
246
|
+
field: SemaphorFieldRef;
|
|
247
|
+
aggregate?: SemaphorAggregateFunction;
|
|
248
|
+
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export declare type MatrixMeasureSemantics = {
|
|
252
|
+
kind: 'additive';
|
|
253
|
+
aggregate?: SemaphorAggregateFunction;
|
|
254
|
+
} | {
|
|
255
|
+
kind: 'semiAdditive';
|
|
256
|
+
aggregate?: SemaphorAggregateFunction;
|
|
257
|
+
grain?: SemaphorTimeGrain;
|
|
258
|
+
} | {
|
|
259
|
+
kind: 'nonAdditive';
|
|
260
|
+
aggregate?: SemaphorAggregateFunction;
|
|
261
|
+
} | {
|
|
262
|
+
kind: 'ratio';
|
|
263
|
+
numeratorMeasureInstanceId?: string;
|
|
264
|
+
denominatorMeasureInstanceId?: string;
|
|
265
|
+
} | {
|
|
266
|
+
kind: 'custom';
|
|
267
|
+
expressionId?: string;
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
export declare type MatrixMemberPathSegment = {
|
|
271
|
+
instanceId: string;
|
|
272
|
+
fieldKey: string;
|
|
273
|
+
value: unknown;
|
|
274
|
+
label: string;
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
export declare type MatrixNode = {
|
|
278
|
+
id: string;
|
|
279
|
+
axis: 'row' | 'column';
|
|
280
|
+
path: MatrixMemberPathSegment[];
|
|
281
|
+
level: number;
|
|
282
|
+
label: string;
|
|
283
|
+
value: unknown;
|
|
284
|
+
parentId?: string;
|
|
285
|
+
hasChildren: boolean;
|
|
286
|
+
isExpanded?: boolean;
|
|
287
|
+
isSubtotal?: boolean;
|
|
288
|
+
isGrandTotal?: boolean;
|
|
289
|
+
subtotalFunction?: SemaphorAggregateFunction;
|
|
290
|
+
childCount?: number;
|
|
291
|
+
actions?: MatrixNodeAction[];
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
export declare type MatrixNodeAction = {
|
|
295
|
+
kind: 'expand' | 'collapse' | 'requestSubgoal' | 'filter' | 'drillThrough' | 'openRelatedRecords' | (string & {});
|
|
296
|
+
label?: string;
|
|
297
|
+
payload?: Record<string, unknown>;
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
export declare type MatrixPageInfo = {
|
|
301
|
+
rowOffset?: number;
|
|
302
|
+
rowLimit?: number;
|
|
303
|
+
columnOffset?: number;
|
|
304
|
+
columnLimit?: number;
|
|
305
|
+
hasMoreRows?: boolean;
|
|
306
|
+
hasMoreColumns?: boolean;
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
export declare type MatrixPayload = {
|
|
310
|
+
kind: 'matrixPayload';
|
|
311
|
+
schemaVersion: 1;
|
|
312
|
+
shape: MatrixShape;
|
|
313
|
+
capabilities: MatrixCapability[];
|
|
314
|
+
executionMetadata: MatrixExecutionMetadata;
|
|
315
|
+
axes: {
|
|
316
|
+
rows: MatrixAxisPayload;
|
|
317
|
+
columns: MatrixAxisPayload;
|
|
318
|
+
};
|
|
319
|
+
measures: MatrixMeasureDescriptor[];
|
|
320
|
+
measureSemantics: Record<string, MatrixMeasureSemantics>;
|
|
321
|
+
fieldDirectory: MatrixFieldDirectory;
|
|
322
|
+
rowNodes: MatrixNode[];
|
|
323
|
+
columnNodes: MatrixNode[];
|
|
324
|
+
cells: MatrixCell[];
|
|
325
|
+
totals: MatrixTotals;
|
|
326
|
+
sort: MatrixResolvedSort[];
|
|
327
|
+
formattingContext: MatrixFormattingContext;
|
|
328
|
+
pageInfo?: MatrixPageInfo;
|
|
329
|
+
warnings?: MatrixWarning[];
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
export declare type MatrixQueryStrategy = 'tall' | 'wide' | 'lazy' | 'export';
|
|
333
|
+
|
|
334
|
+
export declare type MatrixResolvedSort = {
|
|
335
|
+
id: string;
|
|
336
|
+
axis: 'row' | 'column';
|
|
337
|
+
targetInstanceId?: string;
|
|
338
|
+
direction: 'asc' | 'desc';
|
|
339
|
+
nulls?: 'warehouseDefault' | 'first' | 'last';
|
|
340
|
+
scope?: 'global' | 'withinParent';
|
|
341
|
+
by: SemaphorMatrixSortRule['by'];
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
export declare type MatrixShape = 'hierarchical' | 'pivot';
|
|
345
|
+
|
|
346
|
+
export declare type MatrixTotals = {
|
|
347
|
+
rows?: boolean;
|
|
348
|
+
columns?: boolean;
|
|
349
|
+
grandTotal?: boolean | {
|
|
350
|
+
rows?: boolean;
|
|
351
|
+
columns?: boolean;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
export declare type MatrixWarning = {
|
|
356
|
+
code: string;
|
|
357
|
+
message: string;
|
|
358
|
+
path?: string;
|
|
359
|
+
severity?: 'info' | 'warning' | 'error';
|
|
360
|
+
};
|
|
361
|
+
|
|
79
362
|
export declare function normalizeAnalyticsCatalogDataType(value: unknown): AnalyticsCatalogDataType;
|
|
80
363
|
|
|
81
364
|
export declare function normalizeAnalyticsCatalogName(value: unknown): string;
|
|
@@ -351,7 +634,7 @@ export declare type SemaphorAnalyticsFilterBase = {
|
|
|
351
634
|
|
|
352
635
|
export declare type SemaphorAnalyticsFilterOperator = SemaphorInputOperator | 'not_contains' | 'is_null' | 'is_not_null';
|
|
353
636
|
|
|
354
|
-
export declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent;
|
|
637
|
+
export declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent | SemaphorMatrixIntent;
|
|
355
638
|
|
|
356
639
|
export declare type SemaphorAnalyticsIntentFixtureName = keyof typeof SEMAPHOR_ANALYTICS_INTENT_FIXTURES;
|
|
357
640
|
|
|
@@ -410,7 +693,7 @@ export declare type SemaphorAnalyticsRepairHint = {
|
|
|
410
693
|
recommendedNextStep: string;
|
|
411
694
|
};
|
|
412
695
|
|
|
413
|
-
export declare type SemaphorAnalyticsResult = SemaphorMetricResult | SemaphorRecordsResult | SemaphorInputOptionsResult | SemaphorSqlResult;
|
|
696
|
+
export declare type SemaphorAnalyticsResult = SemaphorMetricResult | SemaphorRecordsResult | SemaphorInputOptionsResult | SemaphorSqlResult | SemaphorMatrixResult;
|
|
414
697
|
|
|
415
698
|
export declare type SemaphorAnalyticsResultBase = {
|
|
416
699
|
intentId?: string;
|
|
@@ -506,16 +789,63 @@ export declare type SemaphorDashboardViewIntent = {
|
|
|
506
789
|
text?: string;
|
|
507
790
|
};
|
|
508
791
|
|
|
792
|
+
export declare type SemaphorDerivedFieldAggregationBehavior = 'additive' | 'non_additive' | 'ratio_of_sums' | 'weighted' | 'pre_aggregated' | 'snapshot';
|
|
793
|
+
|
|
794
|
+
export declare type SemaphorDerivedFieldAggregationStrategy = 'default' | 'symmetric_aggregate' | 'aggregate_then_join' | 'weighted';
|
|
795
|
+
|
|
796
|
+
export declare type SemaphorDerivedFieldComputeStage = 'row' | 'aggregate';
|
|
797
|
+
|
|
798
|
+
export declare type SemaphorDerivedFieldDefinition = {
|
|
799
|
+
kind: 'derived_field';
|
|
800
|
+
name: string;
|
|
801
|
+
label: string;
|
|
802
|
+
description?: string;
|
|
803
|
+
resultRole: SemaphorDerivedFieldResultRole;
|
|
804
|
+
dataType: NonNullable<SemaphorFieldRef['dataType']>;
|
|
805
|
+
computeStage: SemaphorDerivedFieldComputeStage;
|
|
806
|
+
expression: string;
|
|
807
|
+
expressionLanguage?: 'semaphor_sql_template';
|
|
808
|
+
inputs: Record<string, SemaphorDerivedFieldInput>;
|
|
809
|
+
defaultAggregate?: SemaphorAggregateFunction;
|
|
810
|
+
aggregationBehavior?: SemaphorDerivedFieldAggregationBehavior;
|
|
811
|
+
aggregationStrategy?: SemaphorDerivedFieldAggregationStrategy;
|
|
812
|
+
format?: unknown;
|
|
813
|
+
tags?: string[];
|
|
814
|
+
};
|
|
815
|
+
|
|
816
|
+
export declare type SemaphorDerivedFieldInput = {
|
|
817
|
+
kind: 'field';
|
|
818
|
+
field: SemaphorFieldRef;
|
|
819
|
+
aggregate?: SemaphorAggregateFunction;
|
|
820
|
+
} | {
|
|
821
|
+
kind: 'metric';
|
|
822
|
+
metric: SemaphorFieldRef;
|
|
823
|
+
} | {
|
|
824
|
+
kind: 'dimension';
|
|
825
|
+
dimension: SemaphorFieldRef;
|
|
826
|
+
};
|
|
827
|
+
|
|
828
|
+
export declare type SemaphorDerivedFieldResultRole = 'measure' | 'group' | 'date' | 'id' | 'filter';
|
|
829
|
+
|
|
509
830
|
export declare type SemaphorDialect = 'postgres' | 'mysql' | 'mssql' | 'snowflake' | 'clickhouse' | 'bigquery' | 'redshift' | 'duckdb' | 'sqlite' | 'unknown';
|
|
510
831
|
|
|
511
832
|
export declare type SemaphorExecutionFieldRef = SemaphorFieldRef & {
|
|
512
833
|
semanticAggregate?: SemaphorAggregateFunction;
|
|
513
834
|
effectiveAggregate?: SemaphorAggregateFunction;
|
|
514
835
|
aggregateSource?: SemaphorMetricAggregateSource;
|
|
836
|
+
derivedField?: SemaphorDerivedFieldDefinition;
|
|
515
837
|
};
|
|
516
838
|
|
|
517
839
|
export declare type SemaphorExperienceIntent = SemaphorDashboardIntent;
|
|
518
840
|
|
|
841
|
+
/**
|
|
842
|
+
* Explorer-backed table source. This is intentionally distinct from raw SQL:
|
|
843
|
+
* matrix planning needs stable source metadata, fields, and dialect context.
|
|
844
|
+
*/
|
|
845
|
+
export declare type SemaphorExplorerSourceRef = Extract<SemaphorSourceRef, {
|
|
846
|
+
kind: 'physical';
|
|
847
|
+
}>;
|
|
848
|
+
|
|
519
849
|
export declare type SemaphorFieldRef = {
|
|
520
850
|
name: string;
|
|
521
851
|
label?: string;
|
|
@@ -550,6 +880,7 @@ export declare type SemaphorInputOptionsIntent = {
|
|
|
550
880
|
field: SemaphorFieldRef;
|
|
551
881
|
search?: string;
|
|
552
882
|
limit?: number;
|
|
883
|
+
derivedFields?: SemaphorDerivedFieldDefinition[];
|
|
553
884
|
};
|
|
554
885
|
|
|
555
886
|
export declare type SemaphorInputOptionsResult = SemaphorAnalyticsResultBase & {
|
|
@@ -584,6 +915,157 @@ export declare type SemaphorInputSpec = {
|
|
|
584
915
|
scope?: SemaphorInputScope;
|
|
585
916
|
};
|
|
586
917
|
|
|
918
|
+
export declare type SemaphorMatrixAxisExpansionOptions = {
|
|
919
|
+
defaultDepth?: number;
|
|
920
|
+
lazy?: boolean;
|
|
921
|
+
expandedPaths?: SemaphorMatrixMemberPathSegment[][];
|
|
922
|
+
};
|
|
923
|
+
|
|
924
|
+
export declare type SemaphorMatrixAxisLevel = {
|
|
925
|
+
id?: string;
|
|
926
|
+
field: SemaphorFieldRef;
|
|
927
|
+
grain?: SemaphorTimeGrain;
|
|
928
|
+
label?: string;
|
|
929
|
+
subtotal?: boolean | SemaphorMatrixSubtotalOptions;
|
|
930
|
+
sortBy?: SemaphorMatrixAxisSortRule;
|
|
931
|
+
};
|
|
932
|
+
|
|
933
|
+
export declare type SemaphorMatrixAxisSortRule = {
|
|
934
|
+
direction: 'asc' | 'desc';
|
|
935
|
+
by: {
|
|
936
|
+
kind: 'label';
|
|
937
|
+
} | {
|
|
938
|
+
kind: 'field';
|
|
939
|
+
field: SemaphorFieldRef;
|
|
940
|
+
aggregate?: SemaphorAggregateFunction;
|
|
941
|
+
};
|
|
942
|
+
nulls?: 'warehouseDefault' | 'first' | 'last';
|
|
943
|
+
scope?: 'global' | 'withinParent';
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
export declare type SemaphorMatrixDisplayLimitOptions = {
|
|
947
|
+
rows?: SemaphorMatrixDisplayLimitRule;
|
|
948
|
+
columns?: SemaphorMatrixDisplayLimitRule;
|
|
949
|
+
};
|
|
950
|
+
|
|
951
|
+
export declare type SemaphorMatrixDisplayLimitRule = {
|
|
952
|
+
limit: number;
|
|
953
|
+
by?: 'label' | 'value';
|
|
954
|
+
direction?: 'top' | 'bottom';
|
|
955
|
+
others?: boolean | {
|
|
956
|
+
label?: string;
|
|
957
|
+
};
|
|
958
|
+
};
|
|
959
|
+
|
|
960
|
+
export declare type SemaphorMatrixExpansionOptions = {
|
|
961
|
+
rows?: SemaphorMatrixAxisExpansionOptions;
|
|
962
|
+
columns?: SemaphorMatrixAxisExpansionOptions;
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
export declare type SemaphorMatrixIntent = {
|
|
966
|
+
kind: 'matrix';
|
|
967
|
+
version?: SemaphorProtocolVersion;
|
|
968
|
+
id?: string;
|
|
969
|
+
label?: string;
|
|
970
|
+
source: SemaphorMatrixSourceRef;
|
|
971
|
+
rows: SemaphorMatrixAxisLevel[];
|
|
972
|
+
columns?: SemaphorMatrixAxisLevel[];
|
|
973
|
+
values: SemaphorMatrixValueField[];
|
|
974
|
+
filters?: SemaphorAnalyticsFilter[];
|
|
975
|
+
inputs?: SemaphorInputBinding[];
|
|
976
|
+
totals?: SemaphorMatrixTotalOptions;
|
|
977
|
+
sort?: SemaphorMatrixSortRule[];
|
|
978
|
+
expansion?: SemaphorMatrixExpansionOptions;
|
|
979
|
+
layout?: SemaphorMatrixLayoutOptions;
|
|
980
|
+
displayLimits?: SemaphorMatrixDisplayLimitOptions;
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
export declare type SemaphorMatrixLayoutOptions = {
|
|
984
|
+
hierarchy?: 'compact' | 'tabular' | 'outline';
|
|
985
|
+
valuesPlacement?: 'columns' | 'rows';
|
|
986
|
+
stickyRowHeaders?: boolean;
|
|
987
|
+
stickyColumnHeaders?: boolean;
|
|
988
|
+
};
|
|
989
|
+
|
|
990
|
+
export declare type SemaphorMatrixMemberPathSegment = {
|
|
991
|
+
levelId: string;
|
|
992
|
+
value: unknown;
|
|
993
|
+
};
|
|
994
|
+
|
|
995
|
+
export declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
|
|
996
|
+
kind: 'matrix';
|
|
997
|
+
intent: SemaphorMatrixIntent;
|
|
998
|
+
payload: MatrixPayload;
|
|
999
|
+
grid: MatrixGridProjection;
|
|
1000
|
+
expansion?: MatrixExpansionResponseHints;
|
|
1001
|
+
};
|
|
1002
|
+
|
|
1003
|
+
export declare type SemaphorMatrixSortRule = {
|
|
1004
|
+
axis: 'row' | 'column';
|
|
1005
|
+
targetId?: string;
|
|
1006
|
+
direction: 'asc' | 'desc';
|
|
1007
|
+
by: {
|
|
1008
|
+
kind: 'label';
|
|
1009
|
+
} | {
|
|
1010
|
+
kind: 'field';
|
|
1011
|
+
field: SemaphorFieldRef;
|
|
1012
|
+
aggregate?: SemaphorAggregateFunction;
|
|
1013
|
+
} | {
|
|
1014
|
+
kind: 'value';
|
|
1015
|
+
valueId: string;
|
|
1016
|
+
rowPath?: SemaphorMatrixMemberPathSegment[];
|
|
1017
|
+
columnPath?: SemaphorMatrixMemberPathSegment[];
|
|
1018
|
+
};
|
|
1019
|
+
nulls?: 'warehouseDefault' | 'first' | 'last';
|
|
1020
|
+
scope?: 'global' | 'withinParent';
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1023
|
+
export declare type SemaphorMatrixSourceRef = SemaphorSemanticSourceRef | SemaphorExplorerSourceRef;
|
|
1024
|
+
|
|
1025
|
+
export declare type SemaphorMatrixSubtotalOptions = {
|
|
1026
|
+
enabled?: boolean;
|
|
1027
|
+
position?: 'before' | 'after';
|
|
1028
|
+
label?: string;
|
|
1029
|
+
};
|
|
1030
|
+
|
|
1031
|
+
export declare type SemaphorMatrixTotalCalculation = {
|
|
1032
|
+
kind: 'defaultAggregate';
|
|
1033
|
+
} | {
|
|
1034
|
+
kind: 'blank';
|
|
1035
|
+
} | {
|
|
1036
|
+
kind: 'labelOnly';
|
|
1037
|
+
label?: string;
|
|
1038
|
+
} | {
|
|
1039
|
+
kind: 'customAggregate';
|
|
1040
|
+
aggregate: SemaphorAggregateFunction;
|
|
1041
|
+
} | {
|
|
1042
|
+
kind: 'percentOfParent';
|
|
1043
|
+
} | {
|
|
1044
|
+
kind: 'percentOfGrandTotal';
|
|
1045
|
+
} | {
|
|
1046
|
+
kind: 'customExpression';
|
|
1047
|
+
expressionId: string;
|
|
1048
|
+
};
|
|
1049
|
+
|
|
1050
|
+
export declare type SemaphorMatrixTotalOptions = {
|
|
1051
|
+
rows?: boolean | 'perLevel';
|
|
1052
|
+
columns?: boolean | 'perLevel';
|
|
1053
|
+
grandTotal?: boolean | {
|
|
1054
|
+
rows?: boolean;
|
|
1055
|
+
columns?: boolean;
|
|
1056
|
+
};
|
|
1057
|
+
rowPosition?: 'top' | 'bottom';
|
|
1058
|
+
columnPosition?: 'left' | 'right';
|
|
1059
|
+
};
|
|
1060
|
+
|
|
1061
|
+
export declare type SemaphorMatrixValueField = {
|
|
1062
|
+
id?: string;
|
|
1063
|
+
field: SemaphorFieldRef;
|
|
1064
|
+
aggregate?: SemaphorAggregateFunction;
|
|
1065
|
+
label?: string;
|
|
1066
|
+
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
1067
|
+
};
|
|
1068
|
+
|
|
587
1069
|
export declare type SemaphorMetricAggregateSource = 'semantic_model' | 'caller_override' | 'default_sum';
|
|
588
1070
|
|
|
589
1071
|
export declare type SemaphorMetricAnalysis = {
|
|
@@ -617,6 +1099,7 @@ export declare type SemaphorMetricIntent = {
|
|
|
617
1099
|
};
|
|
618
1100
|
inputs?: SemaphorInputBinding[];
|
|
619
1101
|
limit?: number;
|
|
1102
|
+
derivedFields?: SemaphorDerivedFieldDefinition[];
|
|
620
1103
|
};
|
|
621
1104
|
|
|
622
1105
|
export declare type SemaphorMetricResult = SemaphorAnalyticsResultBase & {
|
|
@@ -693,6 +1176,7 @@ export declare type SemaphorRecordsIntent = {
|
|
|
693
1176
|
direction: 'asc' | 'desc';
|
|
694
1177
|
};
|
|
695
1178
|
inputs?: SemaphorInputBinding[];
|
|
1179
|
+
derivedFields?: SemaphorDerivedFieldDefinition[];
|
|
696
1180
|
};
|
|
697
1181
|
|
|
698
1182
|
export declare type SemaphorRecordsResult = SemaphorAnalyticsResultBase & {
|
|
@@ -738,6 +1222,44 @@ export declare type SemaphorRelativeTimeWindow = {
|
|
|
738
1222
|
completeness?: 'include_partial' | 'complete_periods';
|
|
739
1223
|
};
|
|
740
1224
|
|
|
1225
|
+
export declare type SemaphorResultCalculation = {
|
|
1226
|
+
id: string;
|
|
1227
|
+
label: string;
|
|
1228
|
+
kind: 'percent_of_total';
|
|
1229
|
+
input: SemaphorResultColumnRef;
|
|
1230
|
+
denominator?: SemaphorResultCalculationDenominator;
|
|
1231
|
+
output: SemaphorResultCalculationOutput;
|
|
1232
|
+
} | {
|
|
1233
|
+
id: string;
|
|
1234
|
+
label: string;
|
|
1235
|
+
kind: 'rank';
|
|
1236
|
+
input: SemaphorResultColumnRef;
|
|
1237
|
+
order?: 'asc' | 'desc';
|
|
1238
|
+
output: SemaphorResultCalculationOutput;
|
|
1239
|
+
} | {
|
|
1240
|
+
id: string;
|
|
1241
|
+
label: string;
|
|
1242
|
+
kind: 'running_total' | 'previous_row_delta';
|
|
1243
|
+
input: SemaphorResultColumnRef;
|
|
1244
|
+
orderBy?: SemaphorResultColumnRef;
|
|
1245
|
+
output: SemaphorResultCalculationOutput;
|
|
1246
|
+
};
|
|
1247
|
+
|
|
1248
|
+
export declare type SemaphorResultCalculationDenominator = {
|
|
1249
|
+
scope: 'returned_result';
|
|
1250
|
+
} | {
|
|
1251
|
+
scope: 'population';
|
|
1252
|
+
metric: SemaphorFieldRef;
|
|
1253
|
+
filters?: SemaphorAnalyticsFilter[];
|
|
1254
|
+
};
|
|
1255
|
+
|
|
1256
|
+
export declare type SemaphorResultCalculationOutput = {
|
|
1257
|
+
key: string;
|
|
1258
|
+
label?: string;
|
|
1259
|
+
dataType?: SemaphorFieldRef['dataType'];
|
|
1260
|
+
format?: unknown;
|
|
1261
|
+
};
|
|
1262
|
+
|
|
741
1263
|
export declare type SemaphorResultColumn = {
|
|
742
1264
|
/**
|
|
743
1265
|
* Stable row accessor for this result. Consumers should read values with
|
|
@@ -756,8 +1278,19 @@ export declare type SemaphorResultColumn = {
|
|
|
756
1278
|
dataType?: SemaphorFieldRef['dataType'];
|
|
757
1279
|
aggregate?: SemaphorFieldRef['aggregate'];
|
|
758
1280
|
source?: SemaphorFieldRef['source'];
|
|
1281
|
+
derivedField?: SemaphorDerivedFieldDefinition;
|
|
1282
|
+
};
|
|
1283
|
+
|
|
1284
|
+
export declare type SemaphorResultColumnRef = {
|
|
1285
|
+
columnKey: string;
|
|
1286
|
+
} | {
|
|
1287
|
+
field: SemaphorFieldRef;
|
|
759
1288
|
};
|
|
760
1289
|
|
|
1290
|
+
export declare type SemaphorSemanticSourceRef = Extract<SemaphorSourceRef, {
|
|
1291
|
+
kind: 'semantic';
|
|
1292
|
+
}>;
|
|
1293
|
+
|
|
761
1294
|
export declare type SemaphorSourceCoordinateInput = {
|
|
762
1295
|
databaseName?: string;
|
|
763
1296
|
schemaName?: string;
|
|
@@ -847,6 +1380,9 @@ export declare type SemaphorViewPresentation = {
|
|
|
847
1380
|
} | {
|
|
848
1381
|
kind: 'table';
|
|
849
1382
|
columns?: string[];
|
|
1383
|
+
} | {
|
|
1384
|
+
kind: 'matrixTable';
|
|
1385
|
+
mode?: 'auto' | 'pivot' | 'hierarchical';
|
|
850
1386
|
} | {
|
|
851
1387
|
kind: 'text';
|
|
852
1388
|
};
|
|
@@ -857,6 +1393,10 @@ export declare function validateSemaphorAnalyticsRecoveryPlan(plan: SemaphorAnal
|
|
|
857
1393
|
|
|
858
1394
|
export declare function validateSemaphorDashboardIntent(intent: SemaphorDashboardIntent): SemaphorValidationResult;
|
|
859
1395
|
|
|
1396
|
+
export declare function validateSemaphorDerivedFieldDefinition(definition: SemaphorDerivedFieldDefinition): SemaphorValidationResult;
|
|
1397
|
+
|
|
860
1398
|
export declare function validateSemaphorOperationIntent(intent: SemaphorOperationIntent): SemaphorAnalyticsValidationResult;
|
|
861
1399
|
|
|
1400
|
+
export declare function validateSemaphorResultCalculation(calculation: SemaphorResultCalculation): SemaphorValidationResult;
|
|
1401
|
+
|
|
862
1402
|
export { }
|