react-semaphor 0.1.601 → 0.1.603
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.js +415 -375
- package/dist/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +5 -5
- package/dist/brand-studio/index.js +8 -8
- package/dist/briefings/index.js +5 -5
- package/dist/chunks/{add-to-dashboard-ClhEIFst.js → add-to-dashboard-CFF-wFU-.js} +1 -1
- package/dist/chunks/{analytics-base-schemas-DevrgqQb.js → analytics-base-schemas-DsUh5Q3C.js} +14 -12
- package/dist/chunks/{assistant-chat-BE0XXzZP.js → assistant-chat-B6hNQI1t.js} +146 -146
- package/dist/chunks/{bookmark-impact-DXDAN5AY.js → bookmark-impact-Ba2PLcGp.js} +3 -3
- package/dist/chunks/{bookmark-state-BMyB3Tb6.js → bookmark-state-n7AaNzR_.js} +517 -516
- package/dist/chunks/{card-filter-builder-CE0-YVN5.js → card-filter-builder-Y22HizVx.js} +474 -474
- package/dist/chunks/{comparison-window-caption-Dxj2CHOa.js → comparison-window-caption-Ck2TIbnR.js} +69 -69
- package/dist/chunks/{context-BJoEFgNl.js → context-UCQ7sere.js} +1 -1
- package/dist/chunks/{dashboard-mJKPFRbb.js → dashboard-BghI99oY.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-CntwKyiZ.js → dashboard-briefing-launcher-DtBAnGiH.js} +725 -716
- package/dist/chunks/{dashboard-controls-XO089DMg.js → dashboard-controls-CtFXlyjV.js} +53 -53
- package/dist/chunks/{dashboard-json-CQRiydUv.js → dashboard-json-DfGBUtCd.js} +5 -5
- package/dist/chunks/dates-BnrXF4bb.js +185 -0
- package/dist/chunks/{edit-dashboard-visual-f-Dm-BLR.js → edit-dashboard-visual-oxt3x1wb.js} +8081 -8268
- package/dist/chunks/{filter-line-CKNMyNTQ.js → filter-line-Cy5YYqRL.js} +27 -27
- package/dist/chunks/{filter-reach-copy-B8GGyVuR.js → filter-reach-copy-CE_ZX147.js} +1786 -2214
- package/dist/chunks/{filter-value-text-CRtKecI5.js → filter-value-text-fWvSDwkl.js} +11 -11
- package/dist/chunks/{index-DoPApnxg.js → index-D5rxbtS4.js} +24 -24
- package/dist/chunks/{layout-grid-CiSCZdIr.js → layout-grid-9LndRoLa.js} +1 -1
- package/dist/chunks/{matrix-analytical-definition-myf3D3Qx.js → matrix-analytical-definition-CCp48UCw.js} +496 -425
- package/dist/chunks/matrix-member-presentation-zNehruXR.js +391 -0
- package/dist/chunks/{matrix-operation-contract-C1SuOHLZ.js → matrix-operation-contract-DPBj69D8.js} +518 -514
- package/dist/chunks/{metric-comparison-Cm0G893W.js → metric-comparison-B0FR-Q8I.js} +184 -125
- package/dist/chunks/{paintbrush-DQIwqlck.js → paintbrush-58FQYY-y.js} +1 -1
- package/dist/chunks/{palette-Cun747Rg.js → palette-Be62Tkoa.js} +1 -1
- package/dist/chunks/{pivot-result-contract-expectations-C1Dyx8du.js → pivot-result-contract-expectations-BYqAmG9n.js} +1236 -1190
- package/dist/chunks/{pivot-result-identity-CBS-ssEp.js → pivot-result-identity-CAP4--iq.js} +1 -1
- package/dist/chunks/raw-temporal-value-Dg_MTFF7.js +3778 -0
- package/dist/chunks/{report-preferences-dialog-SDZEcG2x.js → report-preferences-dialog-uJp9GBTM.js} +219 -205
- package/dist/chunks/{report-runtime-context-BbedQdtc.js → report-runtime-context-c77_KF9v.js} +2 -2
- package/dist/chunks/{resolve-dashboard-input-context-DRBS0eRa.js → resolve-dashboard-input-context-Rtl1ffmE.js} +8808 -7291
- package/dist/chunks/{save-Dj5bjm7P.js → save-C5A0JnEV.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-DWVlJcsa.js → saved-dashboard-context-tcyTU8jm.js} +199 -213
- package/dist/chunks/selection-filter-compiler-DNijjI5y.js +150 -0
- package/dist/chunks/{semaphor-ready-indicator-OFOoAY-A.js → semaphor-ready-indicator-FBvunj6S.js} +37894 -35726
- package/dist/chunks/{shelf-drop-preview-context-2swWypXu.js → shelf-drop-preview-context-QKStrcK9.js} +54 -54
- package/dist/chunks/{stored-dashboard-NtOuEX6a.js → stored-dashboard-CHozcAY9.js} +770 -743
- package/dist/chunks/{style-sheet-parts-Qv4UcLAo.js → style-sheet-parts-CDCG-8Ej.js} +258 -251
- package/dist/chunks/{table-export-sheet-Do7ZB0_F.js → table-export-sheet-ZFIvs6Sj.js} +1 -1
- package/dist/chunks/{token-types-Dy_aXO-U.js → token-types-XbM6QByy.js} +1 -1
- package/dist/chunks/{upload-Bq-puSVy.js → upload-H15d7uHK.js} +1 -1
- package/dist/chunks/{validators-C7DFk3QK.js → validators-Baf3VIf5.js} +5 -5
- package/dist/chunks/{variable-draft-Cy03qnEi.js → variable-draft-C2y8Jp6Z.js} +27 -28
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.js +3392 -2761
- package/dist/format-utils/index.js +205 -204
- package/dist/index.js +73 -75
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/components/dashboard/dashboard-web-component.d.ts +7 -0
- package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -0
- package/dist/types/index.js +5 -5
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +1 -1
- package/dist/types/lib/document/document-edits.d.ts +0 -4
- package/dist/types/lib/query-context/assemble-card-query.d.ts +6 -1
- package/dist/types/lib/stores/dashboard-store.d.ts +30 -1
- package/dist/types/lib/types/common-types.d.ts +0 -2
- package/dist/types/lib/types/explorer-types.d.ts +1 -1
- package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +15 -0
- package/dist/types/shared/analytics-protocol/analytics-base-schemas.d.ts +18 -0
- package/dist/types/shared/analytics-protocol/analyze-result-types.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/comparison-choices.d.ts +92 -0
- package/dist/types/shared/analytics-protocol/comparison-placement.d.ts +30 -0
- package/dist/types/shared/analytics-protocol/contracts.d.ts +11 -5
- package/dist/types/shared/analytics-protocol/date-window.d.ts +105 -0
- package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +27 -0
- package/dist/types/shared/analytics-protocol/fixtures.d.ts +4 -2
- package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
- package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +93 -11
- package/dist/types/shared/assistant-protocol/context.d.ts +16 -16
- package/dist/types/shared/dashboard-authoring/calculations/calculated-column.d.ts +52 -0
- package/dist/types/shared/dashboard-authoring/calculations/definition.d.ts +129 -0
- package/dist/types/shared/dashboard-authoring/calculations/resolve-dashboard-field-copies.d.ts +46 -0
- package/dist/types/shared/dashboard-authoring/calculations/tokens.d.ts +36 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-display-write.d.ts +8 -0
- package/dist/types/shared/dashboard-authoring/card-settings/card-kinds.d.ts +1 -1
- package/dist/types/shared/dashboard-authoring/card-settings/inputs.d.ts +2 -1
- package/dist/types/shared/dashboard-authoring/card-settings/resolved.d.ts +0 -3
- package/dist/types/shared/dashboard-authoring/changes/calculation-change.d.ts +399 -0
- package/dist/types/shared/dashboard-authoring/changes/dashboard-change.d.ts +165 -360
- package/dist/types/shared/dashboard-authoring/changes/diagnostics.d.ts +23 -2
- package/dist/types/shared/dashboard-authoring/changes/domain-change.d.ts +143 -266
- package/dist/types/shared/dashboard-authoring/changes/read-card-query.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/changes/resolve-dashboard-changes.d.ts +46 -0
- package/dist/types/shared/dashboard-authoring/conditional-formatting/schema.d.ts +10 -10
- package/dist/types/shared/dashboard-authoring/dashboard-variable-card.d.ts +2 -4
- package/dist/types/shared/dashboard-authoring/index.d.ts +7 -1
- package/dist/types/shared/dashboard-authoring/kpi-date-context.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/kpi-figure.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/comparison.d.ts +8 -7
- package/dist/types/shared/dashboard-authoring/measure-calculations/dates.d.ts +11 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/index.d.ts +2 -2
- package/dist/types/shared/dashboard-authoring/measure-calculations/options.d.ts +4 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/read.d.ts +18 -1
- package/dist/types/shared/dashboard-authoring/measure-calculations/resolve.d.ts +2 -0
- package/dist/types/shared/dashboard-authoring/measure-calculations/schemas.d.ts +46 -88
- package/dist/types/shared/dashboard-authoring/operations/calculated-field-operations.d.ts +158 -0
- package/dist/types/shared/dashboard-authoring/operations/card-operations.d.ts +71 -0
- package/dist/types/shared/dashboard-authoring/operations/operation-types.d.ts +17 -6
- package/dist/types/shared/dashboard-authoring/outline/outline-dashboard.d.ts +21 -0
- package/dist/types/shared/dashboard-authoring/outline/outline-filters.d.ts +3 -0
- package/dist/types/shared/format-utils/comparison-detail.d.ts +34 -0
- package/dist/types/shared/format-utils/index.d.ts +1 -0
- package/dist/types/shared/format-utils/partial-period.d.ts +4 -2
- package/dist/types/shared/temporal/calendar-periods.d.ts +11 -0
- package/dist/types/shared/temporal/index.d.ts +2 -0
- package/dist/types/shared/temporal/temporal-text.d.ts +33 -0
- package/dist/types/shared/temporal/temporal.d.ts +27 -0
- package/dist/types/shared/temporal/zoned-wall-clock.d.ts +4 -3
- package/dist/types/shared/usage-events/details.d.ts +2 -2
- package/dist/types/shared/usage-events/envelope.d.ts +2 -2
- package/dist/usage-events/index.js +1 -1
- package/package.json +3 -2
- package/dist/chunks/dates-B-Urp5OD.js +0 -164
- package/dist/chunks/matrix-member-presentation-g0c_NpDW.js +0 -258
- package/dist/chunks/raw-temporal-value-DN_l-Tss.js +0 -454
- package/dist/chunks/selection-filter-compiler-DmAr7yqC.js +0 -131
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const calculationInputSchema: z.ZodUnion<[z.ZodObject<{
|
|
3
|
+
dataset: z.ZodString;
|
|
4
|
+
field: z.ZodString;
|
|
5
|
+
aggregate: z.ZodOptional<z.ZodEnum<["SUM", "COUNT", "AVG", "MIN", "MAX", "MEDIAN", "DISTINCT"]>>;
|
|
6
|
+
}, "strict", z.ZodTypeAny, {
|
|
7
|
+
field: string;
|
|
8
|
+
dataset: string;
|
|
9
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
field: string;
|
|
12
|
+
dataset: string;
|
|
13
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
14
|
+
}>, z.ZodObject<{
|
|
15
|
+
metric: z.ZodString;
|
|
16
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, "strict", z.ZodTypeAny, {
|
|
18
|
+
metric: string;
|
|
19
|
+
dataset?: string | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
metric: string;
|
|
22
|
+
dataset?: string | undefined;
|
|
23
|
+
}>]>;
|
|
24
|
+
/**
|
|
25
|
+
* A new calculation, by intent: the domain decides whether it is a fact, a
|
|
26
|
+
* dimension or a metric from its formula (SE-D2). One dataset's formula names
|
|
27
|
+
* the dataset; one across datasets names its `inputs` as {token}s.
|
|
28
|
+
*/
|
|
29
|
+
export declare const calculationAddSchema: z.ZodObject<{
|
|
30
|
+
op: z.ZodLiteral<"calculation.add">;
|
|
31
|
+
domainId: z.ZodOptional<z.ZodString>;
|
|
32
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
label: z.ZodOptional<z.ZodString>;
|
|
35
|
+
description: z.ZodOptional<z.ZodString>;
|
|
36
|
+
expression: z.ZodString;
|
|
37
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
38
|
+
dataset: z.ZodString;
|
|
39
|
+
field: z.ZodString;
|
|
40
|
+
aggregate: z.ZodOptional<z.ZodEnum<["SUM", "COUNT", "AVG", "MIN", "MAX", "MEDIAN", "DISTINCT"]>>;
|
|
41
|
+
}, "strict", z.ZodTypeAny, {
|
|
42
|
+
field: string;
|
|
43
|
+
dataset: string;
|
|
44
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
field: string;
|
|
47
|
+
dataset: string;
|
|
48
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
49
|
+
}>, z.ZodObject<{
|
|
50
|
+
metric: z.ZodString;
|
|
51
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, "strict", z.ZodTypeAny, {
|
|
53
|
+
metric: string;
|
|
54
|
+
dataset?: string | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
metric: string;
|
|
57
|
+
dataset?: string | undefined;
|
|
58
|
+
}>]>>>;
|
|
59
|
+
use: z.ZodOptional<z.ZodEnum<["aggregate", "group_or_filter"]>>;
|
|
60
|
+
dataType: z.ZodOptional<z.ZodEnum<["string", "number", "boolean", "date", "datetime"]>>;
|
|
61
|
+
}, "strict", z.ZodTypeAny, {
|
|
62
|
+
name: string;
|
|
63
|
+
expression: string;
|
|
64
|
+
op: "calculation.add";
|
|
65
|
+
domainId?: string | undefined;
|
|
66
|
+
label?: string | undefined;
|
|
67
|
+
dataType?: "string" | "number" | "boolean" | "date" | "datetime" | undefined;
|
|
68
|
+
description?: string | undefined;
|
|
69
|
+
inputs?: Record<string, {
|
|
70
|
+
field: string;
|
|
71
|
+
dataset: string;
|
|
72
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
73
|
+
} | {
|
|
74
|
+
metric: string;
|
|
75
|
+
dataset?: string | undefined;
|
|
76
|
+
}> | undefined;
|
|
77
|
+
dataset?: string | undefined;
|
|
78
|
+
use?: "aggregate" | "group_or_filter" | undefined;
|
|
79
|
+
}, {
|
|
80
|
+
name: string;
|
|
81
|
+
expression: string;
|
|
82
|
+
op: "calculation.add";
|
|
83
|
+
domainId?: string | undefined;
|
|
84
|
+
label?: string | undefined;
|
|
85
|
+
dataType?: "string" | "number" | "boolean" | "date" | "datetime" | undefined;
|
|
86
|
+
description?: string | undefined;
|
|
87
|
+
inputs?: Record<string, {
|
|
88
|
+
field: string;
|
|
89
|
+
dataset: string;
|
|
90
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
91
|
+
} | {
|
|
92
|
+
metric: string;
|
|
93
|
+
dataset?: string | undefined;
|
|
94
|
+
}> | undefined;
|
|
95
|
+
dataset?: string | undefined;
|
|
96
|
+
use?: "aggregate" | "group_or_filter" | undefined;
|
|
97
|
+
}>;
|
|
98
|
+
/** A calculation changed: its label, description or formula. Its name identifies it. */
|
|
99
|
+
export declare const calculationUpdateSchema: z.ZodObject<{
|
|
100
|
+
op: z.ZodLiteral<"calculation.update">;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
domainId: z.ZodOptional<z.ZodString>;
|
|
103
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
104
|
+
label: z.ZodOptional<z.ZodString>;
|
|
105
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
|
+
expression: z.ZodOptional<z.ZodString>;
|
|
107
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
108
|
+
dataset: z.ZodString;
|
|
109
|
+
field: z.ZodString;
|
|
110
|
+
aggregate: z.ZodOptional<z.ZodEnum<["SUM", "COUNT", "AVG", "MIN", "MAX", "MEDIAN", "DISTINCT"]>>;
|
|
111
|
+
}, "strict", z.ZodTypeAny, {
|
|
112
|
+
field: string;
|
|
113
|
+
dataset: string;
|
|
114
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
115
|
+
}, {
|
|
116
|
+
field: string;
|
|
117
|
+
dataset: string;
|
|
118
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
119
|
+
}>, z.ZodObject<{
|
|
120
|
+
metric: z.ZodString;
|
|
121
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, "strict", z.ZodTypeAny, {
|
|
123
|
+
metric: string;
|
|
124
|
+
dataset?: string | undefined;
|
|
125
|
+
}, {
|
|
126
|
+
metric: string;
|
|
127
|
+
dataset?: string | undefined;
|
|
128
|
+
}>]>>>;
|
|
129
|
+
}, "strict", z.ZodTypeAny, {
|
|
130
|
+
name: string;
|
|
131
|
+
op: "calculation.update";
|
|
132
|
+
domainId?: string | undefined;
|
|
133
|
+
label?: string | undefined;
|
|
134
|
+
description?: string | null | undefined;
|
|
135
|
+
expression?: string | undefined;
|
|
136
|
+
inputs?: Record<string, {
|
|
137
|
+
field: string;
|
|
138
|
+
dataset: string;
|
|
139
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
140
|
+
} | {
|
|
141
|
+
metric: string;
|
|
142
|
+
dataset?: string | undefined;
|
|
143
|
+
}> | undefined;
|
|
144
|
+
dataset?: string | undefined;
|
|
145
|
+
}, {
|
|
146
|
+
name: string;
|
|
147
|
+
op: "calculation.update";
|
|
148
|
+
domainId?: string | undefined;
|
|
149
|
+
label?: string | undefined;
|
|
150
|
+
description?: string | null | undefined;
|
|
151
|
+
expression?: string | undefined;
|
|
152
|
+
inputs?: Record<string, {
|
|
153
|
+
field: string;
|
|
154
|
+
dataset: string;
|
|
155
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
156
|
+
} | {
|
|
157
|
+
metric: string;
|
|
158
|
+
dataset?: string | undefined;
|
|
159
|
+
}> | undefined;
|
|
160
|
+
dataset?: string | undefined;
|
|
161
|
+
}>;
|
|
162
|
+
/** A dashboard field removed; refused while a card or filter uses it. */
|
|
163
|
+
export declare const calculationRemoveSchema: z.ZodObject<{
|
|
164
|
+
op: z.ZodLiteral<"calculation.remove">;
|
|
165
|
+
name: z.ZodString;
|
|
166
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
167
|
+
}, "strict", z.ZodTypeAny, {
|
|
168
|
+
name: string;
|
|
169
|
+
op: "calculation.remove";
|
|
170
|
+
dataset?: string | undefined;
|
|
171
|
+
}, {
|
|
172
|
+
name: string;
|
|
173
|
+
op: "calculation.remove";
|
|
174
|
+
dataset?: string | undefined;
|
|
175
|
+
}>;
|
|
176
|
+
export declare const calculationChangeSchemas: readonly [z.ZodObject<{
|
|
177
|
+
op: z.ZodLiteral<"calculation.add">;
|
|
178
|
+
domainId: z.ZodOptional<z.ZodString>;
|
|
179
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
180
|
+
name: z.ZodString;
|
|
181
|
+
label: z.ZodOptional<z.ZodString>;
|
|
182
|
+
description: z.ZodOptional<z.ZodString>;
|
|
183
|
+
expression: z.ZodString;
|
|
184
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
185
|
+
dataset: z.ZodString;
|
|
186
|
+
field: z.ZodString;
|
|
187
|
+
aggregate: z.ZodOptional<z.ZodEnum<["SUM", "COUNT", "AVG", "MIN", "MAX", "MEDIAN", "DISTINCT"]>>;
|
|
188
|
+
}, "strict", z.ZodTypeAny, {
|
|
189
|
+
field: string;
|
|
190
|
+
dataset: string;
|
|
191
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
192
|
+
}, {
|
|
193
|
+
field: string;
|
|
194
|
+
dataset: string;
|
|
195
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
196
|
+
}>, z.ZodObject<{
|
|
197
|
+
metric: z.ZodString;
|
|
198
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
199
|
+
}, "strict", z.ZodTypeAny, {
|
|
200
|
+
metric: string;
|
|
201
|
+
dataset?: string | undefined;
|
|
202
|
+
}, {
|
|
203
|
+
metric: string;
|
|
204
|
+
dataset?: string | undefined;
|
|
205
|
+
}>]>>>;
|
|
206
|
+
use: z.ZodOptional<z.ZodEnum<["aggregate", "group_or_filter"]>>;
|
|
207
|
+
dataType: z.ZodOptional<z.ZodEnum<["string", "number", "boolean", "date", "datetime"]>>;
|
|
208
|
+
}, "strict", z.ZodTypeAny, {
|
|
209
|
+
name: string;
|
|
210
|
+
expression: string;
|
|
211
|
+
op: "calculation.add";
|
|
212
|
+
domainId?: string | undefined;
|
|
213
|
+
label?: string | undefined;
|
|
214
|
+
dataType?: "string" | "number" | "boolean" | "date" | "datetime" | undefined;
|
|
215
|
+
description?: string | undefined;
|
|
216
|
+
inputs?: Record<string, {
|
|
217
|
+
field: string;
|
|
218
|
+
dataset: string;
|
|
219
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
220
|
+
} | {
|
|
221
|
+
metric: string;
|
|
222
|
+
dataset?: string | undefined;
|
|
223
|
+
}> | undefined;
|
|
224
|
+
dataset?: string | undefined;
|
|
225
|
+
use?: "aggregate" | "group_or_filter" | undefined;
|
|
226
|
+
}, {
|
|
227
|
+
name: string;
|
|
228
|
+
expression: string;
|
|
229
|
+
op: "calculation.add";
|
|
230
|
+
domainId?: string | undefined;
|
|
231
|
+
label?: string | undefined;
|
|
232
|
+
dataType?: "string" | "number" | "boolean" | "date" | "datetime" | undefined;
|
|
233
|
+
description?: string | undefined;
|
|
234
|
+
inputs?: Record<string, {
|
|
235
|
+
field: string;
|
|
236
|
+
dataset: string;
|
|
237
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
238
|
+
} | {
|
|
239
|
+
metric: string;
|
|
240
|
+
dataset?: string | undefined;
|
|
241
|
+
}> | undefined;
|
|
242
|
+
dataset?: string | undefined;
|
|
243
|
+
use?: "aggregate" | "group_or_filter" | undefined;
|
|
244
|
+
}>, z.ZodObject<{
|
|
245
|
+
op: z.ZodLiteral<"calculation.update">;
|
|
246
|
+
name: z.ZodString;
|
|
247
|
+
domainId: z.ZodOptional<z.ZodString>;
|
|
248
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
249
|
+
label: z.ZodOptional<z.ZodString>;
|
|
250
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
251
|
+
expression: z.ZodOptional<z.ZodString>;
|
|
252
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
|
|
253
|
+
dataset: z.ZodString;
|
|
254
|
+
field: z.ZodString;
|
|
255
|
+
aggregate: z.ZodOptional<z.ZodEnum<["SUM", "COUNT", "AVG", "MIN", "MAX", "MEDIAN", "DISTINCT"]>>;
|
|
256
|
+
}, "strict", z.ZodTypeAny, {
|
|
257
|
+
field: string;
|
|
258
|
+
dataset: string;
|
|
259
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
260
|
+
}, {
|
|
261
|
+
field: string;
|
|
262
|
+
dataset: string;
|
|
263
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
264
|
+
}>, z.ZodObject<{
|
|
265
|
+
metric: z.ZodString;
|
|
266
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
267
|
+
}, "strict", z.ZodTypeAny, {
|
|
268
|
+
metric: string;
|
|
269
|
+
dataset?: string | undefined;
|
|
270
|
+
}, {
|
|
271
|
+
metric: string;
|
|
272
|
+
dataset?: string | undefined;
|
|
273
|
+
}>]>>>;
|
|
274
|
+
}, "strict", z.ZodTypeAny, {
|
|
275
|
+
name: string;
|
|
276
|
+
op: "calculation.update";
|
|
277
|
+
domainId?: string | undefined;
|
|
278
|
+
label?: string | undefined;
|
|
279
|
+
description?: string | null | undefined;
|
|
280
|
+
expression?: string | undefined;
|
|
281
|
+
inputs?: Record<string, {
|
|
282
|
+
field: string;
|
|
283
|
+
dataset: string;
|
|
284
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
285
|
+
} | {
|
|
286
|
+
metric: string;
|
|
287
|
+
dataset?: string | undefined;
|
|
288
|
+
}> | undefined;
|
|
289
|
+
dataset?: string | undefined;
|
|
290
|
+
}, {
|
|
291
|
+
name: string;
|
|
292
|
+
op: "calculation.update";
|
|
293
|
+
domainId?: string | undefined;
|
|
294
|
+
label?: string | undefined;
|
|
295
|
+
description?: string | null | undefined;
|
|
296
|
+
expression?: string | undefined;
|
|
297
|
+
inputs?: Record<string, {
|
|
298
|
+
field: string;
|
|
299
|
+
dataset: string;
|
|
300
|
+
aggregate?: "SUM" | "COUNT" | "AVG" | "MIN" | "MAX" | "MEDIAN" | "DISTINCT" | undefined;
|
|
301
|
+
} | {
|
|
302
|
+
metric: string;
|
|
303
|
+
dataset?: string | undefined;
|
|
304
|
+
}> | undefined;
|
|
305
|
+
dataset?: string | undefined;
|
|
306
|
+
}>, z.ZodObject<{
|
|
307
|
+
op: z.ZodLiteral<"calculation.remove">;
|
|
308
|
+
name: z.ZodString;
|
|
309
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
310
|
+
}, "strict", z.ZodTypeAny, {
|
|
311
|
+
name: string;
|
|
312
|
+
op: "calculation.remove";
|
|
313
|
+
dataset?: string | undefined;
|
|
314
|
+
}, {
|
|
315
|
+
name: string;
|
|
316
|
+
op: "calculation.remove";
|
|
317
|
+
dataset?: string | undefined;
|
|
318
|
+
}>];
|
|
319
|
+
export declare const registeredCalculationChangeSchemas: readonly [z.ZodObject<{
|
|
320
|
+
op: z.ZodLiteral<"calculation.add">;
|
|
321
|
+
domainId: z.ZodOptional<z.ZodString>;
|
|
322
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
323
|
+
name: z.ZodString;
|
|
324
|
+
label: z.ZodOptional<z.ZodString>;
|
|
325
|
+
description: z.ZodOptional<z.ZodString>;
|
|
326
|
+
expression: z.ZodString;
|
|
327
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
328
|
+
use: z.ZodOptional<z.ZodEnum<["aggregate", "group_or_filter"]>>;
|
|
329
|
+
dataType: z.ZodOptional<z.ZodEnum<["string", "number", "boolean", "date", "datetime"]>>;
|
|
330
|
+
}, "strict", z.ZodTypeAny, {
|
|
331
|
+
name: string;
|
|
332
|
+
expression: string;
|
|
333
|
+
op: "calculation.add";
|
|
334
|
+
domainId?: string | undefined;
|
|
335
|
+
label?: string | undefined;
|
|
336
|
+
dataType?: "string" | "number" | "boolean" | "date" | "datetime" | undefined;
|
|
337
|
+
description?: string | undefined;
|
|
338
|
+
inputs?: Record<string, Record<string, unknown>> | undefined;
|
|
339
|
+
dataset?: string | undefined;
|
|
340
|
+
use?: "aggregate" | "group_or_filter" | undefined;
|
|
341
|
+
}, {
|
|
342
|
+
name: string;
|
|
343
|
+
expression: string;
|
|
344
|
+
op: "calculation.add";
|
|
345
|
+
domainId?: string | undefined;
|
|
346
|
+
label?: string | undefined;
|
|
347
|
+
dataType?: "string" | "number" | "boolean" | "date" | "datetime" | undefined;
|
|
348
|
+
description?: string | undefined;
|
|
349
|
+
inputs?: Record<string, Record<string, unknown>> | undefined;
|
|
350
|
+
dataset?: string | undefined;
|
|
351
|
+
use?: "aggregate" | "group_or_filter" | undefined;
|
|
352
|
+
}>, z.ZodObject<{
|
|
353
|
+
op: z.ZodLiteral<"calculation.update">;
|
|
354
|
+
name: z.ZodString;
|
|
355
|
+
domainId: z.ZodOptional<z.ZodString>;
|
|
356
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
357
|
+
label: z.ZodOptional<z.ZodString>;
|
|
358
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
359
|
+
expression: z.ZodOptional<z.ZodString>;
|
|
360
|
+
inputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
361
|
+
}, "strict", z.ZodTypeAny, {
|
|
362
|
+
name: string;
|
|
363
|
+
op: "calculation.update";
|
|
364
|
+
domainId?: string | undefined;
|
|
365
|
+
label?: string | undefined;
|
|
366
|
+
description?: string | null | undefined;
|
|
367
|
+
expression?: string | undefined;
|
|
368
|
+
inputs?: Record<string, Record<string, unknown>> | undefined;
|
|
369
|
+
dataset?: string | undefined;
|
|
370
|
+
}, {
|
|
371
|
+
name: string;
|
|
372
|
+
op: "calculation.update";
|
|
373
|
+
domainId?: string | undefined;
|
|
374
|
+
label?: string | undefined;
|
|
375
|
+
description?: string | null | undefined;
|
|
376
|
+
expression?: string | undefined;
|
|
377
|
+
inputs?: Record<string, Record<string, unknown>> | undefined;
|
|
378
|
+
dataset?: string | undefined;
|
|
379
|
+
}>, z.ZodObject<{
|
|
380
|
+
op: z.ZodLiteral<"calculation.remove">;
|
|
381
|
+
name: z.ZodString;
|
|
382
|
+
dataset: z.ZodOptional<z.ZodString>;
|
|
383
|
+
}, "strict", z.ZodTypeAny, {
|
|
384
|
+
name: string;
|
|
385
|
+
op: "calculation.remove";
|
|
386
|
+
dataset?: string | undefined;
|
|
387
|
+
}, {
|
|
388
|
+
name: string;
|
|
389
|
+
op: "calculation.remove";
|
|
390
|
+
dataset?: string | undefined;
|
|
391
|
+
}>];
|
|
392
|
+
export type CalculationInput = z.infer<typeof calculationInputSchema>;
|
|
393
|
+
export type CalculationAddChange = z.infer<typeof calculationAddSchema>;
|
|
394
|
+
export type CalculationUpdateChange = z.infer<typeof calculationUpdateSchema>;
|
|
395
|
+
export type CalculationRemoveChange = z.infer<typeof calculationRemoveSchema>;
|
|
396
|
+
export type CalculationChange = CalculationAddChange | CalculationUpdateChange | CalculationRemoveChange;
|
|
397
|
+
/** The calculation ops, in both op lists for routing (MC-D3). */
|
|
398
|
+
export declare const CALCULATION_CHANGE_OPS: readonly CalculationChange['op'][];
|
|
399
|
+
export {};
|