react-semaphor 0.1.424 → 0.1.426

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +246 -91
  3. package/dist/appearance/index.cjs +1 -1
  4. package/dist/appearance/index.js +1 -1
  5. package/dist/brand-studio/index.cjs +2 -2
  6. package/dist/brand-studio/index.js +8 -8
  7. package/dist/chunks/{analyze-result-contract-D7pjjYPy.js → analyze-result-contract-DnfF8kBb.js} +434 -427
  8. package/dist/chunks/analyze-result-contract-ege_u6Nl.js +1 -0
  9. package/dist/chunks/{braces-8TRlDwDw.js → braces-BdbUk_r9.js} +1 -1
  10. package/dist/chunks/{braces-D2tStQjF.js → braces-CbO-aIwH.js} +1 -1
  11. package/dist/chunks/calendar-preferences-dialog-C-gN-vlq.js +1 -0
  12. package/dist/chunks/{calendar-preferences-dialog-D5mABNDT.js → calendar-preferences-dialog-tBSngRN-.js} +4 -4
  13. package/dist/chunks/{catalog-field-grounding-CJKAqtiC.js → catalog-field-grounding-AOGwWu0K.js} +11 -11
  14. package/dist/chunks/{switch-2bh3Hka1.js → code-editor-Pod1s6SK.js} +9927 -9098
  15. package/dist/chunks/code-editor-tfzm8LWW.js +138 -0
  16. package/dist/chunks/{common-types-4bjoIgvm.js → common-types-ClkOI-3O.js} +4 -4
  17. package/dist/chunks/comparison-document-migration-BJH1idOd.js +414 -0
  18. package/dist/chunks/comparison-document-migration-b6c3xiWh.js +1 -0
  19. package/dist/chunks/dashboard-JNK2ly_e.js +1402 -0
  20. package/dist/chunks/{index-Dzz6jXSY.js → dashboard-ZoKNg47G.js} +67158 -65267
  21. package/dist/chunks/{dashboard-briefing-launcher-DuWgwtxX.js → dashboard-briefing-launcher-0kR-QThz.js} +11 -6
  22. package/dist/chunks/{dashboard-briefing-launcher-BNDzMjjt.js → dashboard-briefing-launcher-BE-sNAzW.js} +226 -209
  23. package/dist/chunks/dashboard-controls-BUYTVauu.js +36 -0
  24. package/dist/chunks/dashboard-controls-Ce_Bps8f.js +2196 -0
  25. package/dist/chunks/dashboard-date-comparison-definition-BaYxjLi5.js +167 -0
  26. package/dist/chunks/dashboard-date-comparison-definition-DGZr3m-b.js +1 -0
  27. package/dist/chunks/dashboard-input-contract-BFpERluO.js +18 -0
  28. package/dist/chunks/dashboard-input-contract-DV3cshjz.js +1 -0
  29. package/dist/chunks/{dashboard-json-CkTEDNtH.js → dashboard-json-4quaFoSw.js} +16 -15
  30. package/dist/chunks/dashboard-json-81uc8aVR.js +1 -0
  31. package/dist/chunks/date-formatter-BTTYdAik.js +1 -0
  32. package/dist/chunks/date-formatter-D-89jTjG.js +514 -0
  33. package/dist/chunks/{edit-dashboard-visual-CRjVRZLk.js → edit-dashboard-visual-DqQsH7rN.js} +8470 -8520
  34. package/dist/chunks/edit-dashboard-visual-nVRXv1Lq.js +182 -0
  35. package/dist/chunks/{index-CjzRe2su.js → index-CnujJ3fa.js} +3 -3
  36. package/dist/chunks/{index-DRlMUglg.js → index-Dpm_VET4.js} +2 -2
  37. package/dist/chunks/{index-CJdxSyQq.js → index-If0wlXGi.js} +308 -308
  38. package/dist/chunks/index-jSrCwPQz.js +31 -0
  39. package/dist/chunks/{x-CXDkqdur.js → index-xHCrHprY.js} +59 -59
  40. package/dist/chunks/{layout-grid-C0OI-MRn.js → layout-grid-B08pP7v6.js} +1 -1
  41. package/dist/chunks/{layout-grid-CiubineE.js → layout-grid-D5tYJg1-.js} +1 -1
  42. package/dist/chunks/metric-comparison-BKgkMy9r.js +1 -0
  43. package/dist/chunks/metric-comparison-CWweq9RG.js +387 -0
  44. package/dist/chunks/{palette-C4KTXOug.js → palette-C0yjT5Tv.js} +1 -1
  45. package/dist/chunks/{palette-Cp1hqZtm.js → palette-jqaAcwiQ.js} +1 -1
  46. package/dist/chunks/{save-DgMfP0j8.js → save-HCJjjzdX.js} +1 -1
  47. package/dist/chunks/{save-C__QggEE.js → save-Xdc4pnys.js} +1 -1
  48. package/dist/chunks/{search-BHsQIWBV.js → search-DHZCro8B.js} +1 -1
  49. package/dist/chunks/{search-DNCejM7Z.js → search-Dcud9ajy.js} +1 -1
  50. package/dist/chunks/{update-policy-C1pmhLz9.js → update-policy-BgONreNd.js} +1 -1
  51. package/dist/chunks/{update-policy-BCJc0oI5.js → update-policy-CY2k-pJP.js} +9 -9
  52. package/dist/chunks/{use-create-flow-overlay-state-B-bYbtix.js → use-create-flow-overlay-state-CoANTEXS.js} +2 -2
  53. package/dist/chunks/{use-create-flow-overlay-state-B9vArrvr.js → use-create-flow-overlay-state-DUVIsF0y.js} +62 -62
  54. package/dist/chunks/validators-B4VMLX3_.js +1 -0
  55. package/dist/chunks/{validators-PXkij33j.js → validators-Cz-XuORM.js} +123 -119
  56. package/dist/dashboard/index.cjs +1 -1
  57. package/dist/dashboard/index.js +2 -2
  58. package/dist/dashboard-authoring/index.cjs +2 -2
  59. package/dist/dashboard-authoring/index.js +6 -4
  60. package/dist/data-app-builder/index.cjs +6 -6
  61. package/dist/data-app-builder/index.js +5 -5
  62. package/dist/data-app-codegen/index.cjs +1 -1
  63. package/dist/data-app-codegen/index.js +2 -2
  64. package/dist/data-app-codegen-node/index.cjs +1 -1
  65. package/dist/data-app-codegen-node/index.js +3 -3
  66. package/dist/data-app-sdk/index.cjs +1 -1
  67. package/dist/data-app-sdk/index.js +6 -6
  68. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  69. package/dist/data-app-sdk-adapters/index.js +1 -1
  70. package/dist/data-app-sdk-validation/index.cjs +1 -1
  71. package/dist/data-app-sdk-validation/index.js +65 -68
  72. package/dist/format-utils/index.cjs +2 -2
  73. package/dist/format-utils/index.js +59 -58
  74. package/dist/index.cjs +1 -1
  75. package/dist/index.js +19 -19
  76. package/dist/style.css +1 -1
  77. package/dist/surfboard/index.cjs +1 -1
  78. package/dist/surfboard/index.js +3 -3
  79. package/dist/types/analytics-protocol.d.ts +337 -3
  80. package/dist/types/brand-studio.d.ts +2 -2
  81. package/dist/types/briefings.d.ts +65 -41
  82. package/dist/types/dashboard-assistant.d.ts +28 -7
  83. package/dist/types/dashboard-authoring.d.ts +123 -43
  84. package/dist/types/dashboard.d.ts +122 -48
  85. package/dist/types/data-app-builder.d.ts +2 -2
  86. package/dist/types/data-app-sdk.d.ts +1 -1
  87. package/dist/types/format-utils.d.ts +98 -10
  88. package/dist/types/index.js +1 -1
  89. package/dist/types/main.d.ts +264 -100
  90. package/dist/types/shared.d.ts +84 -43
  91. package/dist/types/surfboard.d.ts +124 -49
  92. package/dist/types/types.d.ts +135 -50
  93. package/package.json +2 -1
  94. package/dist/chunks/analyze-result-contract-DpDcImgk.js +0 -1
  95. package/dist/chunks/calendar-preferences-dialog-iokD3HbE.js +0 -1
  96. package/dist/chunks/contracts-CoCOpd_i.js +0 -11
  97. package/dist/chunks/contracts-CtB2VONT.js +0 -1
  98. package/dist/chunks/dashboard-controls-bbEF-AbK.js +0 -52
  99. package/dist/chunks/dashboard-controls-id39vb7G.js +0 -2322
  100. package/dist/chunks/dashboard-json-DVoqS1ks.js +0 -1
  101. package/dist/chunks/date-formatter-B4EBSe9C.js +0 -1
  102. package/dist/chunks/date-formatter-BlhBftA9.js +0 -416
  103. package/dist/chunks/edit-dashboard-visual-CkrxZCcp.js +0 -178
  104. package/dist/chunks/index-S1CGUcSz.js +0 -1406
  105. package/dist/chunks/switch-DMT7qf_R.js +0 -138
  106. package/dist/chunks/validators-DMlVbd1p.js +0 -1
  107. package/dist/chunks/x-B6ghREd2.js +0 -31
@@ -1,5 +1,11 @@
1
1
  import { z as e } from "zod";
