react-semaphor 0.1.527 → 0.1.529

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 (64) hide show
  1. package/dist/analytics-protocol/index.js +207 -196
  2. package/dist/brand-studio/index.js +3 -3
  3. package/dist/briefings/index.js +5 -5
  4. package/dist/chunks/{calculated-field-identity-DEhjPSr-.js → calculated-field-identity-Q1aCudPD.js} +4 -4
  5. package/dist/chunks/{card-config-utils-BlIbwkuD.js → card-config-utils-DqyASiD_.js} +5 -5
  6. package/dist/chunks/{dashboard-JNHR0_cZ.js → dashboard-BC-EC5M_.js} +1 -1
  7. package/dist/chunks/{dashboard-briefing-launcher-D9pFByPh.js → dashboard-briefing-launcher-CwyFda8i.js} +9 -9
  8. package/dist/chunks/{dashboard-controls-CJI5ZWMq.js → dashboard-controls-Bqg8vlyr.js} +11 -11
  9. package/dist/chunks/{dashboard-json-DLdrFry-.js → dashboard-json-DVicOlh9.js} +3 -3
  10. package/dist/chunks/{edit-dashboard-visual-D5LjWle1.js → edit-dashboard-visual-D4k246cQ.js} +1984 -1961
  11. package/dist/chunks/{editor-action-buttons-G91NQKxU.js → editor-action-buttons-DKIZkBTZ.js} +6 -6
  12. package/dist/chunks/{field-aggregations-DeVQLIsP.js → field-aggregations-BCDRRYMo.js} +6 -6
  13. package/dist/chunks/{field-dependencies-CGYic38w.js → field-dependencies-BWStuMxe.js} +1 -1
  14. package/dist/chunks/{index-BvJOYbNv.js → index-BpAM7UE0.js} +351 -360
  15. package/dist/chunks/{matrix-analytical-definition-BJyH5-99.js → matrix-analytical-definition-Q4GL16S4.js} +1 -1
  16. package/dist/chunks/{matrix-card-DY45yiUM.js → matrix-card-CkfMe-h-.js} +2 -2
  17. package/dist/chunks/{matrix-control-sources-BypfLZsK.js → matrix-control-sources-fD0Ns_9n.js} +5 -5
  18. package/dist/chunks/{matrix-definition-Cdn3LoxW.js → matrix-definition-CiGRzEzt.js} +1 -1
  19. package/dist/chunks/{matrix-formatter-BoKU3MzZ.js → matrix-formatter-DDjECnMd.js} +5 -5
  20. package/dist/chunks/{matrix-member-presentation-BBW0n1iY.js → matrix-member-presentation-Glhem6xB.js} +1 -1
  21. package/dist/chunks/matrix-operation-contract-BotZ-6zT.js +1383 -0
  22. package/dist/chunks/{metric-comparison-Crljx_XY.js → metric-comparison-QEkk6hqL.js} +1 -1
  23. package/dist/chunks/{numeric-presentation-LvnNY5Ma.js → numeric-presentation-D2I9znLM.js} +1 -1
  24. package/dist/chunks/{pivot-header-presentation-D5v8uyjj.js → pivot-header-presentation-BTOXdU6S.js} +7 -7
  25. package/dist/chunks/{pivot-result-identity-CY__BuwI.js → pivot-result-identity-BhAm8MCg.js} +1 -1
  26. package/dist/chunks/{pivot-result-lifecycle-BWrPhlGT.js → pivot-result-lifecycle-BxmATSFJ.js} +8 -8
  27. package/dist/chunks/{raw-temporal-CdnA_OXJ.js → raw-temporal-B0EuwEHr.js} +2 -2
  28. package/dist/chunks/{raw-temporal-contract-Bc9z83t-.js → raw-temporal-contract-BlyUGV3y.js} +1 -1
  29. package/dist/chunks/{relative-date-DAF9J7mt.js → relative-date-P4o6ME04.js} +1 -1
  30. package/dist/chunks/{report-preferences-dialog-D3hxu4sE.js → report-preferences-dialog-DFpOrZ02.js} +9 -9
  31. package/dist/chunks/{report-runtime-context-CtaGGlit.js → report-runtime-context-DceiWMKz.js} +1 -1
  32. package/dist/chunks/{selection-reducer-C7Um5XN-.js → selection-reducer-DQok8gsC.js} +1 -1
  33. package/dist/chunks/{semantic-format-BjBMOSoo.js → semantic-format-ByNkXJpY.js} +3 -3
  34. package/dist/chunks/{semaphor-ready-indicator-D46I_4g7.js → semaphor-ready-indicator-DBb9d0Xp.js} +9359 -9411
  35. package/dist/chunks/{slider-B6LELqx6.js → slider-BibKRCxX.js} +8 -8
  36. package/dist/chunks/{source-entity-resolution-Bde29mqE.js → source-entity-resolution-BWmw7a8P.js} +124 -132
  37. package/dist/chunks/{switch-_7uBAbYx.js → switch-Bql-RCoZ.js} +16 -18
  38. package/dist/chunks/{temporal-bucket-contract-C6lUGPS3.js → temporal-bucket-contract-CdBtoHX2.js} +1 -1
  39. package/dist/chunks/{temporal-input-presentation-DyMWCZYh.js → temporal-input-presentation-wUO681Zs.js} +1 -1
  40. package/dist/chunks/{token-types-UjyNz95-.js → token-types-Brc30mNN.js} +1 -1
  41. package/dist/chunks/{validators-CQcG0EPN.js → validators-BS521dum.js} +1 -1
  42. package/dist/dashboard/index.js +1 -1
  43. package/dist/dashboard-authoring/index.js +10 -10
  44. package/dist/data-app-sdk/index.js +5 -5
  45. package/dist/data-app-sdk-adapters/index.js +2 -2
  46. package/dist/data-app-sdk-validation/index.js +5 -5
  47. package/dist/format-utils/index.js +13 -13
  48. package/dist/index.js +17 -17
  49. package/dist/report-runtime-context/index.js +2 -2
  50. package/dist/surfboard/index.js +1 -1
  51. package/dist/types/index.js +5 -5
  52. package/dist/types/lib/types/explorer-types.d.ts +3 -1
  53. package/dist/types/lib/types/semantic-types.d.ts +4 -2
  54. package/dist/types/lib/utils/aggregate-expression-utils.d.ts +0 -4
  55. package/dist/types/lib/utils/connection-capabilities.d.ts +3 -3
  56. package/dist/types/shared/analytics-protocol/aggregate-expression.d.ts +89 -0
  57. package/dist/types/shared/analytics-protocol/analytics-refusal.d.ts +32 -0
  58. package/dist/types/shared/analytics-protocol/contracts.d.ts +38 -0
  59. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  60. package/dist/types/shared/analytics-protocol/matrix-analytical-definition.d.ts +1 -0
  61. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +10 -1
  62. package/dist/types/shared/analytics-protocol/measure-aggregation-profile.d.ts +63 -0
  63. package/package.json +2 -2
  64. package/dist/chunks/matrix-operation-contract-BV02rLhu.js +0 -809
