react-semaphor 0.1.537 → 0.1.539

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 (174) hide show
  1. package/dist/analytics-protocol/index.js +352 -341
  2. package/dist/assistant-context/index.js +10 -0
  3. package/dist/assistant-protocol/index.js +104 -0
  4. package/dist/brand-studio/index.js +35 -31
  5. package/dist/briefings/index.js +46 -45
  6. package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +28 -0
  7. package/dist/chunks/add-to-dashboard-CxtTfISD.js +56 -0
  8. package/dist/chunks/aggregate-table-row-presentation-BjK9YfMI.js +979 -0
  9. package/dist/chunks/analytics-base-schemas-BFAoRlkU.js +472 -0
  10. package/dist/chunks/apply-dashboard-operations-C-iahGka.js +402 -0
  11. package/dist/chunks/assistant-chat-DgiSuFT4.js +8083 -0
  12. package/dist/chunks/availability-Bp5Gfu1I.js +44 -0
  13. package/dist/chunks/{bookmark-state-B-I9BDD0.js → bookmark-state-k7y5SNGf.js} +9 -9
  14. package/dist/chunks/{braces-8TRlDwDw.js → braces-o9UiRQes.js} +1 -1
  15. package/dist/chunks/calculated-field-identity-DcBS2NPP.js +2161 -0
  16. package/dist/chunks/calendar-day-equality-Bpl15IBo.js +487 -0
  17. package/dist/chunks/class-utils-Df1OVOT1.js +2315 -0
  18. package/dist/chunks/{field-dependencies-CpRUwr9J.js → common-types-CUf03Htv.js} +65 -58
  19. package/dist/chunks/context-HD9usB1P.js +349 -0
  20. package/dist/chunks/conversation-sQiWYUOb.js +16 -0
  21. package/dist/chunks/csv-utils-GUfKyT1J.js +56 -0
  22. package/dist/chunks/custom-visual-inputs-BrUOIwln.js +3288 -0
  23. package/dist/chunks/{dashboard-briefing-launcher-A2uVpHCp.js → dashboard-briefing-launcher-Bl3gCeBR.js} +580 -556
  24. package/dist/chunks/{dashboard-controls-DxTuVis_.js → dashboard-controls-0EX0HiJt.js} +683 -686
  25. package/dist/chunks/{common-types-g7yS12Cg.js → dashboard-filter-value-compatibility-D95O4nd7.js} +18 -24
  26. package/dist/chunks/dashboard-json-6X_2BDiL.js +69 -0
  27. package/dist/chunks/{dashboard-BPJo-Fnd.js → dashboard-y5BwcvzT.js} +1 -1
  28. package/dist/chunks/document-dashboard-inputs-BrYYlRVo.js +10678 -0
  29. package/dist/chunks/document-sheet-utils-C1eEldxs.js +1076 -0
  30. package/dist/chunks/{edit-dashboard-visual-ByV0OwSp.js → edit-dashboard-visual-Bzchfgga.js} +4744 -4746
  31. package/dist/chunks/editor-draft-sync-BN5qYHPF.js +15 -0
  32. package/dist/chunks/filter-value-text-BhWugPWE.js +163 -0
  33. package/dist/chunks/index-CqMiAkay.js +3164 -0
  34. package/dist/chunks/index-CuHybtft.js +51 -0
  35. package/dist/chunks/layout-grid-Bgzth8vd.js +16 -0
  36. package/dist/chunks/{matrix-analytical-definition-CgBTD6H8.js → matrix-analytical-definition-bcprSe4u.js} +1 -1
  37. package/dist/chunks/{matrix-card-CAdizkUl.js → matrix-card-CJn1hB5V.js} +13 -12
  38. package/dist/chunks/matrix-definition-DQDI2okF.js +206 -0
  39. package/dist/chunks/{matrix-formatter-DJCk8Znf.js → matrix-formatter-DQ8avoIQ.js} +648 -457
  40. package/dist/chunks/matrix-member-presentation-BNPSDKBG.js +105 -0
  41. package/dist/chunks/{matrix-operation-contract-BKupLHXL.js → matrix-operation-contract-B8PBF1Gd.js} +134 -133
  42. package/dist/chunks/{metric-comparison-BKHyvnAy.js → metric-comparison-CojWeLqx.js} +1 -1
  43. package/dist/chunks/{palette-Cp1hqZtm.js → palette-D10o_yYX.js} +1 -1
  44. package/dist/chunks/pivot-header-presentation-MkcKnjn3.js +42 -0
  45. package/dist/chunks/{pivot-result-identity-Bs4tLtLo.js → pivot-result-identity-D6hhcRXi.js} +1 -1
  46. package/dist/chunks/pivot-result-lifecycle-8qCDmpKc.js +804 -0
  47. package/dist/chunks/raw-temporal-D61lr48Y.js +1464 -0
  48. package/dist/chunks/{raw-temporal-contract-mLFS-9wk.js → raw-temporal-contract-C51YG48G.js} +1 -1
  49. package/dist/chunks/report-preferences-dialog-CWhSbc5_.js +1808 -0
  50. package/dist/chunks/{report-runtime-context-CG_I0PPW.js → report-runtime-context-B984Nq1E.js} +8 -7
  51. package/dist/chunks/save-CfJpQQ68.js +21 -0
  52. package/dist/chunks/saved-dashboard-context-Dqve2jlB.js +566 -0
  53. package/dist/chunks/{selection-reducer-CiDEtmAq.js → selection-reducer-vKIb_jS6.js} +2 -2
  54. package/dist/chunks/{semaphor-ready-indicator-CHu1L-lo.js → semaphor-ready-indicator-ldcwmLoY.js} +65803 -62954
  55. package/dist/chunks/{shelf-drop-preview-context-i-H6DFyU.js → shelf-drop-preview-context-BWxunXTq.js} +199 -196
  56. package/dist/chunks/{source-entity-resolution-C-oNyYMp.js → source-entity-resolution-CVA1a85c.js} +8 -8
  57. package/dist/chunks/switch-CvItuC1Q.js +8199 -0
  58. package/dist/chunks/{temporal-bucket-DlFuhCnT.js → temporal-bucket-D8JF7zKz.js} +86 -71
  59. package/dist/chunks/{temporal-bucket-contract-D2OuaVZ7.js → temporal-bucket-contract-DaOajRC7.js} +1 -1
  60. package/dist/chunks/{token-types-DtSJOUjh.js → token-types-bxUxXDX2.js} +1 -1
  61. package/dist/chunks/{upload-CAIpsti1.js → upload-BFX7apKV.js} +1 -1
  62. package/dist/chunks/{use-create-flow-overlay-state-Bj63WwHc.js → use-create-flow-overlay-state-RHgzVfcz.js} +331 -339
  63. package/dist/chunks/{validators-DMSH81OM.js → validators-Ej1DdCXa.js} +1050 -1510
  64. package/dist/chunks/visual-choice-JiJ-_3bi.js +204 -0
  65. package/dist/chunks/x-4f5U2XwU.js +100 -0
  66. package/dist/chunks/{zoned-wall-clock-1qlWCE20.js → zoned-wall-clock-MulfA26h.js} +2 -2
  67. package/dist/dashboard/index.js +2 -2
  68. package/dist/dashboard-authoring/index.js +823 -661
  69. package/dist/data-app-sdk/index.js +32 -30
  70. package/dist/data-app-sdk-adapters/index.js +23 -22
  71. package/dist/data-app-sdk-validation/index.js +23 -22
  72. package/dist/format-utils/index.js +173 -168
  73. package/dist/index.js +267 -258
  74. package/dist/layouts/index.js +236 -24
  75. package/dist/report-runtime-context/index.js +2 -2
  76. package/dist/style.css +1 -1
  77. package/dist/surfboard/index.js +2 -2
  78. package/dist/types/assistant-context.d.ts +2 -0
  79. package/dist/types/assistant-protocol.d.ts +2 -0
  80. package/dist/types/components/assistant/assistant-entry-points.d.ts +18 -0
  81. package/dist/types/components/assistant/assistant-provider.d.ts +19 -0
  82. package/dist/types/components/assistant/assistant-store.d.ts +52 -0
  83. package/dist/types/components/assistant/use-assistant.d.ts +38 -0
  84. package/dist/types/components/index.d.ts +5 -1
  85. package/dist/types/components/surfboard/filter/types.d.ts +5 -2
  86. package/dist/types/index.js +50 -51
  87. package/dist/types/lib/api/invalidate-token.d.ts +7 -0
  88. package/dist/types/lib/charts/cartesian-fields.d.ts +64 -0
  89. package/dist/types/lib/charts/types.d.ts +7 -0
  90. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +14 -2
  91. package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +5 -6
  92. package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +8 -3
  93. package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +11 -6
  94. package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +7 -0
  95. package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +79 -0
  96. package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +3 -2
  97. package/dist/types/lib/document/document-table-data-policy.d.ts +15 -0
  98. package/dist/types/lib/filter-values/filter-mode.d.ts +22 -0
  99. package/dist/types/lib/hooks/use-calendar-context.d.ts +5 -0
  100. package/dist/types/lib/hooks/use-filter-option-browse.d.ts +5 -0
  101. package/dist/types/lib/hooks/use-text-filter.d.ts +9 -0
  102. package/dist/types/lib/print/print-inputs.d.ts +4 -2
  103. package/dist/types/lib/query-context/build-card-query-context.d.ts +12 -4
  104. package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +93 -0
  105. package/dist/types/lib/query-context/card-server-request.d.ts +72 -0
  106. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +7 -0
  107. package/dist/types/lib/query-context/describe-card-execution-snapshot.d.ts +56 -0
  108. package/dist/types/lib/query-context/document-section-card-query.d.ts +45 -0
  109. package/dist/types/lib/query-context/resolve-runtime-card-filters.d.ts +17 -2
  110. package/dist/types/lib/stores/dashboard-store.d.ts +34 -11
  111. package/dist/types/lib/stores/editor-store.d.ts +4 -2
  112. package/dist/types/lib/types/token-types.d.ts +11 -0
  113. package/dist/types/lib/utils/card-type-change.d.ts +30 -0
  114. package/dist/types/lib/utils/comparison-window-caption.d.ts +12 -0
  115. package/dist/types/lib/utils/filter-default-value-utils.d.ts +13 -2
  116. package/dist/types/shared/analytics-protocol/applied-constraints.d.ts +74 -0
  117. package/dist/types/shared/analytics-protocol/contracts.d.ts +3 -0
  118. package/dist/types/shared/analytics-protocol/filter-field-ownership.d.ts +43 -0
  119. package/dist/types/shared/analytics-protocol/index.d.ts +3 -0
  120. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +1 -1
  121. package/dist/types/shared/analytics-protocol/visual-choice.d.ts +75 -0
  122. package/dist/types/shared/assistant-context/index.d.ts +9 -0
  123. package/dist/types/shared/assistant-context/project-context.d.ts +55 -0
  124. package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +130 -0
  125. package/dist/types/shared/assistant-protocol/add-to-dashboard.d.ts +17 -0
  126. package/dist/types/shared/assistant-protocol/artifact.d.ts +63 -0
  127. package/dist/types/shared/assistant-protocol/availability.d.ts +39 -0
  128. package/dist/types/shared/assistant-protocol/context.d.ts +952 -0
  129. package/dist/types/shared/assistant-protocol/conversation.d.ts +38 -0
  130. package/dist/types/shared/assistant-protocol/index.d.ts +16 -0
  131. package/dist/types/shared/assistant-protocol/limits.d.ts +53 -0
  132. package/dist/types/shared/assistant-protocol/parts.d.ts +140 -0
  133. package/dist/types/shared/assistant-protocol/request.d.ts +77 -0
  134. package/dist/types/shared/assistant-protocol/sources.d.ts +27 -0
  135. package/dist/types/shared/assistant-protocol/token-config.d.ts +32 -0
  136. package/dist/types/shared/assistant-protocol/transcript.d.ts +40 -0
  137. package/dist/types/shared/dashboard-authoring/card-query-request.d.ts +112 -0
  138. package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +1794 -0
  139. package/dist/types/shared/dashboard-authoring/index.d.ts +5 -0
  140. package/dist/types/shared/dashboard-authoring/new-card.d.ts +10 -0
  141. package/dist/types/shared/dashboard-authoring/operations/apply-dashboard-operations.d.ts +40 -0
  142. package/dist/types/shared/dashboard-authoring/resolved-primary-date-field-validation.d.ts +16 -0
  143. package/dist/types/shared/format-utils/filter-detail.d.ts +70 -0
  144. package/dist/types/shared/format-utils/filter-value-text.d.ts +15 -0
  145. package/dist/types/shared/format-utils/index.d.ts +3 -0
  146. package/dist/types/shared/format-utils/raw-temporal.d.ts +7 -0
  147. package/dist/types/shared/format-utils/temporal-bucket.d.ts +7 -0
  148. package/dist/types/shared/layouts/frame-layouts.d.ts +23 -0
  149. package/dist/types/shared/layouts/index.d.ts +1 -0
  150. package/package.json +12 -2
  151. package/dist/chunks/calculated-field-identity-BptYhyOP.js +0 -1326
  152. package/dist/chunks/calendar-day-equality-BRjN1S9h.js +0 -383
  153. package/dist/chunks/card-config-utils-BOM1dxCk.js +0 -1150
  154. package/dist/chunks/constants-DNWVy8Y3.js +0 -9
  155. package/dist/chunks/dashboard-json-B1dEQu98.js +0 -65
  156. package/dist/chunks/field-aggregations-CoLzYHeL.js +0 -1229
  157. package/dist/chunks/index-DTcTAGGM.js +0 -4101
  158. package/dist/chunks/matrix-continuation-C4sRcjZU.js +0 -72
  159. package/dist/chunks/matrix-control-sources-DTqcA2_L.js +0 -636
  160. package/dist/chunks/matrix-definition-D9iShKZI.js +0 -87
  161. package/dist/chunks/matrix-member-presentation-Ct8GuxHt.js +0 -209
  162. package/dist/chunks/numeric-presentation-CWu3gunq.js +0 -537
  163. package/dist/chunks/pivot-header-presentation-CHs2GFrM.js +0 -753
  164. package/dist/chunks/pivot-result-lifecycle-DQz_gjGu.js +0 -789
  165. package/dist/chunks/raw-temporal-iMXRK-Qz.js +0 -930
  166. package/dist/chunks/report-preferences-dialog-DXPjteCU.js +0 -1623
  167. package/dist/chunks/save-kO6cIaob.js +0 -34
  168. package/dist/chunks/semantic-format-DiqYeKwU.js +0 -192
  169. package/dist/chunks/switch-DO8a0EfJ.js +0 -25004
  170. package/dist/chunks/temporal-input-presentation-BD7YNUzu.js +0 -195
  171. package/dist/chunks/x-CXDkqdur.js +0 -149
  172. package/dist/types/lib/class-utils.d.ts +0 -2
  173. package/dist/types/lib/document/document-input-runtime.d.ts +0 -26
  174. package/dist/types/lib/utils.d.ts +0 -51