2
- const Se = "SUM";
2
+ const we = "SUM";
3
+ function b(s) {
4
+ return typeof s == "string" && s.trim().length > 0;
5
+ }
6
+ function di(s) {
7
+ return s ? s.kind === "semantic" ? !!(b(s.domainId) && (b(s.datasetId) || b(s.datasetName))) : s.kind === "physical" ? b(s.connectionId) && b(s.tableName) : b(s.connectionId) : !1;
8
+ }
3
9
  function D(s) {
4
10
  return s ? s.kind === "semantic" ? [
5
11
  s.kind,
@@ -18,10 +24,10 @@ function D(s) {
18
24
  s.label || ""
19
25
  ].join(":") : "";
20
26
  }
21
- function Z(s, i) {
27
+ function ee(s, i) {
22
28
  return !s || !i ? s === i : s.kind !== i.kind ? !1 : s.kind === "semantic" && i.kind === "semantic" ? s.domainId !== i.domainId ? !1 : s.datasetId && i.datasetId ? s.datasetId === i.datasetId : s.datasetName === i.datasetName : D(s) === D(i);
23
29
  }
24
- function ee(s, i) {
30
+ function te(s, i) {
25
31
  return s.kind !== "semantic" || i.kind !== "semantic" ? s : {
26
32
  ...s,
27
33
  datasetName: s.datasetName || i.datasetName,
@@ -30,55 +36,55 @@ function ee(s, i) {
30
36
  connectionId: s.connectionId || i.connectionId
31
37
  };
32
38
  }
33
- function ui(s) {
39
+ function ci(s) {
34
40
  const i = [];
35
41
  for (const t of s) {
36
42
  const o = i.findIndex(
37
- (n) => Z(n, t)
43
+ (n) => ee(n, t)
38
44
  );
39
45
  if (o === -1) {
40
46
  i.push(t);
41
47
  continue;
42
48
  }
43
- i[o] = ee(
49
+ i[o] = te(
44
50
  i[o],
45
51
  t
46
52
  );
47
53
  }
48
54
  return i;
49
55
  }
50
- function di(s, i) {
51
- return s.name === i.name && Z(s.source, i.source);
56
+ function pi(s, i) {
57
+ return s.name === i.name && ee(s.source, i.source);
52
58
  }
53
- function we(s) {
59
+ function ke(s) {
54
60
  return [
55
61
  s.source ? D(s.source) : "unknown",
56
- te(s),
62
+ ie(s),
57
63
  s.name
58
64
  ].filter(Boolean).join(":");
59
65
  }
60
- function te(s) {
61
- return ke(
62
- s.aggregate || Se
66
+ function ie(s) {
67
+ return Ie(
68
+ s.aggregate || we
63
69
  );
64
70
  }
65
- function ke(s) {
71
+ function Ie(s) {
66
72
  return s.trim().toUpperCase();
67
73
  }
68
- function ci(s, i) {
74
+ function mi(s, i) {
69
75
  return {
70
76
  ...s,
71
77
  label: s.label || i.label,
72
78
  role: s.role || i.role,
73
79
  dataType: s.dataType || i.dataType,
74
- source: s.source && i.source ? ee(s.source, i.source) : s.source || i.source
80
+ source: s.source && i.source ? te(s.source, i.source) : s.source || i.source
75
81
  };
76
82
  }
77
- const L = {
83
+ const G = {
78
84
  answerSummary: "string",
79
85
  responseDetail: "responseDetail",
80
86
  mode: "string",
81
- comparisonType: "string",
87
+ comparisonKind: "string",
82
88
  executionResult: "executionResult",
83
89
  compiledQuery: "unknown",
84
90
  data: "unknown",
@@ -114,19 +120,19 @@ const L = {
114
120
  periodRows: "recordArray",
115
121
  sql: "unknown",
116
122
  omitted: "stringArray"
117
- }, B = "semaphor-data-app-codegen-summary/v1", pi = "semaphor-data-app-codegen-summary-validator/v2", Ie = /* @__PURE__ */ new Set([
123
+ }, O = "semaphor-data-app-codegen-summary/v1", gi = "semaphor-data-app-codegen-summary-validator/v2", Ae = /* @__PURE__ */ new Set([
118
124
  "metric",
119
125
  "records",
120
126
  "matrix",
121
127
  "analysis",
122
128
  "sql_fallback"
123
- ]), Ae = /* @__PURE__ */ new Set([
129
+ ]), _e = /* @__PURE__ */ new Set([
124
130
  "semaphor.metric",
125
131
  "semaphor.records",
126
132
  "semaphor.matrix",
127
133
  "semaphor.analysis",
128
134
  "semaphor.sql"
129
- ]), _e = /* @__PURE__ */ new Set([
135
+ ]), je = /* @__PURE__ */ new Set([
130
136
  "SUM",
131
137
  "COUNT",
132
138
  "AVG",
@@ -134,13 +140,13 @@ const L = {
134
140
  "MAX",
135
141
  "MEDIAN",
136
142
  "DISTINCT"
137
- ]), je = /* @__PURE__ */ new Set([
143
+ ]), Re = /* @__PURE__ */ new Set([
138
144
  "absolute_delta",
139
145
  "largest_negative",
140
146
  "largest_positive",
141
147
  "positive_and_negative",
142
148
  "all"
143
- ]), ie = /* @__PURE__ */ new Set([
149
+ ]), se = /* @__PURE__ */ new Set([
144
150
  "source",
145
151
  "id",
146
152
  "label",
@@ -155,8 +161,8 @@ const L = {
155
161
  "relationshipHint",
156
162
  "limit",
157
163
  "derivedFields"
158
- ]), Re = /* @__PURE__ */ new Set([
159
- ...ie,
164
+ ]), Ce = /* @__PURE__ */ new Set([
165
+ ...se,
160
166
  "analysis",
161
167
  "timeWindow",
162
168
  "filters",
@@ -165,7 +171,7 @@ const L = {
165
171
  "calendarContext",
166
172
  "chartTitle",
167
173
  "chartType"
168
- ]), Ce = /* @__PURE__ */ new Set([
174
+ ]), qe = /* @__PURE__ */ new Set([
169
175
  "source",
170
176
  "id",
171
177
  "label",
@@ -180,7 +186,7 @@ const L = {
180
186
  "pagination",
181
187
  "totals",
182
188
  "derivedFields"
183
- ]), qe = /* @__PURE__ */ new Set([
189
+ ]), xe = /* @__PURE__ */ new Set([
184
190
  "source",
185
191
  "id",
186
192
  "label",
@@ -194,7 +200,7 @@ const L = {
194
200
  "expansion",
195
201
  "layout",
196
202
  "displayLimits"
197
- ]), xe = /* @__PURE__ */ new Set([
203
+ ]), Ee = /* @__PURE__ */ new Set([
198
204
  "source",
199
205
  "id",
200
206
  "label",
@@ -205,7 +211,7 @@ const L = {
205
211
  "limit",
206
212
  "pagination",
207
213
  "rationale"
208
- ]), Ee = /* @__PURE__ */ new Set([
214
+ ]), Fe = /* @__PURE__ */ new Set([
209
215
  "kpi",
210
216
  "line_chart",
211
217
  "bar_chart",
@@ -218,7 +224,7 @@ const L = {
218
224
  "narrative",
219
225
  "text_block",
220
226
  "custom"
221
- ]), Fe = /* @__PURE__ */ new Set([
227
+ ]), Ne = /* @__PURE__ */ new Set([
222
228
  "missing_measure",
223
229
  "missing_dimension",
224
230
  "missing_date",
@@ -235,47 +241,47 @@ const L = {
235
241
  "requires_sql_escape_hatch",
236
242
  "unsupported_sdk_capability"
237
243
  ]);
238
- function mi(s) {
239
- return se(s).ok;
244
+ function fi(s) {
245
+ return oe(s).ok;
240
246
  }
241
- function se(s) {
247
+ function oe(s) {
242
248
  const i = [];
243
249
  if (!s || typeof s != "object")
244
250
  return { ok: !1, issues: ["Summary must be an object."] };
245
251
  const t = s;
246
- return t.schemaVersion !== B && i.push(
247
- `schemaVersion must be ${B}.`
252
+ return t.schemaVersion !== O && i.push(
253
+ `schemaVersion must be ${O}.`
248
254
  ), (typeof t.title != "string" || !t.title.trim()) && i.push("title is required."), Array.isArray(t.sources) || i.push("sources must be an array."), Array.isArray(t.inputs) || i.push("inputs must be an array."), Array.isArray(t.views) || i.push("views must be an array."), Array.isArray(t.filterContracts) || i.push("filterContracts must be an array."), (!t.implementationChecklist || typeof t.implementationChecklist != "object") && i.push("implementationChecklist must be an object."), t.implementationChecklist && typeof t.implementationChecklist == "object" && i.push(
249
- ...Ke(t.implementationChecklist)
255
+ ...Te(t.implementationChecklist)
250
256
  ), Array.isArray(t.sources) && t.sources.forEach((o, n) => {
251
- i.push(...k(o, `sources.${n}`));
257
+ i.push(...I(o, `sources.${n}`));
252
258
  }), Array.isArray(t.inputs) && t.inputs.forEach((o, n) => {
253
- i.push(...Te(o, `inputs.${n}`));
259
+ i.push(...Me(o, `inputs.${n}`));
254
260
  }), Array.isArray(t.views) && t.views.forEach((o, n) => {
255
- i.push(...Me(o, `views.${n}`));
261
+ i.push(...Be(o, `views.${n}`));
256
262
  }), Array.isArray(t.filterContracts) && t.filterContracts.forEach((o, n) => {
257
263
  i.push(
258
- ...He(o, `filterContracts.${n}`)
264
+ ...Qe(o, `filterContracts.${n}`)
259
265
  );
260
266
  }), t.unsupportedInsights !== void 0 && (Array.isArray(t.unsupportedInsights) ? t.unsupportedInsights.forEach((o, n) => {
261
267
  i.push(
262
- ...mt(
268
+ ...gt(
263
269
  o,
264
270
  `unsupportedInsights.${n}`
265
271
  )
266
272
  );
267
- }) : i.push("unsupportedInsights must be an array.")), i.push(...Ne(t)), { ok: i.length === 0, issues: i };
273
+ }) : i.push("unsupportedInsights must be an array.")), i.push(...Ke(t)), { ok: i.length === 0, issues: i };
268
274
  }
269
- function Ne(s) {
275
+ function Ke(s) {
270
276
  const i = Array.isArray(s.unsupportedInsights) && s.unsupportedInsights.some(
271
277
  (u) => {
272
278
  var l;
273
- return H.has((l = a(u)) == null ? void 0 : l.reason);
279
+ return Q.has((l = a(u)) == null ? void 0 : l.reason);
274
280
  }
275
281
  ), t = Array.isArray(s.views) && s.views.some((u) => {
276
282
  var d;
277
283
  const l = a((d = a(u)) == null ? void 0 : d.computation);
278
- return (l == null ? void 0 : l.kind) === "unsupported" && H.has(l.reason);
284
+ return (l == null ? void 0 : l.kind) === "unsupported" && Q.has(l.reason);
279
285
  });
280
286
  if (!i && !t)
281
287
  return [];
@@ -288,15 +294,15 @@ function Ne(s) {
288
294
  "nextRequiredTool.name must be semaphor_propose_semantic_model_change when semantic model repair gaps are present."
289
295
  ), o;
290
296
  }
291
- const H = /* @__PURE__ */ new Set([
297
+ const Q = /* @__PURE__ */ new Set([
292
298
  "missing_relationship",
293
299
  "raw_identifier_filter_options"
294
300
  ]);
295
- function k(s, i) {
301
+ function I(s, i) {
296
302
  const t = a(s);
297
303
  return t ? t.kind === "semantic" ? typeof t.domainId == "string" && t.domainId.trim() && typeof t.datasetName == "string" && t.datasetName.trim() ? [] : [`${i} must include sourceKey or a supported source identity.`] : typeof t.sourceKey == "string" && t.sourceKey.trim() ? [] : t.kind === "physical" && typeof t.tableName == "string" && t.tableName.trim() && typeof t.connectionId == "string" && t.connectionId.trim() ? [] : t.kind === "sql" && typeof t.connectionId == "string" && t.connectionId.trim() ? [] : [`${i} must include sourceKey or a supported source identity.`] : [`${i} must be an object.`];
298
304
  }
299
- function Ke(s) {
305
+ function Te(s) {
300
306
  const i = a(s);
301
307
  if (!i)
302
308
  return ["implementationChecklist must be an object."];
@@ -321,12 +327,12 @@ function Ke(s) {
321
327
  "implementationChecklist.browserSmokeChecks must be an array of strings."
322
328
  ), t;
323
329
  }
324
- function Te(s, i) {
330
+ function Me(s, i) {
325
331
  const t = a(s);
326
332
  if (!t)
327
333
  return [`${i} must be an object.`];
328
334
  const o = [];
329
- return (typeof t.id != "string" || !t.id.trim()) && o.push(`${i}.id is required.`), t.fieldRef && o.push(...c(t.fieldRef, `${i}.fieldRef`)), o.push(...ne(t.optionQuery, `${i}.optionQuery`)), g(t.appliesToViewIds) || o.push(`${i}.appliesToViewIds must be an array of strings.`), t.bindings !== void 0 && !Array.isArray(t.bindings) && o.push(`${i}.bindings must be an array.`), Array.isArray(t.bindings) && t.bindings.forEach((n, r) => {
335
+ return (typeof t.id != "string" || !t.id.trim()) && o.push(`${i}.id is required.`), t.fieldRef && o.push(...c(t.fieldRef, `${i}.fieldRef`)), o.push(...re(t.optionQuery, `${i}.optionQuery`)), g(t.appliesToViewIds) || o.push(`${i}.appliesToViewIds must be an array of strings.`), t.bindings !== void 0 && !Array.isArray(t.bindings) && o.push(`${i}.bindings must be an array.`), Array.isArray(t.bindings) && t.bindings.forEach((n, r) => {
330
336
  const u = a(n);
331
337
  if (!u) {
332
338
  o.push(`${i}.bindings.${r} must be an object.`);
@@ -342,20 +348,20 @@ function Te(s, i) {
342
348
  );
343
349
  }), o;
344
350
  }
345
- function Me(s, i) {
351
+ function Be(s, i) {
346
352
  const t = a(s);
347
353
  if (!t)
348
354
  return [`${i} must be an object.`];
349
355
  const o = [];
350
- if ((typeof t.id != "string" || !t.id.trim()) && o.push(`${i}.id is required.`), t.visualSpec !== void 0 && o.push(...rt(t.visualSpec, `${i}.visualSpec`)), t.computation !== void 0 && o.push(...pt(t.computation, `${i}.computation`)), nt(t))
351
- return o.push(...F(t, `${i}`)), t.fields !== void 0 && (Array.isArray(t.fields) ? t.fields.forEach((d, y) => {
356
+ if ((typeof t.id != "string" || !t.id.trim()) && o.push(`${i}.id is required.`), t.visualSpec !== void 0 && o.push(...at(t.visualSpec, `${i}.visualSpec`)), t.computation !== void 0 && o.push(...mt(t.computation, `${i}.computation`)), rt(t))
357
+ return o.push(...N(t, `${i}`)), t.fields !== void 0 && (Array.isArray(t.fields) ? t.fields.forEach((d, y) => {
352
358
  o.push(...c(d, `${i}.fields.${y}`));
353
359
  }) : o.push(`${i}.fields must be an array.`)), t.queryKind !== void 0 && o.push(`${i}.queryKind is not allowed for non-executable views.`), t.sdkBuilder !== void 0 && o.push(`${i}.sdkBuilder is not allowed for non-executable views.`), t.sdkSpec !== void 0 && o.push(`${i}.sdkSpec is not allowed for non-executable views.`), o;
354
360
  if (!Array.isArray(t.fields))
355
- return o.push(`${i}.fields must be an array.`), (t.sdkSpec !== void 0 || t.sdkBuilder !== void 0) && o.push(`${i}.fields must be an array for executable views.`), o.push(...F(t, `${i}`)), o;
361
+ return o.push(`${i}.fields must be an array.`), (t.sdkSpec !== void 0 || t.sdkBuilder !== void 0) && o.push(`${i}.fields must be an array for executable views.`), o.push(...N(t, `${i}`)), o;
356
362
  t.fields.forEach((d, y) => {
357
363
  o.push(...c(d, `${i}.fields.${y}`));
358
- }), S(t.queryKind) || o.push(`${i}.queryKind must be a supported codegen query kind.`), t.sdkBuilder !== void 0 && !le(t.sdkBuilder) && o.push(`${i}.sdkBuilder must be a supported SDK builder.`), t.metricBindingKeys !== void 0 && (Array.isArray(t.metricBindingKeys) ? t.metricBindingKeys.some(
364
+ }), w(t.queryKind) || o.push(`${i}.queryKind must be a supported codegen query kind.`), t.sdkBuilder !== void 0 && !ue(t.sdkBuilder) && o.push(`${i}.sdkBuilder must be a supported SDK builder.`), t.metricBindingKeys !== void 0 && (Array.isArray(t.metricBindingKeys) ? t.metricBindingKeys.some(
359
365
  (d) => typeof d != "string" || d.trim().length === 0
360
366
  ) && o.push(`${i}.metricBindingKeys must be an array of strings.`) : o.push(`${i}.metricBindingKeys must be an array of strings.`));
361
367
  const n = a(t.sdkSpec), r = (n == null ? void 0 : n.builder) === "semaphor.metric";
@@ -365,14 +371,14 @@ function Me(s, i) {
365
371
  `${i}.metricBindingKeys must match the generated metric field binding keys in order.`
366
372
  );
367
373
  const l = a(t.computation);
368
- return (l == null ? void 0 : l.kind) === "server_query" && S(t.queryKind) && S(l.queryKind) && l.queryKind !== t.queryKind && o.push(`${i}.computation.queryKind must match queryKind.`), o.push(
369
- ...Qe({
374
+ return (l == null ? void 0 : l.kind) === "server_query" && w(t.queryKind) && w(l.queryKind) && l.queryKind !== t.queryKind && o.push(`${i}.computation.queryKind must match queryKind.`), o.push(
375
+ ...Ye({
370
376
  value: t.sdkSpec,
371
377
  path: `${i}.sdkSpec`,
372
378
  queryKind: typeof t.queryKind == "string" ? t.queryKind : void 0,
373
379
  sdkBuilder: typeof t.sdkBuilder == "string" ? t.sdkBuilder : void 0
374
380
  }),
375
- ...F(t, `${i}`)
381
+ ...N(t, `${i}`)
376
382
  ), o;
377
383
  }
378
384
  function De(s) {
@@ -385,28 +391,28 @@ function De(s) {
385
391
  const n = [
386
392
  t.primaryMeasure,
387
393
  ...Array.isArray(t.measures) ? t.measures : []
388
- ].map(Be).filter(
394
+ ].map(Oe).filter(
389
395
  (r) => !!r
390
396
  );
391
397
  return Array.from(
392
398
  new Map(n.map((r) => [r.identity, r.bindingKey])).values()
393
399
  );
394
400
  }
395
- function Be(s) {
401
+ function Oe(s) {
396
402
  const i = a(s);
397
403
  if (!i || typeof i.name != "string" || !i.name.trim())
398
404
  return;
399
- const t = Oe(i);
405
+ const t = Pe(i);
400
406
  return t ? {
401
407
  identity: JSON.stringify({
402
408
  source: t,
403
409
  name: i.name,
404
- aggregate: oe(i)
410
+ aggregate: ne(i)
405
411
  }),
406
- bindingKey: Pe(i)
412
+ bindingKey: Ve(i)
407
413
  } : void 0;
408
414
  }
409
- function Oe(s) {
415
+ function Pe(s) {
410
416
  if (typeof s.sourceKey == "string" && s.sourceKey.trim())
411
417
  return { sourceKey: s.sourceKey };
412
418
  const i = a(s.source);
@@ -419,19 +425,19 @@ function Oe(s) {
419
425
  name: i.name
420
426
  };
421
427
  }
422
- function Pe(s) {
428
+ function Ve(s) {
423
429
  return typeof s.sourceKey == "string" && s.sourceKey.trim() ? [
424
430
  s.sourceKey,
425
- oe(s),
431
+ ne(s),
426
432
  s.name
427
- ].filter(Boolean).join(":") : we(s);
433
+ ].filter(Boolean).join(":") : ke(s);
428
434
  }
429
- function oe(s) {
430
- return te(
435
+ function ne(s) {
436
+ return ie(
431
437
  s
432
438
  );
433
439
  }
434
- function F(s, i) {
440
+ function N(s, i) {
435
441
  var y;
436
442
  const t = a((y = a(s.visualSpec)) == null ? void 0 : y.tableBehavior), o = a(s.sdkSpec), n = a(o == null ? void 0 : o.spec), r = typeof (o == null ? void 0 : o.builder) == "string" ? o.builder : void 0, u = r === "semaphor.records" ? a(n == null ? void 0 : n.totals) : void 0, l = [];
437
443
  if (!t)
@@ -444,7 +450,7 @@ function F(s, i) {
444
450
  ), !u || u.mode !== "server" ? l.push(
445
451
  `${i}.sdkSpec.spec.totals.mode must be server when tableBehavior.totals.mode is server.`
446
452
  ) : l.push(
447
- ...Ve({
453
+ ...Le({
448
454
  left: d.measures,
449
455
  right: u.measures,
450
456
  leftPath: `${i}.visualSpec.tableBehavior.totals.measures`,
@@ -458,7 +464,7 @@ function F(s, i) {
458
464
  `${i}.sdkSpec.spec.totals is only allowed when tableBehavior.totals.mode is server.`
459
465
  ), l);
460
466
  }
461
- function Ve({
467
+ function Le({
462
468
  left: s,
463
469
  right: i,
464
470
  leftPath: t,
@@ -468,23 +474,23 @@ function Ve({
468
474
  return [`${o} must match ${t}.`];
469
475
  const n = [];
470
476
  return s.length !== i.length ? (n.push(`${o} must match ${t}.`), n) : (s.forEach((r, u) => {
471
- Le(
477
+ Ge(
472
478
  a(r),
473
479
  a(i[u])
474
480
  ) || n.push(`${o}.${u} must match ${t}.${u}.`);
475
481
  }), n);
476
482
  }
477
- function Le(s, i) {
478
- return !s || !i ? !1 : s.name === i.name && (s.role || "measure") === (i.role || "measure") && Q(s) === Q(i) && Ge(s, i);
483
+ function Ge(s, i) {
484
+ return !s || !i ? !1 : s.name === i.name && (s.role || "measure") === (i.role || "measure") && Y(s) === Y(i) && Ue(s, i);
479
485
  }
480
- function Q(s) {
486
+ function Y(s) {
481
487
  return typeof s.aggregate == "string" ? s.aggregate.toUpperCase() : "SUM";
482
488
  }
483
- function Ge(s, i) {
489
+ function Ue(s, i) {
484
490
  const t = a(s.source), o = a(i.source);
485
- if (Ue(t, o))
491
+ if (ze(t, o))
486
492
  return !1;
487
- const n = Y(s), r = Y(i);
493
+ const n = J(s), r = J(i);
488
494
  if (n.size > 0 || r.size > 0) {
489
495
  for (const u of n)
490
496
  if (r.has(u))
@@ -493,17 +499,17 @@ function Ge(s, i) {
493
499
  }
494
500
  return !t || !o || t.kind !== o.kind ? !1 : t.kind === "semantic" ? t.domainId === o.domainId && t.datasetName === o.datasetName && (t.datasetId === void 0 || o.datasetId === void 0 || t.datasetId === o.datasetId) : t.kind === "physical" ? t.connectionId === o.connectionId && t.tableName === o.tableName : t.kind === "sql" ? t.connectionId === o.connectionId : !1;
495
501
  }
496
- function Ue(s, i) {
502
+ function ze(s, i) {
497
503
  if (!s || !i || s.kind !== "semantic" || i.kind !== "semantic")
498
504
  return !1;
499
505
  const t = typeof s.datasetId == "string" ? s.datasetId.trim() : "", o = typeof i.datasetId == "string" ? i.datasetId.trim() : "";
500
506
  return !!(t && o && t !== o);
501
507
  }
502
- function Y(s) {
508
+ function J(s) {
503
509
  const i = typeof s.sourceKey == "string" ? s.sourceKey.trim() : "";
504
- return i ? /* @__PURE__ */ new Set([i]) : ze(a(s.source));
510
+ return i ? /* @__PURE__ */ new Set([i]) : He(a(s.source));
505
511
  }
506
- function ze(s) {
512
+ function He(s) {
507
513
  const i = /* @__PURE__ */ new Set();
508
514
  if (!s)
509
515
  return i;
@@ -524,7 +530,7 @@ function ze(s) {
524
530
  }
525
531
  return i;
526
532
  }
527
- function He(s, i) {
533
+ function Qe(s, i) {
528
534
  const t = a(s);
529
535
  if (!t)
530
536
  return [`${i} must be an object.`];
@@ -532,7 +538,7 @@ function He(s, i) {
532
538
  if (t.fieldRef && o.push(
533
539
  ...c(t.fieldRef, `${i}.fieldRef`)
534
540
  ), (typeof t.inputId != "string" || !t.inputId.trim()) && o.push(`${i}.inputId is required.`), o.push(
535
- ...ne(t.optionQuery, `${i}.optionQuery`)
541
+ ...re(t.optionQuery, `${i}.optionQuery`)
536
542
  ), g(t.appliesToViewIds) || o.push(`${i}.appliesToViewIds must be an array of strings.`), g(t.notAppliedToViewIds) || o.push(`${i}.notAppliedToViewIds must be an array of strings.`), !Array.isArray(t.bindings))
537
543
  o.push(`${i}.bindings must be an array.`);
538
544
  else {
@@ -559,7 +565,7 @@ function He(s, i) {
559
565
  }
560
566
  return o;
561
567
  }
562
- function ne(s, i) {
568
+ function re(s, i) {
563
569
  if (s === void 0)
564
570
  return [];
565
571
  const t = a(s);
@@ -579,26 +585,26 @@ function ne(s, i) {
579
585
  `${i}.filterFieldRef`
580
586
  )
581
587
  ];
582
- return t.builder !== "semaphor.inputOptions" && o.push(`${i}.builder must be semaphor.inputOptions.`), typeof t.sourceKey != "string" && t.source === void 0 && o.push(`${i} must include source or sourceKey.`), t.source !== void 0 && o.push(...k(t.source, `${i}.source`)), a(t.valueFieldRef) || o.push(`${i}.valueFieldRef is required.`), a(t.labelFieldRef) || o.push(`${i}.labelFieldRef is required.`), t.limit !== void 0 && (typeof t.limit != "number" || !Number.isInteger(t.limit) || t.limit <= 0) && o.push(`${i}.limit must be a positive integer.`), o;
588
+ return t.builder !== "semaphor.inputOptions" && o.push(`${i}.builder must be semaphor.inputOptions.`), typeof t.sourceKey != "string" && t.source === void 0 && o.push(`${i} must include source or sourceKey.`), t.source !== void 0 && o.push(...I(t.source, `${i}.source`)), a(t.valueFieldRef) || o.push(`${i}.valueFieldRef is required.`), a(t.labelFieldRef) || o.push(`${i}.labelFieldRef is required.`), t.limit !== void 0 && (typeof t.limit != "number" || !Number.isInteger(t.limit) || t.limit <= 0) && o.push(`${i}.limit must be a positive integer.`), o;
583
589
  }
584
- function Qe(s) {
590
+ function Ye(s) {
585
591
  var n;
586
592
  const i = a(s.value);
587
593
  if (!i)
588
594
  return [`${s.path} is required for executable views.`];
589
595
  const t = [];
590
- if (!le(i.builder))
596
+ if (!ue(i.builder))
591
597
  return t.push(`${s.path}.builder must be a supported SDK builder.`), t;
592
- s.sdkBuilder && i.builder !== s.sdkBuilder && t.push(`${s.path}.builder must match sdkBuilder.`), s.queryKind && S(s.queryKind) && i.builder !== ot(s.queryKind) && t.push(`${s.path}.builder must match queryKind.`);
598
+ s.sdkBuilder && i.builder !== s.sdkBuilder && t.push(`${s.path}.builder must match sdkBuilder.`), s.queryKind && w(s.queryKind) && i.builder !== nt(s.queryKind) && t.push(`${s.path}.builder must match queryKind.`);
593
599
  const o = a(i.spec);
594
600
  if (!o)
595
601
  return t.push(`${s.path}.spec must be an object.`), t;
596
602
  switch (i.builder) {
597
603
  case "semaphor.metric":
598
604
  t.push(
599
- ...$(o, ie, `${s.path}.spec`),
600
- ..._(o, s.path),
601
- ...N(o.measures, `${s.path}.spec.measures`),
605
+ ...S(o, se, `${s.path}.spec`),
606
+ ...j(o, s.path),
607
+ ...K(o.measures, `${s.path}.spec.measures`),
602
608
  ...f(
603
609
  o.primaryMeasure,
604
610
  `${s.path}.spec.primaryMeasure`
@@ -607,19 +613,19 @@ function Qe(s) {
607
613
  o.dateField,
608
614
  `${s.path}.spec.dateField`
609
615
  ),
610
- ...K(
616
+ ...T(
611
617
  o.dimensions,
612
618
  `${s.path}.spec.dimensions`
613
619
  ),
614
- ...T(o.orderBy, `${s.path}.spec.orderBy`),
615
- ...j(o.filters, `${s.path}.spec.filters`)
620
+ ...M(o.orderBy, `${s.path}.spec.orderBy`),
621
+ ...R(o.filters, `${s.path}.spec.filters`)
616
622
  );
617
623
  break;
618
624
  case "semaphor.analysis":
619
625
  t.push(
620
- ...$(o, Re, `${s.path}.spec`),
621
- ..._(o, s.path),
622
- ...N(o.measures, `${s.path}.spec.measures`),
626
+ ...S(o, Ce, `${s.path}.spec`),
627
+ ...j(o, s.path),
628
+ ...K(o.measures, `${s.path}.spec.measures`),
623
629
  ...f(
624
630
  o.primaryMeasure,
625
631
  `${s.path}.spec.primaryMeasure`
@@ -628,27 +634,27 @@ function Qe(s) {
628
634
  o.dateField,
629
635
  `${s.path}.spec.dateField`
630
636
  ),
631
- ...K(
637
+ ...T(
632
638
  o.dimensions,
633
639
  `${s.path}.spec.dimensions`
634
640
  ),
635
- ...T(o.orderBy, `${s.path}.spec.orderBy`),
636
- ...j(o.filters, `${s.path}.spec.filters`),
637
- ...Je(o, `${s.path}.spec`)
641
+ ...M(o.orderBy, `${s.path}.spec.orderBy`),
642
+ ...R(o.filters, `${s.path}.spec.filters`),
643
+ ...We(o, `${s.path}.spec`)
638
644
  );
639
645
  break;
640
646
  case "semaphor.records":
641
647
  t.push(
642
- ...$(o, Ce, `${s.path}.spec`),
643
- ..._(o, s.path),
644
- ...N(o.fields, `${s.path}.spec.fields`),
648
+ ...S(o, qe, `${s.path}.spec`),
649
+ ...j(o, s.path),
650
+ ...K(o.fields, `${s.path}.spec.fields`),
645
651
  ...f(
646
652
  o.dateField,
647
653
  `${s.path}.spec.dateField`
648
654
  ),
649
- ...T(o.orderBy, `${s.path}.spec.orderBy`),
650
- ...j(o.filters, `${s.path}.spec.filters`),
651
- ...We(
655
+ ...M(o.orderBy, `${s.path}.spec.orderBy`),
656
+ ...R(o.filters, `${s.path}.spec.filters`),
657
+ ...Xe(
652
658
  o.totals,
653
659
  `${s.path}.spec.totals`
654
660
  )
@@ -656,17 +662,17 @@ function Qe(s) {
656
662
  break;
657
663
  case "semaphor.matrix":
658
664
  t.push(
659
- ...$(o, qe, `${s.path}.spec`),
660
- ...Xe(o, s.path),
661
- ...Ze(o.rows, `${s.path}.spec.rows`),
662
- ...et(
665
+ ...S(o, xe, `${s.path}.spec`),
666
+ ...Ze(o, s.path),
667
+ ...et(o.rows, `${s.path}.spec.rows`),
668
+ ...tt(
663
669
  o.columns,
664
670
  `${s.path}.spec.columns`
665
671
  ),
666
- ...tt(o.values, `${s.path}.spec.values`),
667
- ...it(o.sort, `${s.path}.spec.sort`),
668
- ...j(o.filters, `${s.path}.spec.filters`),
669
- ...Ye(
672
+ ...it(o.values, `${s.path}.spec.values`),
673
+ ...st(o.sort, `${s.path}.spec.sort`),
674
+ ...R(o.filters, `${s.path}.spec.filters`),
675
+ ...Je(
670
676
  o.displayLimits,
671
677
  `${s.path}.spec.displayLimits`
672
678
  )
@@ -674,10 +680,10 @@ function Qe(s) {
674
680
  break;
675
681
  case "semaphor.sql":
676
682
  t.push(
677
- ...$(o, xe, `${s.path}.spec`),
678
- ..._(o, s.path)
683
+ ...S(o, Ee, `${s.path}.spec`),
684
+ ...j(o, s.path)
679
685
  ), ((n = a(o.source)) == null ? void 0 : n.kind) !== "sql" && t.push(`${s.path}.spec.source.kind must be sql.`), (typeof o.sql != "string" || !o.sql.trim()) && t.push(`${s.path}.spec.sql is required.`), t.push(
680
- ...K(
686
+ ...T(
681
687
  o.fields,
682
688
  `${s.path}.spec.fields`
683
689
  )
@@ -686,7 +692,7 @@ function Qe(s) {
686
692
  }
687
693
  return t;
688
694
  }
689
- function Ye(s, i) {
695
+ function Je(s, i) {
690
696
  if (s === void 0)
691
697
  return [];
692
698
  const t = a(s);
@@ -694,8 +700,8 @@ function Ye(s, i) {
694
700
  return [`${i} must be an object.`];
695
701
  const o = [];
696
702
  o.push(
697
- ...J(t.rows, `${i}.rows`),
698
- ...J(
703
+ ...W(t.rows, `${i}.rows`),
704
+ ...W(
699
705
  t.columns,
700
706
  `${i}.columns`
701
707
  )
@@ -704,7 +710,7 @@ function Ye(s, i) {
704
710
  n === "rows" || n === "columns" || o.push(`${i}.${n} is not supported.`);
705
711
  return o;
706
712
  }
707
- function J(s, i) {
713
+ function W(s, i) {
708
714
  if (s === void 0)
709
715
  return [];
710
716
  const t = a(s);
@@ -718,9 +724,9 @@ function J(s, i) {
718
724
  );
719
725
  return o;
720
726
  }
721
- function Je(s, i) {
727
+ function We(s, i) {
722
728
  const t = [];
723
- if (s.driverMode !== void 0 && !je.has(s.driverMode) && t.push(`${i}.driverMode must be a supported analysis driver mode.`), s.includePopulation !== void 0 && typeof s.includePopulation != "boolean" && t.push(`${i}.includePopulation must be a boolean.`), s.calendarContext !== void 0) {
729
+ if (s.driverMode !== void 0 && !Re.has(s.driverMode) && t.push(`${i}.driverMode must be a supported analysis driver mode.`), s.includePopulation !== void 0 && typeof s.includePopulation != "boolean" && t.push(`${i}.includePopulation must be a boolean.`), s.calendarContext !== void 0) {
724
730
  const o = a(s.calendarContext);
725
731
  if (!o)
726
732
  t.push(`${i}.calendarContext must be an object.`);
@@ -737,7 +743,7 @@ function Je(s, i) {
737
743
  }
738
744
  return t;
739
745
  }
740
- function We(s, i) {
746
+ function Xe(s, i) {
741
747
  if (s === void 0)
742
748
  return [];
743
749
  const t = a(s);
@@ -747,36 +753,36 @@ function We(s, i) {
747
753
  return t.mode !== "server" && o.push(`${i}.mode must be server.`), !Array.isArray(t.measures) || t.measures.length === 0 ? o.push(`${i}.measures must include at least one measure.`) : t.measures.forEach((n, r) => {
748
754
  var u;
749
755
  o.push(
750
- ...ue(
756
+ ...de(
751
757
  n,
752
758
  `${i}.measures.${r}`
753
759
  )
754
760
  ), ((u = a(n)) == null ? void 0 : u.role) !== "measure" && o.push(`${i}.measures.${r}.role must be measure.`);
755
761
  }), o;
756
762
  }
757
- function $(s, i, t) {
763
+ function S(s, i, t) {
758
764
  const o = [];
759
765
  return Object.keys(s).forEach((n) => {
760
766
  i.has(n) || o.push(`${t}.${n} is not supported for this SDK builder.`);
761
767
  }), o;
762
768
  }
763
- function _(s, i) {
764
- return a(s.source) ? k(s.source, `${i}.spec.source`) : [`${i}.spec.source must be an object.`];
769
+ function j(s, i) {
770
+ return a(s.source) ? I(s.source, `${i}.spec.source`) : [`${i}.spec.source must be an object.`];
765
771
  }
766
- function Xe(s, i) {
772
+ function Ze(s, i) {
767
773
  const t = a(s.source);
768
774
  if (!t)
769
775
  return [`${i}.spec.source must be an object.`];
770
- const o = k(s.source, `${i}.spec.source`);
776
+ const o = I(s.source, `${i}.spec.source`);
771
777
  return t.kind !== "semantic" && t.kind !== "physical" && o.push(`${i}.spec.source.kind must be semantic or physical.`), o;
772
778
  }
773
- function N(s, i) {
774
- const t = G(s, i);
779
+ function K(s, i) {
780
+ const t = U(s, i);
775
781
  return Array.isArray(s) && s.forEach((o, n) => {
776
782
  t.push(...c(o, `${i}.${n}`));
777
783
  }), t;
778
784
  }
779
- function K(s, i) {
785
+ function T(s, i) {
780
786
  if (s === void 0)
781
787
  return [];
782
788
  if (!Array.isArray(s))
@@ -786,17 +792,17 @@ function K(s, i) {
786
792
  t.push(...c(o, `${i}.${n}`));
787
793
  }), t;
788
794
  }
789
- function T(s, i) {
795
+ function M(s, i) {
790
796
  if (s === void 0)
791
797
  return [];
792
798
  const t = a(s);
793
799
  return t ? [
794
800
  ...c(t.field, `${i}.field`),
795
- ...re(t.direction, `${i}.direction`)
801
+ ...ae(t.direction, `${i}.direction`)
796
802
  ] : [`${i} must be an object.`];
797
803
  }
798
- function Ze(s, i) {
799
- const t = G(s, i);
804
+ function et(s, i) {
805
+ const t = U(s, i);
800
806
  return Array.isArray(s) && s.forEach((o, n) => {
801
807
  const r = a(o);
802
808
  if (!r) {
@@ -808,7 +814,7 @@ function Ze(s, i) {
808
814
  );
809
815
  }), t;
810
816
  }
811
- function et(s, i) {
817
+ function tt(s, i) {
812
818
  if (s === void 0)
813
819
  return [];
814
820
  const t = [];
@@ -823,8 +829,8 @@ function et(s, i) {
823
829
  );
824
830
  }), t) : [`${i} must be an array.`];
825
831
  }
826
- function tt(s, i) {
827
- const t = G(s, i);
832
+ function it(s, i) {
833
+ const t = U(s, i);
828
834
  return Array.isArray(s) && s.forEach((o, n) => {
829
835
  const r = a(o);
830
836
  if (!r) {
@@ -836,7 +842,7 @@ function tt(s, i) {
836
842
  );
837
843
  }), t;
838
844
  }
839
- function it(s, i) {
845
+ function st(s, i) {
840
846
  if (s === void 0)
841
847
  return [];
842
848
  if (!Array.isArray(s))
@@ -849,12 +855,12 @@ function it(s, i) {
849
855
  return;
850
856
  }
851
857
  r.axis !== "row" && r.axis !== "column" && t.push(`${i}.${n}.axis must be row or column.`), t.push(
852
- ...re(r.direction, `${i}.${n}.direction`),
853
- ...st(r.by, `${i}.${n}.by`)
858
+ ...ae(r.direction, `${i}.${n}.direction`),
859
+ ...ot(r.by, `${i}.${n}.by`)
854
860
  );
855
861
  }), t;
856
862
  }
857
- function st(s, i) {
863
+ function ot(s, i) {
858
864
  const t = a(s);
859
865
  if (!t)
860
866
  return [`${i} must be an object.`];
@@ -869,10 +875,10 @@ function st(s, i) {
869
875
  return [`${i}.kind must be label, field, or value.`];
870
876
  }
871
877
  }
872
- function re(s, i) {
878
+ function ae(s, i) {
873
879
  return s === "asc" || s === "desc" ? [] : [`${i} must be asc or desc.`];
874
880
  }
875
- function j(s, i) {
881
+ function R(s, i) {
876
882
  if (s === void 0)
877
883
  return [];
878
884
  if (!Array.isArray(s))
@@ -887,10 +893,10 @@ function j(s, i) {
887
893
  t.push(...c(r.field, `${i}.${n}.field`));
888
894
  }), t;
889
895
  }
890
- function G(s, i) {
896
+ function U(s, i) {
891
897
  return !Array.isArray(s) || s.length === 0 ? [`${i} must be a non-empty array.`] : [];
892
898
  }
893
- function ot(s) {
899
+ function nt(s) {
894
900
  switch (s) {
895
901
  case "metric":
896
902
  return "semaphor.metric";
@@ -904,56 +910,56 @@ function ot(s) {
904
910
  return "semaphor.sql";
905
911
  }
906
912
  }
907
- function nt(s) {
913
+ function rt(s) {
908
914
  const i = a(s.computation), t = a(s.visualSpec);
909
915
  return (i == null ? void 0 : i.kind) === "presentation_only" || (i == null ? void 0 : i.kind) === "derived" || (i == null ? void 0 : i.kind) === "unsupported" || s.visual === "text_block" || (t == null ? void 0 : t.visualType) === "text_block";
910
916
  }
911
- function rt(s, i) {
917
+ function at(s, i) {
912
918
  const t = a(s);
913
919
  if (!t)
914
920
  return [`${i} must be an object.`];
915
921
  const o = [];
916
- return Ee.has(t.visualType) || o.push(`${i}.visualType must be a supported visual type.`), t.limit !== void 0 && (typeof t.limit != "number" || !Number.isInteger(t.limit) || t.limit <= 0) && o.push(`${i}.limit must be a positive integer.`), t.tableBehavior !== void 0 && o.push(
917
- ...at(
922
+ return Fe.has(t.visualType) || o.push(`${i}.visualType must be a supported visual type.`), t.limit !== void 0 && (typeof t.limit != "number" || !Number.isInteger(t.limit) || t.limit <= 0) && o.push(`${i}.limit must be a positive integer.`), t.tableBehavior !== void 0 && o.push(
923
+ ...lt(
918
924
  t.tableBehavior,
919
925
  `${i}.tableBehavior`
920
926
  )
921
927
  ), o;
922
928
  }
923
- function at(s, i) {
929
+ function lt(s, i) {
924
930
  const t = a(s);
925
931
  if (!t)
926
932
  return [`${i} must be an object.`];
927
933
  const o = [];
928
934
  return t.tableMode !== "bounded" && t.tableMode !== "server_paginated" && t.tableMode !== "server_windowed" && o.push(`${i}.tableMode must be a supported table mode.`), o.push(
929
- ...lt(t.height, `${i}.height`),
930
- ...ut(t.pagination, `${i}.pagination`),
931
- ...dt(t.sorting, `${i}.sorting`),
932
- ...ct(t.totals, `${i}.totals`)
935
+ ...ut(t.height, `${i}.height`),
936
+ ...dt(t.pagination, `${i}.pagination`),
937
+ ...ct(t.sorting, `${i}.sorting`),
938
+ ...pt(t.totals, `${i}.totals`)
933
939
  ), typeof t.serverSideRequired != "boolean" && o.push(`${i}.serverSideRequired must be a boolean.`), o;
934
940
  }
935
- function lt(s, i) {
941
+ function ut(s, i) {
936
942
  const t = a(s);
937
943
  if (!t)
938
944
  return [`${i} must be an object.`];
939
945
  const o = [];
940
946
  return (typeof t.maxPx != "number" || !Number.isInteger(t.maxPx) || t.maxPx <= 0) && o.push(`${i}.maxPx must be a positive integer.`), t.scroll !== "vertical" && t.scroll !== "both" && o.push(`${i}.scroll must be vertical or both.`), typeof t.stickyHeader != "boolean" && o.push(`${i}.stickyHeader must be a boolean.`), o;
941
947
  }
942
- function ut(s, i) {
948
+ function dt(s, i) {
943
949
  const t = a(s);
944
950
  if (!t)
945
951
  return [`${i} must be an object.`];
946
952
  const o = [];
947
953
  return t.mode !== "none" && t.mode !== "server" && t.mode !== "client_for_bounded_rows" && o.push(`${i}.mode must be a supported pagination mode.`), t.pageSize !== void 0 && (typeof t.pageSize != "number" || !Number.isInteger(t.pageSize) || t.pageSize <= 0) && o.push(`${i}.pageSize must be a positive integer.`), t.readsFrom !== void 0 && t.readsFrom !== "result.pagination" && o.push(`${i}.readsFrom must be result.pagination.`), o;
948
954
  }
949
- function dt(s, i) {
955
+ function ct(s, i) {
950
956
  const t = a(s);
951
957
  if (!t)
952
958
  return [`${i} must be an object.`];
953
959
  const o = [];
954
960
  return t.mode !== "server" && t.mode !== "client_for_bounded_rows" && o.push(`${i}.mode must be a supported sorting mode.`), t.defaultField !== void 0 && (typeof t.defaultField != "string" || !t.defaultField.trim()) && o.push(`${i}.defaultField must be a non-empty string.`), t.defaultDirection !== void 0 && t.defaultDirection !== "asc" && t.defaultDirection !== "desc" && o.push(`${i}.defaultDirection must be asc or desc.`), t.resetPageOnChange !== void 0 && typeof t.resetPageOnChange != "boolean" && o.push(`${i}.resetPageOnChange must be a boolean.`), o;
955
961
  }
956
- function ct(s, i) {
962
+ function pt(s, i) {
957
963
  const t = a(s);
958
964
  if (!t)
959
965
  return [`${i} must be an object.`];
@@ -961,21 +967,21 @@ function ct(s, i) {
961
967
  return t.mode !== "none" && t.mode !== "server" && t.mode !== "local" ? (o.push(`${i}.mode must be none, server, or local.`), o) : t.mode === "none" ? (t.measures !== void 0 && o.push(`${i}.measures is not allowed when mode is none.`), t.label !== void 0 && o.push(`${i}.label is not allowed when mode is none.`), o) : t.mode === "server" ? (!Array.isArray(t.measures) || t.measures.length === 0 ? o.push(`${i}.measures must include at least one measure when mode is server.`) : t.measures.forEach((n, r) => {
962
968
  var u;
963
969
  o.push(
964
- ...ue(
970
+ ...de(
965
971
  n,
966
972
  `${i}.measures.${r}`
967
973
  )
968
974
  ), ((u = a(n)) == null ? void 0 : u.role) !== "measure" && o.push(`${i}.measures.${r}.role must be measure.`);
969
975
  }), t.label !== void 0 && o.push(`${i}.label is not allowed when mode is server.`), o) : (t.mode === "local" && (t.label !== "Displayed rows" && t.label !== "Current page" && o.push(`${i}.label must be Displayed rows or Current page when mode is local.`), t.measures !== void 0 && o.push(`${i}.measures is not allowed when mode is local.`)), o);
970
976
  }
971
- function pt(s, i) {
977
+ function mt(s, i) {
972
978
  const t = a(s);
973
979
  if (!t)
974
980
  return [`${i} must be an object.`];
975
981
  const o = [];
976
982
  switch (t.kind) {
977
983
  case "server_query":
978
- S(t.queryKind) || o.push(`${i}.queryKind must be a supported codegen query kind.`), t.queryOwnership !== void 0 && t.queryOwnership !== "view_owned" && t.queryOwnership !== "shared_query" && o.push(
984
+ w(t.queryKind) || o.push(`${i}.queryKind must be a supported codegen query kind.`), t.queryOwnership !== void 0 && t.queryOwnership !== "view_owned" && t.queryOwnership !== "shared_query" && o.push(
979
985
  `${i}.queryOwnership must be view_owned or shared_query.`
980
986
  ), t.sourceKeys !== void 0 && !g(t.sourceKeys) && o.push(`${i}.sourceKeys must be an array of strings.`), t.fieldNames !== void 0 && !g(t.fieldNames) && o.push(`${i}.fieldNames must be an array of strings.`);
981
987
  break;
@@ -992,34 +998,34 @@ function pt(s, i) {
992
998
  }
993
999
  return o;
994
1000
  }
995
- function mt(s, i) {
1001
+ function gt(s, i) {
996
1002
  const t = a(s);
997
1003
  if (!t)
998
1004
  return [`${i} must be an object.`];
999
1005
  const o = [];
1000
1006
  for (const r of ["title", "requestedQuestion", "suggestedModelingFix"])
1001
1007
  (typeof t[r] != "string" || !t[r].trim()) && o.push(`${i}.${r} is required.`);
1002
- return Fe.has(t.reason) || o.push(`${i}.reason must be a supported unsupported insight reason.`), (t.relationshipCandidate !== void 0 || t.nextRepairAction !== void 0) && t.reason !== "missing_relationship" && o.push(
1008
+ return Ne.has(t.reason) || o.push(`${i}.reason must be a supported unsupported insight reason.`), (t.relationshipCandidate !== void 0 || t.nextRepairAction !== void 0) && t.reason !== "missing_relationship" && o.push(
1003
1009
  `${i} relationship repair metadata is only valid for missing_relationship unsupported insights.`
1004
1010
  ), t.diagnostic !== void 0 && o.push(
1005
- ...gt(
1011
+ ...ft(
1006
1012
  t.diagnostic,
1007
1013
  `${i}.diagnostic`,
1008
1014
  t.reason
1009
1015
  )
1010
1016
  ), t.relationshipCandidate !== void 0 && o.push(
1011
- ...ht(
1017
+ ...yt(
1012
1018
  t.relationshipCandidate,
1013
1019
  `${i}.relationshipCandidate`
1014
1020
  )
1015
1021
  ), t.nextRepairAction !== void 0 && o.push(
1016
- ...ft(
1022
+ ...ht(
1017
1023
  t.nextRepairAction,
1018
1024
  `${i}.nextRepairAction`
1019
1025
  )
1020
1026
  ), o;
1021
1027
  }
1022
- function gt(s, i, t) {
1028
+ function ft(s, i, t) {
1023
1029
  const o = a(s);
1024
1030
  if (!o)
1025
1031
  return [`${i} must be an object.`];
@@ -1041,12 +1047,12 @@ function gt(s, i, t) {
1041
1047
  for (const l of ["inputId", "inputLabel"])
1042
1048
  (typeof o[l] != "string" || !o[l].trim()) && n.push(`${i}.${l} must be a non-empty string.`);
1043
1049
  n.push(
1044
- ...O(
1050
+ ...P(
1045
1051
  o.optionSource,
1046
1052
  `${i}.optionSource`
1047
1053
  )
1048
1054
  ), n.push(
1049
- ...ae(
1055
+ ...le(
1050
1056
  o.optionField,
1051
1057
  `${i}.optionField`
1052
1058
  )
@@ -1061,7 +1067,7 @@ function gt(s, i, t) {
1061
1067
  );
1062
1068
  }), n;
1063
1069
  }
1064
- function ft(s, i) {
1070
+ function ht(s, i) {
1065
1071
  const t = a(s);
1066
1072
  if (!t)
1067
1073
  return [`${i} must be an object.`];
@@ -1074,7 +1080,7 @@ function ft(s, i) {
1074
1080
  `${i}.tool must be semaphor_propose_semantic_model_change.`
1075
1081
  ), t.reason !== "missing_relationship" && o.push(`${i}.reason must be missing_relationship.`), o;
1076
1082
  }
1077
- function ht(s, i) {
1083
+ function yt(s, i) {
1078
1084
  const t = a(s);
1079
1085
  if (!t)
1080
1086
  return [`${i} must be an object.`];
@@ -1084,9 +1090,9 @@ function ht(s, i) {
1084
1090
  `${i}.${r} is not supported; relationship candidates support only source, sourceFields, target, and targetFields.`
1085
1091
  );
1086
1092
  }), o.push(
1087
- ...O(t.source, `${i}.source`)
1093
+ ...P(t.source, `${i}.source`)
1088
1094
  ), o.push(
1089
- ...O(t.target, `${i}.target`)
1095
+ ...P(t.target, `${i}.target`)
1090
1096
  );
1091
1097
  for (const r of ["sourceFields", "targetFields"]) {
1092
1098
  const u = t[r];
@@ -1096,13 +1102,13 @@ function ht(s, i) {
1096
1102
  }
1097
1103
  u.forEach((l, d) => {
1098
1104
  o.push(
1099
- ...ae(l, `${i}.${r}.${d}`)
1105
+ ...le(l, `${i}.${r}.${d}`)
1100
1106
  );
1101
1107
  });
1102
1108
  }
1103
1109
  return o;
1104
1110
  }
1105
- function ae(s, i) {
1111
+ function le(s, i) {
1106
1112
  const t = a(s);
1107
1113
  if (!t)
1108
1114
  return [`${i} must be an object.`];
@@ -1117,7 +1123,7 @@ function ae(s, i) {
1117
1123
  `${i}.dataType must be string, number, boolean, date, datetime, or unknown.`
1118
1124
  ), o;
1119
1125
  }
1120
- function O(s, i) {
1126
+ function P(s, i) {
1121
1127
  const t = a(s);
1122
1128
  if (!t)
1123
1129
  return [`${i} must be an object.`];
@@ -1135,12 +1141,12 @@ function O(s, i) {
1135
1141
  );
1136
1142
  }), t.kind !== "semantic" && o.push(`${i} must use semantic source identity.`), (typeof t.domainId != "string" || !t.domainId.trim() || typeof t.datasetName != "string" || !t.datasetName.trim()) && o.push(`${i} must include semantic domainId and datasetName.`), o;
1137
1143
  }
1138
- function S(s) {
1139
- return Ie.has(s);
1140
- }
1141
- function le(s) {
1144
+ function w(s) {
1142
1145
  return Ae.has(s);
1143
1146
  }
1147
+ function ue(s) {
1148
+ return _e.has(s);
1149
+ }
1144
1150
  function f(s, i) {
1145
1151
  return s === void 0 ? [] : c(s, i);
1146
1152
  }
@@ -1149,14 +1155,14 @@ function c(s, i) {
1149
1155
  if (!t)
1150
1156
  return [`${i} must be an object.`];
1151
1157
  const o = [];
1152
- return (typeof t.name != "string" || !t.name.trim()) && o.push(`${i}.name is required.`), !t.source && typeof t.sourceKey != "string" && o.push(`${i} must include source or sourceKey.`), t.aggregate !== void 0 && !_e.has(t.aggregate) && o.push(`${i}.aggregate must be a supported aggregate function.`), o;
1158
+ return (typeof t.name != "string" || !t.name.trim()) && o.push(`${i}.name is required.`), !t.source && typeof t.sourceKey != "string" && o.push(`${i} must include source or sourceKey.`), t.aggregate !== void 0 && !je.has(t.aggregate) && o.push(`${i}.aggregate must be a supported aggregate function.`), o;
1153
1159
  }
1154
- function ue(s, i) {
1160
+ function de(s, i) {
1155
1161
  const t = a(s), o = c(s, i);
1156
1162
  if (!t || typeof t.sourceKey == "string" && t.sourceKey.trim())
1157
1163
  return o;
1158
1164
  if (t.source !== void 0) {
1159
- const r = k(t.source, `${i}.source`);
1165
+ const r = I(t.source, `${i}.source`);
1160
1166
  return r.length === 0 || o.push(...r), o;
1161
1167
  }
1162
1168
  return o.includes(`${i} must include source or sourceKey.`) || o.push(`${i} must include source or sourceKey.`), o;
@@ -1167,7 +1173,7 @@ function a(s) {
1167
1173
  function g(s) {
1168
1174
  return Array.isArray(s) && s.every((i) => typeof i == "string");
1169
1175
  }
1170
- const p = e.record(e.string(), e.unknown()), C = e.array(p), m = e.enum([
1176
+ const p = e.record(e.string(), e.unknown()), q = e.array(p), m = e.enum([
1171
1177
  "SUM",
1172
1178
  "COUNT",
1173
1179
  "AVG",
@@ -1175,7 +1181,7 @@ const p = e.record(e.string(), e.unknown()), C = e.array(p), m = e.enum([
1175
1181
  "MAX",
1176
1182
  "MEDIAN",
1177
1183
  "DISTINCT"
1178
- ]), q = e.enum([
1184
+ ]), x = e.enum([
1179
1185
  "postgres",
1180
1186
  "mysql",
1181
1187
  "mssql",
@@ -1186,33 +1192,33 @@ const p = e.record(e.string(), e.unknown()), C = e.array(p), m = e.enum([
1186
1192
  "duckdb",
1187
1193
  "sqlite",
1188
1194
  "unknown"
1189
- ]), de = e.enum([
1195
+ ]), ce = e.enum([
1190
1196
  "hour",
1191
1197
  "day",
1192
1198
  "week",
1193
1199
  "month",
1194
1200
  "quarter",
1195
1201
  "year"
1196
- ]), x = e.enum([
1202
+ ]), E = e.enum([
1197
1203
  "dimension",
1198
1204
  "measure",
1199
1205
  "date",
1200
1206
  "id",
1201
1207
  "unknown"
1202
- ]), E = e.enum([
1208
+ ]), F = e.enum([
1203
1209
  "string",
1204
1210
  "number",
1205
1211
  "boolean",
1206
1212
  "date",
1207
1213
  "datetime",
1208
1214
  "unknown"
1209
- ]), R = e.union([e.number(), e.string(), e.null()]), M = e.enum([
1215
+ ]), C = e.union([e.number(), e.string(), e.null()]), B = e.enum([
1210
1216
  "millisecond",
1211
1217
  "second",
1212
1218
  "minute",
1213
1219
  "hour",
1214
1220
  "day"
1215
- ]), ce = e.union([
1221
+ ]), pe = e.union([
1216
1222
  e.object({
1217
1223
  type: e.enum(["number", "currency", "percent", "percentage", "scientific"]),
1218
1224
  locale: e.string().optional(),
@@ -1239,10 +1245,10 @@ const p = e.record(e.string(), e.unknown()), C = e.array(p), m = e.enum([
1239
1245
  }).passthrough(),
1240
1246
  e.object({
1241
1247
  type: e.literal("duration"),
1242
- inputUnit: M.optional(),
1248
+ inputUnit: B.optional(),
1243
1249
  outputStyle: e.enum(["compact", "digital", "long"]).optional(),
1244
- largestUnit: M.optional(),
1245
- smallestUnit: M.optional(),
1250
+ largestUnit: B.optional(),
1251
+ smallestUnit: B.optional(),
1246
1252
  maxUnits: e.number().optional(),
1247
1253
  prefix: e.string().optional(),
1248
1254
  suffix: e.string().optional(),
@@ -1253,7 +1259,7 @@ const p = e.record(e.string(), e.unknown()), C = e.array(p), m = e.enum([
1253
1259
  prefix: e.string().optional(),
1254
1260
  suffix: e.string().optional()
1255
1261
  }).passthrough()
1256
- ]), yt = e.union([
1262
+ ]), bt = e.union([
1257
1263
  e.object({ kind: e.literal("defaultAggregate") }).passthrough(),
1258
1264
  e.object({ kind: e.literal("blank") }).passthrough(),
1259
1265
  e.object({
@@ -1271,7 +1277,7 @@ const p = e.record(e.string(), e.unknown()), C = e.array(p), m = e.enum([
1271
1277
  expressionId: e.string()
1272
1278
  }).passthrough()
1273
1279
  ]);
1274
- function I(s, i) {
1280
+ function A(s, i) {
1275
1281
  return e.object(s).passthrough().superRefine((t, o) => {
1276
1282
  for (const n of i)
1277
1283
  Object.prototype.hasOwnProperty.call(t, n) || o.addIssue({
@@ -1281,14 +1287,14 @@ function I(s, i) {
1281
1287
  });
1282
1288
  });
1283
1289
  }
1284
- const pe = e.object({
1290
+ const me = e.object({
1285
1291
  kind: e.literal("semantic"),
1286
1292
  domainId: e.string(),
1287
1293
  datasetName: e.string(),
1288
1294
  datasetId: e.string().optional(),
1289
1295
  label: e.string().optional(),
1290
1296
  connectionId: e.string().optional()
1291
- }).passthrough(), bt = e.object({
1297
+ }).passthrough(), vt = e.object({
1292
1298
  kind: e.literal("physical"),
1293
1299
  connectionId: e.string(),
1294
1300
  connectionType: e.string().optional(),
@@ -1296,38 +1302,38 @@ const pe = e.object({
1296
1302
  databaseName: e.string().optional(),
1297
1303
  schemaName: e.string().optional(),
1298
1304
  label: e.string().optional(),
1299
- dialect: q.optional()
1300
- }).passthrough(), vt = e.object({
1305
+ dialect: x.optional()
1306
+ }).passthrough(), $t = e.object({
1301
1307
  kind: e.literal("sql"),
1302
1308
  connectionId: e.string(),
1303
- dialect: q.optional(),
1309
+ dialect: x.optional(),
1304
1310
  label: e.string().optional()
1305
- }).passthrough(), w = e.union([
1306
- pe,
1307
- bt,
1308
- vt
1309
- ]), v = e.object({
1311
+ }).passthrough(), k = e.union([
1312
+ me,
1313
+ vt,
1314
+ $t
1315
+ ]), $ = e.object({
1310
1316
  name: e.string(),
1311
1317
  label: e.string().optional(),
1312
- role: x.optional(),
1313
- dataType: E.optional(),
1314
- source: w.optional(),
1318
+ role: E.optional(),
1319
+ dataType: F.optional(),
1320
+ source: k.optional(),
1315
1321
  aggregate: m.optional()
1316
- }).passthrough(), $t = e.object({
1322
+ }).passthrough(), St = e.object({
1317
1323
  kind: e.literal("field"),
1318
- field: v,
1324
+ field: $,
1319
1325
  aggregate: m.optional()
1320
- }).passthrough(), me = e.object({
1326
+ }).passthrough(), ge = e.object({
1321
1327
  kind: e.literal("derived_field"),
1322
1328
  name: e.string(),
1323
1329
  label: e.string(),
1324
1330
  description: e.string().optional(),
1325
- resultRole: x,
1326
- dataType: E,
1331
+ resultRole: E,
1332
+ dataType: F,
1327
1333
  computeStage: e.enum(["row", "aggregate"]),
1328
1334
  expression: e.string(),
1329
1335
  expressionLanguage: e.literal("semaphor_sql_template").optional(),
1330
- inputs: e.record($t),
1336
+ inputs: e.record(St),
1331
1337
  defaultAggregate: m.optional(),
1332
1338
  aggregationBehavior: e.enum([
1333
1339
  "additive",
@@ -1343,13 +1349,13 @@ const pe = e.object({
1343
1349
  "aggregate_then_join",
1344
1350
  "weighted"
1345
1351
  ]).optional(),
1346
- format: ce.optional(),
1352
+ format: pe.optional(),
1347
1353
  tags: e.array(e.string()).optional()
1348
- }).passthrough(), U = v.and(
1354
+ }).passthrough(), z = $.and(
1349
1355
  e.object({
1350
- derivedField: me.optional()
1356
+ derivedField: ge.optional()
1351
1357
  }).passthrough()
1352
- ), St = pe, wt = e.object({
1358
+ ), wt = me, kt = e.object({
1353
1359
  kind: e.literal("physical"),
1354
1360
  connectionId: e.string().optional(),
1355
1361
  connectionType: e.string().optional(),
@@ -1357,35 +1363,35 @@ const pe = e.object({
1357
1363
  databaseName: e.string().optional(),
1358
1364
  schemaName: e.string().optional(),
1359
1365
  label: e.string().optional(),
1360
- dialect: q.optional()
1361
- }).passthrough(), kt = e.object({
1366
+ dialect: x.optional()
1367
+ }).passthrough(), It = e.object({
1362
1368
  kind: e.literal("sql"),
1363
1369
  connectionId: e.string().optional(),
1364
- dialect: q.optional(),
1370
+ dialect: x.optional(),
1365
1371
  label: e.string().optional()
1366
- }).passthrough(), It = e.union([
1367
- St,
1372
+ }).passthrough(), At = e.union([
1368
1373
  wt,
1369
- kt
1370
- ]), At = e.object({
1374
+ kt,
1375
+ It
1376
+ ]), _t = e.object({
1371
1377
  key: e.string().optional(),
1372
1378
  name: e.string(),
1373
1379
  label: e.string().optional(),
1374
- role: x.optional(),
1375
- dataType: E.optional(),
1376
- source: It.optional(),
1380
+ role: E.optional(),
1381
+ dataType: F.optional(),
1382
+ source: At.optional(),
1377
1383
  aggregate: m.optional(),
1378
1384
  derivedField: e.never().optional()
1379
- }).passthrough(), P = e.object({
1385
+ }).passthrough(), V = e.object({
1380
1386
  key: e.string(),
1381
1387
  name: e.string(),
1382
1388
  label: e.string(),
1383
- role: x.optional(),
1384
- dataType: E.optional(),
1389
+ role: E.optional(),
1390
+ dataType: F.optional(),
1385
1391
  aggregate: m.optional(),
1386
- source: w.optional(),
1387
- derivedField: me.optional()
1388
- }).passthrough(), ge = e.object({
1392
+ source: k.optional(),
1393
+ derivedField: ge.optional()
1394
+ }).passthrough(), fe = e.object({
1389
1395
  code: e.string(),
1390
1396
  message: e.string().optional(),
1391
1397
  invalidField: e.string().optional(),
@@ -1394,61 +1400,61 @@ const pe = e.object({
1394
1400
  validDateCandidates: e.array(e.string()).optional(),
1395
1401
  validDimensionCandidates: e.array(e.string()).optional(),
1396
1402
  recommendedNextStep: e.string()
1397
- }).passthrough(), V = e.object({
1403
+ }).passthrough(), L = e.object({
1398
1404
  code: e.string(),
1399
1405
  message: e.string(),
1400
1406
  path: e.string().optional(),
1401
1407
  fieldRole: e.enum(["measure", "date", "dimension", "input", "source", "sql"]).optional(),
1402
- repairHint: ge.optional()
1403
- }).passthrough(), fe = e.object({
1408
+ repairHint: fe.optional()
1409
+ }).passthrough(), he = e.object({
1404
1410
  ok: e.boolean(),
1405
- errors: e.array(V),
1406
- warnings: e.array(V),
1407
- repairHints: e.array(ge)
1408
- }).passthrough(), _t = e.object({
1411
+ errors: e.array(L),
1412
+ warnings: e.array(L),
1413
+ repairHints: e.array(fe)
1414
+ }).passthrough(), jt = e.object({
1409
1415
  page: e.number(),
1410
1416
  pageSize: e.number(),
1411
1417
  pageCount: e.number(),
1412
1418
  totalCount: e.number(),
1413
1419
  hasNextPage: e.boolean(),
1414
1420
  hasPrevPage: e.boolean()
1415
- }).passthrough(), A = {
1421
+ }).passthrough(), _ = {
1416
1422
  intentId: e.string().optional(),
1417
1423
  queryPath: e.enum(["query_spec", "sql", "sql_python"]),
1418
1424
  warnings: e.array(e.string()).optional(),
1419
1425
  rowCount: e.number().optional(),
1420
1426
  rowLimitExceeded: e.boolean().optional(),
1421
1427
  limit: e.number().optional(),
1422
- pagination: _t.optional()
1423
- }, jt = e.object({
1424
- ...A,
1428
+ pagination: jt.optional()
1429
+ }, Rt = e.object({
1430
+ ..._,
1425
1431
  kind: e.literal("metric"),
1426
- primaryValue: R,
1427
- measures: e.record(R).optional(),
1432
+ primaryValue: C,
1433
+ measures: e.record(C).optional(),
1428
1434
  missingMeasures: e.array(e.string()).optional(),
1429
1435
  comparison: e.object({
1430
1436
  kind: e.enum(["previous_period", "previous_year", "target"]),
1431
- value: R.optional(),
1437
+ value: C.optional(),
1432
1438
  delta: e.union([e.number(), e.null()]).optional(),
1433
1439
  deltaPercent: e.union([e.number(), e.null()]).optional()
1434
1440
  }).passthrough().optional(),
1435
- records: C.optional()
1436
- }).passthrough(), Rt = e.object({
1437
- ...A,
1441
+ records: q.optional()
1442
+ }).passthrough(), Ct = e.object({
1443
+ ..._,
1438
1444
  kind: e.literal("records"),
1439
- columns: e.array(P),
1440
- records: C,
1445
+ columns: e.array(V),
1446
+ records: q,
1441
1447
  totals: e.object({
1442
1448
  mode: e.literal("server"),
1443
1449
  scope: e.literal("filtered_result"),
1444
1450
  row: e.record(e.string(), e.unknown()),
1445
- columns: e.array(P).optional()
1451
+ columns: e.array(V).optional()
1446
1452
  }).passthrough().optional()
1447
- }).passthrough(), Ct = e.object({
1448
- ...A,
1453
+ }).passthrough(), qt = e.object({
1454
+ ..._,
1449
1455
  kind: e.literal("inputOptions"),
1450
1456
  options: e.array(
1451
- I(
1457
+ A(
1452
1458
  {
1453
1459
  label: e.string(),
1454
1460
  value: e.unknown(),
@@ -1458,34 +1464,34 @@ const pe = e.object({
1458
1464
  ["value"]
1459
1465
  )
1460
1466
  )
1461
- }).passthrough(), qt = e.object({
1462
- ...A,
1467
+ }).passthrough(), xt = e.object({
1468
+ ..._,
1463
1469
  kind: e.literal("sql"),
1464
- columns: e.array(P),
1465
- records: C,
1470
+ columns: e.array(V),
1471
+ records: q,
1466
1472
  sqlShape: e.object({
1467
1473
  statementType: e.string().optional(),
1468
1474
  explicitLimit: e.number().optional(),
1469
1475
  hasPythonCode: e.boolean().optional()
1470
1476
  }).passthrough().optional()
1471
- }).passthrough(), xt = e.object({
1477
+ }).passthrough(), Et = e.object({
1472
1478
  enabled: e.boolean().optional(),
1473
1479
  position: e.enum(["before", "after"]).optional(),
1474
1480
  label: e.string().optional()
1475
- }).passthrough(), W = e.object({
1481
+ }).passthrough(), X = e.object({
1476
1482
  id: e.enum(["rows", "columns"]),
1477
1483
  levels: e.array(
1478
1484
  e.object({
1479
1485
  instanceId: e.string(),
1480
1486
  fieldKey: e.string(),
1481
1487
  label: e.string(),
1482
- field: v,
1483
- grain: de.optional(),
1484
- subtotal: xt.optional()
1488
+ field: $,
1489
+ grain: ce.optional(),
1490
+ subtotal: Et.optional()
1485
1491
  }).passthrough()
1486
1492
  ),
1487
1493
  nodeIds: e.array(e.string())
1488
- }).passthrough(), b = I(
1494
+ }).passthrough(), v = A(
1489
1495
  {
1490
1496
  instanceId: e.string(),
1491
1497
  fieldKey: e.string(),
@@ -1493,25 +1499,25 @@ const pe = e.object({
1493
1499
  label: e.string()
1494
1500
  },
1495
1501
  ["value"]
1496
- ), Et = e.union([
1502
+ ), Ft = e.union([
1497
1503
  e.object({ kind: e.literal("label") }).passthrough(),
1498
1504
  e.object({
1499
1505
  kind: e.literal("field"),
1500
- field: v,
1506
+ field: $,
1501
1507
  aggregate: m.optional()
1502
1508
  }).passthrough(),
1503
1509
  e.object({
1504
1510
  kind: e.literal("value"),
1505
1511
  valueId: e.string(),
1506
- rowPath: e.array(b).optional(),
1507
- columnPath: e.array(b).optional()
1512
+ rowPath: e.array(v).optional(),
1513
+ columnPath: e.array(v).optional()
1508
1514
  }).passthrough()
1509
- ]), Ft = e.enum([
1515
+ ]), Nt = e.enum([
1510
1516
  "present",
1511
1517
  "presentNull",
1512
1518
  "missing",
1513
1519
  "densified"
1514
- ]), Nt = e.enum([
1520
+ ]), Kt = e.enum([
1515
1521
  "value",
1516
1522
  "rowSubtotal",
1517
1523
  "columnSubtotal",
@@ -1519,13 +1525,13 @@ const pe = e.object({
1519
1525
  "rowGrandTotal",
1520
1526
  "columnGrandTotal",
1521
1527
  "matrixGrandTotal"
1522
- ]), Kt = e.object({
1528
+ ]), Tt = e.object({
1523
1529
  instanceId: e.string(),
1524
1530
  fieldKey: e.string(),
1525
- field: v,
1531
+ field: $,
1526
1532
  role: e.enum(["row", "column", "measure", "sort", "filter"]),
1527
1533
  label: e.string().optional()
1528
- }).passthrough(), Tt = e.union([
1534
+ }).passthrough(), Mt = e.union([
1529
1535
  e.object({
1530
1536
  kind: e.literal("additive"),
1531
1537
  aggregate: m.optional()
@@ -1533,7 +1539,7 @@ const pe = e.object({
1533
1539
  e.object({
1534
1540
  kind: e.literal("semiAdditive"),
1535
1541
  aggregate: m.optional(),
1536
- grain: de.optional()
1542
+ grain: ce.optional()
1537
1543
  }).passthrough(),
1538
1544
  e.object({
1539
1545
  kind: e.literal("nonAdditive"),
@@ -1548,15 +1554,15 @@ const pe = e.object({
1548
1554
  kind: e.literal("custom"),
1549
1555
  expressionId: e.string().optional()
1550
1556
  }).passthrough()
1551
- ]), Mt = e.object({
1557
+ ]), Bt = e.object({
1552
1558
  instanceId: e.string(),
1553
1559
  fieldKey: e.string(),
1554
1560
  label: e.string(),
1555
- field: v,
1561
+ field: $,
1556
1562
  aggregate: m.optional(),
1557
- format: ce.optional(),
1558
- totalBehavior: yt.optional(),
1559
- semantics: Tt
1563
+ format: pe.optional(),
1564
+ totalBehavior: bt.optional(),
1565
+ semantics: Mt
1560
1566
  }).passthrough(), Dt = e.object({
1561
1567
  id: e.string(),
1562
1568
  measureId: e.string(),
@@ -1578,15 +1584,15 @@ const pe = e.object({
1578
1584
  rowNodeId: e.string().optional(),
1579
1585
  columnNodeId: e.string().optional()
1580
1586
  }).passthrough().optional()
1581
- }).passthrough(), Bt = e.object({
1587
+ }).passthrough(), Ot = e.object({
1582
1588
  kind: e.string(),
1583
1589
  label: e.string().optional(),
1584
1590
  payload: e.record(e.string(), e.unknown()).optional()
1585
- }).passthrough(), Ot = I(
1591
+ }).passthrough(), Pt = A(
1586
1592
  {
1587
1593
  id: e.string(),
1588
1594
  axis: e.enum(["row", "column"]),
1589
- path: e.array(b),
1595
+ path: e.array(v),
1590
1596
  level: e.number(),
1591
1597
  label: e.string(),
1592
1598
  value: e.unknown(),
@@ -1597,10 +1603,10 @@ const pe = e.object({
1597
1603
  isGrandTotal: e.boolean().optional(),
1598
1604
  subtotalFunction: m.optional(),
1599
1605
  childCount: e.number().optional(),
1600
- actions: e.array(Bt).optional()
1606
+ actions: e.array(Ot).optional()
1601
1607
  },
1602
1608
  ["value"]
1603
- ), Pt = e.object({
1609
+ ), Vt = e.object({
1604
1610
  rowHeaderLevels: e.array(
1605
1611
  e.object({
1606
1612
  id: e.string(),
@@ -1624,7 +1630,7 @@ const pe = e.object({
1624
1630
  ]),
1625
1631
  colSpan: e.number(),
1626
1632
  rowSpan: e.number(),
1627
- columnPath: e.array(b),
1633
+ columnPath: e.array(v),
1628
1634
  measureInstanceId: e.string().optional()
1629
1635
  }).passthrough()
1630
1636
  )
@@ -1635,24 +1641,24 @@ const pe = e.object({
1635
1641
  id: e.string(),
1636
1642
  label: e.string(),
1637
1643
  columnNodeId: e.string().optional(),
1638
- columnPath: e.array(b),
1644
+ columnPath: e.array(v),
1639
1645
  measureInstanceId: e.string(),
1640
1646
  role: e.enum(["value", "columnSubtotal", "columnGrandTotal"])
1641
1647
  }).passthrough()
1642
1648
  )
1643
- }).passthrough(), Vt = I(
1649
+ }).passthrough(), Lt = A(
1644
1650
  {
1645
1651
  rowId: e.string(),
1646
1652
  columnId: e.string().optional(),
1647
1653
  measureId: e.string(),
1648
1654
  value: e.unknown(),
1649
1655
  formattedValue: e.string().optional(),
1650
- presence: Ft,
1651
- role: Nt,
1656
+ presence: Nt,
1657
+ role: Kt,
1652
1658
  calculationId: e.string().optional()
1653
1659
  },
1654
1660
  ["value"]
1655
- ), Lt = e.object({
1661
+ ), Gt = e.object({
1656
1662
  rows: e.boolean().optional(),
1657
1663
  columns: e.boolean().optional(),
1658
1664
  grandTotal: e.union([
@@ -1662,7 +1668,7 @@ const pe = e.object({
1662
1668
  columns: e.boolean().optional()
1663
1669
  }).passthrough()
1664
1670
  ]).optional()
1665
- }).passthrough(), Gt = I(
1671
+ }).passthrough(), Ut = A(
1666
1672
  {
1667
1673
  id: e.string(),
1668
1674
  axis: e.enum(["row", "column"]),
@@ -1670,27 +1676,27 @@ const pe = e.object({
1670
1676
  direction: e.enum(["asc", "desc"]),
1671
1677
  nulls: e.enum(["warehouseDefault", "first", "last"]).optional(),
1672
1678
  scope: e.enum(["global", "withinParent"]).optional(),
1673
- by: Et
1679
+ by: Ft
1674
1680
  },
1675
1681
  ["by"]
1676
- ), Ut = e.object({
1682
+ ), zt = e.object({
1677
1683
  rowOffset: e.number().optional(),
1678
1684
  rowLimit: e.number().optional(),
1679
1685
  columnOffset: e.number().optional(),
1680
1686
  columnLimit: e.number().optional(),
1681
1687
  hasMoreRows: e.boolean().optional(),
1682
1688
  hasMoreColumns: e.boolean().optional()
1683
- }).passthrough(), zt = e.object({
1689
+ }).passthrough(), Ht = e.object({
1684
1690
  axis: e.enum(["row", "column"]),
1685
- path: e.array(b),
1691
+ path: e.array(v),
1686
1692
  depth: e.number().optional()
1687
- }).passthrough(), Ht = e.object({
1693
+ }).passthrough(), Qt = e.object({
1688
1694
  rowLazyLoading: e.boolean().optional(),
1689
1695
  columnLazyLoading: e.boolean().optional(),
1690
1696
  expandableRowNodeIds: e.array(e.string()).optional(),
1691
1697
  expandableColumnNodeIds: e.array(e.string()).optional(),
1692
- nextRequests: e.array(zt).optional()
1693
- }).passthrough(), Qt = e.object({
1698
+ nextRequests: e.array(Ht).optional()
1699
+ }).passthrough(), Yt = e.object({
1694
1700
  domains: e.record(
1695
1701
  e.object({
1696
1702
  min: e.number().optional(),
@@ -1698,35 +1704,35 @@ const pe = e.object({
1698
1704
  }).passthrough()
1699
1705
  ).optional(),
1700
1706
  rules: e.array(e.record(e.string(), e.unknown())).optional()
1701
- }).passthrough(), Yt = e.object({
1702
- ...A,
1707
+ }).passthrough(), Jt = e.object({
1708
+ ..._,
1703
1709
  kind: e.literal("matrix"),
1704
1710
  schemaVersion: e.literal(1),
1705
1711
  shape: e.enum(["hierarchical", "pivot"]),
1706
1712
  capabilities: e.array(e.string()),
1707
1713
  executionMetadata: e.record(e.string(), e.unknown()),
1708
- fieldsById: e.record(e.string(), Kt),
1709
- measuresById: e.record(e.string(), Mt),
1714
+ fieldsById: e.record(e.string(), Tt),
1715
+ measuresById: e.record(e.string(), Bt),
1710
1716
  calculationsById: e.record(e.string(), Dt).optional(),
1711
1717
  axes: e.object({
1712
- rows: W,
1713
- columns: W
1718
+ rows: X,
1719
+ columns: X
1714
1720
  }).passthrough(),
1715
- nodesById: e.record(e.string(), Ot),
1716
- layout: Pt,
1717
- cells: e.array(Vt),
1718
- totals: Lt,
1719
- sort: e.array(Gt),
1720
- formattingContext: Qt,
1721
- pageInfo: Ut.optional(),
1722
- expansion: Ht.optional()
1723
- }).passthrough(), Jt = e.union([
1724
- jt,
1721
+ nodesById: e.record(e.string(), Pt),
1722
+ layout: Vt,
1723
+ cells: e.array(Lt),
1724
+ totals: Gt,
1725
+ sort: e.array(Ut),
1726
+ formattingContext: Yt,
1727
+ pageInfo: zt.optional(),
1728
+ expansion: Qt.optional()
1729
+ }).passthrough(), Wt = e.union([
1725
1730
  Rt,
1726
1731
  Ct,
1727
1732
  qt,
1728
- Yt
1729
- ]), Wt = e.object({
1733
+ xt,
1734
+ Jt
1735
+ ]), Xt = e.object({
1730
1736
  status: e.enum([
1731
1737
  "not_required",
1732
1738
  "resolved",
@@ -1735,22 +1741,22 @@ const pe = e.object({
1735
1741
  "fanout_risk",
1736
1742
  "unknown"
1737
1743
  ]),
1738
- requiredSources: e.array(w).optional(),
1744
+ requiredSources: e.array(k).optional(),
1739
1745
  relationshipsUsed: e.array(e.string()).optional(),
1740
1746
  missingSources: e.array(e.string()).optional(),
1741
1747
  warnings: e.array(e.string()).optional(),
1742
1748
  message: e.string().optional(),
1743
1749
  recommendedNextStep: e.string().optional(),
1744
1750
  joinPlanSummary: e.object({
1745
- baseSource: w.optional(),
1746
- joinedSources: e.array(w).optional(),
1751
+ baseSource: k.optional(),
1752
+ joinedSources: e.array(k).optional(),
1747
1753
  joinCount: e.number().optional()
1748
1754
  }).passthrough().optional(),
1749
1755
  fanoutRisk: e.object({
1750
1756
  status: e.enum(["none", "warning", "error", "unknown"]),
1751
1757
  message: e.string().optional()
1752
1758
  }).passthrough().optional()
1753
- }).passthrough(), X = e.enum([
1759
+ }).passthrough(), Z = e.enum([
1754
1760
  "ambiguous_fields",
1755
1761
  "empty_result",
1756
1762
  "missing_grounded_fields",
@@ -1760,7 +1766,7 @@ const pe = e.object({
1760
1766
  "presentation_incomplete",
1761
1767
  "query_validation_failed",
1762
1768
  "unsafe_join"
1763
- ]), he = e.object({
1769
+ ]), ye = e.object({
1764
1770
  version: e.literal(1),
1765
1771
  status: e.enum(["answered", "partial", "blocked"]),
1766
1772
  summary: e.string(),
@@ -1770,14 +1776,14 @@ const pe = e.object({
1770
1776
  queryId: e.string().optional(),
1771
1777
  summary: e.string(),
1772
1778
  evidenceIds: e.array(e.string()).optional(),
1773
- fieldsUsed: e.array(U).optional()
1779
+ fieldsUsed: e.array(z).optional()
1774
1780
  }).passthrough()
1775
1781
  ),
1776
1782
  blocked: e.array(
1777
1783
  e.object({
1778
1784
  slotId: e.string().optional(),
1779
1785
  queryId: e.string().optional(),
1780
- reasonCode: X,
1786
+ reasonCode: Z,
1781
1787
  message: e.string(),
1782
1788
  missingFields: e.array(e.string()).optional(),
1783
1789
  availableFields: e.array(e.string()).optional(),
@@ -1790,19 +1796,19 @@ const pe = e.object({
1790
1796
  ),
1791
1797
  semanticModelRecommendations: e.array(
1792
1798
  e.object({
1793
- reasonCode: X,
1799
+ reasonCode: Z,
1794
1800
  message: e.string(),
1795
1801
  recommendedNextStep: e.string().optional()
1796
1802
  }).passthrough()
1797
1803
  ).optional()
1798
- }).passthrough(), ye = e.object({
1799
- scope: e.literal("filtered_query"),
1800
- measures: e.record(R)
1801
1804
  }).passthrough(), be = e.object({
1805
+ scope: e.literal("filtered_query"),
1806
+ measures: e.record(C)
1807
+ }).passthrough(), ve = e.object({
1802
1808
  answeredObligations: e.array(e.string()),
1803
1809
  missingObligations: e.array(e.string()),
1804
- warnings: e.array(V).optional()
1805
- }).passthrough(), Xt = e.object({
1810
+ warnings: e.array(L).optional()
1811
+ }).passthrough(), Zt = e.object({
1806
1812
  intentId: e.string().optional(),
1807
1813
  queryId: e.string().optional(),
1808
1814
  status: e.enum(["answered", "partial", "failed"]),
@@ -1817,39 +1823,39 @@ const pe = e.object({
1817
1823
  ]).optional(),
1818
1824
  intent: e.unknown().optional(),
1819
1825
  compiledQuery: e.unknown().optional(),
1820
- fieldsUsed: e.array(U).optional(),
1821
- result: Jt.optional(),
1822
- validation: fe,
1823
- coverage: be.optional(),
1826
+ fieldsUsed: e.array(z).optional(),
1827
+ result: Wt.optional(),
1828
+ validation: he,
1829
+ coverage: ve.optional(),
1824
1830
  missingFields: e.array(e.string()).optional(),
1825
1831
  warnings: e.array(e.string()).optional(),
1826
- relationshipDiagnostics: Wt.optional(),
1827
- diagnosticFeedback: he.optional(),
1828
- population: ye.optional(),
1832
+ relationshipDiagnostics: Xt.optional(),
1833
+ diagnosticFeedback: ye.optional(),
1834
+ population: be.optional(),
1829
1835
  metadata: e.record(e.string(), e.unknown()).optional()
1830
1836
  }).passthrough();
1831
- function Zt(s) {
1837
+ function ei(s) {
1832
1838
  switch (s) {
1833
1839
  case "boolean":
1834
1840
  return e.boolean().optional();
1835
1841
  case "compactExecutionFieldArray":
1836
- return e.array(At).optional();
1842
+ return e.array(_t).optional();
1837
1843
  case "coverage":
1838
- return be.optional();
1844
+ return ve.optional();
1839
1845
  case "diagnosticFeedback":
1840
- return he.optional();
1846
+ return ye.optional();
1841
1847
  case "executionFieldArray":
1842
- return e.array(U).optional();
1848
+ return e.array(z).optional();
1843
1849
  case "executionResult":
1844
- return Xt.optional();
1850
+ return Zt.optional();
1845
1851
  case "number":
1846
1852
  return e.number().finite().optional();
1847
1853
  case "population":
1848
- return ye.optional();
1854
+ return be.optional();
1849
1855
  case "record":
1850
1856
  return p.optional();
1851
1857
  case "recordArray":
1852
- return C.optional();
1858
+ return q.optional();
1853
1859
  case "responseDetail":
1854
1860
  return e.enum(["compact", "standard", "debug"]).optional();
1855
1861
  case "string":
@@ -1861,14 +1867,14 @@ function Zt(s) {
1861
1867
  case "unknownArray":
1862
1868
  return e.array(e.unknown()).optional();
1863
1869
  case "validationResult":
1864
- return fe.optional();
1870
+ return he.optional();
1865
1871
  }
1866
1872
  }
1867
- const ei = Object.fromEntries(
1868
- Object.entries(L).map(
1869
- ([s, i]) => [s, Zt(i)]
1873
+ const ti = Object.fromEntries(
1874
+ Object.entries(G).map(
1875
+ ([s, i]) => [s, ei(i)]
1870
1876
  )
1871
- ), ti = e.object(ei).strict(), z = e.object({
1877
+ ), ii = e.object(ti).strict(), H = e.object({
1872
1878
  sourceKey: e.string().optional(),
1873
1879
  kind: e.enum(["semantic", "physical", "sql"]).optional(),
1874
1880
  domainId: e.string().optional(),
@@ -1884,11 +1890,11 @@ const ei = Object.fromEntries(
1884
1890
  dataType: e.enum(["string", "number", "boolean", "date", "datetime", "unknown"]).optional(),
1885
1891
  aggregate: m.optional(),
1886
1892
  sourceKey: e.string().optional(),
1887
- source: z.optional()
1888
- }).passthrough(), ve = e.object({
1893
+ source: H.optional()
1894
+ }).passthrough(), $e = e.object({
1889
1895
  id: e.string().optional(),
1890
1896
  builder: e.literal("semaphor.inputOptions"),
1891
- source: z.optional(),
1897
+ source: H.optional(),
1892
1898
  sourceKey: e.string().optional(),
1893
1899
  valueFieldRef: h,
1894
1900
  labelFieldRef: h,
@@ -1897,24 +1903,24 @@ const ei = Object.fromEntries(
1897
1903
  dependencies: e.unknown().optional(),
1898
1904
  limit: e.number().int().positive().optional(),
1899
1905
  spec: p.optional()
1900
- }).passthrough(), $e = e.object({
1906
+ }).passthrough(), Se = e.object({
1901
1907
  appliesToViewIds: e.array(e.string()).optional(),
1902
1908
  viewId: e.string().optional(),
1903
1909
  fieldRef: h,
1904
1910
  relationshipHint: e.unknown().optional(),
1905
1911
  relationshipsUsed: e.array(p).optional()
1906
- }).passthrough(), ii = e.object({
1912
+ }).passthrough(), si = e.object({
1907
1913
  id: e.string(),
1908
1914
  label: e.string().optional(),
1909
1915
  type: e.string().optional(),
1910
1916
  serverSide: e.boolean().optional(),
1911
1917
  fieldRef: h.optional(),
1912
- optionQuery: ve.optional(),
1913
- bindings: e.array($e).optional(),
1918
+ optionQuery: $e.optional(),
1919
+ bindings: e.array(Se).optional(),
1914
1920
  appliesToViewIds: e.array(e.string()),
1915
1921
  relationshipHint: e.unknown().optional(),
1916
1922
  relationshipsUsed: e.array(p).optional()
1917
- }).passthrough(), si = e.object({
1923
+ }).passthrough(), oi = e.object({
1918
1924
  builder: e.enum([
1919
1925
  "semaphor.metric",
1920
1926
  "semaphor.records",
@@ -1924,7 +1930,7 @@ const ei = Object.fromEntries(
1924
1930
  ]),
1925
1931
  spec: p,
1926
1932
  fallbackReason: p.optional()
1927
- }).passthrough(), oi = e.object({
1933
+ }).passthrough(), ni = e.object({
1928
1934
  id: e.string(),
1929
1935
  title: e.string().optional(),
1930
1936
  purpose: e.string().optional(),
@@ -1942,31 +1948,31 @@ const ei = Object.fromEntries(
1942
1948
  "semaphor.analysis",
1943
1949
  "semaphor.sql"
1944
1950
  ]).optional(),
1945
- sdkSpec: si.optional(),
1951
+ sdkSpec: oi.optional(),
1946
1952
  fields: e.array(h).optional(),
1947
1953
  computation: p.optional(),
1948
1954
  uxExpectations: e.array(e.string()).optional(),
1949
1955
  validation: p.optional()
1950
- }).passthrough(), ni = e.object({
1956
+ }).passthrough(), ri = e.object({
1951
1957
  inputId: e.string(),
1952
1958
  label: e.string().optional(),
1953
1959
  type: e.string().optional(),
1954
1960
  serverSide: e.boolean().optional(),
1955
1961
  fieldRef: h.optional(),
1956
- optionQuery: ve.optional(),
1957
- bindings: e.array($e),
1962
+ optionQuery: $e.optional(),
1963
+ bindings: e.array(Se),
1958
1964
  appliesToViewIds: e.array(e.string()),
1959
1965
  notAppliedToViewIds: e.array(e.string())
1960
- }).passthrough(), gi = e.object({
1961
- schemaVersion: e.literal(B),
1966
+ }).passthrough(), hi = e.object({
1967
+ schemaVersion: e.literal(O),
1962
1968
  title: e.string(),
1963
1969
  purpose: e.string().optional(),
1964
1970
  userGoal: e.string().optional(),
1965
1971
  nextStep: e.string().optional(),
1966
- sources: e.array(z),
1967
- inputs: e.array(ii),
1968
- views: e.array(oi),
1969
- filterContracts: e.array(ni),
1972
+ sources: e.array(H),
1973
+ inputs: e.array(si),
1974
+ views: e.array(ni),
1975
+ filterContracts: e.array(ri),
1970
1976
  implementationChecklist: e.object({
1971
1977
  schemaVersion: e.string().optional(),
1972
1978
  requiredDevtools: e.object({
@@ -1996,74 +2002,75 @@ const ei = Object.fromEntries(
1996
2002
  assumptions: e.array(e.string()).optional(),
1997
2003
  validation: p.optional()
1998
2004
  }).passthrough().superRefine((s, i) => {
1999
- const t = se(s);
2005
+ const t = oe(s);
2000
2006
  for (const o of t.issues)
2001
2007
  i.addIssue({
2002
2008
  code: e.ZodIssueCode.custom,
2003
2009
  message: o
2004
2010
  });
2005
- }), ri = new Set(
2006
- Object.keys(L)
2011
+ }), ai = new Set(
2012
+ Object.keys(G)
2007
2013
  );
2008
- function fi() {
2014
+ function yi() {
2009
2015
  return Object.keys(
2010
- L
2016
+ G
2011
2017
  );
2012
2018
  }
2013
- function ai(s) {
2014
- return ri.has(s);
2019
+ function li(s) {
2020
+ return ai.has(s);
2015
2021
  }
2016
- function hi(s) {
2022
+ function bi(s) {
2017
2023
  if (!s || typeof s != "object" || Array.isArray(s))
2018
2024
  throw new Error("Semaphor analyze result must be an object.");
2019
2025
  const t = Object.keys(s).filter(
2020
- (o) => !ai(o)
2026
+ (o) => !li(o)
2021
2027
  );
2022
2028
  if (t.length)
2023
2029
  throw new Error(
2024
2030
  `Semaphor analyze result contains unsupported top-level field(s): ${t.join(", ")}.`
2025
2031
  );
2026
- return ti.parse(s);
2032
+ return ii.parse(s);
2027
2033
  }
2028
2034
  export {
2029
- Wt as A,
2030
- he as B,
2031
- ye as C,
2032
- be as D,
2033
- Xt as E,
2034
- ei as F,
2035
- ti as G,
2036
- gi as H,
2037
- D as I,
2038
- Z as J,
2039
- ee as K,
2040
- ui as L,
2041
- we as M,
2042
- B as S,
2043
- pi as a,
2044
- te as b,
2045
- ai as c,
2046
- hi as d,
2047
- L as e,
2048
- pe as f,
2049
- fi as g,
2050
- bt as h,
2051
- mi as i,
2052
- vt as j,
2053
- w as k,
2054
- v as l,
2055
- me as m,
2056
- U as n,
2057
- P as o,
2058
- ci as p,
2059
- V as q,
2060
- fe as r,
2061
- di as s,
2062
- jt as t,
2063
- Rt as u,
2064
- se as v,
2065
- Ct as w,
2066
- qt as x,
2067
- Yt as y,
2068
- Jt as z
2035
+ z as A,
2036
+ $ as B,
2037
+ qt as C,
2038
+ Jt as D,
2039
+ ke as E,
2040
+ Rt as F,
2041
+ vt as G,
2042
+ Ct as H,
2043
+ Xt as I,
2044
+ V as J,
2045
+ me as K,
2046
+ k as L,
2047
+ xt as M,
2048
+ $t as N,
2049
+ O as S,
2050
+ gi as a,
2051
+ ie as b,
2052
+ ee as c,
2053
+ D as d,
2054
+ G as e,
2055
+ li as f,
2056
+ yi as g,
2057
+ di as h,
2058
+ fi as i,
2059
+ bi as j,
2060
+ te as k,
2061
+ ve as l,
2062
+ ci as m,
2063
+ ye as n,
2064
+ Zt as o,
2065
+ mi as p,
2066
+ be as q,
2067
+ Wt as r,
2068
+ pi as s,
2069
+ L as t,
2070
+ he as u,
2071
+ oe as v,
2072
+ ii as w,
2073
+ ti as x,
2074
+ hi as y,
2075
+ ge as z
2069
2076
  };