@@ -2,30 +2,30 @@ import { jsx as T, jsxs as ke, Fragment as br } from "react/jsx-runtime";
2
2
  import * as h from "react";
3
3
  import N, { forwardRef as jc, isValidElement as ui, useLayoutEffect as Kh, useState as qc, useRef as fi, useMemo as Yh, useId as Xh, useImperativeHandle as Qh } from "react";
4
4
  import { j as Zh, c as st, C as Uc } from "./x-CXDkqdur.js";
5
- import { az as Jh, F as at, d as nr, am as em, v as tm, a0 as nm, q as Ls, N as no, G as zt, E as tn } from "./validators-CQcG0EPN.js";
6
- import { F as Do, r as on, t as rm, u as om, q as Hi } from "./matrix-operation-contract-BV02rLhu.js";
5
+ import { az as Jh, F as at, d as nr, am as em, v as tm, a0 as nm, q as Ls, N as no, G as zt, E as tn } from "./validators-BS521dum.js";
6
+ import { F as Do, r as on, t as rm, u as om, q as Hi } from "./matrix-operation-contract-BotZ-6zT.js";
7
7
  import "zod";
8
8
  import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as pi } from "../value-format-preferences/index.js";
9
9
  import * as Ao from "react-dom";
10
10
  import Wc from "react-dom";
11
11
  import { u as im } from "./appearance-context-DEYtWinQ.js";
12
- import { r as am, l as Ra, v as yt, D as ro, B as Pa, n as sm, o as lm, p as oo, q as cm, s as Bs, h as dm, t as um, b as fm, u as $s, x as $e } from "./card-config-utils-BlIbwkuD.js";
13
- import { A as Gi, z as pm, m as rr, j as Na, N as hm, n as vt, e as zs, u as $t, c as Hc, d as ko, a as io, b as Gc, K as Te, l as mm, k as Kc, r as Yc, o as Xc, f as Qc, h as gm, H as Ar } from "./calculated-field-identity-DEhjPSr-.js";
14
- import { a as bm, B as ym, u as Zc, w as Jc, m as vm, z as Oa, A as ed, t as Im, d as Ki, e as Yi, c as Sm, g as ot, i as Cm, b as xm, C as _a, D as td, r as ao, j as wm } from "./relative-date-DAF9J7mt.js";
15
- import { b as Tm } from "./report-runtime-context-CtaGGlit.js";
16
- import { i as nd, a as Em, r as Fm } from "./matrix-card-DY45yiUM.js";
12
+ import { r as am, l as Ra, v as yt, D as ro, B as Pa, n as sm, o as lm, p as oo, q as cm, s as Bs, h as dm, t as um, b as fm, u as $s, x as $e } from "./card-config-utils-DqyASiD_.js";
13
+ import { A as Gi, z as pm, m as rr, j as Na, N as hm, n as vt, e as zs, u as $t, c as Hc, d as ko, a as io, b as Gc, K as Te, l as mm, k as Kc, r as Yc, o as Xc, f as Qc, h as gm, H as Ar } from "./calculated-field-identity-Q1aCudPD.js";
14
+ import { a as bm, B as ym, u as Zc, w as Jc, m as vm, z as Oa, A as ed, t as Im, d as Ki, e as Yi, c as Sm, g as ot, i as Cm, b as xm, C as _a, D as td, r as ao, j as wm } from "./relative-date-P4o6ME04.js";
15
+ import { b as Tm } from "./report-runtime-context-DceiWMKz.js";
16
+ import { i as nd, a as Em, r as Fm } from "./matrix-card-CkfMe-h-.js";
17
17
  import "./matrix-continuation-C4sRcjZU.js";
18
- import { b as Dm, f as Am, l as km, r as Rm, o as Pm } from "./source-entity-resolution-Bde29mqE.js";
18
+ import { b as Dm, f as Am, l as km, r as Rm, o as Pm } from "./source-entity-resolution-BWmw7a8P.js";
19
19
  import { r as Nm } from "./temporal-bucket-DlFuhCnT.js";
20
- import { u as Ro, c as Om, b as _m, y as Mm, k as Ma, h as hn, o as _n, D as Vm, n as rd, q as od, j as Va } from "./field-aggregations-DeVQLIsP.js";
21
- import { c as Lm } from "./metric-comparison-Crljx_XY.js";
20
+ import { u as Ro, c as Om, b as _m, y as Mm, k as Ma, h as hn, o as _n, D as Vm, n as rd, q as od, j as Va } from "./field-aggregations-BCDRRYMo.js";
21
+ import { c as Lm } from "./metric-comparison-QEkk6hqL.js";
22
22
  import { C as id } from "./common-types-C6cAQgyh.js";
23
- import { g as Bm, a as $m } from "./matrix-definition-Cdn3LoxW.js";
23
+ import { g as Bm, a as $m } from "./matrix-definition-CiGRzEzt.js";
24
24
  import "react-dom/client";
25
25
  import { createFrameLayouts as zm } from "../layouts/index.js";
