react-semaphor 0.1.368 → 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.
- package/dist/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +1 -1
- package/dist/brand-studio/index.cjs +5 -5
- package/dist/brand-studio/index.js +24 -23
- package/dist/chunks/{braces-Cc86y9Ov.js → braces-C3-w6xDL.js} +1 -1
- package/dist/chunks/{braces-CXvY9MwQ.js → braces-C8QqW4wu.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-BOFlzOJg.js → calendar-preferences-dialog-6q51A6XC.js} +3 -3
- package/dist/chunks/{calendar-preferences-dialog-ZzwfJv2J.js → calendar-preferences-dialog-CUGzkNcE.js} +1 -1
- package/dist/chunks/{chevrons-up-down-CUZL1zaU.js → chevrons-up-down-CnCSGY02.js} +1 -1
- package/dist/chunks/{chevrons-up-down-qQMadOWA.js → chevrons-up-down-DSvLu4Ye.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-9-PCYMjR.js → dashboard-briefing-launcher-BEZnvIla.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-D2lBFqAd.js → dashboard-briefing-launcher-ptERmNJr.js} +176 -177
- package/dist/chunks/{dashboard-controls-D4bUHAjX.js → dashboard-controls-CGt6_hMf.js} +11 -11
- package/dist/chunks/{dashboard-controls-BIk094Ah.js → dashboard-controls-CqKC5oEk.js} +77 -77
- package/dist/chunks/{dashboard-json-DImOf512.js → dashboard-json-6SgPm_QW.js} +13 -14
- package/dist/chunks/dashboard-json-CYSbOdmE.js +1 -0
- package/dist/chunks/{edit-dashboard-visual-DTxkV6Fl.js → edit-dashboard-visual-ByQx_M2i.js} +8 -9
- package/dist/chunks/{edit-dashboard-visual-BHKlcqQR.js → edit-dashboard-visual-w6hKbjlw.js} +1 -1
- package/dist/chunks/index-BtqYNH_S.js +1361 -0
- package/dist/chunks/{index-BVEIk-rB.js → index-CPyEi9gS.js} +72498 -76193
- package/dist/chunks/{palette-DPuAc82h.js → palette-D-f4-82S.js} +1 -1
- package/dist/chunks/{palette-C1k347Tb.js → palette-DUGktM-M.js} +1 -1
- package/dist/chunks/{resource-management-panel-BeHceP2D.js → resource-management-panel-Bf8-3eUf.js} +1 -1
- package/dist/chunks/{resource-management-panel-BOfbSf48.js → resource-management-panel-mJ84NxzC.js} +152 -152
- package/dist/chunks/save-D3YYinDz.js +6 -0
- package/dist/chunks/save-kkBEBeLg.js +21 -0
- package/dist/chunks/{switch-xcWLtWs0.js → switch-Dkx2qEOr.js} +758 -776
- package/dist/chunks/{switch-C0S63HAv.js → switch-fIkmwzUt.js} +27 -32
- package/dist/chunks/{use-create-flow-overlay-state-B5FygfQL.js → use-create-flow-overlay-state-BfoXDDrd.js} +190 -189
- package/dist/chunks/use-create-flow-overlay-state-c6rCm36x.js +26 -0
- package/dist/chunks/{use-visual-utils-DxDE8S8M.js → use-visual-utils-C_c-aiqi.js} +1 -1
- package/dist/chunks/{use-visual-utils-CszWnFBW.js → use-visual-utils-NN0e3fBP.js} +13 -13
- package/dist/chunks/validation-DYL3ArlL.js +1 -0
- package/dist/chunks/validation-PPSpYtVf.js +900 -0
- package/dist/chunks/validators-CgxWT8UX.js +1 -0
- package/dist/chunks/validators-DBNa-eb1.js +1799 -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 +51 -1
- package/dist/data-app-builder/index.js +3666 -2
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +661 -389
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +14 -14
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +472 -3
- package/dist/types/dashboard-assistant.d.ts +469 -3
- package/dist/types/dashboard-authoring.d.ts +170 -2
- package/dist/types/data-app-builder.d.ts +167 -2
- package/dist/types/data-app-sdk-validation.d.ts +576 -25
- package/dist/types/data-app-sdk.d.ts +655 -37
- package/dist/types/main.d.ts +167 -2
- package/package.json +1 -1
- package/dist/chunks/dashboard-json-Bo1kX6W1.js +0 -1
- package/dist/chunks/index-HjDeEytV.js +0 -1411
- package/dist/chunks/use-create-flow-overlay-state-DOXTbTcQ.js +0 -26
- package/dist/chunks/validation-CrUjNWby.js +0 -689
- package/dist/chunks/validation-DGl8wnTt.js +0 -1
- package/dist/chunks/validators-Dq5X4mp0.js +0 -1
- package/dist/chunks/validators-L0xEXtjf.js +0 -965
|
@@ -534,6 +534,289 @@ declare interface JoinPlan {
|
|
|
534
534
|
|
|
535
535
|
declare type LogicalOperator = 'AND' | 'OR';
|
|
536
536
|
|
|
537
|
+
declare type MatrixAxisLevelDescriptor = {
|
|
538
|
+
instanceId: string;
|
|
539
|
+
fieldKey: string;
|
|
540
|
+
label: string;
|
|
541
|
+
field: SemaphorFieldRef;
|
|
542
|
+
grain?: SemaphorTimeGrain;
|
|
543
|
+
subtotal?: SemaphorMatrixSubtotalOptions;
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
declare type MatrixAxisPayload = {
|
|
547
|
+
id: 'rows' | 'columns';
|
|
548
|
+
levels: MatrixAxisLevelDescriptor[];
|
|
549
|
+
nodes: MatrixNode[];
|
|
550
|
+
};
|
|
551
|
+
|
|
552
|
+
declare type MatrixCapability = 'rowHierarchy' | 'columnHierarchy' | 'rowSubtotals' | 'columnSubtotals' | 'grandTotals' | 'lazyRows' | 'lazyColumns' | 'conditionalFormatting' | 'visualExport' | (string & {});
|
|
553
|
+
|
|
554
|
+
declare type MatrixCell = {
|
|
555
|
+
id: string;
|
|
556
|
+
rowNodeId: string;
|
|
557
|
+
columnNodeId?: string;
|
|
558
|
+
measureInstanceId: string;
|
|
559
|
+
rowPath: MatrixMemberPathSegment[];
|
|
560
|
+
columnPath: MatrixMemberPathSegment[];
|
|
561
|
+
rawValue: unknown;
|
|
562
|
+
presence: MatrixCellPresence;
|
|
563
|
+
formattedValue?: string;
|
|
564
|
+
role: MatrixCellRole;
|
|
565
|
+
aggregateFunction?: SemaphorAggregateFunction;
|
|
566
|
+
formattingScope: MatrixCellFormattingScope;
|
|
567
|
+
actions?: MatrixCellAction[];
|
|
568
|
+
};
|
|
569
|
+
|
|
570
|
+
declare type MatrixCellAction = {
|
|
571
|
+
kind: 'requestSubgoal' | 'filter' | 'copyValue' | 'explainCalculation' | 'inspectContributingRows' | 'drillThrough' | (string & {});
|
|
572
|
+
label?: string;
|
|
573
|
+
payload?: Record<string, unknown>;
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
declare type MatrixCellFormattingScope = {
|
|
577
|
+
rowNodeId: string;
|
|
578
|
+
columnNodeId?: string;
|
|
579
|
+
measureInstanceId: string;
|
|
580
|
+
role: MatrixCellRole;
|
|
581
|
+
rowPath: MatrixMemberPathSegment[];
|
|
582
|
+
columnPath: MatrixMemberPathSegment[];
|
|
583
|
+
};
|
|
584
|
+
|
|
585
|
+
declare type MatrixCellPresence = 'present' | 'presentNull' | 'missing' | 'densified';
|
|
586
|
+
|
|
587
|
+
declare type MatrixCellRole = 'value' | 'rowSubtotal' | 'columnSubtotal' | 'subtotalIntersection' | 'rowGrandTotal' | 'columnGrandTotal' | 'matrixGrandTotal';
|
|
588
|
+
|
|
589
|
+
declare type MatrixExecutionMetadata = {
|
|
590
|
+
strategy?: MatrixQueryStrategy;
|
|
591
|
+
dialect?: SemaphorDialect;
|
|
592
|
+
rowNodeCount?: number;
|
|
593
|
+
columnNodeCount?: number;
|
|
594
|
+
cellCount?: number;
|
|
595
|
+
groupingSetCount?: number;
|
|
596
|
+
queryDurationMs?: number;
|
|
597
|
+
budgetRejected?: boolean;
|
|
598
|
+
cacheStatus?: 'hit' | 'miss' | 'bypass';
|
|
599
|
+
[key: string]: unknown;
|
|
600
|
+
};
|
|
601
|
+
|
|
602
|
+
declare type MatrixExpansionRequest = {
|
|
603
|
+
axis: 'row' | 'column';
|
|
604
|
+
path: MatrixMemberPathSegment[];
|
|
605
|
+
depth?: number;
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
declare type MatrixExpansionResponseHints = {
|
|
609
|
+
rowLazyLoading?: boolean;
|
|
610
|
+
columnLazyLoading?: boolean;
|
|
611
|
+
expandableRowNodeIds?: string[];
|
|
612
|
+
expandableColumnNodeIds?: string[];
|
|
613
|
+
nextRequests?: MatrixExpansionRequest[];
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
declare type MatrixFieldDescriptor = {
|
|
617
|
+
instanceId: string;
|
|
618
|
+
fieldKey: string;
|
|
619
|
+
field: SemaphorFieldRef;
|
|
620
|
+
role: 'row' | 'column' | 'measure' | 'sort' | 'filter';
|
|
621
|
+
label?: string;
|
|
622
|
+
};
|
|
623
|
+
|
|
624
|
+
declare type MatrixFieldDirectory = {
|
|
625
|
+
fieldsByInstanceId: Record<string, MatrixFieldDescriptor>;
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
declare type MatrixFormattingContext = {
|
|
629
|
+
domains?: Record<string, {
|
|
630
|
+
min?: number;
|
|
631
|
+
max?: number;
|
|
632
|
+
}>;
|
|
633
|
+
rules?: Array<Record<string, unknown>>;
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
declare type MatrixGridCell = {
|
|
637
|
+
id: string;
|
|
638
|
+
columnId: string;
|
|
639
|
+
cellId?: string;
|
|
640
|
+
rawValue: unknown;
|
|
641
|
+
formattedValue?: string;
|
|
642
|
+
presence: MatrixCellPresence;
|
|
643
|
+
role: MatrixCellRole;
|
|
644
|
+
measureInstanceId: string;
|
|
645
|
+
rowPath: MatrixMemberPathSegment[];
|
|
646
|
+
columnPath: MatrixMemberPathSegment[];
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
declare type MatrixGridColumn = {
|
|
650
|
+
id: string;
|
|
651
|
+
label: string;
|
|
652
|
+
columnNodeId?: string;
|
|
653
|
+
columnPath: MatrixMemberPathSegment[];
|
|
654
|
+
measureInstanceId: string;
|
|
655
|
+
role: 'value' | 'columnSubtotal' | 'columnGrandTotal';
|
|
656
|
+
};
|
|
657
|
+
|
|
658
|
+
declare type MatrixGridHeaderCell = {
|
|
659
|
+
id: string;
|
|
660
|
+
label: string;
|
|
661
|
+
role: 'rowHeader' | 'columnHeader' | 'measureHeader' | 'subtotal' | 'grandTotal';
|
|
662
|
+
colSpan: number;
|
|
663
|
+
rowSpan: number;
|
|
664
|
+
columnPath: MatrixMemberPathSegment[];
|
|
665
|
+
measureInstanceId?: string;
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
declare type MatrixGridHeaderRow = {
|
|
669
|
+
id: string;
|
|
670
|
+
cells: MatrixGridHeaderCell[];
|
|
671
|
+
};
|
|
672
|
+
|
|
673
|
+
declare type MatrixGridProjection = {
|
|
674
|
+
schemaVersion: 1;
|
|
675
|
+
shape: MatrixShape;
|
|
676
|
+
rowHeaderLevels: MatrixGridRowHeaderLevel[];
|
|
677
|
+
columnHeaderRows: MatrixGridHeaderRow[];
|
|
678
|
+
columns: MatrixGridColumn[];
|
|
679
|
+
rows: MatrixGridRow[];
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
declare type MatrixGridRow = {
|
|
683
|
+
id: string;
|
|
684
|
+
rowNodeId: string;
|
|
685
|
+
rowPath: MatrixMemberPathSegment[];
|
|
686
|
+
depth: number;
|
|
687
|
+
label: string;
|
|
688
|
+
role: 'value' | 'rowSubtotal' | 'rowGrandTotal';
|
|
689
|
+
isExpanded?: boolean;
|
|
690
|
+
hasChildren?: boolean;
|
|
691
|
+
cells: MatrixGridCell[];
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
declare type MatrixGridRowHeaderLevel = {
|
|
695
|
+
id: string;
|
|
696
|
+
label: string;
|
|
697
|
+
fieldInstanceId: string;
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
declare type MatrixMeasureDescriptor = {
|
|
701
|
+
instanceId: string;
|
|
702
|
+
fieldKey: string;
|
|
703
|
+
label: string;
|
|
704
|
+
field: SemaphorFieldRef;
|
|
705
|
+
aggregate?: SemaphorAggregateFunction;
|
|
706
|
+
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
declare type MatrixMeasureSemantics = {
|
|
710
|
+
kind: 'additive';
|
|
711
|
+
aggregate?: SemaphorAggregateFunction;
|
|
712
|
+
} | {
|
|
713
|
+
kind: 'semiAdditive';
|
|
714
|
+
aggregate?: SemaphorAggregateFunction;
|
|
715
|
+
grain?: SemaphorTimeGrain;
|
|
716
|
+
} | {
|
|
717
|
+
kind: 'nonAdditive';
|
|
718
|
+
aggregate?: SemaphorAggregateFunction;
|
|
719
|
+
} | {
|
|
720
|
+
kind: 'ratio';
|
|
721
|
+
numeratorMeasureInstanceId?: string;
|
|
722
|
+
denominatorMeasureInstanceId?: string;
|
|
723
|
+
} | {
|
|
724
|
+
kind: 'custom';
|
|
725
|
+
expressionId?: string;
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
declare type MatrixMemberPathSegment = {
|
|
729
|
+
instanceId: string;
|
|
730
|
+
fieldKey: string;
|
|
731
|
+
value: unknown;
|
|
732
|
+
label: string;
|
|
733
|
+
};
|
|
734
|
+
|
|
735
|
+
declare type MatrixNode = {
|
|
736
|
+
id: string;
|
|
737
|
+
axis: 'row' | 'column';
|
|
738
|
+
path: MatrixMemberPathSegment[];
|
|
739
|
+
level: number;
|
|
740
|
+
label: string;
|
|
741
|
+
value: unknown;
|
|
742
|
+
parentId?: string;
|
|
743
|
+
hasChildren: boolean;
|
|
744
|
+
isExpanded?: boolean;
|
|
745
|
+
isSubtotal?: boolean;
|
|
746
|
+
isGrandTotal?: boolean;
|
|
747
|
+
subtotalFunction?: SemaphorAggregateFunction;
|
|
748
|
+
childCount?: number;
|
|
749
|
+
actions?: MatrixNodeAction[];
|
|
750
|
+
};
|
|
751
|
+
|
|
752
|
+
declare type MatrixNodeAction = {
|
|
753
|
+
kind: 'expand' | 'collapse' | 'requestSubgoal' | 'filter' | 'drillThrough' | 'openRelatedRecords' | (string & {});
|
|
754
|
+
label?: string;
|
|
755
|
+
payload?: Record<string, unknown>;
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
declare type MatrixPageInfo = {
|
|
759
|
+
rowOffset?: number;
|
|
760
|
+
rowLimit?: number;
|
|
761
|
+
columnOffset?: number;
|
|
762
|
+
columnLimit?: number;
|
|
763
|
+
hasMoreRows?: boolean;
|
|
764
|
+
hasMoreColumns?: boolean;
|
|
765
|
+
};
|
|
766
|
+
|
|
767
|
+
declare type MatrixPayload = {
|
|
768
|
+
kind: 'matrixPayload';
|
|
769
|
+
schemaVersion: 1;
|
|
770
|
+
shape: MatrixShape;
|
|
771
|
+
capabilities: MatrixCapability[];
|
|
772
|
+
executionMetadata: MatrixExecutionMetadata;
|
|
773
|
+
axes: {
|
|
774
|
+
rows: MatrixAxisPayload;
|
|
775
|
+
columns: MatrixAxisPayload;
|
|
776
|
+
};
|
|
777
|
+
measures: MatrixMeasureDescriptor[];
|
|
778
|
+
measureSemantics: Record<string, MatrixMeasureSemantics>;
|
|
779
|
+
fieldDirectory: MatrixFieldDirectory;
|
|
780
|
+
rowNodes: MatrixNode[];
|
|
781
|
+
columnNodes: MatrixNode[];
|
|
782
|
+
cells: MatrixCell[];
|
|
783
|
+
totals: MatrixTotals;
|
|
784
|
+
sort: MatrixResolvedSort[];
|
|
785
|
+
formattingContext: MatrixFormattingContext;
|
|
786
|
+
pageInfo?: MatrixPageInfo;
|
|
787
|
+
warnings?: MatrixWarning[];
|
|
788
|
+
};
|
|
789
|
+
|
|
790
|
+
declare type MatrixQueryStrategy = 'tall' | 'wide' | 'lazy' | 'export';
|
|
791
|
+
|
|
792
|
+
declare type MatrixResolvedSort = {
|
|
793
|
+
id: string;
|
|
794
|
+
axis: 'row' | 'column';
|
|
795
|
+
targetInstanceId?: string;
|
|
796
|
+
direction: 'asc' | 'desc';
|
|
797
|
+
nulls?: 'warehouseDefault' | 'first' | 'last';
|
|
798
|
+
scope?: 'global' | 'withinParent';
|
|
799
|
+
by: SemaphorMatrixSortRule['by'];
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
declare type MatrixShape = 'hierarchical' | 'pivot';
|
|
803
|
+
|
|
804
|
+
declare type MatrixTotals = {
|
|
805
|
+
rows?: boolean;
|
|
806
|
+
columns?: boolean;
|
|
807
|
+
grandTotal?: boolean | {
|
|
808
|
+
rows?: boolean;
|
|
809
|
+
columns?: boolean;
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
declare type MatrixWarning = {
|
|
814
|
+
code: string;
|
|
815
|
+
message: string;
|
|
816
|
+
path?: string;
|
|
817
|
+
severity?: 'info' | 'warning' | 'error';
|
|
818
|
+
};
|
|
819
|
+
|
|
537
820
|
declare interface MetricField extends Field {
|
|
538
821
|
role: 'metric';
|
|
539
822
|
aggregate?: AggregateFunction;
|
|
@@ -648,7 +931,7 @@ declare type SemaphorAnalyticsFilterBase = {
|
|
|
648
931
|
|
|
649
932
|
declare type SemaphorAnalyticsFilterOperator = SemaphorInputOperator | 'not_contains' | 'is_null' | 'is_not_null';
|
|
650
933
|
|
|
651
|
-
declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent;
|
|
934
|
+
declare type SemaphorAnalyticsIntent = SemaphorMetricIntent | SemaphorRecordsIntent | SemaphorInputOptionsIntent | SemaphorSqlIntent | SemaphorMatrixIntent;
|
|
652
935
|
|
|
653
936
|
declare type SemaphorAnalyticsNullFilter = SemaphorAnalyticsFilterBase & {
|
|
654
937
|
operator: SemaphorAnalyticsNullFilterOperator;
|
|
@@ -673,7 +956,7 @@ declare type SemaphorAnalyticsRepairHint = {
|
|
|
673
956
|
recommendedNextStep: string;
|
|
674
957
|
};
|
|
675
958
|
|
|
676
|
-
declare type SemaphorAnalyticsResult = SemaphorMetricResult | SemaphorRecordsResult | SemaphorInputOptionsResult | SemaphorSqlResult;
|
|
959
|
+
declare type SemaphorAnalyticsResult = SemaphorMetricResult | SemaphorRecordsResult | SemaphorInputOptionsResult | SemaphorSqlResult | SemaphorMatrixResult;
|
|
677
960
|
|
|
678
961
|
declare type SemaphorAnalyticsResultBase = {
|
|
679
962
|
intentId?: string;
|
|
@@ -682,6 +965,7 @@ declare type SemaphorAnalyticsResultBase = {
|
|
|
682
965
|
rowCount?: number;
|
|
683
966
|
rowLimitExceeded?: boolean;
|
|
684
967
|
limit?: number;
|
|
968
|
+
pagination?: SemaphorPaginationMetadata;
|
|
685
969
|
};
|
|
686
970
|
|
|
687
971
|
declare type SemaphorAnalyticsValidationCode = 'missing_source' | 'invalid_source_kind' | 'missing_semantic_domain' | 'missing_dataset_name' | 'missing_connection_id' | 'missing_table_name' | 'missing_sql' | 'missing_metric' | 'missing_record_fields' | 'missing_input_options_field' | 'invalid_metric' | 'invalid_metric_list' | 'invalid_date_field' | 'invalid_dimension' | 'invalid_metric_dimensions' | 'conflicting_sql' | 'sql_policy_violation' | 'unsupported_intent_for_adapter' | 'invalid_analytics_kind' | 'invalid_analytics_intent';
|
|
@@ -741,6 +1025,14 @@ declare type SemaphorExecutionFieldRef = SemaphorFieldRef & {
|
|
|
741
1025
|
aggregateSource?: SemaphorMetricAggregateSource;
|
|
742
1026
|
};
|
|
743
1027
|
|
|
1028
|
+
/**
|
|
1029
|
+
* Explorer-backed table source. This is intentionally distinct from raw SQL:
|
|
1030
|
+
* matrix planning needs stable source metadata, fields, and dialect context.
|
|
1031
|
+
*/
|
|
1032
|
+
declare type SemaphorExplorerSourceRef = Extract<SemaphorSourceRef, {
|
|
1033
|
+
kind: 'physical';
|
|
1034
|
+
}>;
|
|
1035
|
+
|
|
744
1036
|
declare type SemaphorFieldRef = {
|
|
745
1037
|
name: string;
|
|
746
1038
|
label?: string;
|
|
@@ -752,6 +1044,9 @@ declare type SemaphorFieldRef = {
|
|
|
752
1044
|
|
|
753
1045
|
declare type SemaphorInputBinding = {
|
|
754
1046
|
inputId: string;
|
|
1047
|
+
kind?: 'filter' | 'control';
|
|
1048
|
+
controlRole?: 'grain' | 'metric' | 'dimension' | 'aggregation' | 'sqlParam';
|
|
1049
|
+
operator?: SemaphorInputOperator;
|
|
755
1050
|
field?: SemaphorFieldRef;
|
|
756
1051
|
};
|
|
757
1052
|
|
|
@@ -777,6 +1072,157 @@ declare type SemaphorInputOptionsResult = SemaphorAnalyticsResultBase & {
|
|
|
777
1072
|
}>;
|
|
778
1073
|
};
|
|
779
1074
|
|
|
1075
|
+
declare type SemaphorMatrixAxisExpansionOptions = {
|
|
1076
|
+
defaultDepth?: number;
|
|
1077
|
+
lazy?: boolean;
|
|
1078
|
+
expandedPaths?: SemaphorMatrixMemberPathSegment[][];
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
declare type SemaphorMatrixAxisLevel = {
|
|
1082
|
+
id?: string;
|
|
1083
|
+
field: SemaphorFieldRef;
|
|
1084
|
+
grain?: SemaphorTimeGrain;
|
|
1085
|
+
label?: string;
|
|
1086
|
+
subtotal?: boolean | SemaphorMatrixSubtotalOptions;
|
|
1087
|
+
sortBy?: SemaphorMatrixAxisSortRule;
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1090
|
+
declare type SemaphorMatrixAxisSortRule = {
|
|
1091
|
+
direction: 'asc' | 'desc';
|
|
1092
|
+
by: {
|
|
1093
|
+
kind: 'label';
|
|
1094
|
+
} | {
|
|
1095
|
+
kind: 'field';
|
|
1096
|
+
field: SemaphorFieldRef;
|
|
1097
|
+
aggregate?: SemaphorAggregateFunction;
|
|
1098
|
+
};
|
|
1099
|
+
nulls?: 'warehouseDefault' | 'first' | 'last';
|
|
1100
|
+
scope?: 'global' | 'withinParent';
|
|
1101
|
+
};
|
|
1102
|
+
|
|
1103
|
+
declare type SemaphorMatrixDisplayLimitOptions = {
|
|
1104
|
+
rows?: SemaphorMatrixDisplayLimitRule;
|
|
1105
|
+
columns?: SemaphorMatrixDisplayLimitRule;
|
|
1106
|
+
};
|
|
1107
|
+
|
|
1108
|
+
declare type SemaphorMatrixDisplayLimitRule = {
|
|
1109
|
+
limit: number;
|
|
1110
|
+
by?: 'label' | 'value';
|
|
1111
|
+
direction?: 'top' | 'bottom';
|
|
1112
|
+
others?: boolean | {
|
|
1113
|
+
label?: string;
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
|
|
1117
|
+
declare type SemaphorMatrixExpansionOptions = {
|
|
1118
|
+
rows?: SemaphorMatrixAxisExpansionOptions;
|
|
1119
|
+
columns?: SemaphorMatrixAxisExpansionOptions;
|
|
1120
|
+
};
|
|
1121
|
+
|
|
1122
|
+
declare type SemaphorMatrixIntent = {
|
|
1123
|
+
kind: 'matrix';
|
|
1124
|
+
version?: SemaphorProtocolVersion;
|
|
1125
|
+
id?: string;
|
|
1126
|
+
label?: string;
|
|
1127
|
+
source: SemaphorMatrixSourceRef;
|
|
1128
|
+
rows: SemaphorMatrixAxisLevel[];
|
|
1129
|
+
columns?: SemaphorMatrixAxisLevel[];
|
|
1130
|
+
values: SemaphorMatrixValueField[];
|
|
1131
|
+
filters?: SemaphorAnalyticsFilter[];
|
|
1132
|
+
inputs?: SemaphorInputBinding[];
|
|
1133
|
+
totals?: SemaphorMatrixTotalOptions;
|
|
1134
|
+
sort?: SemaphorMatrixSortRule[];
|
|
1135
|
+
expansion?: SemaphorMatrixExpansionOptions;
|
|
1136
|
+
layout?: SemaphorMatrixLayoutOptions;
|
|
1137
|
+
displayLimits?: SemaphorMatrixDisplayLimitOptions;
|
|
1138
|
+
};
|
|
1139
|
+
|
|
1140
|
+
declare type SemaphorMatrixLayoutOptions = {
|
|
1141
|
+
hierarchy?: 'compact' | 'tabular' | 'outline';
|
|
1142
|
+
valuesPlacement?: 'columns' | 'rows';
|
|
1143
|
+
stickyRowHeaders?: boolean;
|
|
1144
|
+
stickyColumnHeaders?: boolean;
|
|
1145
|
+
};
|
|
1146
|
+
|
|
1147
|
+
declare type SemaphorMatrixMemberPathSegment = {
|
|
1148
|
+
levelId: string;
|
|
1149
|
+
value: unknown;
|
|
1150
|
+
};
|
|
1151
|
+
|
|
1152
|
+
declare type SemaphorMatrixResult = SemaphorAnalyticsResultBase & {
|
|
1153
|
+
kind: 'matrix';
|
|
1154
|
+
intent: SemaphorMatrixIntent;
|
|
1155
|
+
payload: MatrixPayload;
|
|
1156
|
+
grid: MatrixGridProjection;
|
|
1157
|
+
expansion?: MatrixExpansionResponseHints;
|
|
1158
|
+
};
|
|
1159
|
+
|
|
1160
|
+
declare type SemaphorMatrixSortRule = {
|
|
1161
|
+
axis: 'row' | 'column';
|
|
1162
|
+
targetId?: string;
|
|
1163
|
+
direction: 'asc' | 'desc';
|
|
1164
|
+
by: {
|
|
1165
|
+
kind: 'label';
|
|
1166
|
+
} | {
|
|
1167
|
+
kind: 'field';
|
|
1168
|
+
field: SemaphorFieldRef;
|
|
1169
|
+
aggregate?: SemaphorAggregateFunction;
|
|
1170
|
+
} | {
|
|
1171
|
+
kind: 'value';
|
|
1172
|
+
valueId: string;
|
|
1173
|
+
rowPath?: SemaphorMatrixMemberPathSegment[];
|
|
1174
|
+
columnPath?: SemaphorMatrixMemberPathSegment[];
|
|
1175
|
+
};
|
|
1176
|
+
nulls?: 'warehouseDefault' | 'first' | 'last';
|
|
1177
|
+
scope?: 'global' | 'withinParent';
|
|
1178
|
+
};
|
|
1179
|
+
|
|
1180
|
+
declare type SemaphorMatrixSourceRef = SemaphorSemanticSourceRef | SemaphorExplorerSourceRef;
|
|
1181
|
+
|
|
1182
|
+
declare type SemaphorMatrixSubtotalOptions = {
|
|
1183
|
+
enabled?: boolean;
|
|
1184
|
+
position?: 'before' | 'after';
|
|
1185
|
+
label?: string;
|
|
1186
|
+
};
|
|
1187
|
+
|
|
1188
|
+
declare type SemaphorMatrixTotalCalculation = {
|
|
1189
|
+
kind: 'defaultAggregate';
|
|
1190
|
+
} | {
|
|
1191
|
+
kind: 'blank';
|
|
1192
|
+
} | {
|
|
1193
|
+
kind: 'labelOnly';
|
|
1194
|
+
label?: string;
|
|
1195
|
+
} | {
|
|
1196
|
+
kind: 'customAggregate';
|
|
1197
|
+
aggregate: SemaphorAggregateFunction;
|
|
1198
|
+
} | {
|
|
1199
|
+
kind: 'percentOfParent';
|
|
1200
|
+
} | {
|
|
1201
|
+
kind: 'percentOfGrandTotal';
|
|
1202
|
+
} | {
|
|
1203
|
+
kind: 'customExpression';
|
|
1204
|
+
expressionId: string;
|
|
1205
|
+
};
|
|
1206
|
+
|
|
1207
|
+
declare type SemaphorMatrixTotalOptions = {
|
|
1208
|
+
rows?: boolean | 'perLevel';
|
|
1209
|
+
columns?: boolean | 'perLevel';
|
|
1210
|
+
grandTotal?: boolean | {
|
|
1211
|
+
rows?: boolean;
|
|
1212
|
+
columns?: boolean;
|
|
1213
|
+
};
|
|
1214
|
+
rowPosition?: 'top' | 'bottom';
|
|
1215
|
+
columnPosition?: 'left' | 'right';
|
|
1216
|
+
};
|
|
1217
|
+
|
|
1218
|
+
declare type SemaphorMatrixValueField = {
|
|
1219
|
+
id?: string;
|
|
1220
|
+
field: SemaphorFieldRef;
|
|
1221
|
+
aggregate?: SemaphorAggregateFunction;
|
|
1222
|
+
label?: string;
|
|
1223
|
+
totalBehavior?: SemaphorMatrixTotalCalculation;
|
|
1224
|
+
};
|
|
1225
|
+
|
|
780
1226
|
declare type SemaphorMetricAggregateSource = 'semantic_model' | 'caller_override' | 'default_sum';
|
|
781
1227
|
|
|
782
1228
|
declare type SemaphorMetricAnalysis = {
|
|
@@ -823,6 +1269,20 @@ declare type SemaphorMetricResult = SemaphorAnalyticsResultBase & {
|
|
|
823
1269
|
};
|
|
824
1270
|
};
|
|
825
1271
|
|
|
1272
|
+
declare type SemaphorPaginationMetadata = {
|
|
1273
|
+
page: number;
|
|
1274
|
+
pageSize: number;
|
|
1275
|
+
pageCount: number;
|
|
1276
|
+
totalCount: number;
|
|
1277
|
+
hasNextPage: boolean;
|
|
1278
|
+
hasPrevPage: boolean;
|
|
1279
|
+
};
|
|
1280
|
+
|
|
1281
|
+
declare type SemaphorPaginationRequest = {
|
|
1282
|
+
page: number;
|
|
1283
|
+
pageSize: number;
|
|
1284
|
+
};
|
|
1285
|
+
|
|
826
1286
|
declare type SemaphorProtocolIssue = {
|
|
827
1287
|
code: string;
|
|
828
1288
|
message: string;
|
|
@@ -845,6 +1305,7 @@ declare type SemaphorRecordsIntent = {
|
|
|
845
1305
|
timeWindow?: SemaphorTimeWindow;
|
|
846
1306
|
filters?: SemaphorAnalyticsFilter[];
|
|
847
1307
|
limit?: number;
|
|
1308
|
+
pagination?: SemaphorPaginationRequest;
|
|
848
1309
|
orderBy?: {
|
|
849
1310
|
field: SemaphorFieldRef;
|
|
850
1311
|
direction: 'asc' | 'desc';
|
|
@@ -907,6 +1368,10 @@ declare type SemaphorResultColumn = {
|
|
|
907
1368
|
source?: SemaphorFieldRef['source'];
|
|
908
1369
|
};
|
|
909
1370
|
|
|
1371
|
+
declare type SemaphorSemanticSourceRef = Extract<SemaphorSourceRef, {
|
|
1372
|
+
kind: 'semantic';
|
|
1373
|
+
}>;
|
|
1374
|
+
|
|
910
1375
|
declare type SemaphorSourceRef = {
|
|
911
1376
|
kind: 'semantic';
|
|
912
1377
|
domainId: string;
|
|
@@ -939,9 +1404,10 @@ declare type SemaphorSqlIntent = {
|
|
|
939
1404
|
kind: 'sql';
|
|
940
1405
|
}>;
|
|
941
1406
|
sql: string;
|
|
942
|
-
|
|
1407
|
+
defaultParameters?: Record<string, unknown>;
|
|
943
1408
|
pythonCode?: string;
|
|
944
1409
|
limit?: number;
|
|
1410
|
+
pagination?: SemaphorPaginationRequest;
|
|
945
1411
|
rationale?: string;
|
|
946
1412
|
fields?: SemaphorFieldRef[];
|
|
947
1413
|
inputs?: SemaphorInputBinding[];
|