react-semaphor 0.1.568 → 0.1.569

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 (126) hide show
  1. package/README.md +0 -7
  2. package/dist/analytics-protocol/index.js +434 -454
  3. package/dist/assistant-context/index.js +1 -1
  4. package/dist/brand-studio/index.js +10 -12
  5. package/dist/briefings/index.js +4 -4
  6. package/dist/chunks/{_commonjsHelpers-DimLPMtv.js → _commonjsHelpers-Bid1ZNYj.js} +271 -222
  7. package/dist/chunks/{assistant-chat-BN5I8KuN.js → assistant-chat-Dzf2Mbph.js} +107 -109
  8. package/dist/chunks/{bookmark-impact-CJ-65omV.js → bookmark-impact-Czg6FGt5.js} +2 -2
  9. package/dist/chunks/{bookmark-state-Du3s13_V.js → bookmark-state-CflS88gq.js} +251 -250
  10. package/dist/chunks/{card-filter-builder-BBuB99GZ.js → card-filter-builder-BS982X7x.js} +986 -985
  11. package/dist/chunks/{code-editor-DJNOsgJH.js → code-editor-BsxHzm9u.js} +43 -45
  12. package/dist/chunks/{comparison-window-caption-CMLb3mut.js → comparison-window-caption-lLTgzOkM.js} +252 -253
  13. package/dist/chunks/{dashboard-YnWZC4dK.js → dashboard-BiYSbxZv.js} +1 -1
  14. package/dist/chunks/{dashboard-briefing-launcher-BF89TU2h.js → dashboard-briefing-launcher-Bdj7luOr.js} +158 -159
  15. package/dist/chunks/{dashboard-controls-atHc1EjP.js → dashboard-controls-TViDsnb8.js} +17 -19
  16. package/dist/chunks/dashboard-json-Dg9dQd9U.js +66 -0
  17. package/dist/chunks/{dates-CKO05ino.js → dates-BsPrWZIP.js} +8 -8
  18. package/dist/chunks/{edit-dashboard-visual-DdmTfn-J.js → edit-dashboard-visual-C6hoIeEJ.js} +20 -21
  19. package/dist/chunks/{filter-reach-copy-jZGzK_IH.js → filter-reach-copy-hcQ4os0u.js} +695 -699
  20. package/dist/chunks/filter-value-text-CVxEEDVl.js +146 -0
  21. package/dist/chunks/{index-CPNZW0mu.js → index-G4q89J6O.js} +74 -76
  22. package/dist/chunks/{layout-grid-0hIlqEtk.js → layout-grid-BIcoFfdS.js} +1 -1
  23. package/dist/chunks/{list-filter-DkgoCeBm.js → list-filter-C6tYkHyv.js} +1 -1
  24. package/dist/chunks/matrix-analytical-definition-dkS8szLM.js +1253 -0
  25. package/dist/chunks/matrix-member-presentation-DRa-9e6Q.js +169 -0
  26. package/dist/chunks/{matrix-operation-contract-Eb6elidS.js → matrix-operation-contract-DCVinw1o.js} +122 -122
  27. package/dist/chunks/{metric-comparison-ChXUFaZu.js → metric-comparison-n9NsIa-2.js} +175 -128
  28. package/dist/chunks/{palette-4vf2BEEg.js → palette-NjHOE_6B.js} +1 -1
  29. package/dist/chunks/pivot-result-contract-expectations-DkmueDTW.js +55 -0
  30. package/dist/chunks/{pivot-result-identity-BlbLrqaC.js → pivot-result-identity-B89X5xjb.js} +1 -1
  31. package/dist/chunks/raw-temporal-value-DdT0s47W.js +159 -0
  32. package/dist/chunks/{report-preferences-dialog-Mbd-I0wV.js → report-preferences-dialog-Xc8_GFju.js} +26 -28
  33. package/dist/chunks/{report-runtime-context-DnA_PiKo.js → report-runtime-context-BhPzLTbS.js} +1 -1
  34. package/dist/chunks/{resolve-dashboard-input-context-Du0fjN3h.js → resolve-dashboard-input-context-KqvcLcTM.js} +4784 -4764
  35. package/dist/chunks/{save-D6pHmSSP.js → save-C6VmEJTA.js} +1 -1
  36. package/dist/chunks/{saved-dashboard-context-y8N6RvjS.js → saved-dashboard-context-BeXXyoD4.js} +6 -6
  37. package/dist/chunks/{semaphor-ready-indicator-BSEdUq40.js → semaphor-ready-indicator-BNkaANsG.js} +28395 -28384
  38. package/dist/chunks/{shelf-drop-preview-context-D7QqPl36.js → shelf-drop-preview-context-C_issPBA.js} +18 -20
  39. package/dist/chunks/{stored-dashboard-d3xQYxBD.js → stored-dashboard-B6_StAty.js} +263 -265
  40. package/dist/chunks/{table-export-sheet--DUKWk6o.js → table-export-sheet-BWP2joD1.js} +1 -1
  41. package/dist/chunks/{temporal-input-presentation--2r9BLr0.js → temporal-input-presentation-scSWQXAB.js} +4 -4
  42. package/dist/chunks/{token-types-C8JymO8s.js → token-types-iKMplaBL.js} +1 -1
  43. package/dist/chunks/{upload-Cf3wXZT8.js → upload-BRW4Mwrd.js} +1 -1
  44. package/dist/chunks/validators-B8fpdinG.js +3651 -0
  45. package/dist/chunks/{variable-draft-DOX03R4A.js → variable-draft-BQ3OMjvy.js} +4 -4
  46. package/dist/dashboard/index.js +2 -2
  47. package/dist/dashboard-authoring/index.js +1527 -1517
  48. package/dist/format-utils/index.js +230 -231
  49. package/dist/index.js +236 -237
  50. package/dist/report-runtime-context/index.js +1 -1
  51. package/dist/style.css +1 -1
  52. package/dist/surfboard/index.js +2 -2
  53. package/dist/types/components/surfboard/filter/types.d.ts +5 -4
  54. package/dist/types/components/ui-custom/date-range-presets.d.ts +1 -17
  55. package/dist/types/index.js +9 -9
  56. package/dist/types/lib/hooks/use-date-filter.d.ts +3 -3
  57. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
  58. package/dist/types/lib/types/explorer-types.d.ts +2 -2
  59. package/dist/types/lib/types/index.d.ts +1 -1
  60. package/dist/types/lib/utils/card-definition.d.ts +7 -7
  61. package/dist/types/shared/analytics-protocol/agent-time-window.d.ts +84 -0
  62. package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +2 -2
  63. package/dist/types/shared/analytics-protocol/contracts.d.ts +8 -17
  64. package/dist/types/shared/analytics-protocol/fixtures.d.ts +3 -2
  65. package/dist/types/shared/analytics-protocol/index.d.ts +2 -4
  66. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +4 -4
  67. package/dist/types/shared/analytics-protocol/relative-date/describe.d.ts +18 -0
  68. package/dist/types/shared/analytics-protocol/relative-date/index.d.ts +7 -0
  69. package/dist/types/shared/analytics-protocol/relative-date/limits.d.ts +3 -0
  70. package/dist/types/shared/analytics-protocol/relative-date/presets.d.ts +11 -0
  71. package/dist/types/shared/analytics-protocol/relative-date/resolve.d.ts +49 -0
  72. package/dist/types/shared/analytics-protocol/relative-date/schemas.d.ts +76 -0
  73. package/dist/types/shared/analytics-protocol/relative-date/traits.d.ts +51 -0
  74. package/dist/types/shared/analytics-protocol/relative-date/window.d.ts +111 -0
  75. package/dist/types/shared/analytics-protocol/selection-contract.d.ts +1 -1
  76. package/dist/types/shared/assistant-protocol/context.d.ts +12 -12
  77. package/dist/types/shared/dashboard-authoring/changes/card-query-part.d.ts +0 -2
  78. package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +155 -1753
  79. package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +8 -4
  80. package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +74 -74
  81. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +20 -20
  82. package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +3 -0
  83. package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +10 -2
  84. package/dist/types/shared/format-utils/filter-detail.d.ts +2 -8
  85. package/dist/types/shared/format-utils/filter-line.d.ts +2 -2
  86. package/dist/types/shared/format-utils/matrix-continuation.d.ts +3 -3
  87. package/dist/types/shared/temporal/index.d.ts +0 -2
  88. package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +2 -2
  89. package/package.json +2 -24
  90. package/DATA_APP_SDK.md +0 -339
  91. package/dist/chunks/dashboard-json-Cxp3inxd.js +0 -68
  92. package/dist/chunks/filter-value-text-7zhmth1S.js +0 -163
  93. package/dist/chunks/index-CuHybtft.js +0 -51
  94. package/dist/chunks/matrix-analytical-definition-C9xB_T84.js +0 -717
  95. package/dist/chunks/matrix-card-BSUeSXpD.js +0 -42
  96. package/dist/chunks/matrix-member-presentation-DZNgQpUq.js +0 -105
  97. package/dist/chunks/operators-B3zZoskU.js +0 -66
  98. package/dist/chunks/pivot-result-contract-expectations-Ddh1rNz5.js +0 -56
  99. package/dist/chunks/raw-temporal-value-Bqz8wc7L.js +0 -242
  100. package/dist/chunks/selection-reducer-OaJ-N5uN.js +0 -46
  101. package/dist/chunks/source-entity-resolution-DF6GulDn.js +0 -607
  102. package/dist/chunks/validators-wtjw0aw6.js +0 -3332
  103. package/dist/data-app-sdk/index.js +0 -1412
  104. package/dist/data-app-sdk-adapters/index.js +0 -361
  105. package/dist/data-app-sdk-validation/index.js +0 -1031
  106. package/dist/types/data-app-sdk/adapters.d.ts +0 -35
  107. package/dist/types/data-app-sdk/builders.d.ts +0 -62
  108. package/dist/types/data-app-sdk/contracts.d.ts +0 -419
  109. package/dist/types/data-app-sdk/executor.d.ts +0 -5
  110. package/dist/types/data-app-sdk/field-catalog-validation.d.ts +0 -29
  111. package/dist/types/data-app-sdk/hooks.d.ts +0 -11
  112. package/dist/types/data-app-sdk/index.d.ts +0 -9
  113. package/dist/types/data-app-sdk/provider.d.ts +0 -8
  114. package/dist/types/data-app-sdk/relationship-aware-field-policy.d.ts +0 -21
  115. package/dist/types/data-app-sdk/selection.d.ts +0 -2
  116. package/dist/types/data-app-sdk/validation.d.ts +0 -58
  117. package/dist/types/data-app-sdk-adapters.d.ts +0 -2
  118. package/dist/types/data-app-sdk-validation.d.ts +0 -2
  119. package/dist/types/data-app-sdk.d.ts +0 -2
  120. package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +0 -68
  121. package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +0 -20
  122. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +0 -314
  123. package/dist/types/shared/analytics-protocol/time-window.d.ts +0 -52
  124. package/dist/types/shared/temporal/relative-date.d.ts +0 -21
  125. package/dist/types/shared/temporal/time-window-periods.d.ts +0 -21
  126. package/src/data-app-sdk/README.md +0 -402
