@vaultgradient/pipequery-lang 1.2.2

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.
@@ -0,0 +1,120 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type OperationType = 'where' | 'select' | 'sort' | 'groupBy' | 'join' | 'first' | 'last' | 'distinct' | 'map' | 'reduce' | 'rollup' | 'pivot' | 'flatten' | 'transpose';
4
+ interface WhereConfig {
5
+ condition: string;
6
+ }
7
+ interface SelectConfig {
8
+ fields: string[];
9
+ expressions: string[];
10
+ }
11
+ interface SortConfig {
12
+ criteria: Array<{
13
+ field: string;
14
+ direction: 'asc' | 'desc';
15
+ }>;
16
+ }
17
+ interface GroupByConfig {
18
+ fields: string[];
19
+ }
20
+ interface JoinConfig {
21
+ rightSource: string;
22
+ condition: string;
23
+ }
24
+ interface FirstLastConfig {
25
+ count: number;
26
+ }
27
+ interface DistinctConfig {
28
+ fields: string[];
29
+ }
30
+ interface MapConfig {
31
+ expressions: string[];
32
+ }
33
+ interface ReduceConfig {
34
+ initial: string;
35
+ accumulator: string;
36
+ }
37
+ interface RollupConfig {
38
+ keys: string[];
39
+ aggregates: string[];
40
+ }
41
+ interface PivotConfig {
42
+ pivotField: string;
43
+ aggregates: string[];
44
+ }
45
+ interface FlattenConfig {
46
+ field: string;
47
+ }
48
+ interface TransposeConfig {
49
+ headerField: string;
50
+ }
51
+ type StepConfig = {
52
+ type: 'where';
53
+ config: WhereConfig;
54
+ } | {
55
+ type: 'select';
56
+ config: SelectConfig;
57
+ } | {
58
+ type: 'sort';
59
+ config: SortConfig;
60
+ } | {
61
+ type: 'groupBy';
62
+ config: GroupByConfig;
63
+ } | {
64
+ type: 'join';
65
+ config: JoinConfig;
66
+ } | {
67
+ type: 'first';
68
+ config: FirstLastConfig;
69
+ } | {
70
+ type: 'last';
71
+ config: FirstLastConfig;
72
+ } | {
73
+ type: 'distinct';
74
+ config: DistinctConfig;
75
+ } | {
76
+ type: 'map';
77
+ config: MapConfig;
78
+ } | {
79
+ type: 'reduce';
80
+ config: ReduceConfig;
81
+ } | {
82
+ type: 'rollup';
83
+ config: RollupConfig;
84
+ } | {
85
+ type: 'pivot';
86
+ config: PivotConfig;
87
+ } | {
88
+ type: 'flatten';
89
+ config: FlattenConfig;
90
+ } | {
91
+ type: 'transpose';
92
+ config: TransposeConfig;
93
+ };
94
+ interface PipelineStep {
95
+ id: string;
96
+ step: StepConfig;
97
+ }
98
+ type Orientation = 'vertical' | 'horizontal';
99
+ interface PipeQueryBuilderProps {
100
+ orientation: Orientation;
101
+ source: string;
102
+ onSourceChange: (source: string) => void;
103
+ availableSources: string[];
104
+ availableFields: string[];
105
+ onQueryChange: (query: string) => void;
106
+ compact?: boolean;
107
+ maxSteps?: number;
108
+ initialSteps?: PipelineStep[];
109
+ showResult?: boolean;
110
+ joinSources?: string[];
111
+ rowCount?: number;
112
+ }
113
+ type OperationCategory = 'filter' | 'transform' | 'sort' | 'aggregate' | 'limit' | 'join';
114
+ declare function createDefaultConfig(type: OperationType): StepConfig;
115
+ declare function getStepSummary(step: StepConfig): string;
116
+ declare function generateQuery(source: string, steps: PipelineStep[]): string;
117
+
118
+ declare function PipeQueryBuilder({ orientation, source, onSourceChange, availableSources, availableFields, onQueryChange, compact, maxSteps, initialSteps, showResult, joinSources, rowCount, }: PipeQueryBuilderProps): react_jsx_runtime.JSX.Element;
119
+
120
+ export { type OperationCategory, type OperationType, type Orientation, PipeQueryBuilder, type PipeQueryBuilderProps, type PipelineStep, type StepConfig, createDefaultConfig, generateQuery, getStepSummary };
@@ -0,0 +1,120 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ type OperationType = 'where' | 'select' | 'sort' | 'groupBy' | 'join' | 'first' | 'last' | 'distinct' | 'map' | 'reduce' | 'rollup' | 'pivot' | 'flatten' | 'transpose';
4
+ interface WhereConfig {
5
+ condition: string;
6
+ }
7
+ interface SelectConfig {
8
+ fields: string[];
9
+ expressions: string[];
10
+ }
11
+ interface SortConfig {
12
+ criteria: Array<{
13
+ field: string;
14
+ direction: 'asc' | 'desc';
15
+ }>;
16
+ }
17
+ interface GroupByConfig {
18
+ fields: string[];
19
+ }
20
+ interface JoinConfig {
21
+ rightSource: string;
22
+ condition: string;
23
+ }
24
+ interface FirstLastConfig {
25
+ count: number;
26
+ }
27
+ interface DistinctConfig {
28
+ fields: string[];
29
+ }
30
+ interface MapConfig {
31
+ expressions: string[];
32
+ }
33
+ interface ReduceConfig {
34
+ initial: string;
35
+ accumulator: string;
36
+ }
37
+ interface RollupConfig {
38
+ keys: string[];
39
+ aggregates: string[];
40
+ }
41
+ interface PivotConfig {
42
+ pivotField: string;
43
+ aggregates: string[];
44
+ }
45
+ interface FlattenConfig {
46
+ field: string;
47
+ }
48
+ interface TransposeConfig {
49
+ headerField: string;
50
+ }
51
+ type StepConfig = {
52
+ type: 'where';
53
+ config: WhereConfig;
54
+ } | {
55
+ type: 'select';
56
+ config: SelectConfig;
57
+ } | {
58
+ type: 'sort';
59
+ config: SortConfig;
60
+ } | {
61
+ type: 'groupBy';
62
+ config: GroupByConfig;
63
+ } | {
64
+ type: 'join';
65
+ config: JoinConfig;
66
+ } | {
67
+ type: 'first';
68
+ config: FirstLastConfig;
69
+ } | {
70
+ type: 'last';
71
+ config: FirstLastConfig;
72
+ } | {
73
+ type: 'distinct';
74
+ config: DistinctConfig;
75
+ } | {
76
+ type: 'map';
77
+ config: MapConfig;
78
+ } | {
79
+ type: 'reduce';
80
+ config: ReduceConfig;
81
+ } | {
82
+ type: 'rollup';
83
+ config: RollupConfig;
84
+ } | {
85
+ type: 'pivot';
86
+ config: PivotConfig;
87
+ } | {
88
+ type: 'flatten';
89
+ config: FlattenConfig;
90
+ } | {
91
+ type: 'transpose';
92
+ config: TransposeConfig;
93
+ };
94
+ interface PipelineStep {
95
+ id: string;
96
+ step: StepConfig;
97
+ }
98
+ type Orientation = 'vertical' | 'horizontal';
99
+ interface PipeQueryBuilderProps {
100
+ orientation: Orientation;
101
+ source: string;
102
+ onSourceChange: (source: string) => void;
103
+ availableSources: string[];
104
+ availableFields: string[];
105
+ onQueryChange: (query: string) => void;
106
+ compact?: boolean;
107
+ maxSteps?: number;
108
+ initialSteps?: PipelineStep[];
109
+ showResult?: boolean;
110
+ joinSources?: string[];
111
+ rowCount?: number;
112
+ }
113
+ type OperationCategory = 'filter' | 'transform' | 'sort' | 'aggregate' | 'limit' | 'join';
114
+ declare function createDefaultConfig(type: OperationType): StepConfig;
115
+ declare function getStepSummary(step: StepConfig): string;
116
+ declare function generateQuery(source: string, steps: PipelineStep[]): string;
117
+
118
+ declare function PipeQueryBuilder({ orientation, source, onSourceChange, availableSources, availableFields, onQueryChange, compact, maxSteps, initialSteps, showResult, joinSources, rowCount, }: PipeQueryBuilderProps): react_jsx_runtime.JSX.Element;
119
+
120
+ export { type OperationCategory, type OperationType, type Orientation, PipeQueryBuilder, type PipeQueryBuilderProps, type PipelineStep, type StepConfig, createDefaultConfig, generateQuery, getStepSummary };