react-semaphor 0.1.449 → 0.1.453
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 +115 -109
- package/dist/appearance/index.cjs +1 -1
- package/dist/appearance/index.js +1 -1
- package/dist/brand-studio/index.cjs +4 -4
- package/dist/brand-studio/index.js +15 -13
- package/dist/briefings/index.cjs +1 -1
- package/dist/briefings/index.js +39 -2131
- package/dist/chunks/{analyze-result-contract-BHb7sUUW.cjs → analyze-result-contract-Dxw66nUG.cjs} +1 -1
- package/dist/chunks/{analyze-result-contract-T-0Ntzys.js → analyze-result-contract-GHKFwThg.js} +1 -1
- package/dist/chunks/canonical-result-keys-Drc2x-lf.cjs +1 -0
- package/dist/chunks/canonical-result-keys-KLk__J_O.js +466 -0
- package/dist/chunks/color-CJvdlFM_.js +2162 -0
- package/dist/chunks/color-CyB5o13F.cjs +4 -0
- package/dist/chunks/{common-types-CQ6SHfLk.cjs → common-types-Ci66eflG.cjs} +1 -1
- package/dist/chunks/{common-types-B7Jk3Rtj.js → common-types-F6qk6PPS.js} +1 -1
- package/dist/chunks/contracts-CoCOpd_i.js +11 -0
- package/dist/chunks/contracts-CtB2VONT.cjs +1 -0
- package/dist/chunks/{dashboard-briefing-launcher-DCHiEkLE.js → dashboard-briefing-launcher-CFpX0WX3.js} +86 -84
- package/dist/chunks/dashboard-briefing-launcher-mUXWuiOZ.cjs +26 -0
- package/dist/chunks/{dashboard-controls-DwRFCcHV.js → dashboard-controls-BeYAmOJc.js} +15 -13
- package/dist/chunks/{dashboard-controls-CaFioayc.cjs → dashboard-controls-SoNubIu1.cjs} +1 -1
- package/dist/chunks/dashboard-json-BublPnQ4.cjs +1 -0
- package/dist/chunks/{dashboard-json-WoILbfTe.js → dashboard-json-DeLUagVV.js} +25 -23
- package/dist/chunks/edit-dashboard-visual-CrvPcO7A.cjs +172 -0
- package/dist/chunks/{edit-dashboard-visual-ciFhxqaI.js → edit-dashboard-visual-Go0h82DR.js} +6925 -6947
- package/dist/chunks/editor-action-buttons-1Lo0fIh7.cjs +16 -0
- package/dist/chunks/{editor-action-buttons-BPo_45pM.js → editor-action-buttons-BFNtjFzO.js} +41 -39
- package/dist/chunks/format-types-CFHQoIuk.js +1350 -0
- package/dist/chunks/format-types-PSZZ7hG8.cjs +1 -0
- package/dist/chunks/index-B3ZugihZ.js +3713 -0
- package/dist/chunks/{index-CPuawpXJ.js → index-BsH32bn1.js} +47472 -47845
- package/dist/chunks/index-ByFbacH7.cjs +1 -0
- package/dist/chunks/index-CACdoqu3.js +318 -0
- package/dist/chunks/index-DSKR3nKn.js +421 -0
- package/dist/chunks/index-DjiIh_9n.cjs +4 -0
- package/dist/chunks/index-F25jnH0p.cjs +1 -0
- package/dist/chunks/index-q12_nNUS.cjs +1392 -0
- package/dist/chunks/{metric-comparison-97zHGEx5.js → metric-comparison-D0T0MKRK.js} +1 -1
- package/dist/chunks/{metric-comparison-CUAJ8n4y.cjs → metric-comparison-DYR3RXam.cjs} +1 -1
- package/dist/chunks/pivot-header-presentation-DcfPaCiy.cjs +4 -0
- package/dist/chunks/pivot-header-presentation-nk604qc1.js +557 -0
- package/dist/chunks/{pivot-result-identity-CwJWpKI7.js → pivot-result-identity-C43Ai5Kr.js} +1 -1
- package/dist/chunks/{pivot-result-identity-CDLRT-YG.cjs → pivot-result-identity-CRUokNgm.cjs} +1 -1
- package/dist/chunks/pivot-result-lifecycle-4kSe0Hk1.js +1642 -0
- package/dist/chunks/pivot-result-lifecycle-BiJepH5S.cjs +1 -0
- package/dist/chunks/raw-temporal-contract-BF7PjBY9.js +64 -0
- package/dist/chunks/raw-temporal-contract-CxbRFwnd.cjs +1 -0
- package/dist/chunks/report-preferences-dialog-BEVZAE3m.cjs +1 -0
- package/dist/chunks/report-preferences-dialog-BNV7qXYH.js +723 -0
- package/dist/chunks/{report-runtime-context-bCy3CVzK.js → report-runtime-context-BJQDu2fV.js} +1 -1
- package/dist/chunks/{report-runtime-context-C8LZFsqV.cjs → report-runtime-context-DjYqLV-c.cjs} +1 -1
- package/dist/chunks/saved-temporal-bucket-format-DiZdQXOL.js +924 -0
- package/dist/chunks/saved-temporal-bucket-format-Gfbh4IiP.cjs +1 -0
- package/dist/chunks/switch-CjJ6FHYJ.cjs +138 -0
- package/dist/chunks/{switch-BXet-Sno.js → switch-DgLwr7O-.js} +4352 -5249
- package/dist/chunks/temporal-bucket-Dnj8qT9l.cjs +1 -0
- package/dist/chunks/temporal-bucket-FBZGrDCe.js +560 -0
- package/dist/chunks/temporal-bucket-authoring-7hv2laOG.cjs +1 -0
- package/dist/chunks/temporal-bucket-authoring-FIRnJz0e.js +221 -0
- package/dist/chunks/{temporal-bucket-contract-_F6vNhhH.js → temporal-bucket-contract-BQOj6Frl.js} +1 -1
- package/dist/chunks/{temporal-bucket-contract-ChDBWX8I.cjs → temporal-bucket-contract-anl4h-vg.cjs} +1 -1
- package/dist/chunks/{token-types-BHR58aTy.js → token-types-CRpQJ4kv.js} +1 -1
- package/dist/chunks/{token-types-BdQ8kHBm.cjs → token-types-D0i0IUX3.cjs} +1 -1
- package/dist/chunks/{update-policy-BxvYMYz0.cjs → update-policy-C1i9bgsy.cjs} +1 -1
- package/dist/chunks/{update-policy-g0rCQ9BM.js → update-policy-CaJz9aPG.js} +1 -1
- package/dist/chunks/{validators-Cs74WVie.js → validators-DeMXwRON.js} +253 -233
- package/dist/chunks/validators-Dm7Kpz6p.cjs +1 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +2 -2
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +32 -29
- package/dist/data-app-builder/index.cjs +1 -1
- package/dist/data-app-builder/index.js +2 -2
- package/dist/data-app-codegen/index.cjs +1 -1
- package/dist/data-app-codegen/index.js +2 -2
- package/dist/data-app-codegen-node/index.cjs +1 -1
- package/dist/data-app-codegen-node/index.js +3 -3
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +3 -3
- package/dist/data-app-sdk-adapters/index.cjs +1 -1
- package/dist/data-app-sdk-adapters/index.js +2 -2
- package/dist/data-app-sdk-validation/index.cjs +1 -1
- package/dist/data-app-sdk-validation/index.js +3 -3
- package/dist/format-utils/index.cjs +3 -3
- package/dist/format-utils/index.js +162 -145
- package/dist/index.cjs +1 -1
- package/dist/index.js +157 -155
- package/dist/report-runtime-context/index.cjs +1 -1
- package/dist/report-runtime-context/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +3 -3
- package/dist/types/analytics-protocol.d.ts +37 -0
- package/dist/types/briefings.d.ts +718 -7
- package/dist/types/dashboard-assistant.d.ts +18 -0
- package/dist/types/dashboard-authoring.d.ts +52 -2
- package/dist/types/dashboard.d.ts +128 -0
- package/dist/types/data-app-sdk-validation.d.ts +13 -0
- package/dist/types/data-app-sdk.d.ts +13 -0
- package/dist/types/format-utils.d.ts +190 -3
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +4 -4
- package/dist/types/main.d.ts +103 -12
- package/dist/types/shared.d.ts +5 -0
- package/dist/types/surfboard.d.ts +129 -1
- package/dist/types/types.d.ts +98 -6
- package/dist/types/value-format-preferences.d.ts +3 -0
- package/package.json +2 -1
- package/dist/chunks/card-config-utils-15sRtebL.cjs +0 -1
- package/dist/chunks/card-config-utils-BYZ5MJOh.js +0 -16
- package/dist/chunks/dashboard-briefing-launcher-DDgDr2s3.cjs +0 -26
- package/dist/chunks/dashboard-json-CYtvwtvj.cjs +0 -1
- package/dist/chunks/edit-dashboard-visual-DwKcvlsF.cjs +0 -177
- package/dist/chunks/editor-action-buttons-BVmsk0Aj.cjs +0 -16
- package/dist/chunks/format-types-CSv0V7mm.cjs +0 -1
- package/dist/chunks/format-types-DZGgYj39.js +0 -1663
- package/dist/chunks/index-CJdxSyQq.js +0 -2578
- package/dist/chunks/index-DPv8_Ild.cjs +0 -1395
- package/dist/chunks/index-DRlMUglg.cjs +0 -4
- package/dist/chunks/pivot-result-lifecycle-BBabQ_da.js +0 -914
- package/dist/chunks/pivot-result-lifecycle-DPc0ANwk.cjs +0 -4
- package/dist/chunks/presentation-execution-BLfPTGX_.js +0 -637
- package/dist/chunks/presentation-execution-BTV-Q43g.cjs +0 -1
- package/dist/chunks/report-preferences-dialog-D9ZCGh9l.js +0 -691
- package/dist/chunks/report-preferences-dialog-DaqTEcac.cjs +0 -1
- package/dist/chunks/switch-Cjk6G06r.cjs +0 -138
- package/dist/chunks/temporal-bucket-BnPxGrAi.js +0 -446
- package/dist/chunks/temporal-bucket-authoring-CPTwHzvs.cjs +0 -1
- package/dist/chunks/temporal-bucket-authoring-CgOuakGW.js +0 -205
- package/dist/chunks/temporal-bucket-pMnV-4Nj.cjs +0 -1
- package/dist/chunks/temporal-result-owner-6peubmhU.js +0 -443
- package/dist/chunks/temporal-result-owner-f6-i65Fb.cjs +0 -1
- package/dist/chunks/validators-9D4KBqKD.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as a } from "zod";
|
|
2
|
-
const
|
|
2
|
+
const F = [
|
|
3
3
|
"second",
|
|
4
4
|
"minute",
|
|
5
5
|
"hour",
|
|
@@ -10,9 +10,9 @@ const C = [
|
|
|
10
10
|
"year"
|
|
11
11
|
];
|
|
12
12
|
function ci(e) {
|
|
13
|
-
return typeof e == "string" &&
|
|
13
|
+
return typeof e == "string" && F.includes(e);
|
|
14
14
|
}
|
|
15
|
-
const [, , ...le] =
|
|
15
|
+
const [, , ...le] = F;
|
|
16
16
|
function pi(e) {
|
|
17
17
|
return ci(e) && le.includes(e);
|
|
18
18
|
}
|
|
@@ -23,15 +23,17 @@ const mi = [
|
|
|
23
23
|
"quarter_long",
|
|
24
24
|
"fiscal_quarter_short",
|
|
25
25
|
"fiscal_year"
|
|
26
|
-
]
|
|
26
|
+
], Wa = {
|
|
27
|
+
invalidMetadata: "invalid_raw_temporal_metadata"
|
|
28
|
+
};
|
|
27
29
|
function fi(e) {
|
|
28
30
|
return e === "second" || e === "minute" || e === "hour" ? "datetime" : "date";
|
|
29
31
|
}
|
|
30
|
-
const
|
|
32
|
+
const es = {
|
|
31
33
|
missingMetadata: "missing_temporal_bucket_metadata",
|
|
32
34
|
invalidMetadata: "invalid_temporal_bucket_metadata",
|
|
33
35
|
invalidValue: "invalid_temporal_bucket_value"
|
|
34
|
-
},
|
|
36
|
+
}, is = "__auto_count__";
|
|
35
37
|
function gi(e) {
|
|
36
38
|
try {
|
|
37
39
|
return new Intl.DateTimeFormat("en-US", { timeZone: e }).format(), !0;
|
|
@@ -83,7 +85,7 @@ const hi = {
|
|
|
83
85
|
function I(e) {
|
|
84
86
|
return typeof e == "string" && e.trim().length > 0;
|
|
85
87
|
}
|
|
86
|
-
function
|
|
88
|
+
function ts(e) {
|
|
87
89
|
return e ? e.kind === "semantic" ? !!(I(e.domainId) && (I(e.datasetId) || I(e.datasetName))) : e.kind === "physical" ? I(e.connectionId) && I(e.tableName) : I(e.connectionId) : !1;
|
|
88
90
|
}
|
|
89
91
|
function ee(e) {
|
|
@@ -104,10 +106,10 @@ function ee(e) {
|
|
|
104
106
|
e.label || ""
|
|
105
107
|
].join(":") : "";
|
|
106
108
|
}
|
|
107
|
-
function
|
|
109
|
+
function Ce(e, i) {
|
|
108
110
|
return !e || !i ? e === i : e.kind !== i.kind ? !1 : e.kind === "semantic" && i.kind === "semantic" ? e.domainId !== i.domainId ? !1 : e.datasetId && i.datasetId ? e.datasetId === i.datasetId : e.datasetName === i.datasetName : ee(e) === ee(i);
|
|
109
111
|
}
|
|
110
|
-
function
|
|
112
|
+
function Fe(e, i) {
|
|
111
113
|
return e.kind !== "semantic" || i.kind !== "semantic" ? e : {
|
|
112
114
|
...e,
|
|
113
115
|
datasetName: e.datasetName || i.datasetName,
|
|
@@ -116,17 +118,17 @@ function Ce(e, i) {
|
|
|
116
118
|
connectionId: e.connectionId || i.connectionId
|
|
117
119
|
};
|
|
118
120
|
}
|
|
119
|
-
function
|
|
121
|
+
function as(e) {
|
|
120
122
|
const i = [];
|
|
121
123
|
for (const t of e) {
|
|
122
124
|
const s = i.findIndex(
|
|
123
|
-
(n) =>
|
|
125
|
+
(n) => Ce(n, t)
|
|
124
126
|
);
|
|
125
127
|
if (s === -1) {
|
|
126
128
|
i.push(t);
|
|
127
129
|
continue;
|
|
128
130
|
}
|
|
129
|
-
i[s] =
|
|
131
|
+
i[s] = Fe(
|
|
130
132
|
i[s],
|
|
131
133
|
t
|
|
132
134
|
);
|
|
@@ -134,7 +136,7 @@ function is(e) {
|
|
|
134
136
|
return i;
|
|
135
137
|
}
|
|
136
138
|
function yi(e, i) {
|
|
137
|
-
return e.name === i.name &&
|
|
139
|
+
return e.name === i.name && Ce(e.source, i.source);
|
|
138
140
|
}
|
|
139
141
|
function _i(e) {
|
|
140
142
|
return [
|
|
@@ -151,16 +153,16 @@ function de(e) {
|
|
|
151
153
|
function vi(e) {
|
|
152
154
|
return e.trim().toUpperCase();
|
|
153
155
|
}
|
|
154
|
-
function
|
|
156
|
+
function ss(e, i) {
|
|
155
157
|
return {
|
|
156
158
|
...e,
|
|
157
159
|
label: e.label || i.label,
|
|
158
160
|
role: e.role || i.role,
|
|
159
161
|
dataType: e.dataType || i.dataType,
|
|
160
|
-
source: e.source && i.source ?
|
|
162
|
+
source: e.source && i.source ? Fe(e.source, i.source) : e.source || i.source
|
|
161
163
|
};
|
|
162
164
|
}
|
|
163
|
-
const ie = "semaphor-data-app-codegen-summary/v1",
|
|
165
|
+
const ie = "semaphor-data-app-codegen-summary/v1", ns = "semaphor-data-app-codegen-summary-validator/v2", $i = /* @__PURE__ */ new Set([
|
|
164
166
|
"metric",
|
|
165
167
|
"records",
|
|
166
168
|
"matrix",
|
|
@@ -281,7 +283,7 @@ const ie = "semaphor-data-app-codegen-summary/v1", as = "semaphor-data-app-codeg
|
|
|
281
283
|
"requires_sql_escape_hatch",
|
|
282
284
|
"unsupported_sdk_capability"
|
|
283
285
|
]);
|
|
284
|
-
function
|
|
286
|
+
function os(e) {
|
|
285
287
|
return qe(e).ok;
|
|
286
288
|
}
|
|
287
289
|
function qe(e) {
|
|
@@ -296,9 +298,9 @@ function qe(e) {
|
|
|
296
298
|
), Array.isArray(t.sources) && t.sources.forEach((s, n) => {
|
|
297
299
|
i.push(...N(s, `sources.${n}`));
|
|
298
300
|
}), Array.isArray(t.inputs) && t.inputs.forEach((s, n) => {
|
|
299
|
-
i.push(...
|
|
301
|
+
i.push(...Ci(s, `inputs.${n}`));
|
|
300
302
|
}), Array.isArray(t.views) && t.views.forEach((s, n) => {
|
|
301
|
-
i.push(...
|
|
303
|
+
i.push(...Fi(s, `views.${n}`));
|
|
302
304
|
}), Array.isArray(t.filterContracts) && t.filterContracts.forEach((s, n) => {
|
|
303
305
|
i.push(
|
|
304
306
|
...Ui(s, `filterContracts.${n}`)
|
|
@@ -367,7 +369,7 @@ function Ti(e) {
|
|
|
367
369
|
"implementationChecklist.browserSmokeChecks must be an array of strings."
|
|
368
370
|
), t;
|
|
369
371
|
}
|
|
370
|
-
function
|
|
372
|
+
function Ci(e, i) {
|
|
371
373
|
const t = c(e);
|
|
372
374
|
if (!t)
|
|
373
375
|
return [`${i} must be an object.`];
|
|
@@ -388,7 +390,7 @@ function Fi(e, i) {
|
|
|
388
390
|
);
|
|
389
391
|
}), s;
|
|
390
392
|
}
|
|
391
|
-
function
|
|
393
|
+
function Fi(e, i) {
|
|
392
394
|
const t = c(e);
|
|
393
395
|
if (!t)
|
|
394
396
|
return [`${i} must be an object.`];
|
|
@@ -1232,7 +1234,7 @@ const b = a.record(a.string(), a.unknown()), x = a.array(b), y = a.enum([
|
|
|
1232
1234
|
"duckdb",
|
|
1233
1235
|
"sqlite",
|
|
1234
1236
|
"unknown"
|
|
1235
|
-
]), ft = a.enum(
|
|
1237
|
+
]), ft = a.enum(F), Le = a.enum(le), H = a.enum([
|
|
1236
1238
|
"dimension",
|
|
1237
1239
|
"measure",
|
|
1238
1240
|
"date",
|
|
@@ -1277,6 +1279,9 @@ const b = a.record(a.string(), a.unknown()), x = a.array(b), y = a.enum([
|
|
|
1277
1279
|
kind: a.literal("temporal_bucket"),
|
|
1278
1280
|
granularity: ft,
|
|
1279
1281
|
calendar: yt
|
|
1282
|
+
}).strict(), _t = a.object({
|
|
1283
|
+
kind: a.literal("raw_temporal"),
|
|
1284
|
+
valueKind: a.enum(["date", "wall_datetime", "instant"])
|
|
1280
1285
|
}).strict(), Ue = a.union([
|
|
1281
1286
|
a.object({
|
|
1282
1287
|
type: a.enum(["number", "currency", "percent", "percentage", "scientific"]),
|
|
@@ -1324,7 +1329,7 @@ const b = a.record(a.string(), a.unknown()), x = a.array(b), y = a.enum([
|
|
|
1324
1329
|
prefix: a.string().optional(),
|
|
1325
1330
|
suffix: a.string().optional()
|
|
1326
1331
|
}).passthrough()
|
|
1327
|
-
]),
|
|
1332
|
+
]), vt = a.union([
|
|
1328
1333
|
a.object({ kind: a.literal("defaultAggregate") }).passthrough(),
|
|
1329
1334
|
a.object({ kind: a.literal("blank") }).passthrough(),
|
|
1330
1335
|
a.object({
|
|
@@ -1359,7 +1364,7 @@ const Ge = a.object({
|
|
|
1359
1364
|
datasetId: a.string().optional(),
|
|
1360
1365
|
label: a.string().optional(),
|
|
1361
1366
|
connectionId: a.string().optional()
|
|
1362
|
-
}).passthrough(),
|
|
1367
|
+
}).passthrough(), $t = a.object({
|
|
1363
1368
|
kind: a.literal("physical"),
|
|
1364
1369
|
connectionId: a.string(),
|
|
1365
1370
|
connectionType: a.string().optional(),
|
|
@@ -1368,15 +1373,15 @@ const Ge = a.object({
|
|
|
1368
1373
|
schemaName: a.string().optional(),
|
|
1369
1374
|
label: a.string().optional(),
|
|
1370
1375
|
dialect: G.optional()
|
|
1371
|
-
}).passthrough(),
|
|
1376
|
+
}).passthrough(), St = a.object({
|
|
1372
1377
|
kind: a.literal("sql"),
|
|
1373
1378
|
connectionId: a.string(),
|
|
1374
1379
|
dialect: G.optional(),
|
|
1375
1380
|
label: a.string().optional()
|
|
1376
1381
|
}).passthrough(), j = a.union([
|
|
1377
1382
|
Ge,
|
|
1378
|
-
|
|
1379
|
-
|
|
1383
|
+
$t,
|
|
1384
|
+
St
|
|
1380
1385
|
]), A = a.object({
|
|
1381
1386
|
name: a.string(),
|
|
1382
1387
|
label: a.string().optional(),
|
|
@@ -1384,7 +1389,7 @@ const Ge = a.object({
|
|
|
1384
1389
|
dataType: z.optional(),
|
|
1385
1390
|
source: j.optional(),
|
|
1386
1391
|
aggregate: y.optional()
|
|
1387
|
-
}).passthrough(),
|
|
1392
|
+
}).passthrough(), wt = a.object({
|
|
1388
1393
|
kind: a.literal("field"),
|
|
1389
1394
|
field: A,
|
|
1390
1395
|
aggregate: y.optional()
|
|
@@ -1398,7 +1403,7 @@ const Ge = a.object({
|
|
|
1398
1403
|
computeStage: a.enum(["row", "aggregate"]),
|
|
1399
1404
|
expression: a.string(),
|
|
1400
1405
|
expressionLanguage: a.literal("semaphor_sql_template").optional(),
|
|
1401
|
-
inputs: a.record(
|
|
1406
|
+
inputs: a.record(wt),
|
|
1402
1407
|
defaultAggregate: y.optional(),
|
|
1403
1408
|
aggregationBehavior: a.enum([
|
|
1404
1409
|
"additive",
|
|
@@ -1420,7 +1425,7 @@ const Ge = a.object({
|
|
|
1420
1425
|
a.object({
|
|
1421
1426
|
derivedField: He.optional()
|
|
1422
1427
|
}).passthrough()
|
|
1423
|
-
),
|
|
1428
|
+
), It = Ge, kt = a.object({
|
|
1424
1429
|
kind: a.literal("physical"),
|
|
1425
1430
|
connectionId: a.string().optional(),
|
|
1426
1431
|
connectionType: a.string().optional(),
|
|
@@ -1429,22 +1434,22 @@ const Ge = a.object({
|
|
|
1429
1434
|
schemaName: a.string().optional(),
|
|
1430
1435
|
label: a.string().optional(),
|
|
1431
1436
|
dialect: G.optional()
|
|
1432
|
-
}).passthrough(),
|
|
1437
|
+
}).passthrough(), xt = a.object({
|
|
1433
1438
|
kind: a.literal("sql"),
|
|
1434
1439
|
connectionId: a.string().optional(),
|
|
1435
1440
|
dialect: G.optional(),
|
|
1436
1441
|
label: a.string().optional()
|
|
1437
|
-
}).passthrough(),
|
|
1438
|
-
wt,
|
|
1442
|
+
}).passthrough(), At = a.union([
|
|
1439
1443
|
It,
|
|
1440
|
-
kt
|
|
1441
|
-
|
|
1444
|
+
kt,
|
|
1445
|
+
xt
|
|
1446
|
+
]), Rt = a.object({
|
|
1442
1447
|
key: a.string().optional(),
|
|
1443
1448
|
name: a.string(),
|
|
1444
1449
|
label: a.string().optional(),
|
|
1445
1450
|
role: H.optional(),
|
|
1446
1451
|
dataType: z.optional(),
|
|
1447
|
-
source:
|
|
1452
|
+
source: At.optional(),
|
|
1448
1453
|
aggregate: y.optional(),
|
|
1449
1454
|
derivedField: a.never().optional()
|
|
1450
1455
|
}).passthrough(), T = a.object({
|
|
@@ -1457,6 +1462,7 @@ const Ge = a.object({
|
|
|
1457
1462
|
source: j.optional(),
|
|
1458
1463
|
derivedField: He.optional(),
|
|
1459
1464
|
temporalBucket: Se.optional(),
|
|
1465
|
+
rawTemporal: _t.optional(),
|
|
1460
1466
|
pivotIdentity: a.object({
|
|
1461
1467
|
metricId: a.string().min(1),
|
|
1462
1468
|
metricAlias: a.string().min(1),
|
|
@@ -1469,7 +1475,11 @@ const Ge = a.object({
|
|
|
1469
1475
|
)
|
|
1470
1476
|
}).strict().optional()
|
|
1471
1477
|
}).passthrough().superRefine((e, i) => {
|
|
1472
|
-
if (e.temporalBucket
|
|
1478
|
+
if (e.temporalBucket && e.rawTemporal && i.addIssue({
|
|
1479
|
+
code: a.ZodIssueCode.custom,
|
|
1480
|
+
path: ["rawTemporal"],
|
|
1481
|
+
message: "A result column cannot carry both temporalBucket and rawTemporal metadata."
|
|
1482
|
+
}), e.temporalBucket) {
|
|
1473
1483
|
const t = fi(
|
|
1474
1484
|
e.temporalBucket.granularity
|
|
1475
1485
|
);
|
|
@@ -1479,10 +1489,18 @@ const Ge = a.object({
|
|
|
1479
1489
|
message: `${e.temporalBucket.granularity} temporal buckets require dataType ${t}.`
|
|
1480
1490
|
});
|
|
1481
1491
|
}
|
|
1482
|
-
|
|
1492
|
+
if (e.rawTemporal) {
|
|
1493
|
+
const t = e.rawTemporal.valueKind === "date" ? "date" : "datetime";
|
|
1494
|
+
e.dataType !== t && i.addIssue({
|
|
1495
|
+
code: a.ZodIssueCode.custom,
|
|
1496
|
+
path: ["dataType"],
|
|
1497
|
+
message: `${e.rawTemporal.valueKind} raw temporal values require dataType ${t}.`
|
|
1498
|
+
});
|
|
1499
|
+
}
|
|
1500
|
+
}), rs = a.object({
|
|
1483
1501
|
records: x,
|
|
1484
1502
|
columns: a.array(T).optional()
|
|
1485
|
-
}).passthrough(),
|
|
1503
|
+
}).passthrough(), ls = a.object({
|
|
1486
1504
|
records: x,
|
|
1487
1505
|
columns: a.array(T)
|
|
1488
1506
|
}).passthrough(), ze = a.object({
|
|
@@ -1505,7 +1523,7 @@ const Ge = a.object({
|
|
|
1505
1523
|
errors: a.array(ae),
|
|
1506
1524
|
warnings: a.array(ae),
|
|
1507
1525
|
repairHints: a.array(ze)
|
|
1508
|
-
}).passthrough(),
|
|
1526
|
+
}).passthrough(), Mt = a.object({
|
|
1509
1527
|
page: a.number(),
|
|
1510
1528
|
pageSize: a.number(),
|
|
1511
1529
|
pageCount: a.number(),
|
|
@@ -1519,8 +1537,8 @@ const Ge = a.object({
|
|
|
1519
1537
|
rowCount: a.number().optional(),
|
|
1520
1538
|
rowLimitExceeded: a.boolean().optional(),
|
|
1521
1539
|
limit: a.number().optional(),
|
|
1522
|
-
pagination:
|
|
1523
|
-
},
|
|
1540
|
+
pagination: Mt.optional()
|
|
1541
|
+
}, jt = a.object({
|
|
1524
1542
|
...D,
|
|
1525
1543
|
kind: a.literal("metric"),
|
|
1526
1544
|
primaryValue: L,
|
|
@@ -1533,7 +1551,7 @@ const Ge = a.object({
|
|
|
1533
1551
|
deltaPercent: a.union([a.number(), a.null()]).optional()
|
|
1534
1552
|
}).passthrough().optional(),
|
|
1535
1553
|
records: x.optional()
|
|
1536
|
-
}).passthrough(),
|
|
1554
|
+
}).passthrough(), Et = a.object({
|
|
1537
1555
|
...D,
|
|
1538
1556
|
kind: a.literal("records"),
|
|
1539
1557
|
columns: a.array(T),
|
|
@@ -1544,7 +1562,7 @@ const Ge = a.object({
|
|
|
1544
1562
|
row: a.record(a.string(), a.unknown()),
|
|
1545
1563
|
columns: a.array(T).optional()
|
|
1546
1564
|
}).passthrough().optional()
|
|
1547
|
-
}).passthrough(),
|
|
1565
|
+
}).passthrough(), Tt = a.object({
|
|
1548
1566
|
...D,
|
|
1549
1567
|
kind: a.literal("inputOptions"),
|
|
1550
1568
|
options: a.array(
|
|
@@ -1558,7 +1576,7 @@ const Ge = a.object({
|
|
|
1558
1576
|
["value"]
|
|
1559
1577
|
)
|
|
1560
1578
|
)
|
|
1561
|
-
}).passthrough(),
|
|
1579
|
+
}).passthrough(), Ct = a.object({
|
|
1562
1580
|
...D,
|
|
1563
1581
|
kind: a.literal("sql"),
|
|
1564
1582
|
columns: a.array(T),
|
|
@@ -1593,7 +1611,7 @@ const Ge = a.object({
|
|
|
1593
1611
|
label: a.string()
|
|
1594
1612
|
},
|
|
1595
1613
|
["value"]
|
|
1596
|
-
),
|
|
1614
|
+
), Nt = a.union([
|
|
1597
1615
|
a.object({ kind: a.literal("label") }).passthrough(),
|
|
1598
1616
|
a.object({
|
|
1599
1617
|
kind: a.literal("field"),
|
|
@@ -1606,12 +1624,12 @@ const Ge = a.object({
|
|
|
1606
1624
|
rowPath: a.array(k).optional(),
|
|
1607
1625
|
columnPath: a.array(k).optional()
|
|
1608
1626
|
}).passthrough()
|
|
1609
|
-
]),
|
|
1627
|
+
]), qt = a.enum([
|
|
1610
1628
|
"present",
|
|
1611
1629
|
"presentNull",
|
|
1612
1630
|
"missing",
|
|
1613
1631
|
"densified"
|
|
1614
|
-
]),
|
|
1632
|
+
]), Dt = a.enum([
|
|
1615
1633
|
"value",
|
|
1616
1634
|
"rowSubtotal",
|
|
1617
1635
|
"columnSubtotal",
|
|
@@ -1619,13 +1637,13 @@ const Ge = a.object({
|
|
|
1619
1637
|
"rowGrandTotal",
|
|
1620
1638
|
"columnGrandTotal",
|
|
1621
1639
|
"matrixGrandTotal"
|
|
1622
|
-
]),
|
|
1640
|
+
]), Ot = a.object({
|
|
1623
1641
|
instanceId: a.string(),
|
|
1624
1642
|
fieldKey: a.string(),
|
|
1625
1643
|
field: A,
|
|
1626
1644
|
role: a.enum(["row", "column", "measure", "sort", "filter"]),
|
|
1627
1645
|
label: a.string().optional()
|
|
1628
|
-
}).passthrough(),
|
|
1646
|
+
}).passthrough(), Bt = a.union([
|
|
1629
1647
|
a.object({
|
|
1630
1648
|
kind: a.literal("additive"),
|
|
1631
1649
|
aggregate: y.optional()
|
|
@@ -1648,16 +1666,16 @@ const Ge = a.object({
|
|
|
1648
1666
|
kind: a.literal("custom"),
|
|
1649
1667
|
expressionId: a.string().optional()
|
|
1650
1668
|
}).passthrough()
|
|
1651
|
-
]),
|
|
1669
|
+
]), Pt = a.object({
|
|
1652
1670
|
instanceId: a.string(),
|
|
1653
1671
|
fieldKey: a.string(),
|
|
1654
1672
|
label: a.string(),
|
|
1655
1673
|
field: A,
|
|
1656
1674
|
aggregate: y.optional(),
|
|
1657
1675
|
format: Ue.optional(),
|
|
1658
|
-
totalBehavior:
|
|
1659
|
-
semantics:
|
|
1660
|
-
}).passthrough(),
|
|
1676
|
+
totalBehavior: vt.optional(),
|
|
1677
|
+
semantics: Bt
|
|
1678
|
+
}).passthrough(), Kt = a.object({
|
|
1661
1679
|
id: a.string(),
|
|
1662
1680
|
measureId: a.string(),
|
|
1663
1681
|
aggregate: y.optional(),
|
|
@@ -1678,11 +1696,11 @@ const Ge = a.object({
|
|
|
1678
1696
|
rowNodeId: a.string().optional(),
|
|
1679
1697
|
columnNodeId: a.string().optional()
|
|
1680
1698
|
}).passthrough().optional()
|
|
1681
|
-
}).passthrough(),
|
|
1699
|
+
}).passthrough(), Vt = a.object({
|
|
1682
1700
|
kind: a.string(),
|
|
1683
1701
|
label: a.string().optional(),
|
|
1684
1702
|
payload: a.record(a.string(), a.unknown()).optional()
|
|
1685
|
-
}).passthrough(),
|
|
1703
|
+
}).passthrough(), Lt = q(
|
|
1686
1704
|
{
|
|
1687
1705
|
id: a.string(),
|
|
1688
1706
|
axis: a.enum(["row", "column"]),
|
|
@@ -1697,10 +1715,10 @@ const Ge = a.object({
|
|
|
1697
1715
|
isGrandTotal: a.boolean().optional(),
|
|
1698
1716
|
subtotalFunction: y.optional(),
|
|
1699
1717
|
childCount: a.number().optional(),
|
|
1700
|
-
actions: a.array(
|
|
1718
|
+
actions: a.array(Vt).optional()
|
|
1701
1719
|
},
|
|
1702
1720
|
["value"]
|
|
1703
|
-
),
|
|
1721
|
+
), Ut = a.object({
|
|
1704
1722
|
rowHeaderLevels: a.array(
|
|
1705
1723
|
a.object({
|
|
1706
1724
|
id: a.string(),
|
|
@@ -1740,14 +1758,14 @@ const Ge = a.object({
|
|
|
1740
1758
|
role: a.enum(["value", "columnSubtotal", "columnGrandTotal"])
|
|
1741
1759
|
}).passthrough()
|
|
1742
1760
|
)
|
|
1743
|
-
}).passthrough(),
|
|
1761
|
+
}).passthrough(), Gt = q(
|
|
1744
1762
|
{
|
|
1745
1763
|
rowId: a.string(),
|
|
1746
1764
|
columnId: a.string().optional(),
|
|
1747
1765
|
measureId: a.string(),
|
|
1748
1766
|
value: a.unknown(),
|
|
1749
|
-
presence:
|
|
1750
|
-
role:
|
|
1767
|
+
presence: qt,
|
|
1768
|
+
role: Dt,
|
|
1751
1769
|
calculationId: a.string().optional()
|
|
1752
1770
|
},
|
|
1753
1771
|
["value"]
|
|
@@ -1757,7 +1775,7 @@ const Ge = a.object({
|
|
|
1757
1775
|
path: ["formattedValue"],
|
|
1758
1776
|
message: "Matrix result cells carry typed values; formattedValue is not supported."
|
|
1759
1777
|
});
|
|
1760
|
-
}),
|
|
1778
|
+
}), Ht = a.object({
|
|
1761
1779
|
rows: a.boolean().optional(),
|
|
1762
1780
|
columns: a.boolean().optional(),
|
|
1763
1781
|
grandTotal: a.union([
|
|
@@ -1767,7 +1785,7 @@ const Ge = a.object({
|
|
|
1767
1785
|
columns: a.boolean().optional()
|
|
1768
1786
|
}).passthrough()
|
|
1769
1787
|
]).optional()
|
|
1770
|
-
}).passthrough(),
|
|
1788
|
+
}).passthrough(), zt = q(
|
|
1771
1789
|
{
|
|
1772
1790
|
id: a.string(),
|
|
1773
1791
|
axis: a.enum(["row", "column"]),
|
|
@@ -1775,27 +1793,27 @@ const Ge = a.object({
|
|
|
1775
1793
|
direction: a.enum(["asc", "desc"]),
|
|
1776
1794
|
nulls: a.enum(["warehouseDefault", "first", "last"]).optional(),
|
|
1777
1795
|
scope: a.enum(["global", "withinParent"]).optional(),
|
|
1778
|
-
by:
|
|
1796
|
+
by: Nt
|
|
1779
1797
|
},
|
|
1780
1798
|
["by"]
|
|
1781
|
-
),
|
|
1799
|
+
), Qt = a.object({
|
|
1782
1800
|
rowOffset: a.number().optional(),
|
|
1783
1801
|
rowLimit: a.number().optional(),
|
|
1784
1802
|
columnOffset: a.number().optional(),
|
|
1785
1803
|
columnLimit: a.number().optional(),
|
|
1786
1804
|
hasMoreRows: a.boolean().optional(),
|
|
1787
1805
|
hasMoreColumns: a.boolean().optional()
|
|
1788
|
-
}).passthrough(),
|
|
1806
|
+
}).passthrough(), Yt = a.object({
|
|
1789
1807
|
axis: a.enum(["row", "column"]),
|
|
1790
1808
|
path: a.array(k),
|
|
1791
1809
|
depth: a.number().optional()
|
|
1792
|
-
}).passthrough(),
|
|
1810
|
+
}).passthrough(), Zt = a.object({
|
|
1793
1811
|
rowLazyLoading: a.boolean().optional(),
|
|
1794
1812
|
columnLazyLoading: a.boolean().optional(),
|
|
1795
1813
|
expandableRowNodeIds: a.array(a.string()).optional(),
|
|
1796
1814
|
expandableColumnNodeIds: a.array(a.string()).optional(),
|
|
1797
|
-
nextRequests: a.array(
|
|
1798
|
-
}).passthrough(),
|
|
1815
|
+
nextRequests: a.array(Yt).optional()
|
|
1816
|
+
}).passthrough(), Xt = a.object({
|
|
1799
1817
|
domains: a.record(
|
|
1800
1818
|
a.object({
|
|
1801
1819
|
min: a.number().optional(),
|
|
@@ -1803,35 +1821,35 @@ const Ge = a.object({
|
|
|
1803
1821
|
}).passthrough()
|
|
1804
1822
|
).optional(),
|
|
1805
1823
|
rules: a.array(a.record(a.string(), a.unknown())).optional()
|
|
1806
|
-
}).passthrough(),
|
|
1824
|
+
}).passthrough(), Jt = a.object({
|
|
1807
1825
|
...D,
|
|
1808
1826
|
kind: a.literal("matrix"),
|
|
1809
1827
|
schemaVersion: a.literal(1),
|
|
1810
1828
|
shape: a.enum(["hierarchical", "pivot"]),
|
|
1811
1829
|
capabilities: a.array(a.string()),
|
|
1812
1830
|
executionMetadata: a.record(a.string(), a.unknown()),
|
|
1813
|
-
fieldsById: a.record(a.string(),
|
|
1814
|
-
measuresById: a.record(a.string(),
|
|
1815
|
-
calculationsById: a.record(a.string(),
|
|
1831
|
+
fieldsById: a.record(a.string(), Ot),
|
|
1832
|
+
measuresById: a.record(a.string(), Pt),
|
|
1833
|
+
calculationsById: a.record(a.string(), Kt).optional(),
|
|
1816
1834
|
axes: a.object({
|
|
1817
1835
|
rows: we,
|
|
1818
1836
|
columns: we
|
|
1819
1837
|
}).passthrough(),
|
|
1820
|
-
nodesById: a.record(a.string(),
|
|
1821
|
-
layout:
|
|
1822
|
-
cells: a.array(
|
|
1823
|
-
totals:
|
|
1824
|
-
sort: a.array(
|
|
1825
|
-
formattingContext:
|
|
1826
|
-
pageInfo:
|
|
1827
|
-
expansion:
|
|
1828
|
-
}).passthrough(),
|
|
1829
|
-
Mt,
|
|
1838
|
+
nodesById: a.record(a.string(), Lt),
|
|
1839
|
+
layout: Ut,
|
|
1840
|
+
cells: a.array(Gt),
|
|
1841
|
+
totals: Ht,
|
|
1842
|
+
sort: a.array(zt),
|
|
1843
|
+
formattingContext: Xt,
|
|
1844
|
+
pageInfo: Qt.optional(),
|
|
1845
|
+
expansion: Zt.optional()
|
|
1846
|
+
}).passthrough(), Wt = a.union([
|
|
1830
1847
|
jt,
|
|
1831
1848
|
Et,
|
|
1832
1849
|
Tt,
|
|
1833
|
-
|
|
1834
|
-
|
|
1850
|
+
Ct,
|
|
1851
|
+
Jt
|
|
1852
|
+
]), ea = a.object({
|
|
1835
1853
|
status: a.enum([
|
|
1836
1854
|
"not_required",
|
|
1837
1855
|
"resolved",
|
|
@@ -1907,7 +1925,7 @@ const Ge = a.object({
|
|
|
1907
1925
|
answeredObligations: a.array(a.string()),
|
|
1908
1926
|
missingObligations: a.array(a.string()),
|
|
1909
1927
|
warnings: a.array(ae).optional()
|
|
1910
|
-
}).passthrough(),
|
|
1928
|
+
}).passthrough(), ia = a.object({
|
|
1911
1929
|
intentId: a.string().optional(),
|
|
1912
1930
|
queryId: a.string().optional(),
|
|
1913
1931
|
status: a.enum(["answered", "partial", "failed"]),
|
|
@@ -1923,22 +1941,22 @@ const Ge = a.object({
|
|
|
1923
1941
|
intent: a.unknown().optional(),
|
|
1924
1942
|
compiledQuery: a.unknown().optional(),
|
|
1925
1943
|
fieldsUsed: a.array(ce).optional(),
|
|
1926
|
-
result:
|
|
1944
|
+
result: Wt.optional(),
|
|
1927
1945
|
validation: Qe,
|
|
1928
1946
|
coverage: Xe.optional(),
|
|
1929
1947
|
missingFields: a.array(a.string()).optional(),
|
|
1930
1948
|
warnings: a.array(a.string()).optional(),
|
|
1931
|
-
relationshipDiagnostics:
|
|
1949
|
+
relationshipDiagnostics: ea.optional(),
|
|
1932
1950
|
diagnosticFeedback: Ye.optional(),
|
|
1933
1951
|
population: Ze.optional(),
|
|
1934
1952
|
metadata: a.record(a.string(), a.unknown()).optional()
|
|
1935
1953
|
}).passthrough();
|
|
1936
|
-
function
|
|
1954
|
+
function ta(e) {
|
|
1937
1955
|
switch (e) {
|
|
1938
1956
|
case "boolean":
|
|
1939
1957
|
return a.boolean().optional();
|
|
1940
1958
|
case "compactExecutionFieldArray":
|
|
1941
|
-
return a.array(
|
|
1959
|
+
return a.array(Rt).optional();
|
|
1942
1960
|
case "coverage":
|
|
1943
1961
|
return Xe.optional();
|
|
1944
1962
|
case "diagnosticFeedback":
|
|
@@ -1946,7 +1964,7 @@ function ia(e) {
|
|
|
1946
1964
|
case "executionFieldArray":
|
|
1947
1965
|
return a.array(ce).optional();
|
|
1948
1966
|
case "executionResult":
|
|
1949
|
-
return
|
|
1967
|
+
return ia.optional();
|
|
1950
1968
|
case "number":
|
|
1951
1969
|
return a.number().finite().optional();
|
|
1952
1970
|
case "population":
|
|
@@ -1969,11 +1987,11 @@ function ia(e) {
|
|
|
1969
1987
|
return Qe.optional();
|
|
1970
1988
|
}
|
|
1971
1989
|
}
|
|
1972
|
-
const
|
|
1990
|
+
const aa = Object.fromEntries(
|
|
1973
1991
|
Object.entries(hi).map(
|
|
1974
|
-
([e, i]) => [e,
|
|
1992
|
+
([e, i]) => [e, ta(i)]
|
|
1975
1993
|
)
|
|
1976
|
-
),
|
|
1994
|
+
), ds = a.object(aa).strict(), pe = a.object({
|
|
1977
1995
|
sourceKey: a.string().optional(),
|
|
1978
1996
|
kind: a.enum(["semantic", "physical", "sql"]).optional(),
|
|
1979
1997
|
domainId: a.string().optional(),
|
|
@@ -2008,7 +2026,7 @@ const ta = Object.fromEntries(
|
|
|
2008
2026
|
fieldRef: S,
|
|
2009
2027
|
relationshipHint: a.unknown().optional(),
|
|
2010
2028
|
relationshipsUsed: a.array(b).optional()
|
|
2011
|
-
}).passthrough(),
|
|
2029
|
+
}).passthrough(), sa = a.object({
|
|
2012
2030
|
id: a.string(),
|
|
2013
2031
|
label: a.string().optional(),
|
|
2014
2032
|
type: a.string().optional(),
|
|
@@ -2019,7 +2037,7 @@ const ta = Object.fromEntries(
|
|
|
2019
2037
|
appliesToViewIds: a.array(a.string()),
|
|
2020
2038
|
relationshipHint: a.unknown().optional(),
|
|
2021
2039
|
relationshipsUsed: a.array(b).optional()
|
|
2022
|
-
}).passthrough(),
|
|
2040
|
+
}).passthrough(), na = a.object({
|
|
2023
2041
|
builder: a.enum([
|
|
2024
2042
|
"semaphor.metric",
|
|
2025
2043
|
"semaphor.records",
|
|
@@ -2029,7 +2047,7 @@ const ta = Object.fromEntries(
|
|
|
2029
2047
|
]),
|
|
2030
2048
|
spec: b,
|
|
2031
2049
|
fallbackReason: b.optional()
|
|
2032
|
-
}).passthrough(),
|
|
2050
|
+
}).passthrough(), oa = a.object({
|
|
2033
2051
|
id: a.string(),
|
|
2034
2052
|
title: a.string().optional(),
|
|
2035
2053
|
purpose: a.string().optional(),
|
|
@@ -2047,12 +2065,12 @@ const ta = Object.fromEntries(
|
|
|
2047
2065
|
"semaphor.analysis",
|
|
2048
2066
|
"semaphor.sql"
|
|
2049
2067
|
]).optional(),
|
|
2050
|
-
sdkSpec:
|
|
2068
|
+
sdkSpec: na.optional(),
|
|
2051
2069
|
fields: a.array(S).optional(),
|
|
2052
2070
|
computation: b.optional(),
|
|
2053
2071
|
uxExpectations: a.array(a.string()).optional(),
|
|
2054
2072
|
validation: b.optional()
|
|
2055
|
-
}).passthrough(),
|
|
2073
|
+
}).passthrough(), ra = a.object({
|
|
2056
2074
|
inputId: a.string(),
|
|
2057
2075
|
label: a.string().optional(),
|
|
2058
2076
|
type: a.string().optional(),
|
|
@@ -2062,16 +2080,16 @@ const ta = Object.fromEntries(
|
|
|
2062
2080
|
bindings: a.array(We),
|
|
2063
2081
|
appliesToViewIds: a.array(a.string()),
|
|
2064
2082
|
notAppliedToViewIds: a.array(a.string())
|
|
2065
|
-
}).passthrough(),
|
|
2083
|
+
}).passthrough(), us = a.object({
|
|
2066
2084
|
schemaVersion: a.literal(ie),
|
|
2067
2085
|
title: a.string(),
|
|
2068
2086
|
purpose: a.string().optional(),
|
|
2069
2087
|
userGoal: a.string().optional(),
|
|
2070
2088
|
nextStep: a.string().optional(),
|
|
2071
2089
|
sources: a.array(pe),
|
|
2072
|
-
inputs: a.array(
|
|
2073
|
-
views: a.array(
|
|
2074
|
-
filterContracts: a.array(
|
|
2090
|
+
inputs: a.array(sa),
|
|
2091
|
+
views: a.array(oa),
|
|
2092
|
+
filterContracts: a.array(ra),
|
|
2075
2093
|
implementationChecklist: a.object({
|
|
2076
2094
|
schemaVersion: a.string().optional(),
|
|
2077
2095
|
requiredDevtools: a.object({
|
|
@@ -2111,7 +2129,7 @@ const ta = Object.fromEntries(
|
|
|
2111
2129
|
function o(e, i, t) {
|
|
2112
2130
|
return t ? { code: e, message: i, path: t } : { code: e, message: i };
|
|
2113
2131
|
}
|
|
2114
|
-
function
|
|
2132
|
+
function la(e) {
|
|
2115
2133
|
for (let i = 0; i < e.length; i += 1) {
|
|
2116
2134
|
const t = e[i];
|
|
2117
2135
|
if (e.some(
|
|
@@ -2125,15 +2143,15 @@ function ei(e, i) {
|
|
|
2125
2143
|
return yi(e, i);
|
|
2126
2144
|
}
|
|
2127
2145
|
function ii(e, i) {
|
|
2128
|
-
return ei(e, i) &&
|
|
2146
|
+
return ei(e, i) && C(e) === C(i);
|
|
2129
2147
|
}
|
|
2130
|
-
function
|
|
2131
|
-
return `Metric intent has duplicate measure "${e.name}" with the same aggregate (${
|
|
2148
|
+
function da(e) {
|
|
2149
|
+
return `Metric intent has duplicate measure "${e.name}" with the same aggregate (${C(e)}). Use different aggregates to request both, or remove one entry.`;
|
|
2132
2150
|
}
|
|
2133
2151
|
function ke(e) {
|
|
2134
2152
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
|
|
2135
2153
|
}
|
|
2136
|
-
function
|
|
2154
|
+
function ua(e, i, t) {
|
|
2137
2155
|
if (e !== void 0) {
|
|
2138
2156
|
if (!e || typeof e != "object" || Array.isArray(e)) {
|
|
2139
2157
|
t.push(
|
|
@@ -2166,34 +2184,34 @@ function da(e, i, t) {
|
|
|
2166
2184
|
});
|
|
2167
2185
|
}
|
|
2168
2186
|
}
|
|
2169
|
-
function
|
|
2187
|
+
function ca(e, i) {
|
|
2170
2188
|
return me(e, i).length === 1;
|
|
2171
2189
|
}
|
|
2172
|
-
function
|
|
2190
|
+
function pa(e, i) {
|
|
2173
2191
|
return me(e, i).length === 1;
|
|
2174
2192
|
}
|
|
2175
2193
|
function me(e, i) {
|
|
2176
2194
|
return i.filter(
|
|
2177
|
-
(s) =>
|
|
2195
|
+
(s) => ma(e, s)
|
|
2178
2196
|
);
|
|
2179
2197
|
}
|
|
2180
|
-
function pa(e, i) {
|
|
2181
|
-
return ma(e, i) ? e.source ? ei(i, e) : !0 : !1;
|
|
2182
|
-
}
|
|
2183
2198
|
function ma(e, i) {
|
|
2184
|
-
return
|
|
2199
|
+
return fa(e, i) ? e.source ? ei(i, e) : !0 : !1;
|
|
2185
2200
|
}
|
|
2186
2201
|
function fa(e, i) {
|
|
2202
|
+
return !(i.name !== e.name || e.role !== void 0 && i.role !== void 0 && i.role !== e.role || ga(e, i) && C(i) !== C(e));
|
|
2203
|
+
}
|
|
2204
|
+
function ga(e, i) {
|
|
2187
2205
|
return e.role === "measure" || i.role === "measure" || e.aggregate !== void 0 || i.aggregate !== void 0;
|
|
2188
2206
|
}
|
|
2189
|
-
function
|
|
2207
|
+
function C(e) {
|
|
2190
2208
|
return de(e);
|
|
2191
2209
|
}
|
|
2192
|
-
const
|
|
2210
|
+
const ha = /^(\d{4})-(\d{2})-(\d{2})$/, ti = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|[+-]\d{2}:\d{2})$/;
|
|
2193
2211
|
function se(e) {
|
|
2194
2212
|
if (typeof e != "string")
|
|
2195
2213
|
return null;
|
|
2196
|
-
const i = e.trim(), t =
|
|
2214
|
+
const i = e.trim(), t = ha.exec(i);
|
|
2197
2215
|
if (t) {
|
|
2198
2216
|
const [, B, he, be] = t;
|
|
2199
2217
|
return xe(B, he, be) ? new Date(Date.UTC(Number(B), Number(he) - 1, Number(be))) : null;
|
|
@@ -2202,12 +2220,12 @@ function se(e) {
|
|
|
2202
2220
|
if (!s)
|
|
2203
2221
|
return null;
|
|
2204
2222
|
const [, n, r, l, d, u, f = "00", , _] = s;
|
|
2205
|
-
if (!xe(n, r, l) || !E(d, 0, 23) || !E(u, 0, 59) || !E(f, 0, 59) || !
|
|
2223
|
+
if (!xe(n, r, l) || !E(d, 0, 23) || !E(u, 0, 59) || !E(f, 0, 59) || !ba(_))
|
|
2206
2224
|
return null;
|
|
2207
2225
|
const O = new Date(i);
|
|
2208
2226
|
return Number.isFinite(O.getTime()) ? O : null;
|
|
2209
2227
|
}
|
|
2210
|
-
function
|
|
2228
|
+
function cs(e) {
|
|
2211
2229
|
return typeof e != "string" || !ti.test(e.trim()) ? null : se(e);
|
|
2212
2230
|
}
|
|
2213
2231
|
function xe(e, i, t) {
|
|
@@ -2221,7 +2239,7 @@ function E(e, i, t) {
|
|
|
2221
2239
|
const s = Number(e);
|
|
2222
2240
|
return Number.isInteger(s) && s >= i && s <= t;
|
|
2223
2241
|
}
|
|
2224
|
-
function
|
|
2242
|
+
function ba(e) {
|
|
2225
2243
|
if (e === "Z")
|
|
2226
2244
|
return !0;
|
|
2227
2245
|
const i = /^([+-])(\d{2}):(\d{2})$/.exec(e);
|
|
@@ -2230,13 +2248,13 @@ function ha(e) {
|
|
|
2230
2248
|
function m(e) {
|
|
2231
2249
|
return typeof e == "string" && e.trim().length > 0;
|
|
2232
2250
|
}
|
|
2233
|
-
function
|
|
2251
|
+
function ya(e) {
|
|
2234
2252
|
const i = /* @__PURE__ */ new Set();
|
|
2235
2253
|
let t = 0;
|
|
2236
2254
|
for (; t < e.length; ) {
|
|
2237
2255
|
const s = e[t];
|
|
2238
2256
|
if (s === "'" || s === '"') {
|
|
2239
|
-
t =
|
|
2257
|
+
t = _a(e, t);
|
|
2240
2258
|
continue;
|
|
2241
2259
|
}
|
|
2242
2260
|
if (s === "{") {
|
|
@@ -2253,7 +2271,7 @@ function ba(e) {
|
|
|
2253
2271
|
}
|
|
2254
2272
|
return Array.from(i);
|
|
2255
2273
|
}
|
|
2256
|
-
function
|
|
2274
|
+
function _a(e, i) {
|
|
2257
2275
|
const t = e[i];
|
|
2258
2276
|
let s = i + 1;
|
|
2259
2277
|
for (; s < e.length; ) {
|
|
@@ -2318,7 +2336,7 @@ function W(e, i, t, s) {
|
|
|
2318
2336
|
)
|
|
2319
2337
|
);
|
|
2320
2338
|
}
|
|
2321
|
-
const
|
|
2339
|
+
const va = /* @__PURE__ */ new Set([
|
|
2322
2340
|
"SUM",
|
|
2323
2341
|
"COUNT",
|
|
2324
2342
|
"AVG",
|
|
@@ -2395,7 +2413,7 @@ function g(e, i, t, s = {}) {
|
|
|
2395
2413
|
)
|
|
2396
2414
|
), e.source !== void 0 && fe(e.source, `${i}.source`, t), w(e.aggregate, `${i}.aggregate`, t);
|
|
2397
2415
|
}
|
|
2398
|
-
function
|
|
2416
|
+
function $a(e, i, t) {
|
|
2399
2417
|
if (!p(e)) {
|
|
2400
2418
|
t.push(
|
|
2401
2419
|
o(
|
|
@@ -2443,7 +2461,7 @@ function ge(e, i, t) {
|
|
|
2443
2461
|
)
|
|
2444
2462
|
);
|
|
2445
2463
|
}
|
|
2446
|
-
function
|
|
2464
|
+
function Sa(e, i) {
|
|
2447
2465
|
if (m(e.inputId) || i.push(
|
|
2448
2466
|
o(
|
|
2449
2467
|
"missing_input_options_input_id",
|
|
@@ -2506,7 +2524,7 @@ function $a(e, i) {
|
|
|
2506
2524
|
"dependencies.excludeInputIds",
|
|
2507
2525
|
i,
|
|
2508
2526
|
"Input options excludeInputIds must be non-empty strings."
|
|
2509
|
-
),
|
|
2527
|
+
), Ia(e, i);
|
|
2510
2528
|
}
|
|
2511
2529
|
}
|
|
2512
2530
|
if (e.population !== void 0) {
|
|
@@ -2551,7 +2569,7 @@ function $a(e, i) {
|
|
|
2551
2569
|
}
|
|
2552
2570
|
}
|
|
2553
2571
|
}
|
|
2554
|
-
function
|
|
2572
|
+
function wa(e, i) {
|
|
2555
2573
|
if (!(!("inputs" in e) || e.inputs === void 0)) {
|
|
2556
2574
|
if (!Array.isArray(e.inputs)) {
|
|
2557
2575
|
i.push(
|
|
@@ -2564,11 +2582,11 @@ function Sa(e, i) {
|
|
|
2564
2582
|
return;
|
|
2565
2583
|
}
|
|
2566
2584
|
e.inputs.forEach(
|
|
2567
|
-
(t, s) =>
|
|
2585
|
+
(t, s) => $a(t, `inputs.${s}`, i)
|
|
2568
2586
|
);
|
|
2569
2587
|
}
|
|
2570
2588
|
}
|
|
2571
|
-
function
|
|
2589
|
+
function Ia(e, i) {
|
|
2572
2590
|
var s, n;
|
|
2573
2591
|
const t = new Set(
|
|
2574
2592
|
Array.isArray(e.inputs) ? e.inputs.map((r) => p(r) ? r.inputId : void 0).filter((r) => typeof r == "string") : []
|
|
@@ -2594,7 +2612,7 @@ function Re(e, i, t, s) {
|
|
|
2594
2612
|
e !== void 0 && (!Array.isArray(e) || e.some((n) => !m(n))) && t.push(o("invalid_input_options_dependencies", s, i));
|
|
2595
2613
|
}
|
|
2596
2614
|
function w(e, i, t) {
|
|
2597
|
-
e !== void 0 && (typeof e != "string" || !
|
|
2615
|
+
e !== void 0 && (typeof e != "string" || !va.has(e)) && t.push(
|
|
2598
2616
|
o(
|
|
2599
2617
|
"invalid_aggregate",
|
|
2600
2618
|
"Field aggregate must be SUM, COUNT, AVG, MIN, MAX, MEDIAN, or DISTINCT.",
|
|
@@ -2602,20 +2620,20 @@ function w(e, i, t) {
|
|
|
2602
2620
|
)
|
|
2603
2621
|
);
|
|
2604
2622
|
}
|
|
2605
|
-
const
|
|
2623
|
+
const ka = /* @__PURE__ */ new Set([
|
|
2606
2624
|
"measure",
|
|
2607
2625
|
"dimension",
|
|
2608
2626
|
"date",
|
|
2609
2627
|
"id",
|
|
2610
2628
|
"unknown"
|
|
2611
|
-
]),
|
|
2629
|
+
]), xa = /* @__PURE__ */ new Set(["row", "aggregate"]), ai = /* @__PURE__ */ new Set([
|
|
2612
2630
|
"string",
|
|
2613
2631
|
"number",
|
|
2614
2632
|
"boolean",
|
|
2615
2633
|
"date",
|
|
2616
2634
|
"datetime",
|
|
2617
2635
|
"unknown"
|
|
2618
|
-
]),
|
|
2636
|
+
]), Aa = /* @__PURE__ */ new Set([
|
|
2619
2637
|
"number",
|
|
2620
2638
|
"currency",
|
|
2621
2639
|
"percent",
|
|
@@ -2626,13 +2644,13 @@ const Ia = /* @__PURE__ */ new Set([
|
|
|
2626
2644
|
"duration",
|
|
2627
2645
|
"string",
|
|
2628
2646
|
"temporal_bucket"
|
|
2629
|
-
]),
|
|
2647
|
+
]), Ra = new Set(F), Ma = /* @__PURE__ */ new Set([
|
|
2630
2648
|
"millisecond",
|
|
2631
2649
|
"second",
|
|
2632
2650
|
"minute",
|
|
2633
2651
|
"hour",
|
|
2634
2652
|
"day"
|
|
2635
|
-
]),
|
|
2653
|
+
]), ja = /* @__PURE__ */ new Set([
|
|
2636
2654
|
"compact",
|
|
2637
2655
|
"digital",
|
|
2638
2656
|
"long"
|
|
@@ -2651,7 +2669,7 @@ function si(e, i, t) {
|
|
|
2651
2669
|
return;
|
|
2652
2670
|
}
|
|
2653
2671
|
const s = e;
|
|
2654
|
-
(typeof s.type != "string" || !
|
|
2672
|
+
(typeof s.type != "string" || !Aa.has(s.type)) && t.push(
|
|
2655
2673
|
o(
|
|
2656
2674
|
"invalid_value_format_type",
|
|
2657
2675
|
"Value format type must be number, currency, percent, percentage, scientific, date, datetime, duration, string, or temporal_bucket.",
|
|
@@ -2698,7 +2716,7 @@ function si(e, i, t) {
|
|
|
2698
2716
|
);
|
|
2699
2717
|
for (const n of ["inputUnit", "largestUnit", "smallestUnit"]) {
|
|
2700
2718
|
const r = e[n];
|
|
2701
|
-
r !== void 0 && (typeof r != "string" || !
|
|
2719
|
+
r !== void 0 && (typeof r != "string" || !Ma.has(r)) && t.push(
|
|
2702
2720
|
o(
|
|
2703
2721
|
"invalid_value_format_duration_unit",
|
|
2704
2722
|
"Duration format units must be millisecond, second, minute, hour, or day.",
|
|
@@ -2706,7 +2724,7 @@ function si(e, i, t) {
|
|
|
2706
2724
|
)
|
|
2707
2725
|
);
|
|
2708
2726
|
}
|
|
2709
|
-
e.outputStyle !== void 0 && (typeof e.outputStyle != "string" || !
|
|
2727
|
+
e.outputStyle !== void 0 && (typeof e.outputStyle != "string" || !ja.has(e.outputStyle)) && t.push(
|
|
2710
2728
|
o(
|
|
2711
2729
|
"invalid_value_format_duration_style",
|
|
2712
2730
|
"Duration format outputStyle must be compact, digital, or long.",
|
|
@@ -2736,20 +2754,20 @@ function V(e, i, t) {
|
|
|
2736
2754
|
)
|
|
2737
2755
|
);
|
|
2738
2756
|
}
|
|
2739
|
-
const
|
|
2757
|
+
const Ea = /* @__PURE__ */ new Set([
|
|
2740
2758
|
"additive",
|
|
2741
2759
|
"non_additive",
|
|
2742
2760
|
"ratio_of_sums",
|
|
2743
2761
|
"weighted",
|
|
2744
2762
|
"pre_aggregated",
|
|
2745
2763
|
"snapshot"
|
|
2746
|
-
]),
|
|
2764
|
+
]), Ta = /* @__PURE__ */ new Set([
|
|
2747
2765
|
"default",
|
|
2748
2766
|
"symmetric_aggregate",
|
|
2749
2767
|
"aggregate_then_join",
|
|
2750
2768
|
"weighted"
|
|
2751
2769
|
]);
|
|
2752
|
-
function
|
|
2770
|
+
function Ca(e, i, t) {
|
|
2753
2771
|
if (!e || !p(e)) {
|
|
2754
2772
|
t.push(
|
|
2755
2773
|
o(
|
|
@@ -2823,7 +2841,7 @@ function Fa(e, i, t) {
|
|
|
2823
2841
|
)
|
|
2824
2842
|
), ni(e.format, `${i}.format`, t);
|
|
2825
2843
|
}
|
|
2826
|
-
function
|
|
2844
|
+
function Na(e, i, t) {
|
|
2827
2845
|
e !== void 0 && (pi(e) || t.push(
|
|
2828
2846
|
o(
|
|
2829
2847
|
"invalid_time_grain",
|
|
@@ -2849,7 +2867,7 @@ function li(e, i, t, s) {
|
|
|
2849
2867
|
o(s, "Sort scope must be global or withinParent.", i)
|
|
2850
2868
|
);
|
|
2851
2869
|
}
|
|
2852
|
-
function
|
|
2870
|
+
function qa(e, i, t) {
|
|
2853
2871
|
e.enabled !== void 0 && typeof e.enabled != "boolean" && t.push(
|
|
2854
2872
|
o(
|
|
2855
2873
|
"invalid_matrix_subtotal",
|
|
@@ -2870,7 +2888,7 @@ function Na(e, i, t) {
|
|
|
2870
2888
|
)
|
|
2871
2889
|
);
|
|
2872
2890
|
}
|
|
2873
|
-
function
|
|
2891
|
+
function Da(e, i, t) {
|
|
2874
2892
|
if (oi(
|
|
2875
2893
|
e.direction,
|
|
2876
2894
|
`${i}.direction`,
|
|
@@ -2956,13 +2974,13 @@ function je(e, i, t, s) {
|
|
|
2956
2974
|
)
|
|
2957
2975
|
), g(u.field, `${d}.field`, t, {
|
|
2958
2976
|
required: !0
|
|
2959
|
-
}),
|
|
2977
|
+
}), Na(u.grain, `${d}.grain`, t), u.label !== void 0 && typeof u.label != "string" && t.push(
|
|
2960
2978
|
o(
|
|
2961
2979
|
"invalid_matrix_axis_label",
|
|
2962
2980
|
"Matrix axis level label must be a string.",
|
|
2963
2981
|
`${d}.label`
|
|
2964
2982
|
)
|
|
2965
|
-
), u.subtotal !== void 0 && typeof u.subtotal != "boolean" && (p(u.subtotal) ?
|
|
2983
|
+
), u.subtotal !== void 0 && typeof u.subtotal != "boolean" && (p(u.subtotal) ? qa(
|
|
2966
2984
|
u.subtotal,
|
|
2967
2985
|
`${d}.subtotal`,
|
|
2968
2986
|
t
|
|
@@ -2972,7 +2990,7 @@ function je(e, i, t, s) {
|
|
|
2972
2990
|
"Matrix subtotal must be a boolean or structured options object.",
|
|
2973
2991
|
`${d}.subtotal`
|
|
2974
2992
|
)
|
|
2975
|
-
)), u.sortBy !== void 0 && (p(u.sortBy) ?
|
|
2993
|
+
)), u.sortBy !== void 0 && (p(u.sortBy) ? Da(
|
|
2976
2994
|
u.sortBy,
|
|
2977
2995
|
`${d}.sortBy`,
|
|
2978
2996
|
t
|
|
@@ -2985,7 +3003,7 @@ function je(e, i, t, s) {
|
|
|
2985
3003
|
));
|
|
2986
3004
|
}), n;
|
|
2987
3005
|
}
|
|
2988
|
-
function
|
|
3006
|
+
function Oa(e, i, t) {
|
|
2989
3007
|
if (!p(e)) {
|
|
2990
3008
|
t.push(
|
|
2991
3009
|
o(
|
|
@@ -3026,7 +3044,7 @@ function Da(e, i, t) {
|
|
|
3026
3044
|
)
|
|
3027
3045
|
);
|
|
3028
3046
|
}
|
|
3029
|
-
function
|
|
3047
|
+
function Ba(e, i, t) {
|
|
3030
3048
|
if (!Array.isArray(e) || e.length === 0)
|
|
3031
3049
|
return t.push(
|
|
3032
3050
|
o(
|
|
@@ -3071,14 +3089,14 @@ function Oa(e, i, t) {
|
|
|
3071
3089
|
"Matrix value label must be a string.",
|
|
3072
3090
|
`${l}.label`
|
|
3073
3091
|
)
|
|
3074
|
-
), d.totalBehavior !== void 0 &&
|
|
3092
|
+
), d.totalBehavior !== void 0 && Oa(
|
|
3075
3093
|
d.totalBehavior,
|
|
3076
3094
|
`${l}.totalBehavior`,
|
|
3077
3095
|
t
|
|
3078
3096
|
);
|
|
3079
3097
|
}), s;
|
|
3080
3098
|
}
|
|
3081
|
-
function
|
|
3099
|
+
function Pa(e, i, t) {
|
|
3082
3100
|
if (!p(e)) {
|
|
3083
3101
|
t.push(
|
|
3084
3102
|
o(
|
|
@@ -3220,7 +3238,7 @@ function Ee(e, i, t, s) {
|
|
|
3220
3238
|
)
|
|
3221
3239
|
));
|
|
3222
3240
|
}
|
|
3223
|
-
function
|
|
3241
|
+
function Ka(e, i, t, s) {
|
|
3224
3242
|
if (e !== void 0) {
|
|
3225
3243
|
if (!p(e)) {
|
|
3226
3244
|
s.push(
|
|
@@ -3245,7 +3263,7 @@ function Pa(e, i, t, s) {
|
|
|
3245
3263
|
);
|
|
3246
3264
|
}
|
|
3247
3265
|
}
|
|
3248
|
-
function
|
|
3266
|
+
function Va(e, i, t, s, n) {
|
|
3249
3267
|
if (e !== void 0) {
|
|
3250
3268
|
if (!Array.isArray(e)) {
|
|
3251
3269
|
n.push(
|
|
@@ -3351,7 +3369,7 @@ function Ka(e, i, t, s, n) {
|
|
|
3351
3369
|
});
|
|
3352
3370
|
}
|
|
3353
3371
|
}
|
|
3354
|
-
function
|
|
3372
|
+
function La(e, i) {
|
|
3355
3373
|
if (e !== void 0) {
|
|
3356
3374
|
if (!p(e)) {
|
|
3357
3375
|
i.push(
|
|
@@ -3417,7 +3435,7 @@ function Te(e, i, t) {
|
|
|
3417
3435
|
)
|
|
3418
3436
|
);
|
|
3419
3437
|
}
|
|
3420
|
-
function
|
|
3438
|
+
function Ua(e, i) {
|
|
3421
3439
|
if (e !== void 0) {
|
|
3422
3440
|
if (!p(e)) {
|
|
3423
3441
|
i.push(
|
|
@@ -3448,7 +3466,7 @@ function La(e, i) {
|
|
|
3448
3466
|
);
|
|
3449
3467
|
}
|
|
3450
3468
|
}
|
|
3451
|
-
function
|
|
3469
|
+
function Ga(e, i) {
|
|
3452
3470
|
var u;
|
|
3453
3471
|
((u = e.source) == null ? void 0 : u.kind) === "sql" && i.push(
|
|
3454
3472
|
o(
|
|
@@ -3461,8 +3479,8 @@ function Ua(e, i) {
|
|
|
3461
3479
|
required: !0
|
|
3462
3480
|
}), s = je(e.columns, "columns", i, {
|
|
3463
3481
|
required: !1
|
|
3464
|
-
}), n =
|
|
3465
|
-
U(e.filters, "filters", i), e.totals !== void 0 &&
|
|
3482
|
+
}), n = Ba(e.values, "values", i);
|
|
3483
|
+
U(e.filters, "filters", i), e.totals !== void 0 && Pa(e.totals, "totals", i), W(
|
|
3466
3484
|
t.map((f) => f.id),
|
|
3467
3485
|
"rows",
|
|
3468
3486
|
"row axis level",
|
|
@@ -3485,20 +3503,20 @@ function Ua(e, i) {
|
|
|
3485
3503
|
), d = new Set(
|
|
3486
3504
|
n.map((f) => f.id).filter((f) => m(f))
|
|
3487
3505
|
);
|
|
3488
|
-
|
|
3506
|
+
Va(
|
|
3489
3507
|
e.sort,
|
|
3490
3508
|
r,
|
|
3491
3509
|
l,
|
|
3492
3510
|
d,
|
|
3493
3511
|
i
|
|
3494
|
-
),
|
|
3512
|
+
), Ka(
|
|
3495
3513
|
e.expansion,
|
|
3496
3514
|
r,
|
|
3497
3515
|
l,
|
|
3498
3516
|
i
|
|
3499
|
-
),
|
|
3517
|
+
), La(e.layout, i), Ua(e.displayLimits, i);
|
|
3500
3518
|
}
|
|
3501
|
-
function
|
|
3519
|
+
function Ha(e, i) {
|
|
3502
3520
|
if (e.analysis === void 0)
|
|
3503
3521
|
return;
|
|
3504
3522
|
if (!p(e.analysis)) {
|
|
@@ -3597,10 +3615,10 @@ function re(e, i, t) {
|
|
|
3597
3615
|
}
|
|
3598
3616
|
return;
|
|
3599
3617
|
}
|
|
3600
|
-
(typeof e.unit != "string" || !
|
|
3618
|
+
(typeof e.unit != "string" || !Ra.has(e.unit)) && t.push(
|
|
3601
3619
|
o(
|
|
3602
3620
|
"invalid_time_window",
|
|
3603
|
-
`Time window unit must be one of: ${
|
|
3621
|
+
`Time window unit must be one of: ${F.join(", ")}.`,
|
|
3604
3622
|
`${i}.unit`
|
|
3605
3623
|
)
|
|
3606
3624
|
), (typeof e.value != "number" || !Number.isFinite(e.value) || e.value <= 0) && t.push(
|
|
@@ -3720,7 +3738,7 @@ function U(e, i, t) {
|
|
|
3720
3738
|
});
|
|
3721
3739
|
}
|
|
3722
3740
|
}
|
|
3723
|
-
function
|
|
3741
|
+
function za(e) {
|
|
3724
3742
|
const i = [];
|
|
3725
3743
|
if (!p(e))
|
|
3726
3744
|
return i.push(
|
|
@@ -3743,7 +3761,7 @@ function Ha(e) {
|
|
|
3743
3761
|
"Derived field needs a label.",
|
|
3744
3762
|
"label"
|
|
3745
3763
|
)
|
|
3746
|
-
),
|
|
3764
|
+
), ka.has(e.resultRole) || i.push(
|
|
3747
3765
|
o(
|
|
3748
3766
|
"invalid_derived_field_role",
|
|
3749
3767
|
"Derived field resultRole must be measure, dimension, date, id, or unknown.",
|
|
@@ -3755,7 +3773,7 @@ function Ha(e) {
|
|
|
3755
3773
|
"Derived field dataType must be string, number, boolean, date, datetime, or unknown.",
|
|
3756
3774
|
"dataType"
|
|
3757
3775
|
)
|
|
3758
|
-
),
|
|
3776
|
+
), xa.has(e.computeStage) || i.push(
|
|
3759
3777
|
o(
|
|
3760
3778
|
"invalid_derived_field_compute_stage",
|
|
3761
3779
|
"Derived field computeStage must be row or aggregate.",
|
|
@@ -3783,7 +3801,7 @@ function Ha(e) {
|
|
|
3783
3801
|
e.defaultAggregate,
|
|
3784
3802
|
"defaultAggregate",
|
|
3785
3803
|
i
|
|
3786
|
-
), e.aggregationBehavior !== void 0 && !
|
|
3804
|
+
), e.aggregationBehavior !== void 0 && !Ea.has(
|
|
3787
3805
|
e.aggregationBehavior
|
|
3788
3806
|
) && i.push(
|
|
3789
3807
|
o(
|
|
@@ -3791,7 +3809,7 @@ function Ha(e) {
|
|
|
3791
3809
|
"Derived field aggregationBehavior is not supported.",
|
|
3792
3810
|
"aggregationBehavior"
|
|
3793
3811
|
)
|
|
3794
|
-
), e.aggregationStrategy !== void 0 && !
|
|
3812
|
+
), e.aggregationStrategy !== void 0 && !Ta.has(
|
|
3795
3813
|
e.aggregationStrategy
|
|
3796
3814
|
) && i.push(
|
|
3797
3815
|
o(
|
|
@@ -3828,13 +3846,13 @@ function Ha(e) {
|
|
|
3828
3846
|
);
|
|
3829
3847
|
return;
|
|
3830
3848
|
}
|
|
3831
|
-
|
|
3849
|
+
Ca(
|
|
3832
3850
|
n,
|
|
3833
3851
|
`inputs.${s}`,
|
|
3834
3852
|
i
|
|
3835
3853
|
);
|
|
3836
3854
|
}), m(e.expression) && p(e.inputs)) {
|
|
3837
|
-
const s =
|
|
3855
|
+
const s = ya(e.expression), n = new Set(s), r = Object.keys(e.inputs).filter(
|
|
3838
3856
|
(l) => m(l)
|
|
3839
3857
|
);
|
|
3840
3858
|
s.forEach((l) => {
|
|
@@ -3870,7 +3888,7 @@ function Ha(e) {
|
|
|
3870
3888
|
)
|
|
3871
3889
|
), { ok: i.length === 0, errors: i, warnings: [] };
|
|
3872
3890
|
}
|
|
3873
|
-
function
|
|
3891
|
+
function ps(e) {
|
|
3874
3892
|
const i = [];
|
|
3875
3893
|
if (!p(e))
|
|
3876
3894
|
return i.push(
|
|
@@ -3949,7 +3967,7 @@ function di(e) {
|
|
|
3949
3967
|
"Analytics intent version must be 1.",
|
|
3950
3968
|
"version"
|
|
3951
3969
|
)
|
|
3952
|
-
), fe(e.source, "source", i),
|
|
3970
|
+
), fe(e.source, "source", i), Qa(e, i), wa(e, i), "relationshipHint" in e && e.relationshipHint !== void 0 && ge(
|
|
3953
3971
|
e.relationshipHint,
|
|
3954
3972
|
"relationshipHint",
|
|
3955
3973
|
i
|
|
@@ -3975,7 +3993,7 @@ function di(e) {
|
|
|
3975
3993
|
g(r, `measures.${l}`, i, {
|
|
3976
3994
|
required: !0
|
|
3977
3995
|
});
|
|
3978
|
-
}), n.length > 0 && !
|
|
3996
|
+
}), n.length > 0 && !la(n)) {
|
|
3979
3997
|
const r = n.find(
|
|
3980
3998
|
(l, d) => n.some(
|
|
3981
3999
|
(u, f) => f !== d && ii(u, l)
|
|
@@ -3984,7 +4002,7 @@ function di(e) {
|
|
|
3984
4002
|
r && i.push(
|
|
3985
4003
|
o(
|
|
3986
4004
|
"duplicate_measure",
|
|
3987
|
-
|
|
4005
|
+
da(r),
|
|
3988
4006
|
"measures"
|
|
3989
4007
|
)
|
|
3990
4008
|
);
|
|
@@ -4000,7 +4018,7 @@ function di(e) {
|
|
|
4000
4018
|
)
|
|
4001
4019
|
), e.primaryMeasure !== void 0 && (g(e.primaryMeasure, "primaryMeasure", i, {
|
|
4002
4020
|
required: !0
|
|
4003
|
-
}), p(e.primaryMeasure) && m(e.primaryMeasure.name) && n.length > 0 && !
|
|
4021
|
+
}), p(e.primaryMeasure) && m(e.primaryMeasure.name) && n.length > 0 && !ca(
|
|
4004
4022
|
e.primaryMeasure,
|
|
4005
4023
|
n
|
|
4006
4024
|
) && i.push(
|
|
@@ -4056,7 +4074,7 @@ function di(e) {
|
|
|
4056
4074
|
(l) => p(l) && m(l.name)
|
|
4057
4075
|
) : []
|
|
4058
4076
|
];
|
|
4059
|
-
r.length > 0 && !
|
|
4077
|
+
r.length > 0 && !pa(
|
|
4060
4078
|
e.orderBy.field,
|
|
4061
4079
|
r
|
|
4062
4080
|
) && i.push(
|
|
@@ -4068,7 +4086,7 @@ function di(e) {
|
|
|
4068
4086
|
);
|
|
4069
4087
|
}
|
|
4070
4088
|
}
|
|
4071
|
-
|
|
4089
|
+
Ha(e, i);
|
|
4072
4090
|
} else if (e.kind === "records") {
|
|
4073
4091
|
if (!Array.isArray(e.fields) || e.fields.length === 0 ? i.push(
|
|
4074
4092
|
o(
|
|
@@ -4150,7 +4168,7 @@ function di(e) {
|
|
|
4150
4168
|
);
|
|
4151
4169
|
});
|
|
4152
4170
|
}
|
|
4153
|
-
} else e.kind === "inputOptions" ?
|
|
4171
|
+
} else e.kind === "inputOptions" ? Sa(e, i) : e.kind === "matrix" ? Ga(e, i) : e.kind === "sql" ? (((s = e.source) == null ? void 0 : s.kind) !== "sql" && i.push(
|
|
4154
4172
|
o(
|
|
4155
4173
|
"invalid_sql_source",
|
|
4156
4174
|
"SQL analytics intent must use a SQL execution source.",
|
|
@@ -4158,7 +4176,7 @@ function di(e) {
|
|
|
4158
4176
|
)
|
|
4159
4177
|
), m(e.sql) || i.push(
|
|
4160
4178
|
o("missing_sql", "SQL analytics intent needs SQL text.", "sql")
|
|
4161
|
-
),
|
|
4179
|
+
), ua(
|
|
4162
4180
|
e.defaultParameters,
|
|
4163
4181
|
"defaultParameters",
|
|
4164
4182
|
i
|
|
@@ -4175,10 +4193,10 @@ function di(e) {
|
|
|
4175
4193
|
ok: i.length === 0,
|
|
4176
4194
|
errors: i,
|
|
4177
4195
|
warnings: t,
|
|
4178
|
-
repairHints:
|
|
4196
|
+
repairHints: Za(i)
|
|
4179
4197
|
};
|
|
4180
4198
|
}
|
|
4181
|
-
function
|
|
4199
|
+
function Qa(e, i) {
|
|
4182
4200
|
if (!(!("derivedFields" in e) || e.derivedFields === void 0)) {
|
|
4183
4201
|
if (!Array.isArray(e.derivedFields)) {
|
|
4184
4202
|
i.push(
|
|
@@ -4191,7 +4209,7 @@ function za(e, i) {
|
|
|
4191
4209
|
return;
|
|
4192
4210
|
}
|
|
4193
4211
|
e.derivedFields.forEach((t, s) => {
|
|
4194
|
-
|
|
4212
|
+
za(
|
|
4195
4213
|
t
|
|
4196
4214
|
).errors.forEach((r) => {
|
|
4197
4215
|
i.push({
|
|
@@ -4202,7 +4220,7 @@ function za(e, i) {
|
|
|
4202
4220
|
});
|
|
4203
4221
|
}
|
|
4204
4222
|
}
|
|
4205
|
-
function
|
|
4223
|
+
function Ya(e) {
|
|
4206
4224
|
const i = [], t = [];
|
|
4207
4225
|
if (!e || typeof e != "object")
|
|
4208
4226
|
return {
|
|
@@ -4277,7 +4295,7 @@ function Qa(e) {
|
|
|
4277
4295
|
repairHints: ui(i)
|
|
4278
4296
|
};
|
|
4279
4297
|
}
|
|
4280
|
-
function
|
|
4298
|
+
function ms(e) {
|
|
4281
4299
|
const i = [], t = [];
|
|
4282
4300
|
if (!e || typeof e != "object")
|
|
4283
4301
|
return {
|
|
@@ -4305,7 +4323,7 @@ function cs(e) {
|
|
|
4305
4323
|
"kind"
|
|
4306
4324
|
)
|
|
4307
4325
|
);
|
|
4308
|
-
const s =
|
|
4326
|
+
const s = Ya(
|
|
4309
4327
|
e.operationIntent
|
|
4310
4328
|
);
|
|
4311
4329
|
return i.push(...s.errors), t.push(...s.warnings), Array.isArray(e.plannedToolCalls) || i.push(
|
|
@@ -4327,7 +4345,7 @@ function ui(e) {
|
|
|
4327
4345
|
recommendedNextStep: i.code === "missing_obligations" ? "Normalize the user request into one or more typed analytics obligations before recovery planning." : "Correct the operation/recovery contract shape before planning execution."
|
|
4328
4346
|
}));
|
|
4329
4347
|
}
|
|
4330
|
-
function
|
|
4348
|
+
function Za(e) {
|
|
4331
4349
|
return e.map((i) => {
|
|
4332
4350
|
switch (i.code) {
|
|
4333
4351
|
case "missing_source":
|
|
@@ -4410,7 +4428,7 @@ function Ya(e) {
|
|
|
4410
4428
|
}
|
|
4411
4429
|
}).filter((i) => !!i);
|
|
4412
4430
|
}
|
|
4413
|
-
function
|
|
4431
|
+
function Xa(e, i, t, s) {
|
|
4414
4432
|
if (!e || typeof e != "object") {
|
|
4415
4433
|
t.push(
|
|
4416
4434
|
o("invalid_view", "Dashboard view must be an object.", i)
|
|
@@ -4474,7 +4492,7 @@ function Za(e, i, t, s) {
|
|
|
4474
4492
|
)
|
|
4475
4493
|
);
|
|
4476
4494
|
}
|
|
4477
|
-
function
|
|
4495
|
+
function fs(e) {
|
|
4478
4496
|
const i = [], t = [];
|
|
4479
4497
|
if (!e || typeof e != "object")
|
|
4480
4498
|
return {
|
|
@@ -4567,7 +4585,7 @@ function ps(e) {
|
|
|
4567
4585
|
continue;
|
|
4568
4586
|
}
|
|
4569
4587
|
for (const [O, B] of f.views.entries())
|
|
4570
|
-
|
|
4588
|
+
Xa(
|
|
4571
4589
|
B,
|
|
4572
4590
|
`${_}.views.${O}`,
|
|
4573
4591
|
i,
|
|
@@ -4577,64 +4595,66 @@ function ps(e) {
|
|
|
4577
4595
|
return { ok: i.length === 0, errors: i, warnings: t };
|
|
4578
4596
|
}
|
|
4579
4597
|
export {
|
|
4580
|
-
|
|
4581
|
-
|
|
4598
|
+
Ze as $,
|
|
4599
|
+
fs as A,
|
|
4582
4600
|
ft as B,
|
|
4583
4601
|
bt as C,
|
|
4584
|
-
|
|
4585
|
-
|
|
4602
|
+
_t as D,
|
|
4603
|
+
Ge as E,
|
|
4586
4604
|
$t as F,
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4605
|
+
St as G,
|
|
4606
|
+
j as H,
|
|
4607
|
+
A as I,
|
|
4608
|
+
He as J,
|
|
4609
|
+
ce as K,
|
|
4610
|
+
T as L,
|
|
4611
|
+
rs as M,
|
|
4612
|
+
ls as N,
|
|
4613
|
+
ae as O,
|
|
4614
|
+
Qe as P,
|
|
4597
4615
|
jt as Q,
|
|
4598
|
-
|
|
4616
|
+
Wa as R,
|
|
4599
4617
|
ie as S,
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4618
|
+
es as T,
|
|
4619
|
+
Et as U,
|
|
4620
|
+
Tt as V,
|
|
4621
|
+
Ct as W,
|
|
4622
|
+
Jt as X,
|
|
4623
|
+
Wt as Y,
|
|
4624
|
+
ea as Z,
|
|
4625
|
+
Ye as _,
|
|
4626
|
+
ns as a,
|
|
4627
|
+
Xe as a0,
|
|
4628
|
+
ia as a1,
|
|
4629
|
+
aa as a2,
|
|
4630
|
+
us as a3,
|
|
4631
|
+
Ce as a4,
|
|
4632
|
+
Fe as a5,
|
|
4633
|
+
as as a6,
|
|
4634
|
+
_i as a7,
|
|
4615
4635
|
gi as b,
|
|
4616
4636
|
de as c,
|
|
4617
4637
|
fi as d,
|
|
4618
|
-
|
|
4638
|
+
cs as e,
|
|
4619
4639
|
hi as f,
|
|
4620
|
-
|
|
4621
|
-
|
|
4622
|
-
|
|
4640
|
+
ds as g,
|
|
4641
|
+
ts as h,
|
|
4642
|
+
os as i,
|
|
4623
4643
|
ee as j,
|
|
4624
|
-
|
|
4644
|
+
F as k,
|
|
4625
4645
|
ci as l,
|
|
4626
4646
|
le as m,
|
|
4627
4647
|
pi as n,
|
|
4628
4648
|
mi as o,
|
|
4629
|
-
|
|
4630
|
-
|
|
4649
|
+
ss as p,
|
|
4650
|
+
is as q,
|
|
4631
4651
|
se as r,
|
|
4632
4652
|
yi as s,
|
|
4633
4653
|
Se as t,
|
|
4634
|
-
|
|
4654
|
+
za as u,
|
|
4635
4655
|
qe as v,
|
|
4636
|
-
|
|
4656
|
+
ps as w,
|
|
4637
4657
|
di as x,
|
|
4638
|
-
|
|
4639
|
-
|
|
4658
|
+
Ya as y,
|
|
4659
|
+
ms as z
|
|
4640
4660
|
};
|