@@ -1,35 +0,0 @@
1
- import { AnalyticsSelection, SemaphorAnalyticsIntent, SemaphorFieldRef, SemaphorInputBinding, SemaphorInputOperator, SemaphorMatrixIntent, SemaphorMetricIntent, SemaphorRecordsIntent, SemaphorSqlIntent } from '../shared/analytics-protocol/index.js';
2
- import { SemaphorInputOptionsQuerySpec, SemaphorInputReference, SemaphorActiveInput, SemaphorInputSpec, SemaphorInputValue, SemaphorAnalysisQueryOptions, SemaphorAnalysisQuerySpec, SemaphorControlRole, SemaphorMatrixQuerySpec, SemaphorMetricQuerySpec, SemaphorOptionValue, SemaphorRecordsQuerySpec, SemaphorSelectionReference, SemaphorSqlQuerySpec } from './contracts.js';
3
- export declare function toSemaphorMetricIntent(spec: SemaphorMetricQuerySpec): SemaphorMetricIntent;
4
- export declare function toSemaphorAnalysisIntent(spec: SemaphorAnalysisQuerySpec): SemaphorMetricIntent;
5
- export declare function toSemaphorAnalysisQueryOptions(spec: SemaphorAnalysisQuerySpec): SemaphorAnalysisQueryOptions;
6
- export declare function toSemaphorRecordsIntent(spec: SemaphorRecordsQuerySpec): SemaphorRecordsIntent;
7
- export declare function toSemaphorInputOptionsIntent(spec: SemaphorInputOptionsQuerySpec): Extract<SemaphorAnalyticsIntent, {
8
- kind: 'inputOptions';
9
- }>;
10
- export declare function toSemaphorSqlIntent(spec: SemaphorSqlQuerySpec): SemaphorSqlIntent;
11
- export declare function toSemaphorMatrixIntent(spec: SemaphorMatrixQuerySpec): SemaphorMatrixIntent;
12
- export declare function toSemaphorInputBinding(input: SemaphorInputReference): SemaphorInputBinding;
13
- export declare function toSemaphorInputBindings(inputs: SemaphorInputReference[] | undefined): SemaphorInputBinding[] | undefined;
14
- export declare function toSemaphorInputSnapshots(inputs: SemaphorInputReference[] | undefined): SemaphorActiveInput[];
15
- export declare function toSemaphorActiveInputSnapshots(inputs: SemaphorInputReference[] | undefined): SemaphorActiveInput[];
16
- export declare function toSemaphorSelectionSnapshots(selections: SemaphorSelectionReference[] | undefined): AnalyticsSelection[];
17
- export declare function toSemaphorInputSpec<TValue extends SemaphorInputValue = SemaphorInputValue>(spec: SemaphorInputSpec<TValue>): SemaphorInputBinding & {
18
- kind: SemaphorInputSpec['kind'];
19
- label?: string;
20
- field?: SemaphorFieldRef;
21
- operator?: SemaphorInputOperator;
22
- controlRole?: SemaphorControlRole;
23
- };
24
- export declare function normalizeSemaphorInputOptions(options?: Array<{
25
- label: string;
26
- value: SemaphorOptionValue;
27
- count?: number;
28
- disambiguation?: string[];
29
- } | SemaphorOptionValue>): {
30
- label: string;
31
- value: SemaphorOptionValue;
32
- count?: number;
33
- disambiguation?: string[];
34
- }[];
35
- export declare function hasSemaphorInputValue(value: unknown): boolean;
@@ -1,62 +0,0 @@
1
- import { SemaphorAnalysisQueryDefinition, SemaphorAnalysisQuerySpec, SemaphorControlInputSpec, SemaphorControlRole, SemaphorDataAppDefinition, SemaphorDerivedFieldDefinition, SemaphorFilterInputSpec, SemaphorInputOptionsQueryDefinition, SemaphorInputOptionsQuerySpec, SemaphorInputBinding, SemaphorInputBindingReference, SemaphorInputReference, SemaphorInputSpec, SemaphorInputValue, SemaphorMatrixQueryDefinition, SemaphorMatrixQuerySpec, SemaphorMetricQueryDefinition, SemaphorMetricQuerySpec, SemaphorRecordsQueryDefinition, SemaphorRecordsQuerySpec, SemaphorSelectionInputSpec, SemaphorSqlParameterValue, SemaphorSqlQueryDefinition, SemaphorSqlQuerySpec } from './contracts.js';
2
- import { SemaphorFieldRef, SemaphorSemanticSourceRef, SemaphorSourceRef } from '../shared/analytics-protocol/index.js';
3
- export type SemaphorSqlParamInputSpec<TValue extends SemaphorInputValue = SemaphorInputValue> = Omit<SemaphorControlInputSpec<TValue>, 'kind' | 'role'> & {
4
- defaultValue?: TValue;
5
- };
6
- export type SemaphorControlBuilderSpec<TValue extends SemaphorInputValue = SemaphorInputValue> = Omit<SemaphorControlInputSpec<TValue>, 'kind'> & {
7
- role: SemaphorControlRole;
8
- };
9
- export type SemaphorSemanticSourceBuilderSpec = {
10
- domainId: string;
11
- datasetName: string;
12
- datasetId?: string;
13
- connectionId?: string;
14
- label?: string;
15
- };
16
- export type SemaphorSqlSourceBuilderSpec = Extract<SemaphorSourceRef, {
17
- kind: 'sql';
18
- }>;
19
- export type SemaphorFieldBuilderSpec = Omit<SemaphorFieldRef, 'name' | 'role'>;
20
- export type SemaphorBindInputSpec = Omit<SemaphorInputBinding, 'inputId'> & {
21
- inputId?: string;
22
- };
23
- export declare function defineSemaphorDataApp<TDefinition extends SemaphorDataAppDefinition>(definition: TDefinition): TDefinition;
24
- export declare function defineSemaphorInput<TValue extends SemaphorInputValue = SemaphorInputValue>(spec: SemaphorInputSpec<TValue>): SemaphorInputSpec<TValue>;
25
- export declare const semaphor: {
26
- source: {
27
- semantic(spec: SemaphorSemanticSourceBuilderSpec): SemaphorSemanticSourceRef;
28
- sql(spec: Omit<SemaphorSqlSourceBuilderSpec, "kind">): SemaphorSqlSourceBuilderSpec;
29
- };
30
- field: {
31
- measure<const TSpec extends SemaphorFieldBuilderSpec = {}>(name: string, spec?: TSpec): TSpec & {
32
- name: string;
33
- role: "measure";
34
- };
35
- dimension<const TSpec extends SemaphorFieldBuilderSpec = {}>(name: string, spec?: TSpec): TSpec & {
36
- name: string;
37
- role: "dimension";
38
- };
39
- date<const TSpec extends SemaphorFieldBuilderSpec = {}>(name: string, spec?: TSpec): TSpec & {
40
- name: string;
41
- role: "date";
42
- };
43
- id<const TSpec extends SemaphorFieldBuilderSpec = {}>(name: string, spec?: TSpec): TSpec & {
44
- name: string;
45
- role: "id";
46
- };
47
- };
48
- filter<TValue extends SemaphorInputValue = SemaphorInputValue>(spec: Omit<SemaphorFilterInputSpec<TValue>, "kind">): SemaphorFilterInputSpec<TValue>;
49
- selection(spec: Omit<SemaphorSelectionInputSpec, "kind">): SemaphorSelectionInputSpec;
50
- bindInput(input: SemaphorInputReference, binding: SemaphorBindInputSpec): SemaphorInputBindingReference;
51
- control<TValue extends SemaphorInputValue = SemaphorInputValue>(spec: SemaphorControlBuilderSpec<TValue>): SemaphorControlInputSpec<TValue>;
52
- sqlParam<TValue extends SemaphorSqlParameterValue = SemaphorSqlParameterValue>(spec: SemaphorSqlParamInputSpec<TValue>): SemaphorControlInputSpec<TValue>;
53
- derivedField(spec: Omit<SemaphorDerivedFieldDefinition, "kind"> & {
54
- kind?: "derived_field";
55
- }): SemaphorDerivedFieldDefinition;
56
- metric(spec: SemaphorMetricQuerySpec): SemaphorMetricQueryDefinition;
57
- analysis(spec: SemaphorAnalysisQuerySpec): SemaphorAnalysisQueryDefinition;
58
- records(spec: SemaphorRecordsQuerySpec): SemaphorRecordsQueryDefinition;
59
- inputOptions(spec: SemaphorInputOptionsQuerySpec): SemaphorInputOptionsQueryDefinition;
60
- sql(spec: SemaphorSqlQuerySpec): SemaphorSqlQueryDefinition;
61
- matrix(spec: SemaphorMatrixQuerySpec): SemaphorMatrixQueryDefinition;
62
- };
@@ -1,419 +0,0 @@
1
- import { MatrixSpec, MatrixWindowRequest, MatrixWindow, MatrixOperationRequest, MatrixExecutionResult, AnalyticsSelection, AnalyticsSelectionTuple, SemaphorAnalyticsFilter, SemaphorOptionDependencyOutcome, SemaphorOptionMatchResult, SemaphorAnalyticsExecutionResult, SemaphorAnalyticsExecutionStatus, SemaphorAnalyticsIntent, SemaphorAnalyticsValidationIssue, SemaphorAnalyticsValidationResult, SemaphorDerivedFieldDefinition, SemaphorFieldRef, SemaphorInputBinding, SemaphorInputOptionSource, SemaphorInputOperator, SemaphorMetricIntent, SemaphorRelationshipHint, SemaphorMatrixIntent, SemaphorOptionDependencies, SemaphorOptionPopulation, SemaphorPaginationMetadata, SemaphorPaginationRequest, SemaphorRecordsIntent, SemaphorResultColumn, SemaphorSqlIntent, SemaphorSourceRef, SemaphorTimeGrain, SemaphorTimeWindow } from '../shared/analytics-protocol/index.js';
2
- import { CalendarContext } from '../lib/types/token-types.js';
3
- export type { AnalyticsSelection, AnalyticsSelectionCondition, AnalyticsSelectionTuple, SemaphorAnalyticsFilter, SemaphorDerivedFieldDefinition, SemaphorFieldRef, SemaphorInputBinding, SemaphorInputOptionSource, SemaphorInputOperator, SemaphorPaginationMetadata, SemaphorPaginationRequest, SemaphorOptionDependencies, SemaphorOptionPopulation, SemaphorResultColumn, SemaphorMatrixIntent, SemaphorSourceRef, SemaphorTimeWindow, } from '../shared/analytics-protocol/index.js';
4
- export type SemaphorScalar = string | number | boolean | null;
5
- export type SemaphorInputValue = SemaphorScalar | SemaphorScalar[];
6
- export type SemaphorOptionValue = string | number | boolean;
7
- export type SemaphorInputOption = {
8
- label: string;
9
- value: SemaphorOptionValue;
10
- count?: number;
11
- disambiguation?: string[];
12
- };
13
- export type SemaphorQuerySourceSpec = {
14
- source: SemaphorSourceRef;
15
- };
16
- export type SemaphorAppDerivedFieldsSpec = {
17
- derivedFields?: SemaphorDerivedFieldDefinition[];
18
- };
19
- export type SemaphorSqlSourceSpec = {
20
- source: Extract<SemaphorSourceRef, {
21
- kind: 'sql';
22
- }>;
23
- };
24
- export type SemaphorQueryField = SemaphorFieldRef;
25
- export type SemaphorRecordsField = SemaphorFieldRef & {
26
- role: NonNullable<SemaphorFieldRef['role']>;
27
- };
28
- export type SemaphorNonEmptyArray<T> = [T, ...T[]];
29
- export type SemaphorControlRole = 'grain' | 'measure' | 'dimension' | 'aggregation' | 'sqlParam';
30
- type SemaphorInputBase<TValue extends SemaphorInputValue> = {
31
- id: string;
32
- label?: string;
33
- value?: TValue;
34
- defaultValue?: TValue;
35
- onValueChange?: {
36
- bivarianceHack(value: TValue | undefined): void;
37
- }['bivarianceHack'];
38
- options?: Array<SemaphorInputOption | SemaphorOptionValue>;
39
- };
40
- export type SemaphorFilterInputSpec<TValue extends SemaphorInputValue = SemaphorInputValue> = SemaphorInputBase<TValue> & {
41
- kind: 'filter';
42
- field: SemaphorQueryField;
43
- operator?: SemaphorInputOperator;
44
- relationshipHint?: SemaphorInputBinding['relationshipHint'];
45
- multi?: boolean;
46
- };
47
- export type SemaphorControlInputSpec<TValue extends SemaphorInputValue = SemaphorInputValue> = SemaphorInputBase<TValue> & {
48
- kind: 'control';
49
- role: SemaphorControlRole;
50
- };
51
- export type SemaphorInputSpec<TValue extends SemaphorInputValue = SemaphorInputValue> = SemaphorFilterInputSpec<TValue> | SemaphorControlInputSpec<TValue>;
52
- export type SemaphorInputHandle<TValue extends SemaphorInputValue = SemaphorInputValue> = {
53
- id: string;
54
- kind: 'filter' | 'control';
55
- label?: string;
56
- field?: SemaphorFieldRef;
57
- operator?: SemaphorInputOperator;
58
- relationshipHint?: SemaphorInputBinding['relationshipHint'];
59
- controlRole?: SemaphorControlRole;
60
- value: TValue | undefined;
61
- options: SemaphorInputOption[];
62
- isActive: boolean;
63
- setValue(value: TValue | undefined): void;
64
- clear(): void;
65
- toAnalyticsInput(): SemaphorActiveInput<TValue>;
66
- };
67
- export type SemaphorSelectionBase = {
68
- id: string;
69
- label?: string;
70
- multipleSelection?: boolean;
71
- tuples?: AnalyticsSelectionTuple[];
72
- defaultTuples?: AnalyticsSelectionTuple[];
73
- onTuplesChange?: {
74
- bivarianceHack(tuples: AnalyticsSelectionTuple[]): void;
75
- }['bivarianceHack'];
76
- };
77
- export type SemaphorSelectionInputSpec = SemaphorSelectionBase & {
78
- kind: 'selection';
79
- fields: SemaphorQueryField[];
80
- };
81
- export type SemaphorSelectionGesture = {
82
- kind: 'replace';
83
- } | {
84
- kind: 'toggle';
85
- } | {
86
- kind: 'range';
87
- anchor: AnalyticsSelectionTuple;
88
- ordered: AnalyticsSelectionTuple[];
89
- };
90
- export type SemaphorSelectionOutcome = 'selected' | 'added' | 'removed' | 'cleared' | 'rangeSelected' | 'limitReached';
91
- export type SemaphorSelectionHandle = {
92
- id: string;
93
- kind: 'selection';
94
- label?: string;
95
- fields: SemaphorQueryField[];
96
- tuples: AnalyticsSelectionTuple[];
97
- isActive: boolean;
98
- select(tuple: AnalyticsSelectionTuple, gesture?: SemaphorSelectionGesture): {
99
- tuples: AnalyticsSelectionTuple[];
100
- outcome: SemaphorSelectionOutcome;
101
- };
102
- clear(): void;
103
- toAnalyticsSelection(): AnalyticsSelection | undefined;
104
- };
105
- export type SemaphorSelectionReference = AnalyticsSelection | SemaphorSelectionHandle;
106
- export type SemaphorInputBindingReference<TValue extends SemaphorInputValue = SemaphorInputValue> = {
107
- toAnalyticsInput(): SemaphorActiveInput<TValue>;
108
- };
109
- export type SemaphorActiveInput<TValue extends SemaphorInputValue = SemaphorInputValue> = SemaphorInputBinding & {
110
- kind: 'filter' | 'control';
111
- label?: string;
112
- value?: TValue;
113
- isActive: boolean;
114
- operator?: SemaphorInputOperator;
115
- controlRole?: SemaphorControlRole;
116
- };
117
- export type SemaphorMetricComparison = {
118
- kind: 'previous_period' | 'previous_year' | 'target';
119
- targetValue?: number;
120
- };
121
- export type SemaphorQueryOrderBy = {
122
- field: SemaphorQueryField;
123
- direction: 'asc' | 'desc';
124
- };
125
- export type SemaphorMetricQuerySpec = SemaphorQuerySourceSpec & SemaphorAppDerivedFieldsSpec & {
126
- id?: string;
127
- label?: string;
128
- measures: SemaphorNonEmptyArray<SemaphorQueryField>;
129
- primaryMeasure?: SemaphorQueryField;
130
- dateField?: SemaphorQueryField;
131
- timeGrain?: SemaphorTimeGrain;
132
- dimensions?: SemaphorQueryField[];
133
- comparison?: SemaphorMetricComparison;
134
- orderBy?: SemaphorQueryOrderBy;
135
- filters?: SemaphorAnalyticsFilter[];
136
- inputs?: SemaphorInputReference[];
137
- relationshipHint?: SemaphorRelationshipHint;
138
- limit?: number;
139
- };
140
- export type SemaphorAnalysisDriverMode = 'absolute_delta' | 'largest_negative' | 'largest_positive' | 'positive_and_negative' | 'all';
141
- export type SemaphorAnalysisQueryOptions = {
142
- chartTitle?: string;
143
- chartType?: string;
144
- driverMode?: SemaphorAnalysisDriverMode;
145
- includePopulation?: boolean;
146
- calendarContext?: CalendarContext;
147
- };
148
- export type SemaphorAnalysisQuerySpec = SemaphorMetricQuerySpec & SemaphorAnalysisQueryOptions & {
149
- analysis?: SemaphorMetricIntent['analysis'];
150
- timeWindow?: SemaphorMetricIntent['timeWindow'];
151
- };
152
- export type SemaphorRecordsOrderBy = SemaphorQueryOrderBy;
153
- type SemaphorRecordsBaseQuerySpec = SemaphorQuerySourceSpec & SemaphorAppDerivedFieldsSpec & {
154
- id?: string;
155
- label?: string;
156
- dateField?: SemaphorQueryField;
157
- timeGrain?: SemaphorTimeGrain;
158
- timeWindow?: SemaphorTimeWindow;
159
- filters?: SemaphorAnalyticsFilter[];
160
- orderBy?: SemaphorRecordsOrderBy;
161
- inputs?: SemaphorInputReference[];
162
- relationshipHint?: SemaphorRelationshipHint;
163
- limit?: number;
164
- pagination?: SemaphorPaginationRequest;
165
- totals?: SemaphorRecordsIntent['totals'];
166
- };
167
- type SemaphorRecordsSelectorSpec = {
168
- fields: SemaphorNonEmptyArray<SemaphorRecordsField>;
169
- };
170
- export type SemaphorRecordsQuerySpec = SemaphorRecordsBaseQuerySpec & SemaphorRecordsSelectorSpec;
171
- export type SemaphorInputOptionsQuerySpec = Omit<SemaphorQuerySourceSpec, 'source'> & {
172
- /** Option lists are governed from semantic or physical sources only. */
173
- source: Extract<SemaphorSourceRef, {
174
- kind: 'semantic' | 'physical';
175
- }>;
176
- } & Omit<SemaphorInputOptionSource, 'source'> & SemaphorAppDerivedFieldsSpec & {
177
- id?: string;
178
- label?: string;
179
- inputId: string;
180
- population?: SemaphorOptionPopulation;
181
- dependencies?: SemaphorOptionDependencies;
182
- inputs?: SemaphorInputReference[];
183
- search?: string;
184
- limit?: number;
185
- };
186
- export type SemaphorSqlParameterValue = SemaphorScalar | SemaphorScalar[];
187
- export type SemaphorSqlQuerySpec = SemaphorSqlSourceSpec & {
188
- id?: string;
189
- label?: string;
190
- sql: string;
191
- defaultParameters?: Record<string, SemaphorSqlParameterValue>;
192
- pythonCode?: string;
193
- fields?: SemaphorFieldRef[];
194
- inputs?: SemaphorInputReference[];
195
- limit?: number;
196
- pagination?: SemaphorPaginationRequest;
197
- rationale?: string;
198
- };
199
- export type SemaphorMatrixQuerySpec = MatrixSpec & {
200
- id?: string;
201
- label?: string;
202
- inputs?: SemaphorInputReference[];
203
- matrixWindowRequest: MatrixWindowRequest;
204
- };
205
- export type SemaphorMetricQueryDefinition = SemaphorMetricQuerySpec & {
206
- queryKind: 'metric';
207
- };
208
- export type SemaphorAnalysisQueryDefinition = SemaphorAnalysisQuerySpec & {
209
- queryKind: 'analysis';
210
- };
211
- export type SemaphorRecordsQueryDefinition = SemaphorRecordsQuerySpec & {
212
- queryKind: 'records';
213
- };
214
- export type SemaphorInputOptionsQueryDefinition = SemaphorInputOptionsQuerySpec & {
215
- queryKind: 'inputOptions';
216
- };
217
- export type SemaphorSqlQueryDefinition = SemaphorSqlQuerySpec & {
218
- queryKind: 'sql';
219
- };
220
- export type SemaphorMatrixQueryDefinition = SemaphorMatrixQuerySpec & {
221
- queryKind: 'matrix';
222
- };
223
- export type SemaphorQueryDefinition = SemaphorMetricQueryDefinition | SemaphorAnalysisQueryDefinition | SemaphorRecordsQueryDefinition | SemaphorInputOptionsQueryDefinition | SemaphorSqlQueryDefinition | SemaphorMatrixQueryDefinition;
224
- export type SemaphorInputReference = SemaphorInputSpec | SemaphorInputBinding | SemaphorActiveInput | SemaphorInputHandle | SemaphorInputBindingReference;
225
- export type SemaphorDataAppViewDefinition<TQuery extends SemaphorQueryDefinition = SemaphorQueryDefinition> = {
226
- id: string;
227
- title?: string;
228
- description?: string;
229
- query: TQuery;
230
- inputs?: SemaphorInputReference[];
231
- };
232
- export type SemaphorDataAppDefinition = {
233
- id?: string;
234
- title?: string;
235
- description?: string;
236
- inputs?: Record<string, SemaphorInputSpec> | SemaphorInputSpec[];
237
- selections?: Record<string, SemaphorSelectionInputSpec> | SemaphorSelectionInputSpec[];
238
- queries?: Record<string, SemaphorQueryDefinition>;
239
- views: SemaphorDataAppViewDefinition[];
240
- };
241
- export type SemaphorDataAppDebugConfig = boolean | {
242
- enabled?: boolean;
243
- requestServerDebug?: boolean;
244
- };
245
- export type SemaphorQueryRuntimeOptions = {
246
- inputs?: SemaphorInputReference[];
247
- selections?: SemaphorSelectionReference[];
248
- };
249
- export type SemaphorQueryStatus = 'idle' | 'loading' | 'success' | 'error';
250
- export type SemaphorDataAppQueryError = Error & {
251
- kind: 'data_app_query_error';
252
- requestId?: string;
253
- details?: unknown;
254
- executionResult?: SemaphorAnalyticsExecutionResult;
255
- validation?: SemaphorAnalyticsValidationResult;
256
- validationIssues?: SemaphorAnalyticsValidationIssue[];
257
- };
258
- export type SemaphorQueryState = {
259
- status: SemaphorQueryStatus;
260
- executionStatus?: SemaphorAnalyticsExecutionStatus;
261
- executionResult?: SemaphorAnalyticsExecutionResult;
262
- validation?: SemaphorAnalyticsValidationResult;
263
- coverage?: SemaphorAnalyticsExecutionResult['coverage'];
264
- diagnosticFeedback?: SemaphorAnalyticsExecutionResult['diagnosticFeedback'];
265
- isLoading: boolean;
266
- isEmpty: boolean;
267
- isPartial: boolean;
268
- isFiltered: boolean;
269
- isStale: boolean;
270
- isValidated: boolean;
271
- error: SemaphorDataAppQueryError | null;
272
- };
273
- export type SemaphorMetricPayload = {
274
- primaryValue: number | string | null;
275
- measures?: Record<string, number | string | null>;
276
- measureBindings?: Record<string, string>;
277
- missingMeasures?: string[];
278
- comparisonValue?: number | string | null;
279
- comparisonKind?: NonNullable<SemaphorMetricIntent['comparison']>['kind'];
280
- delta?: number | null;
281
- deltaPercent?: number | null;
282
- records?: Array<Record<string, unknown>>;
283
- executionResult?: SemaphorAnalyticsExecutionResult;
284
- };
285
- export type SemaphorMetricQueryResult = SemaphorQueryState & SemaphorMetricPayload & {
286
- id?: string;
287
- intent?: SemaphorMetricIntent;
288
- };
289
- export type SemaphorAnalysisResultSet = {
290
- id?: SemaphorAnalysisResultSetKey | string;
291
- role?: SemaphorAnalysisResultSetKey | string;
292
- records: Array<Record<string, unknown>>;
293
- columns: SemaphorResultColumn[];
294
- rowCount?: number;
295
- warnings?: SemaphorAnalysisWarning[];
296
- };
297
- export type SemaphorAnalysisResultSetKey = 'primary' | 'comparisons' | 'contributors' | 'segments' | 'periodChanges' | 'records' | 'changes' | 'drivers' | 'absoluteDeltaDrivers' | 'largestNegativeChanges' | 'largestPositiveChanges' | 'largestNegativeDrivers' | 'largestPositiveDrivers';
298
- export type SemaphorAnalysisResultSetWarning = {
299
- code: 'missing_analysis_result_key';
300
- severity: 'warning';
301
- message: string;
302
- resultSetKey: SemaphorAnalysisResultSetKey | string;
303
- rowIndex: number;
304
- columnKey: string;
305
- columnName?: string;
306
- columnLabel?: string;
307
- availableKeys: string[];
308
- };
309
- export type SemaphorAnalysisWarning = SemaphorAnalysisResultSetWarning | {
310
- code: string;
311
- severity?: string;
312
- message?: string;
313
- [key: string]: unknown;
314
- };
315
- export type SemaphorAnalysisPayload = {
316
- answerSummary?: string;
317
- mode?: string;
318
- data?: Record<string, unknown>;
319
- resultSets?: Partial<Record<SemaphorAnalysisResultSetKey, SemaphorAnalysisResultSet>> & Record<string, SemaphorAnalysisResultSet>;
320
- analysisWarnings?: SemaphorAnalysisWarning[];
321
- warnings?: unknown[];
322
- columns?: SemaphorResultColumn[];
323
- records?: Array<Record<string, unknown>>;
324
- rowCount?: number;
325
- primary?: Array<Record<string, unknown>>;
326
- comparison?: unknown;
327
- comparisons?: Array<Record<string, unknown>>;
328
- contributors?: Array<Record<string, unknown>>;
329
- segments?: Array<Record<string, unknown>>;
330
- periodChanges?: Array<Record<string, unknown>>;
331
- changes?: Array<Record<string, unknown>>;
332
- drivers?: Array<Record<string, unknown>>;
333
- absoluteDeltaDrivers?: Array<Record<string, unknown>>;
334
- largestNegativeChanges?: Array<Record<string, unknown>>;
335
- largestPositiveChanges?: Array<Record<string, unknown>>;
336
- largestNegativeDrivers?: Array<Record<string, unknown>>;
337
- largestPositiveDrivers?: Array<Record<string, unknown>>;
338
- fieldsUsed?: Record<string, unknown>;
339
- metadata?: Record<string, unknown>;
340
- querySpec?: Record<string, unknown>;
341
- sql?: Record<string, unknown>;
342
- executionResult?: SemaphorAnalyticsExecutionResult;
343
- [key: string]: unknown;
344
- };
345
- export type SemaphorAnalysisQueryResult = SemaphorQueryState & SemaphorAnalysisPayload & {
346
- id?: string;
347
- intent?: SemaphorMetricIntent;
348
- };
349
- export type SemaphorRecordsPayload<TRecord extends Record<string, unknown> = Record<string, unknown>> = {
350
- records: TRecord[];
351
- columns?: SemaphorResultColumn[];
352
- rowCount?: number;
353
- pagination?: SemaphorPaginationMetadata;
354
- totals?: Extract<NonNullable<SemaphorAnalyticsExecutionResult['result']>, {
355
- kind: 'records';
356
- }>['totals'];
357
- executionResult?: SemaphorAnalyticsExecutionResult;
358
- };
359
- export type SemaphorRecordsQueryResult<TRecord extends Record<string, unknown> = Record<string, unknown>> = SemaphorQueryState & SemaphorRecordsPayload<TRecord> & {
360
- id?: string;
361
- intent?: SemaphorRecordsIntent;
362
- };
363
- export type SemaphorSqlPayload<TRecord extends Record<string, unknown> = Record<string, unknown>> = {
364
- records: TRecord[];
365
- columns?: SemaphorResultColumn[];
366
- rowCount?: number;
367
- pagination?: SemaphorPaginationMetadata;
368
- output?: string;
369
- rowLimitExceeded?: boolean;
370
- executionResult?: SemaphorAnalyticsExecutionResult;
371
- };
372
- export type SemaphorSqlQueryResult<TRecord extends Record<string, unknown> = Record<string, unknown>> = SemaphorQueryState & SemaphorSqlPayload<TRecord> & {
373
- id?: string;
374
- intent?: SemaphorSqlIntent;
375
- };
376
- export type SemaphorMatrixPayload = {
377
- window?: MatrixWindow;
378
- executionResult?: MatrixExecutionResult;
379
- };
380
- export type SemaphorMatrixQueryResult = SemaphorQueryState & SemaphorMatrixPayload & {
381
- id?: string;
382
- intent?: SemaphorMatrixIntent;
383
- };
384
- export type SemaphorInputOptionsPayload = {
385
- options: SemaphorInputOption[];
386
- /** Per-dependency classification for the option query; see
387
- * `SemaphorOptionDependencyOutcome`. Absent when no dependencies applied. */
388
- dependencyOutcomes?: SemaphorOptionDependencyOutcome[];
389
- /** Authoritative exact-value relevance result when the request asked for it. */
390
- match?: SemaphorOptionMatchResult;
391
- executionResult?: SemaphorAnalyticsExecutionResult;
392
- };
393
- export type SemaphorInputOptionsQueryResult = SemaphorQueryState & SemaphorInputOptionsPayload & {
394
- id?: string;
395
- intent?: Extract<SemaphorAnalyticsIntent, {
396
- kind: 'inputOptions';
397
- }>;
398
- };
399
- export type SemaphorRowsQueryResult<TRecord extends Record<string, unknown> = Record<string, unknown>> = SemaphorRecordsQueryResult<TRecord> | SemaphorSqlQueryResult<TRecord>;
400
- export type SemaphorQueryResult<TRecord extends Record<string, unknown> = Record<string, unknown>> = SemaphorMetricQueryResult | SemaphorAnalysisQueryResult | SemaphorRowsQueryResult<TRecord> | SemaphorInputOptionsQueryResult | SemaphorMatrixQueryResult;
401
- export type SemaphorAnyQueryResult<TRecord extends Record<string, unknown> = Record<string, unknown>> = SemaphorQueryResult<TRecord>;
402
- export 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;
403
- export type SemaphorQueryExecutorContext = {
404
- token?: string;
405
- apiBaseUrl?: string;
406
- activeInputs?: SemaphorActiveInput[];
407
- selections?: AnalyticsSelection[];
408
- debug?: SemaphorDataAppDebugConfig;
409
- };
410
- export type SemaphorQueryExecutor = {
411
- executeAnalysis?(intent: SemaphorMetricIntent, context: SemaphorQueryExecutorContext, options?: SemaphorAnalysisQueryOptions): Promise<SemaphorAnalysisPayload>;
412
- executeMetric(intent: SemaphorMetricIntent, context: SemaphorQueryExecutorContext): Promise<SemaphorMetricPayload>;
413
- executeRecords<TRecord extends Record<string, unknown> = Record<string, unknown>>(intent: SemaphorRecordsIntent, context: SemaphorQueryExecutorContext): Promise<SemaphorRecordsPayload<TRecord>>;
414
- executeInputOptions(intent: Extract<SemaphorAnalyticsIntent, {
415
- kind: 'inputOptions';
416
- }>, context: SemaphorQueryExecutorContext): Promise<SemaphorInputOptionsPayload>;
417
- executeSql?<TRecord extends Record<string, unknown> = Record<string, unknown>>(intent: SemaphorSqlIntent, context: SemaphorQueryExecutorContext): Promise<SemaphorSqlPayload<TRecord>>;
418
- executeMatrix?(input: MatrixOperationRequest, context: SemaphorQueryExecutorContext): Promise<SemaphorMatrixPayload>;
419
- };
@@ -1,5 +0,0 @@
1
- import { SemaphorQueryExecutor, SemaphorQueryExecutorContext } from './contracts.js';
2
- import { MatrixOperationRequest, MatrixExecutionResult } from '../shared/analytics-protocol/index.js';
3
- export declare function createSemaphorQueryExecutor(): SemaphorQueryExecutor;
4
- /** Bounded Matrix operation shared by the default SDK executor and direct callers. */
5
- export declare function executeMatrixWindow(input: MatrixOperationRequest, context: SemaphorQueryExecutorContext, signal?: AbortSignal): Promise<MatrixExecutionResult>;
@@ -1,29 +0,0 @@
1
- import { SemaphorAnalyticsIntent, SemaphorFieldRef, SemaphorSourceRef } from '../shared/analytics-protocol/index.js';
2
- export type SemaphorDataAppFieldCatalog = {
3
- source: SemaphorSourceRef;
4
- sourceAliases?: SemaphorSourceRef[];
5
- fields: SemaphorFieldRef[];
6
- };
7
- export type IntentFieldCatalogValidation = {
8
- ok: true;
9
- source: SemaphorSourceRef;
10
- catalogField: SemaphorFieldRef;
11
- usesBaseSource: boolean;
12
- } | {
13
- ok: false;
14
- code: 'invalid_source_ref' | 'missing_field' | 'unsupported_joined_projection';
15
- message: string;
16
- pathSuffix?: string;
17
- source: SemaphorSourceRef;
18
- };
19
- export declare function validateIntentFieldCatalogCompatibility({ intent, field, relativePath, baseCatalog, fieldCatalogs, }: {
20
- intent: SemaphorAnalyticsIntent;
21
- field: SemaphorFieldRef;
22
- relativePath: string;
23
- baseCatalog: SemaphorDataAppFieldCatalog;
24
- fieldCatalogs: SemaphorDataAppFieldCatalog[];
25
- }): IntentFieldCatalogValidation;
26
- export declare function findCatalogForSource(catalogs: SemaphorDataAppFieldCatalog[], source: SemaphorSourceRef): SemaphorDataAppFieldCatalog | undefined;
27
- export declare function findCatalogField(catalog: SemaphorDataAppFieldCatalog, field: SemaphorFieldRef, fallbackSource: SemaphorSourceRef): SemaphorFieldRef | undefined;
28
- export declare function normalizeCatalogFieldName(value: unknown): string;
29
- export declare function effectiveFieldSource(field: SemaphorFieldRef, fallbackSource: SemaphorSourceRef): SemaphorSourceRef;
@@ -1,11 +0,0 @@
1
- import { SemaphorAnalysisQueryResult, SemaphorAnalysisQueryDefinition, SemaphorInputHandle, SemaphorInputOption, SemaphorInputOptionsQueryResult, SemaphorInputOptionsQueryDefinition, SemaphorInputSpec, SemaphorInputValue, SemaphorMatrixQueryDefinition, SemaphorMatrixQueryResult, SemaphorMetricQueryResult, SemaphorMetricQueryDefinition, SemaphorQueryRuntimeOptions, SemaphorRecordsQueryResult, SemaphorRecordsQueryDefinition, SemaphorSqlQueryResult, SemaphorSqlQueryDefinition } from './contracts.js';
2
- export declare function useSemaphorInput<TValue extends SemaphorInputValue = SemaphorInputValue>(spec: SemaphorInputSpec<TValue>): SemaphorInputHandle;
3
- export declare function useSemaphorInputs(specs: readonly SemaphorInputSpec[]): SemaphorInputHandle[];
4
- export declare function useClearInvalidSemaphorInputValue(input: SemaphorInputHandle, optionsResult: Pick<SemaphorInputOptionsQueryResult, 'options' | 'status'> | undefined): void;
5
- export declare function isSemaphorInputValueValidForOptions(value: SemaphorInputValue | undefined, options: SemaphorInputOption[] | undefined): boolean;
6
- export declare function useSemaphorQuery(spec: SemaphorMetricQueryDefinition, options?: SemaphorQueryRuntimeOptions): SemaphorMetricQueryResult;
7
- export declare function useSemaphorQuery(spec: SemaphorAnalysisQueryDefinition, options?: SemaphorQueryRuntimeOptions): SemaphorAnalysisQueryResult;
8
- export declare function useSemaphorQuery<TRecord extends Record<string, unknown> = Record<string, unknown>>(spec: SemaphorRecordsQueryDefinition, options?: SemaphorQueryRuntimeOptions): SemaphorRecordsQueryResult<TRecord>;
9
- export declare function useSemaphorQuery(spec: SemaphorInputOptionsQueryDefinition, options?: SemaphorQueryRuntimeOptions): SemaphorInputOptionsQueryResult;
10
- export declare function useSemaphorQuery<TRecord extends Record<string, unknown> = Record<string, unknown>>(spec: SemaphorSqlQueryDefinition, options?: SemaphorQueryRuntimeOptions): SemaphorSqlQueryResult<TRecord>;
11
- export declare function useSemaphorQuery(spec: SemaphorMatrixQueryDefinition, options?: SemaphorQueryRuntimeOptions): SemaphorMatrixQueryResult;
@@ -1,9 +0,0 @@
1
- export { defineSemaphorDataApp, defineSemaphorInput, semaphor, } from './builders.js';
2
- export { createSemaphorQueryExecutor } from './executor.js';
3
- export { semaphorMetricAggregate, semaphorMetricMeasureBindingKey, } from '../shared/analytics-protocol/index.js';
4
- export { isSemaphorInputValueValidForOptions, useClearInvalidSemaphorInputValue, useSemaphorInput, useSemaphorInputs, useSemaphorQuery, } from './hooks.js';
5
- export { useSemaphorSelection } from './selection.js';
6
- export { SemaphorDataAppProvider } from './provider.js';
7
- export type * from './contracts.js';
8
- export type { SemaphorBindInputSpec, SemaphorControlBuilderSpec, SemaphorFieldBuilderSpec, SemaphorSemanticSourceBuilderSpec, SemaphorSqlParamInputSpec, SemaphorSqlSourceBuilderSpec, } from './builders.js';
9
- export type { SemaphorDataAppProviderProps } from './provider.js';
@@ -1,8 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { SemaphorDataAppDebugConfig, SemaphorQueryExecutor, SemaphorQueryExecutorContext } from './contracts.js';
3
- export type SemaphorDataAppProviderProps = SemaphorQueryExecutorContext & {
4
- executor?: SemaphorQueryExecutor;
5
- debug?: SemaphorDataAppDebugConfig;
6
- children: ReactNode;
7
- };
8
- export declare function SemaphorDataAppProvider({ token, apiBaseUrl, executor, debug, children, }: SemaphorDataAppProviderProps): import("react").JSX.Element;
@@ -1,21 +0,0 @@
1
- import { SemaphorAnalyticsIntent, SemaphorFieldRef, SemaphorMetricIntent, SemaphorRecordsIntent } from '../shared/analytics-protocol/index.js';
2
- export type SemaphorRelatedProjectionRole = Extract<NonNullable<SemaphorFieldRef['role']>, 'dimension' | 'date' | 'id'>;
3
- export type SemaphorRelatedProjectionFieldCandidate = {
4
- field: SemaphorFieldRef;
5
- allowedRelatedRoles: SemaphorRelatedProjectionRole[];
6
- unsupportedRelatedRoleMessage?: string;
7
- recommendedNextStep?: string;
8
- };
9
- type RelationshipAwareProjectionIntent = SemaphorRecordsIntent | SemaphorMetricIntent;
10
- export declare function validateRelationshipAwareIntentFieldPolicy({ intent, field, catalogField, relativePath, }: {
11
- intent: SemaphorAnalyticsIntent;
12
- field: SemaphorFieldRef;
13
- catalogField: SemaphorFieldRef;
14
- relativePath: string;
15
- }): boolean;
16
- export declare function relatedProjectionFieldCandidatesForIntent(intent: RelationshipAwareProjectionIntent): SemaphorRelatedProjectionFieldCandidate[];
17
- export declare function normalizeSemaphorFieldRole(field: SemaphorFieldRef): SemaphorFieldRef['role'] | undefined;
18
- export declare function isAllowedRelatedProjectionRole(role: SemaphorFieldRef['role'] | undefined, allowedRelatedRoles: SemaphorRelatedProjectionRole[]): role is SemaphorRelatedProjectionRole;
19
- export declare function fieldWithSelectedProjectionRole(field: SemaphorFieldRef, selectedField?: SemaphorFieldRef): SemaphorFieldRef;
20
- export declare function findMatchingRelatedProjectionField(selectedFields: SemaphorFieldRef[], requestedField: SemaphorFieldRef): SemaphorFieldRef | undefined;
21
- export {};
@@ -1,2 +0,0 @@
1
- import { SemaphorSelectionHandle, SemaphorSelectionInputSpec } from './contracts.js';
2
- export declare function useSemaphorSelection(spec: SemaphorSelectionInputSpec): SemaphorSelectionHandle;