@@ -0,0 +1,472 @@
1
+ import { z as e } from "zod";
2
+ const T = [
3
+ "missing_dependency",
4
+ "missing_relationship",
5
+ "population_required",
6
+ "ambiguous_relationship"
7
+ ];
8
+ function $(a) {
9
+ return T.includes(
10
+ a
11
+ );
12
+ }
13
+ const W = 200, b = [
14
+ "second",
15
+ "minute",
16
+ "hour",
17
+ "day",
18
+ "week",
19
+ "month",
20
+ "quarter",
21
+ "year"
22
+ ];
23
+ function X(a) {
24
+ return typeof a == "string" && b.includes(a);
25
+ }
26
+ const j = [
27
+ "week_of_short",
28
+ "week_of_long",
29
+ "quarter_short",
30
+ "quarter_long",
31
+ "fiscal_quarter_short",
32
+ "fiscal_year"
33
+ ], J = {
34
+ invalidMetadata: "invalid_raw_temporal_metadata"
35
+ };
36
+ function v(a) {
37
+ return a === "second" || a === "minute" || a === "hour" ? "datetime" : "date";
38
+ }
39
+ const Y = {
40
+ missingMetadata: "missing_temporal_bucket_metadata",
41
+ invalidMetadata: "invalid_temporal_bucket_metadata",
42
+ invalidValue: "invalid_temporal_bucket_value"
43
+ }, Q = "__auto_count__";
44
+ function I(a) {
45
+ try {
46
+ return new Intl.DateTimeFormat("en-US", { timeZone: a }).format(), !0;
47
+ } catch {
48
+ return !1;
49
+ }
50
+ }
51
+ const w = e.record(e.string(), e.unknown()), i = e.array(w), r = e.enum([
52
+ "SUM",
53
+ "COUNT",
54
+ "AVG",
55
+ "MIN",
56
+ "MAX",
57
+ "MEDIAN",
58
+ "DISTINCT"
59
+ ]), s = e.enum([
60
+ "postgres",
61
+ "mysql",
62
+ "mssql",
63
+ "snowflake",
64
+ "clickhouse",
65
+ "bigquery",
66
+ "redshift",
67
+ "duckdb",
68
+ "sqlite",
69
+ "unknown"
70
+ ]), C = e.enum(b), l = e.enum([
71
+ "dimension",
72
+ "measure",
73
+ "date",
74
+ "id",
75
+ "unknown"
76
+ ]), p = e.enum([
77
+ "string",
78
+ "number",
79
+ "boolean",
80
+ "date",
81
+ "datetime",
82
+ "unknown"
83
+ ]), u = e.union([e.number(), e.string(), e.null()]), d = e.enum([
84
+ "millisecond",
85
+ "second",
86
+ "minute",
87
+ "hour",
88
+ "day"
89
+ ]), O = e.enum(j), q = e.discriminatedUnion("mode", [
90
+ e.object({ mode: e.literal("auto") }).strict(),
91
+ e.object({
92
+ mode: e.literal("preset"),
93
+ preset: O
94
+ }).strict(),
95
+ e.object({
96
+ mode: e.literal("pattern"),
97
+ pattern: e.string().min(1)
98
+ }).strict()
99
+ ]), ee = e.object({
100
+ type: e.literal("temporal_bucket"),
101
+ presentation: q
102
+ }).strict(), A = e.object({
103
+ tz: e.string().min(1).refine(I, {
104
+ message: "tz must be a valid IANA timezone"
105
+ }),
106
+ weekStart: e.number().int().min(0).max(6),
107
+ fiscalCalendar: e.object({
108
+ kind: e.literal("month_aligned"),
109
+ yearStartMonth: e.number().int().min(1).max(12)
110
+ }).strict().optional()
111
+ }).strict(), g = e.object({
112
+ kind: e.literal("temporal_bucket"),
113
+ granularity: C,
114
+ calendar: A
115
+ }).strict(), D = e.object({
116
+ kind: e.literal("raw_temporal"),
117
+ valueKind: e.enum(["date", "wall_datetime", "instant"])
118
+ }).strict(), E = e.union([
119
+ e.object({
120
+ type: e.enum([
121
+ "number",
122
+ "currency",
123
+ "percent",
124
+ "percentage",
125
+ "scientific"
126
+ ]),
127
+ locale: e.string().optional(),
128
+ minimumFractionDigits: e.number().optional(),
129
+ maximumFractionDigits: e.number().optional(),
130
+ useGrouping: e.boolean().optional(),
131
+ prefix: e.string().optional(),
132
+ suffix: e.string().optional(),
133
+ negativeStyle: e.enum(["minus", "parentheses"]).optional(),
134
+ compact: e.boolean().optional(),
135
+ scale: e.number().optional(),
136
+ currency: e.string().optional(),
137
+ percentValueMode: e.enum(["fraction", "whole"]).optional()
138
+ }).passthrough().superRefine((a, t) => {
139
+ "locale" in a && t.addIssue({
140
+ code: e.ZodIssueCode.custom,
141
+ path: ["locale"],
142
+ message: "Numeric semantic formats inherit locale from viewer preferences."
143
+ });
144
+ }),
145
+ e.object({
146
+ type: e.enum(["date", "datetime"]),
147
+ locale: e.string().optional(),
148
+ pattern: e.string().optional(),
149
+ relative: e.boolean().optional(),
150
+ timezone: e.string().optional(),
151
+ sourceTimezone: e.string().optional(),
152
+ prefix: e.string().optional(),
153
+ suffix: e.string().optional()
154
+ }).passthrough(),
155
+ e.object({
156
+ type: e.literal("duration"),
157
+ inputUnit: d.optional(),
158
+ outputStyle: e.enum(["compact", "digital", "long"]).optional(),
159
+ largestUnit: d.optional(),
160
+ smallestUnit: d.optional(),
161
+ maxUnits: e.number().optional(),
162
+ prefix: e.string().optional(),
163
+ suffix: e.string().optional(),
164
+ negativeStyle: e.enum(["minus", "parentheses"]).optional()
165
+ }).passthrough(),
166
+ e.object({
167
+ type: e.literal("string"),
168
+ prefix: e.string().optional(),
169
+ suffix: e.string().optional()
170
+ }).passthrough()
171
+ ]);
172
+ function M(a, t) {
173
+ return e.object(a).passthrough().superRefine((o, k) => {
174
+ for (const m of t)
175
+ Object.prototype.hasOwnProperty.call(o, m) || k.addIssue({
176
+ code: "custom",
177
+ path: [m],
178
+ message: `Required field "${m}" is missing.`
179
+ });
180
+ });
181
+ }
182
+ const y = e.object({
183
+ kind: e.literal("semantic"),
184
+ domainId: e.string(),
185
+ datasetName: e.string(),
186
+ datasetId: e.string().optional(),
187
+ label: e.string().optional(),
188
+ connectionId: e.string().optional()
189
+ }).passthrough(), N = e.object({
190
+ kind: e.literal("physical"),
191
+ connectionId: e.string(),
192
+ connectionType: e.string().optional(),
193
+ tableName: e.string(),
194
+ databaseName: e.string().optional(),
195
+ schemaName: e.string().optional(),
196
+ label: e.string().optional(),
197
+ dialect: s.optional()
198
+ }).passthrough(), P = e.object({
199
+ kind: e.literal("sql"),
200
+ connectionId: e.string(),
201
+ dialect: s.optional(),
202
+ label: e.string().optional()
203
+ }).passthrough(), S = e.union([
204
+ y,
205
+ N,
206
+ P
207
+ ]), F = e.object({
208
+ name: e.string(),
209
+ label: e.string().optional(),
210
+ role: l.optional(),
211
+ dataType: p.optional(),
212
+ source: S.optional(),
213
+ aggregate: r.optional()
214
+ }).passthrough(), _ = F, x = e.object({
215
+ kind: e.literal("field"),
216
+ field: _,
217
+ aggregate: r.optional()
218
+ }).passthrough(), B = e.object({
219
+ kind: e.literal("derived_field"),
220
+ name: e.string(),
221
+ label: e.string(),
222
+ description: e.string().optional(),
223
+ resultRole: l,
224
+ dataType: p,
225
+ computeStage: e.enum(["row", "aggregate"]),
226
+ expression: e.string(),
227
+ expressionLanguage: e.literal("semaphor_sql_template").optional(),
228
+ inputs: e.record(x),
229
+ defaultAggregate: r.optional(),
230
+ aggregationBehavior: e.enum([
231
+ "additive",
232
+ "non_additive",
233
+ "ratio_of_sums",
234
+ "weighted",
235
+ "pre_aggregated",
236
+ "snapshot"
237
+ ]).optional(),
238
+ aggregationStrategy: e.enum([
239
+ "default",
240
+ "symmetric_aggregate",
241
+ "aggregate_then_join",
242
+ "weighted"
243
+ ]).optional(),
244
+ format: E.optional(),
245
+ tags: e.array(e.string()).optional()
246
+ }).passthrough(), f = B, ae = _.and(
247
+ e.object({
248
+ derivedField: f.optional()
249
+ }).passthrough()
250
+ ), U = y, V = e.object({
251
+ kind: e.literal("physical"),
252
+ connectionId: e.string().optional(),
253
+ connectionType: e.string().optional(),
254
+ tableName: e.string(),
255
+ databaseName: e.string().optional(),
256
+ schemaName: e.string().optional(),
257
+ label: e.string().optional(),
258
+ dialect: s.optional()
259
+ }).passthrough(), z = e.object({
260
+ kind: e.literal("sql"),
261
+ connectionId: e.string().optional(),
262
+ dialect: s.optional(),
263
+ label: e.string().optional()
264
+ }).passthrough(), G = e.union([
265
+ U,
266
+ V,
267
+ z
268
+ ]), te = e.object({
269
+ key: e.string().optional(),
270
+ name: e.string(),
271
+ label: e.string().optional(),
272
+ role: l.optional(),
273
+ dataType: p.optional(),
274
+ source: G.optional(),
275
+ aggregate: r.optional(),
276
+ derivedField: e.never().optional()
277
+ }).passthrough(), n = e.object({
278
+ key: e.string(),
279
+ name: e.string(),
280
+ label: e.string(),
281
+ role: l.optional(),
282
+ dataType: p.optional(),
283
+ aggregate: r.optional(),
284
+ source: S.optional(),
285
+ derivedField: f.optional(),
286
+ temporalBucket: g.optional(),
287
+ rawTemporal: D.optional(),
288
+ pivotIdentity: e.object({
289
+ metricId: e.string().min(1),
290
+ metricAlias: e.string().min(1),
291
+ members: e.array(
292
+ e.object({
293
+ fieldId: e.string().min(1),
294
+ value: e.string().nullable(),
295
+ temporalBucket: g.optional()
296
+ }).strict()
297
+ )
298
+ }).strict().optional()
299
+ }).passthrough().superRefine((a, t) => {
300
+ if (a.temporalBucket && a.rawTemporal && t.addIssue({
301
+ code: e.ZodIssueCode.custom,
302
+ path: ["rawTemporal"],
303
+ message: "A result column cannot carry both temporalBucket and rawTemporal metadata."
304
+ }), a.temporalBucket) {
305
+ const o = v(
306
+ a.temporalBucket.granularity
307
+ );
308
+ a.dataType !== o && t.addIssue({
309
+ code: e.ZodIssueCode.custom,
310
+ path: ["dataType"],
311
+ message: `${a.temporalBucket.granularity} temporal buckets require dataType ${o}.`
312
+ });
313
+ }
314
+ if (a.rawTemporal) {
315
+ const o = a.rawTemporal.valueKind === "date" ? "date" : "datetime";
316
+ a.dataType !== o && t.addIssue({
317
+ code: e.ZodIssueCode.custom,
318
+ path: ["dataType"],
319
+ message: `${a.rawTemporal.valueKind} raw temporal values require dataType ${o}.`
320
+ });
321
+ }
322
+ }), oe = e.object({
323
+ records: i,
324
+ columns: e.array(n).optional()
325
+ }).passthrough(), ne = e.object({
326
+ records: i,
327
+ columns: e.array(n)
328
+ }).passthrough(), R = e.object({
329
+ code: e.string(),
330
+ message: e.string().optional(),
331
+ invalidField: e.string().optional(),
332
+ fieldRole: e.enum(["measure", "date", "dimension", "input", "source", "sql"]).optional(),
333
+ validMeasureCandidates: e.array(e.string()).optional(),
334
+ validDateCandidates: e.array(e.string()).optional(),
335
+ validDimensionCandidates: e.array(e.string()).optional(),
336
+ recommendedNextStep: e.string()
337
+ }).passthrough(), h = e.object({
338
+ code: e.string(),
339
+ message: e.string(),
340
+ path: e.string().optional(),
341
+ fieldRole: e.enum(["measure", "date", "dimension", "input", "source", "sql"]).optional(),
342
+ repairHint: R.optional()
343
+ }).passthrough(), ie = e.object({
344
+ ok: e.boolean(),
345
+ errors: e.array(h),
346
+ warnings: e.array(h),
347
+ repairHints: e.array(R)
348
+ }).passthrough(), L = e.object({
349
+ page: e.number(),
350
+ pageSize: e.number(),
351
+ pageCount: e.number(),
352
+ totalCount: e.number(),
353
+ hasNextPage: e.boolean(),
354
+ hasPrevPage: e.boolean()
355
+ }).passthrough(), c = {
356
+ intentId: e.string().optional(),
357
+ queryPath: e.enum(["query_spec", "sql", "sql_python"]),
358
+ warnings: e.array(e.string()).optional(),
359
+ rowCount: e.number().optional(),
360
+ rowLimitExceeded: e.boolean().optional(),
361
+ limit: e.number().optional(),
362
+ pagination: L.optional()
363
+ }, re = e.object({
364
+ ...c,
365
+ kind: e.literal("metric"),
366
+ primaryValue: u,
367
+ measures: e.record(u).optional(),
368
+ missingMeasures: e.array(e.string()).optional(),
369
+ comparison: e.object({
370
+ kind: e.enum(["previous_period", "previous_year", "target"]),
371
+ value: u.optional(),
372
+ delta: e.union([e.number(), e.null()]).optional(),
373
+ deltaPercent: e.union([e.number(), e.null()]).optional()
374
+ }).passthrough().optional(),
375
+ records: i.optional()
376
+ }).passthrough(), se = e.object({
377
+ ...c,
378
+ kind: e.literal("records"),
379
+ columns: e.array(n),
380
+ records: i,
381
+ totals: e.object({
382
+ mode: e.literal("server"),
383
+ scope: e.literal("filtered_result"),
384
+ row: e.record(e.string(), e.unknown()),
385
+ columns: e.array(n).optional()
386
+ }).passthrough().optional()
387
+ }).passthrough(), H = e.object({
388
+ inputId: e.string().min(1),
389
+ status: e.enum(["applied", "inactive", "skipped", "overridden", "error"]),
390
+ reason: e.enum([
391
+ "unrelated",
392
+ "population_required",
393
+ "missing_dependency",
394
+ "missing_relationship",
395
+ "ambiguous_relationship",
396
+ "invalid_metadata",
397
+ "unsupported_dependency",
398
+ "override_not_eligible"
399
+ ]).optional()
400
+ }), Z = e.object({
401
+ complete: e.boolean(),
402
+ reason: e.enum(["unsupported", "truncated"]).optional()
403
+ }), le = e.object({
404
+ ...c,
405
+ kind: e.literal("inputOptions"),
406
+ dependencyOutcomes: e.array(H).optional(),
407
+ match: Z.optional(),
408
+ options: e.array(
409
+ M(
410
+ {
411
+ label: e.string(),
412
+ value: e.unknown(),
413
+ count: e.number().optional(),
414
+ disambiguation: e.array(e.string()).optional()
415
+ },
416
+ ["value"]
417
+ )
418
+ )
419
+ }).passthrough(), pe = e.object({
420
+ ...c,
421
+ kind: e.literal("sql"),
422
+ columns: e.array(n),
423
+ records: i,
424
+ sqlShape: e.object({
425
+ statementType: e.string().optional(),
426
+ explicitLimit: e.number().optional(),
427
+ hasPythonCode: e.boolean().optional()
428
+ }).passthrough().optional()
429
+ }).passthrough();
430
+ export {
431
+ oe as A,
432
+ ne as B,
433
+ h as C,
434
+ ie as D,
435
+ re as E,
436
+ se as F,
437
+ H as G,
438
+ Z as H,
439
+ le as I,
440
+ pe as J,
441
+ W as M,
442
+ T as O,
443
+ J as R,
444
+ Q as S,
445
+ Y as T,
446
+ v as a,
447
+ b,
448
+ $ as c,
449
+ X as d,
450
+ j as e,
451
+ i as f,
452
+ r as g,
453
+ C as h,
454
+ I as i,
455
+ ee as j,
456
+ D as k,
457
+ E as l,
458
+ y as m,
459
+ u as n,
460
+ N as o,
461
+ P as p,
462
+ F as q,
463
+ w as r,
464
+ S as s,
465
+ g as t,
466
+ _ as u,
467
+ B as v,
468
+ f as w,
469
+ ae as x,
470
+ te as y,
471
+ n as z
472
+ };