26
- import { p as jm, f as qm } from "./temporal-input-presentation-DyMWCZYh.js";
27
- import { i as Po } from "./raw-temporal-CdnA_OXJ.js";
28
- import { n as Um, a as ad, b as No, f as La, D as Wm, c as or } from "./semantic-format-BjBMOSoo.js";
26
+ import { p as jm, f as qm } from "./temporal-input-presentation-wUO681Zs.js";
27
+ import { i as Po } from "./raw-temporal-B0EuwEHr.js";
28
+ import { n as Um, a as ad, b as No, f as La, D as Wm, c as or } from "./semantic-format-ByNkXJpY.js";
29
29
  var sd = Symbol.for("immer-nothing"), js = Symbol.for("immer-draftable"), ae = Symbol.for("immer-state"), Hm = process.env.NODE_ENV !== "production" ? [
30
30
  // All error codes, starting by 0:
31
31
  function(e) {
@@ -5685,10 +5685,9 @@ function mv(e) {
5685
5685
  function gv({
5686
5686
  schemaName: e,
5687
5687
  tableName: n,
5688
- databaseName: t,
5689
- connectionType: r
5688
+ connectionType: t
5690
5689
  }) {
5691
- return r === "S3" || r === "API" ? n : r === "S3Tables" ? `${t}.${e}.${n}` : e ? `${e}.${n}` : n;
5690
+ return t === "S3" || t === "API" ? n : e ? `${e}.${n}` : n;
5692
5691
  }
5693
5692
  function TA({
5694
5693
  schemaName: e,
@@ -5708,7 +5707,6 @@ function TA({
5708
5707
  }) : a = gv({
5709
5708
  schemaName: e,
5710
5709
  tableName: n,
5711
- databaseName: r,
5712
5710
  connectionType: i
5713
5711
  }), t && (a = mv(t));
5714
5712
  let s = a;
@@ -1,4 +1,4 @@
1
- import { w as i, T as l, x as u } from "./validators-CQcG0EPN.js";
1
+ import { w as i, T as l, x as u } from "./validators-BS521dum.js";
2
2
  function c(e) {
3
3
  const r = i.safeParse(e);
4
4
  return r.success ? { ok: !0, value: r.data } : {
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as C } from "../value-format-preferences/index.js";
2
- import { v as D, h as T, r as w, g as E } from "./raw-temporal-CdnA_OXJ.js";
2
+ import { v as D, h as T, r as w, g as E } from "./raw-temporal-B0EuwEHr.js";
3
3
  import { d as I, f as R, c as z } from "./temporal-bucket-DlFuhCnT.js";
4
4
  import { z as U } from "./zoned-wall-clock-BkxV9jS2.js";
5
5
  const A = /* @__PURE__ */ new Set(["short", "medium", "long"]), L = /^(\d{4})-(\d{2})-(\d{2})$/, $ = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?$/, b = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d{1,9})?)?(?:Z|[+-]\d{2}:\d{2})$/, h = " – ";
@@ -1,5 +1,5 @@
1
1
  import "../value-format-preferences/index.js";
2
- import "./validators-CQcG0EPN.js";
2
+ import "./validators-BS521dum.js";
3
3
  const A = {
4
4
  mode: "all"
5
5
  };
@@ -1389,7 +1389,6 @@ const q = i.enum(["day", "week", "month", "quarter", "year"]), Gi = i.enum(["min
1389
1389
  "Snowflake",
1390
1390
  "S3",
1391
1391
  "clickhouse",
1392
- "S3Tables",
1393
1392
  "API",
1394
1393
  "none"
1395
1394
  ]),
@@ -1541,6 +1540,7 @@ const q = i.enum(["day", "week", "month", "quarter", "year"]), Gi = i.enum(["min
1541
1540
  target: oe,
1542
1541
  joinType: i.enum(["INNER", "LEFT", "RIGHT", "FULL"]),
1543
1542
  sequence: i.number().int().nonnegative(),
1543
+ autoResolved: i.boolean().optional(),
1544
1544
  relationshipId: i.string().optional(),
1545
1545
  relationshipName: i.string().optional(),
1546
1546
  relationshipCardinality: i.enum(["one_to_one", "one_to_many", "many_to_one", "many_to_many"]).optional(),
@@ -1,4 +1,4 @@
1
- import { D as o } from "../chunks/dashboard-JNHR0_cZ.js";
1
+ import { D as o } from "../chunks/dashboard-BC-EC5M_.js";
2
2
  import { C as s, E as C } from "../chunks/common-types-C6cAQgyh.js";
3
3
  export {
4
4
  s as CONTROL_CARD_DEFAULT_VALUE,
@@ -1,16 +1,16 @@
1
- import { D as L, a as Ce } from "../chunks/matrix-control-sources-BypfLZsK.js";
2
- import { k as Vt, l as zt, n as qt, h as jt, i as Gt, j as Ht, C as Ut, d as Kt, f as Wt, e as Xt, o as Qt, c as Jt, p as Yt, u as Zt, w as ea, y as ta, g as aa, x as ra, m as na, b as ia, r as oa, s as sa, z as da, t as ca, q as la, v as ua } from "../chunks/matrix-control-sources-BypfLZsK.js";
3
- import { c as Se, r as ve } from "../chunks/field-aggregations-DeVQLIsP.js";
4
- import { A as fa, D as ha, n as ma, S as ga, h as ba, j as Ia, w as _a, k as ya, l as Ca, m as Sa, v as va, o as Da, B as Ta, g as Fa, b as ka, i as wa, z as xa, u as Aa, q as Oa, y as Ra, p as Na, e as Ea, f as Ma, d as La, a as Pa, x as Ba, s as $a, t as Va } from "../chunks/field-aggregations-DeVQLIsP.js";
5
- import { q as De, G as K, b8 as Te, H as se, F as Fe, au as ke } from "../chunks/validators-CQcG0EPN.js";
6
- import "../chunks/matrix-operation-contract-BV02rLhu.js";
1
+ import { D as L, a as Ce } from "../chunks/matrix-control-sources-fD0Ns_9n.js";
2
+ import { k as Vt, l as zt, n as qt, h as jt, i as Gt, j as Ht, C as Ut, d as Kt, f as Wt, e as Xt, o as Qt, c as Jt, p as Yt, u as Zt, w as ea, y as ta, g as aa, x as ra, m as na, b as ia, r as oa, s as sa, z as da, t as ca, q as la, v as ua } from "../chunks/matrix-control-sources-fD0Ns_9n.js";
3
+ import { c as Se, r as ve } from "../chunks/field-aggregations-BCDRRYMo.js";
4
+ import { A as fa, D as ha, n as ma, S as ga, h as ba, j as Ia, w as _a, k as ya, l as Ca, m as Sa, v as va, o as Da, B as Ta, g as Fa, b as ka, i as wa, z as xa, u as Aa, q as Oa, y as Ra, p as Na, e as Ea, f as Ma, d as La, a as Pa, x as Ba, s as $a, t as Va } from "../chunks/field-aggregations-BCDRRYMo.js";
5
+ import { q as De, G as K, b8 as Te, H as se, F as Fe, au as ke } from "../chunks/validators-BS521dum.js";
6
+ import "../chunks/matrix-operation-contract-BotZ-6zT.js";
7
7
  import "zod";
8
- import { m as $, r as q } from "../chunks/calculated-field-identity-DEhjPSr-.js";
9
- import { C as qa, D as ja, l as Ga, p as Ha, J as Ua, q as Ka, k as Wa, f as Xa, d as Qa, i as Ja, z as Ya, g as Za, u as er, A as tr, h as ar, j as rr, v as nr, n as ir, t as or, B as sr, H as dr, x as cr, o as lr, e as ur, a as pr, b as fr, E as hr, F as mr, c as gr, w as br, G as Ir, s as _r, y as yr, I as Cr } from "../chunks/calculated-field-identity-DEhjPSr-.js";
8
+ import { m as $, r as q } from "../chunks/calculated-field-identity-Q1aCudPD.js";
9
+ import { C as qa, D as ja, l as Ga, p as Ha, J as Ua, q as Ka, k as Wa, f as Xa, d as Qa, i as Ja, z as Ya, g as Za, u as er, A as tr, h as ar, j as rr, v as nr, n as ir, t as or, B as sr, H as dr, x as cr, o as lr, e as ur, a as pr, b as fr, E as hr, F as mr, c as gr, w as br, G as Ir, s as _r, y as yr, I as Cr } from "../chunks/calculated-field-identity-Q1aCudPD.js";
10
10
  import { n as we } from "../chunks/operators-B3zZoskU.js";
11
11
  import { a as vr, b as Dr, r as Tr } from "../chunks/canonical-result-keys-CEQefvdO.js";
12
- import { b as kr, c as wr, g as xr, a as Ar, m as Or, r as Rr } from "../chunks/matrix-definition-Cdn3LoxW.js";
13
- import { m as Er, a as Mr, r as Lr } from "../chunks/matrix-card-DY45yiUM.js";
12
+ import { b as kr, c as wr, g as xr, a as Ar, m as Or, r as Rr } from "../chunks/matrix-definition-CiGRzEzt.js";
13
+ import { m as Er, a as Mr, r as Lr } from "../chunks/matrix-card-CkfMe-h-.js";
14
14
  function y(e) {
15
15
  return e && typeof e == "object" ? e : null;
16
16
  }
@@ -1,12 +1,12 @@
1
1
  import { toSemaphorInputSnapshots as rt, toSemaphorInputBinding as tt, toSemaphorSelectionSnapshots as nt, toSemaphorActiveInputSnapshots as X, toSemaphorMatrixIntent as it, toSemaphorSqlIntent as ot, toSemaphorInputOptionsIntent as st, toSemaphorRecordsIntent as at, toSemaphorAnalysisQueryOptions as lt, toSemaphorAnalysisIntent as dt, toSemaphorMetricIntent as ut, hasSemaphorInputValue as fe, normalizeSemaphorInputOptions as qr, toSemaphorInputSpec as Ar } from "../data-app-sdk-adapters/index.js";
2
2
  import { jsxs as p, Fragment as Tr, jsx as l } from "react/jsx-runtime";
3
3
  import { createContext as Ae, useContext as Q, useState as _, useRef as T, useEffect as B, useMemo as x, Fragment as ct, useId as kr, useCallback as L, useReducer as ft } from "react";
4
- import { q as pt, u as gt, H as mt, I as xe, s as yt } from "../chunks/validators-CQcG0EPN.js";
5
- import { a as Co, b9 as Eo } from "../chunks/validators-CQcG0EPN.js";
6
- import { m as ht, ab as bt, aa as vt, z as sr, o as ar, H as St } from "../chunks/matrix-operation-contract-BV02rLhu.js";
4
+ import { q as pt, u as gt, H as mt, I as xe, s as yt } from "../chunks/validators-BS521dum.js";
5
+ import { a as Co, b9 as Eo } from "../chunks/validators-BS521dum.js";
6
+ import { m as ht, am as bt, al as vt, z as sr, o as ar, H as St } from "../chunks/matrix-operation-contract-BotZ-6zT.js";
7
7
  import "zod";
8
- import { m as lr } from "../chunks/matrix-formatter-BoKU3MzZ.js";
9
- import { a as wt, M as It, S as xt, E as qt, C as At, r as dr } from "../chunks/selection-reducer-C7Um5XN-.js";
8
+ import { m as lr } from "../chunks/matrix-formatter-DDjECnMd.js";
9
+ import { a as wt, M as It, S as xt, E as qt, C as At, r as dr } from "../chunks/selection-reducer-DQok8gsC.js";
10
10
  import { X as Tt, C as kt, j as Ct } from "../chunks/x-CXDkqdur.js";
11
11
  function he(e, r, t) {
12
12
  return {
@@ -1,6 +1,6 @@
1
1
  import { n as y } from "../chunks/operators-B3zZoskU.js";
2
- import { m as v, s as m, p as I, a as S } from "../chunks/validators-CQcG0EPN.js";
3
- import { a as F, c as b } from "../chunks/matrix-operation-contract-BV02rLhu.js";
2
+ import { m as v, s as m, p as I, a as S } from "../chunks/validators-BS521dum.js";
3
+ import { a as F, c as b } from "../chunks/matrix-operation-contract-BotZ-6zT.js";
4
4
  import "zod";
5
5
  function w(i) {
6
6
  var n, r, o;
@@ -1,10 +1,10 @@
1
- import { E as b, F as N, s as E, G as v, u as O, H as K, I as l } from "../chunks/validators-CQcG0EPN.js";
2
- import { m as Q } from "../chunks/matrix-operation-contract-BV02rLhu.js";
1
+ import { E as b, F as N, s as E, G as v, u as O, H as K, I as l } from "../chunks/validators-BS521dum.js";
2
+ import { m as Q } from "../chunks/matrix-operation-contract-BotZ-6zT.js";
3
3
  import "zod";
4
- import { p as W } from "../chunks/report-runtime-context-CtaGGlit.js";
5
- import { r as U } from "../chunks/source-entity-resolution-Bde29mqE.js";
4
+ import { p as W } from "../chunks/report-runtime-context-DceiWMKz.js";
5
+ import { r as U } from "../chunks/source-entity-resolution-BWmw7a8P.js";
6
6
  import { toSemaphorMetricIntent as G, toSemaphorAnalysisIntent as J, toSemaphorRecordsIntent as V, toSemaphorSqlIntent as L, toSemaphorMatrixIntent as X, toSemaphorInputOptionsIntent as Y } from "../data-app-sdk-adapters/index.js";
7
- import { m as Z } from "../chunks/matrix-card-DY45yiUM.js";
7
+ import { m as Z } from "../chunks/matrix-card-CkfMe-h-.js";
8
8
  function ee({
9
9
  intent: e,
10
10
  field: r,
@@ -1,19 +1,19 @@
1
- import { R as S, e as h, c as y, b as F, g as x, a as M, i as I, d as N, p as O, f as D, r as $, v as B } from "../chunks/raw-temporal-CdnA_OXJ.js";
2
- import { f as E } from "../chunks/numeric-presentation-LvnNY5Ma.js";
3
- import { b as L, i as V, j as X, a as G, h as q, g as j, e as U, c as z, d as K, p as Y, k as H, r as W, l as Q, v as Z } from "../chunks/numeric-presentation-LvnNY5Ma.js";
4
- import { P as ee, A as re, D as ae, F as te, b as oe, M as se, a as ie, i as le, g as ne, P as me, l as ue, z as ce, j as pe, h as fe, e as Te, d as Ee, u as be, x as Re, y as Ce, t as Ae, f as ve, q as Pe, m as de, c as we, k as ge, p as _e, w as Se, B as he, n as ye, o as Fe, r as xe, s as Me, v as Ie } from "../chunks/pivot-header-presentation-D5v8uyjj.js";
5
- import { c as Oe, f as De, a as $e, d as Be, g as ke, b as Le, p as Ve, r as Xe } from "../chunks/matrix-formatter-BoKU3MzZ.js";
6
- import { f as b, c as R } from "../chunks/pivot-result-lifecycle-BWrPhlGT.js";
7
- import { d as qe, a as je, C as Ue, b as ze, D as Ke, M as Ye, y as He, P as We, A as Qe, o as Ze, g as Je, j as er, w as rr, x as ar, k as tr, h as or, q as sr, s as ir, u as lr, z as nr, e as mr, p as ur, n as cr, l as pr, m as fr, i as Tr, r as Er, t as br, v as Rr } from "../chunks/pivot-result-lifecycle-BWrPhlGT.js";
1
+ import { R as S, e as h, c as y, b as F, g as x, a as M, i as I, d as N, p as O, f as D, r as $, v as B } from "../chunks/raw-temporal-B0EuwEHr.js";
2
+ import { f as E } from "../chunks/numeric-presentation-D2I9znLM.js";
3
+ import { b as L, i as V, j as X, a as G, h as q, g as j, e as U, c as z, d as K, p as Y, k as H, r as W, l as Q, v as Z } from "../chunks/numeric-presentation-D2I9znLM.js";
4
+ import { P as ee, A as re, D as ae, F as te, b as oe, M as se, a as ie, i as le, g as ne, P as me, l as ue, z as ce, j as pe, h as fe, e as Te, d as Ee, u as be, x as Re, y as Ce, t as Ae, f as ve, q as Pe, m as de, c as we, k as ge, p as _e, w as Se, B as he, n as ye, o as Fe, r as xe, s as Me, v as Ie } from "../chunks/pivot-header-presentation-BTOXdU6S.js";
5
+ import { c as Oe, f as De, a as $e, d as Be, g as ke, b as Le, p as Ve, r as Xe } from "../chunks/matrix-formatter-DDjECnMd.js";
6
+ import { f as b, c as R } from "../chunks/pivot-result-lifecycle-BxmATSFJ.js";
7
+ import { d as qe, a as je, C as Ue, b as ze, D as Ke, M as Ye, y as He, P as We, A as Qe, o as Ze, g as Je, j as er, w as rr, x as ar, k as tr, h as or, q as sr, s as ir, u as lr, z as nr, e as mr, p as ur, n as cr, l as pr, m as fr, i as Tr, r as Er, t as br, v as Rr } from "../chunks/pivot-result-lifecycle-BxmATSFJ.js";
8
8
  import { M as Ar, d as vr, a as Pr, b as dr, c as wr, m as gr, f as _r, p as Sr, e as hr, g as yr } from "../chunks/matrix-continuation-C4sRcjZU.js";
9
- import { f as xr } from "../chunks/semantic-format-BjBMOSoo.js";
9
+ import { f as xr } from "../chunks/semantic-format-ByNkXJpY.js";
10
10
  import { FAST_PDF_POLICY as Ir, PDF_SAFETY_LIMIT_EXCEEDED as Nr, getUtf8ByteLength as Or, isFastPdfOutputSizeEligible as Dr, isFastPdfPageCountEligible as $r, isFastPdfRequestSizeEligible as Br, isFastPdfRowCountEligible as kr } from "../pdf-export-policy/index.js";
11
11
  import { D as Vr, T as Xr, a as Gr, f as qr, i as jr, b as Ur, p as zr, r as Kr, c as Yr, t as Hr, v as Wr } from "../chunks/temporal-bucket-DlFuhCnT.js";
12
- import { f as Zr, p as Jr, v as ea } from "../chunks/temporal-input-presentation-DyMWCZYh.js";
13
- import { S as aa } from "../chunks/validators-CQcG0EPN.js";
14
- import { r as oa } from "../chunks/metric-comparison-Crljx_XY.js";
15
- import { P as ia, b as la, i as na, c as ma, d as ua, r as ca, a as pa } from "../chunks/pivot-result-identity-CY__BuwI.js";
16
- import { p as Ta, v as Ea } from "../chunks/raw-temporal-contract-Bc9z83t-.js";
12
+ import { f as Zr, p as Jr, v as ea } from "../chunks/temporal-input-presentation-wUO681Zs.js";
13
+ import { S as aa } from "../chunks/validators-BS521dum.js";
14
+ import { r as oa } from "../chunks/metric-comparison-QEkk6hqL.js";
15
+ import { P as ia, b as la, i as na, c as ma, d as ua, r as ca, a as pa } from "../chunks/pivot-result-identity-BhAm8MCg.js";
16
+ import { p as Ta, v as Ea } from "../chunks/raw-temporal-contract-BlyUGV3y.js";
17
17
  function p(r) {
18
18
  if (r === null || typeof r != "object" || Array.isArray(r))
19
19
  return !1;
package/dist/index.js CHANGED
@@ -1,30 +1,30 @@
1
- import { D as j } from "./chunks/dashboard-JNHR0_cZ.js";
1
+ import { D as j } from "./chunks/dashboard-BC-EC5M_.js";
2
2
  import { C as Ze, E as ea } from "./chunks/common-types-C6cAQgyh.js";
3
- import { a as ta, R as ra, D as sa } from "./chunks/report-preferences-dialog-D3hxu4sE.js";
3
+ import { a as ta, R as ra, D as sa } from "./chunks/report-preferences-dialog-DFpOrZ02.js";
4
4
  import { jsx as n, jsxs as C } from "react/jsx-runtime";
5
- import { E as _, F as k, S as I, a as M, U as O, c as U, C as V, V as z, d as $, e as H, f as W, g as q, I as K, R as Q, h as G, i as Y, j as J, k as X } from "./chunks/semaphor-ready-indicator-D46I_4g7.js";
6
- import { ak as na, al as ia, am as la, B as ca, T as ua, A as da, y as pa, x as fa, at as ha, M as ma, m as ga, p as Ca, p as ya, q as ba, z as Ea, af as Da, ah as va, ai as Aa, ag as xa, a6 as wa, a9 as Sa, as as Ta, Z as Ba, ae as Na, ao as _a, a1 as Fa, aa as Pa, w as Ra, v as La, aw as ja, Y as ka, ab as Ia, ac as Ma, a5 as Oa, a8 as Ua, ar as Va, aq as za, ap as $a, av as Ha, au as Wa, a7 as qa, X as Ka, W as Qa, $ as Ga, ad as Ya, a3 as Ja, a0 as Xa, a2 as Za, a4 as et, _ as at, O as tt, K as rt, an as st, t as ot, H as nt, s as it, l as lt, G as ct, J as ut, n as dt, Q as pt, N as ft, L as ht, P as mt, u as gt, r as Ct, o as yt, aj as bt } from "./chunks/semaphor-ready-indicator-D46I_4g7.js";
7
- import { u as Z, P as ee, a as ae, B as te, c as B, b as re, d as se } from "./chunks/switch-_7uBAbYx.js";
8
- import { a1 as Dt, M as vt, z as At, A as xt, E as wt, O as St, N as Tt, W as Bt, X as Nt, K as _t, D as Ft, J as Pt, Q as Rt, H as Lt, G as jt, F as kt, Y as It, V as Mt, Z as Ot, $ as Ut, _ as Vt, a0 as zt, a3 as $t, a2 as Ht } from "./chunks/switch-_7uBAbYx.js";
5
+ import { E as _, F as k, S as I, a as M, U as O, c as U, C as V, V as z, d as $, e as H, f as W, g as q, I as K, R as Q, h as G, i as Y, j as J, k as X } from "./chunks/semaphor-ready-indicator-DBb9d0Xp.js";
6
+ import { ak as na, al as ia, am as la, B as ca, T as ua, A as da, y as pa, x as fa, at as ha, M as ma, m as ga, p as Ca, p as ya, q as ba, z as Ea, af as Da, ah as va, ai as Aa, ag as xa, a6 as wa, a9 as Sa, as as Ta, Z as Ba, ae as Na, ao as _a, a1 as Fa, aa as Pa, w as Ra, v as La, aw as ja, Y as ka, ab as Ia, ac as Ma, a5 as Oa, a8 as Ua, ar as Va, aq as za, ap as $a, av as Ha, au as Wa, a7 as qa, X as Ka, W as Qa, $ as Ga, ad as Ya, a3 as Ja, a0 as Xa, a2 as Za, a4 as et, _ as at, O as tt, K as rt, an as st, t as ot, H as nt, s as it, l as lt, G as ct, J as ut, n as dt, Q as pt, N as ft, L as ht, P as mt, u as gt, r as Ct, o as yt, aj as bt } from "./chunks/semaphor-ready-indicator-DBb9d0Xp.js";
7
+ import { u as Z, P as ee, a as ae, B as te, c as B, b as re, d as se } from "./chunks/switch-Bql-RCoZ.js";
8
+ import { a1 as Dt, M as vt, z as At, A as xt, E as wt, O as St, N as Tt, W as Bt, X as Nt, K as _t, D as Ft, J as Pt, Q as Rt, H as Lt, G as jt, F as kt, Y as It, V as Mt, Z as Ot, $ as Ut, _ as Vt, a0 as zt, a3 as $t, a2 as Ht } from "./chunks/switch-Bql-RCoZ.js";
9
9
  import * as w from "react";
10
10
  import F, { useMemo as oe, useEffect as P } from "react";
11
- import { D as qt } from "./chunks/token-types-UjyNz95-.js";
12
- import { C as Qt, D as Gt, L as Yt, P as Jt, f as Xt, g as Zt, k as er, j as ar, l as tr, e as rr, c as sr, b as or, d as nr, n as ir, h as lr } from "./chunks/validators-CQcG0EPN.js";
13
- import { A as ur, h as dr, D as pr, f as fr, g as hr, e as mr, b as gr, E as Cr, N as yr, U as br, a as Er, V as Dr, W as vr, u as Ar, c as xr, d as wr } from "./chunks/dashboard-briefing-launcher-D9pFByPh.js";
11
+ import { D as qt } from "./chunks/token-types-Brc30mNN.js";
12
+ import { C as Qt, D as Gt, L as Yt, P as Jt, f as Xt, g as Zt, k as er, j as ar, l as tr, e as rr, c as sr, b as or, d as nr, n as ir, h as lr } from "./chunks/validators-BS521dum.js";
13
+ import { A as ur, h as dr, D as pr, f as fr, g as hr, e as mr, b as gr, E as Cr, N as yr, U as br, a as Er, V as Dr, W as vr, u as Ar, c as xr, d as wr } from "./chunks/dashboard-briefing-launcher-CwyFda8i.js";
14
14
  import { u as Tr } from "./chunks/use-debounced-dirty-check-BwAbnX_5.js";
15
15
  import { createRoot as ne } from "react-dom/client";
16
- import "./chunks/slider-B6LELqx6.js";
17
- import "./chunks/matrix-operation-contract-BV02rLhu.js";
16
+ import "./chunks/slider-BibKRCxX.js";
17
+ import "./chunks/matrix-operation-contract-BotZ-6zT.js";
18
18
  import "zod";
19
19
  import "./chunks/matrix-continuation-C4sRcjZU.js";
20
20
  import "./value-format-preferences/index.js";
21
- import { D as Nr } from "./chunks/report-runtime-context-CtaGGlit.js";
22
- import { r as Fr, a as Pr } from "./chunks/pivot-result-identity-CY__BuwI.js";
23
- import "./chunks/field-aggregations-DeVQLIsP.js";
24
- import { K as ie } from "./chunks/calculated-field-identity-DEhjPSr-.js";
25
- import "./chunks/card-config-utils-BlIbwkuD.js";
21
+ import { D as Nr } from "./chunks/report-runtime-context-DceiWMKz.js";
22
+ import { r as Fr, a as Pr } from "./chunks/pivot-result-identity-BhAm8MCg.js";
23
+ import "./chunks/field-aggregations-BCDRRYMo.js";
24
+ import { K as ie } from "./chunks/calculated-field-identity-Q1aCudPD.js";
25
+ import "./chunks/card-config-utils-DqyASiD_.js";
26
26
  import "react-dom";
27
- import "./chunks/index-BvJOYbNv.js";
27
+ import "./chunks/index-BpAM7UE0.js";
28
28
  import "./chunks/appearance-context-DEYtWinQ.js";
29
29
  import "./chunks/color-CJvdlFM_.js";
30
30
  import "./chunks/index-CLIro-EG.js";
@@ -1,5 +1,5 @@
1
- import { i as r } from "../chunks/validators-CQcG0EPN.js";
2
- import { D as n, p as o, a as p, b as t } from "../chunks/report-runtime-context-CtaGGlit.js";
1
+ import { i as r } from "../chunks/validators-BS521dum.js";
2
+ import { D as n, p as o, a as p, b as t } from "../chunks/report-runtime-context-DceiWMKz.js";
3
3
  export {
4
4
  n as DEFAULT_CALENDAR_CONTEXT,
5
5
  r as isValidIanaTimeZone,
@@ -1,4 +1,4 @@
1
- import { a, R as s, D as o } from "../chunks/report-preferences-dialog-D3hxu4sE.js";
1
+ import { a, R as s, D as o } from "../chunks/report-preferences-dialog-DFpOrZ02.js";
2
2
  import { C as f, E as D } from "../chunks/common-types-C6cAQgyh.js";
3
3
  export {
4
4
  f as CONTROL_CARD_DEFAULT_VALUE,
@@ -1,9 +1,9 @@
1
1
  import { C as r, E as s } from "../chunks/common-types-C6cAQgyh.js";
2
- import { C as o, D as i, L as n, P as c, f as d, g as m, k as u, j as E, l as p, e as C, c as D, b as F, d as A, n as f, h as _ } from "../chunks/validators-CQcG0EPN.js";
3
- import { c as T, g as h, f as x, b as N, e as y, d as I, a as M, h as R, r as b } from "../chunks/field-dependencies-CGYic38w.js";
4
- import { D as S } from "../chunks/token-types-UjyNz95-.js";
5
- import { r as O, a as v } from "../chunks/pivot-result-identity-CY__BuwI.js";
6
- import { D as w } from "../chunks/report-runtime-context-CtaGGlit.js";
2
+ import { C as o, D as i, L as n, P as c, f as d, g as m, k as u, j as E, l as p, e as C, c as D, b as F, d as A, n as f, h as _ } from "../chunks/validators-BS521dum.js";
3
+ import { c as T, g as h, f as x, b as N, e as y, d as I, a as M, h as R, r as b } from "../chunks/field-dependencies-BWStuMxe.js";
4
+ import { D as S } from "../chunks/token-types-Brc30mNN.js";
5
+ import { r as O, a as v } from "../chunks/pivot-result-identity-BhAm8MCg.js";
6
+ import { D as w } from "../chunks/report-runtime-context-DceiWMKz.js";
7
7
  const e = [
8
8
  "concatenate",
9
9
  "conditional-category",
@@ -33,7 +33,7 @@ export type SemanticTemporalPresentation = {
33
33
  granularity: SemaphorTimeGrain;
34
34
  format: TemporalBucketFormat;
35
35
  };
36
- export type ConnectionType = 'GoogleSheets' | 'FileUpload' | 'MySQL' | 'MSSQL' | 'PostgreSQL' | 'BigQuery' | 'Redshift' | 'Snowflake' | 'S3' | 'clickhouse' | 'S3Tables' | 'API' | 'none';
36
+ export type ConnectionType = 'GoogleSheets' | 'FileUpload' | 'MySQL' | 'MSSQL' | 'PostgreSQL' | 'BigQuery' | 'Redshift' | 'Snowflake' | 'S3' | 'clickhouse' | 'API' | 'none';
37
37
  export type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb' | 'mssql';
38
38
  export interface Field {
39
39
  /**
@@ -502,6 +502,8 @@ export interface JoinPlan {
502
502
  joins: Join[];
503
503
  }
504
504
  export interface Join {
505
+ /** True for resolver-generated joins; false/absent for customer-authored joins. */
506
+ autoResolved?: boolean;
505
507
  id: string;
506
508
  source: DatabaseEntityReference;
507
509
  target: DatabaseEntityReference;
@@ -53,10 +53,12 @@ export interface JoinabilityMap {
53
53
  * Cardinality of the direct auto-join, from THIS dataset's side.
54
54
  * `one_to_many` means one row here matches many rows there, so an
55
55
  * aggregate over this dataset's values joined to that dataset may
56
- * repeat. Informational; drives a warning, never a block. Optional.
56
+ * repeat. `unknown` when the relationship has no authored cardinality
57
+ * (the planner refuses repeat-sensitive measures across it).
58
+ * Informational; drives a warning, never a block. Optional.
57
59
  */
58
60
  cardinality?: {
59
- [targetDataset: string]: 'one_to_one' | 'one_to_many' | 'many_to_one' | 'many_to_many';
61
+ [targetDataset: string]: 'one_to_one' | 'one_to_many' | 'many_to_one' | 'many_to_many' | 'unknown';
60
62
  };
61
63
  };
62
64
  }
@@ -1,6 +1,2 @@
1
1
  import { AggregateFunction } from '../types/explorer-types.js';
2
- export declare const KNOWN_AGGREGATE_FUNCTIONS: ReadonlySet<string>;
3
- export declare const AGGREGATE_NAME_HINT_REGEX: RegExp;
4
- export declare function isLikelyAggregateFunctionName(functionName: string): boolean;
5
- export declare function expressionHasAggregate(expression: string): boolean;
6
2
  export declare function getDefaultAggregateForMetricType(dataType?: string): AggregateFunction;
@@ -9,9 +9,9 @@ import { TDbCapabilities } from '../types/common-types.js';
9
9
  * // => 'public.orders'
10
10
  *
11
11
  * @example
12
- * // S3Tables with prefixLevels: ['database', 'schema', 'table']
13
- * buildQualifiedTableName({ capabilities, database: 'ns', schema: 'sch', table: 'orders' })
14
- * // => 'ns.sch.orders'
12
+ * // Snowflake with prefixLevels: ['database', 'schema', 'table']
13
+ * buildQualifiedTableName({ capabilities, database: 'analytics', schema: 'reporting', table: 'orders' })
14
+ * // => 'analytics.reporting.orders'
15
15
  *
16
16
  * @example
17
17
  * // S3/API with prefixLevels: ['table']
@@ -0,0 +1,89 @@
1
+ /**
2
+ * The one aggregate vocabulary and expression scanner for measure
3
+ * expressions (analytics owners plan, owner A). Every consumer that asks
4
+ * "does this expression aggregate, with which functions, and how are they
5
+ * combined?" reads it here instead of keeping its own function list or
6
+ * regular expression.
7
+ *
8
+ * Expressions are Semaphor SQL templates: `{field_N}` tokens for inputs,
9
+ * SQL function calls, string literals in single or double quotes.
10
+ */
11
+ /** What an aggregate function computes, for analytics decisions. */
12
+ export type AggregationFunctionKind = 'count' | 'count_distinct' | 'sum' | 'avg' | 'min' | 'max' | 'median'
13
+ /** Unchanged when input rows repeat: BOOL_AND, BIT_OR, ANY_VALUE, ... */
14
+ | 'repeat_safe_other' | 'other';
15
+ /** Whether a SQL function name is an aggregate. */
16
+ export declare function isAggregateFunctionName(name: string): boolean;
17
+ /**
18
+ * What an aggregate call computes. A DISTINCT argument makes COUNT a
19
+ * distinct count; any other aggregate over DISTINCT values counts each
20
+ * value once, so it is unchanged by repeated rows.
21
+ */
22
+ export declare function aggregationFunctionKind(name: string, distinct?: boolean): AggregationFunctionKind;
23
+ /** One outermost aggregate call in an expression. */
24
+ export type ScannedAggregateCall = {
25
+ name: string;
26
+ kind: AggregationFunctionKind;
27
+ distinct: boolean;
28
+ /** Followed by OVER (...): a window, not a group aggregate. */
29
+ windowed: boolean;
30
+ /** Input tokens inside the call (`field_N` names). */
31
+ tokens: string[];
32
+ /** Source offsets for compiler rewrites; end excludes FILTER/OVER suffixes. */
33
+ span: {
34
+ start: number;
35
+ end: number;
36
+ argumentStart: number;
37
+ argumentEnd: number;
38
+ };
39
+ argumentCount: number;
40
+ filtered: boolean;
41
+ };
42
+ export type ScannedAggregateExpression = {
43
+ calls: ScannedAggregateCall[];
44
+ /** An aggregate call inside another aggregate call. */
45
+ nestedAggregate: boolean;
46
+ windowed: boolean;
47
+ /** Input tokens that occur outside every aggregate call, in order. */
48
+ tokensOutsideAggregates: string[];
49
+ /** All data reads belong to recognized aggregate calls; the rest consists
50
+ * only of literals, operators and understood scalar composition. */
51
+ aggregateInputsComplete: boolean;
52
+ /**
53
+ * The expression with each outermost aggregate call replaced by `@N` (its
54
+ * index in `calls`) and each token outside a call by `#token`, for shape
55
+ * analysis.
56
+ */
57
+ skeleton: string;
58
+ };
59
+ /**
60
+ * Scans an expression's aggregate calls (outermost only), their DISTINCT,
61
+ * FILTER and OVER suffixes, and the input tokens outside them.
62
+ */
63
+ export declare function scanAggregateExpression(expression: string, resolvedInputTokens?: ReadonlySet<string>): ScannedAggregateExpression;
64
+ /** A unit of an expression skeleton: an aggregate call or an input token. */
65
+ export type SkeletonUnit = {
66
+ kind: 'call';
67
+ index: number;
68
+ } | {
69
+ kind: 'token';
70
+ token: string;
71
+ };
72
+ /**
73
+ * The shape of a skeleton: one unit (possibly in parentheses), a linear
74
+ * combination of units (sums and differences, scaled by numeric constants),
75
+ * or anything else (ratios, products of units, functions, CASE, constants
76
+ * added to units).
77
+ */
78
+ export type SkeletonShape = {
79
+ kind: 'single';
80
+ unit: SkeletonUnit;
81
+ } | {
82
+ kind: 'linear';
83
+ units: SkeletonUnit[];
84
+ } | {
85
+ kind: 'other';
86
+ hasDivision: boolean;
87
+ };
88
+ /** Classifies a skeleton from `scanAggregateExpression`. */
89
+ export declare function skeletonShape(skeleton: string): SkeletonShape;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * One typed refusal for governed analytics (analytics owners plan, owner C).
3
+ * Wherever a query is refused or fails, the refusal carries one code from
4
+ * this list, the structured details, and the next step, unchanged through
5
+ * every strategy to the tool that maps it once. Input validation keeps its
6
+ * own specific codes (`invalid_dimension`, `missing_measure`, ...); every
7
+ * other failure uses these.
8
+ */
9
+ export declare const ANALYTICS_REFUSAL_CODES: readonly ["invalid_request", "missing_relationship", "ambiguous_relationship", "unsafe_join", "unsupported_capability", "capability_required", "forbidden", "not_found", "execution_failed", "timeout", "budget_exceeded", "cancelled"];
10
+ export type AnalyticsRefusalCode = (typeof ANALYTICS_REFUSAL_CODES)[number];
11
+ export type AnalyticsRefusal = {
12
+ code: AnalyticsRefusalCode;
13
+ message: string;
14
+ /** Structured specifics: planner code, datasets, path, field, SQL. */
15
+ details?: Record<string, unknown>;
16
+ /** What the caller can do next; absent when retrying is the only option. */
17
+ nextStep?: string;
18
+ /** Only warehouse failures and timeouts are worth retrying unchanged. */
19
+ retryable: boolean;
20
+ /** HTTP status for routes that answer with one. */
21
+ status: number;
22
+ };
23
+ export declare function isAnalyticsRefusalCode(value: unknown): value is AnalyticsRefusalCode;
24
+ /** Builds a refusal with the code's status and retry rule. */
25
+ export declare function analyticsRefusal(code: AnalyticsRefusalCode, message: string, extra?: {
26
+ details?: Record<string, unknown>;
27
+ nextStep?: string;
28
+ status?: number;
29
+ }): AnalyticsRefusal;
30
+ /** Reads a refusal carried on a value (an error, a result, a response). */
31
+ export declare function readAnalyticsRefusal(value: unknown): AnalyticsRefusal | undefined;
32
+ export declare function publicAnalyticsRefusal(refusal: Pick<AnalyticsRefusal, 'code'> & Partial<Pick<AnalyticsRefusal, 'status' | 'retryable'>>): AnalyticsRefusal;
@@ -732,7 +732,45 @@ export type SemaphorRelationshipDiagnostics = {
732
732
  fanoutRisk?: {
733
733
  status: 'none' | 'warning' | 'error' | 'unknown';
734
734
  message?: string;
735
+ /** The planner's structured findings (analytics owners plan, owner B). */
736
+ findings?: SemaphorJoinFinding[];
735
737
  };
738
+ /** How queries ran their joins; mixed means component queries used different strategies. */
739
+ joinStrategy?: 'plain_join' | 'aggregate_then_join' | 'mixed' | 'unknown';
740
+ };
741
+ /** One join walked from a measure's dataset, with its cardinality that way. */
742
+ export type SemaphorJoinStep = {
743
+ from: string;
744
+ to: string;
745
+ relationship?: string;
746
+ walked: 'to_one' | 'to_many' | 'many_to_many' | 'unknown';
747
+ };
748
+ /** What a join does to a measure's rows, as the planner classifies it. */
749
+ export type SemaphorJoinFinding =
750
+ /** Rows repeat per member of a bridge or dimension many side: values per member are attributions. */
751
+ {
752
+ kind: 'attribution';
753
+ measureDataset: string;
754
+ via: SemaphorJoinStep[];
755
+ }
756
+ /** Rows repeat per row of another fact (a chasm trap): values are inflated. */
757
+ | {
758
+ kind: 'inflation';
759
+ measureDataset: string;
760
+ otherFact: string;
761
+ via: SemaphorJoinStep[];
762
+ }
763
+ /** A step's cardinality isn't authored, so repeats can't be ruled out. */
764
+ | {
765
+ kind: 'unknown_cardinality';
766
+ measureDataset: string;
767
+ via: SemaphorJoinStep[];
768
+ }
769
+ /** Measures from facts with no direct relationship, combined at a shared grain. */
770
+ | {
771
+ kind: 'cross_fact';
772
+ datasets: string[];
773
+ sharedGrain?: string[];
736
774
  };
737
775
  export type SemaphorAnalyticsPopulation = {
738
776
  scope: 'filtered_query';
@@ -23,6 +23,9 @@ export * from './raw-temporal-contract.js';
23
23
  export * from './relative-date-filter.js';
24
24
  export * from './relative-date-label.js';
25
25
  export * from './operation-temporal-state.js';
26
+ export * from './aggregate-expression.js';
27
+ export * from './measure-aggregation-profile.js';
28
+ export * from './analytics-refusal.js';
26
29
  /**
27
30
  * The saved filter contract, strict: a key outside it (an execution-only
28
31
  * field the server adds while it runs a filter) fails to parse, so a save
@@ -232,6 +232,7 @@ export declare function getMatrixAnalyticalDefinition(spec: MatrixSpec): {
232
232
  id: string;
233
233
  operator: string;
234
234
  }[];
235
+ autoResolved?: boolean;
235
236
  id: string;
236
237
  source: import('../../components/index.js').DatabaseEntityReference;
237
238
  target: import('../../components/index.js').DatabaseEntityReference;
@@ -56,10 +56,19 @@ export type MatrixDescriptor = {
56
56
  nativeDataType: string;
57
57
  semanticFormat?: SemaphorValueFormat;
58
58
  };
59
+ /**
60
+ * Matrix failure codes: the shared refusal codes (Plan 2b, owner C) plus the
61
+ * two only a windowed Matrix has.
62
+ */
63
+ export declare const MATRIX_FAILURE_CODES: readonly ["invalid_request", "missing_relationship", "ambiguous_relationship", "unsafe_join", "unsupported_capability", "capability_required", "forbidden", "not_found", "execution_failed", "timeout", "budget_exceeded", "cancelled", "stale_cursor", "source_truncated"];
64
+ export type MatrixFailureCode = (typeof MATRIX_FAILURE_CODES)[number];
59
65
  export type MatrixFailure = {
60
- code: 'invalid_request' | 'unsupported_capability' | 'stale_cursor' | 'forbidden' | 'budget_exceeded' | 'source_truncated' | 'execution_failed' | 'cancelled';
66
+ code: MatrixFailureCode;
61
67
  message: string;
62
68
  detail?: string;
69
+ details?: Record<string, unknown>;
70
+ nextStep?: string;
71
+ status?: number;
63
72
  retryable: boolean;
64
73
  scope: {
65
74
  kind: 'operation';