yamchart 0.10.1 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{advisor-5TJDNAY7.js → advisor-5F73GF54.js} +12 -12
- package/dist/{chunk-S2CH4HUZ.js → chunk-25ES7MGF.js} +4 -4
- package/dist/{chunk-QUIDZO5G.js → chunk-5CRXV5PQ.js} +22 -6
- package/dist/chunk-5CRXV5PQ.js.map +1 -0
- package/dist/chunk-7HWFVUGP.js +1239 -0
- package/dist/chunk-7HWFVUGP.js.map +1 -0
- package/dist/{chunk-5FHV22X2.js → chunk-PYVROL7Z.js} +4 -4
- package/dist/{chunk-64CI3HSY.js → chunk-UOSOZT47.js} +15 -8
- package/dist/{chunk-64CI3HSY.js.map → chunk-UOSOZT47.js.map} +1 -1
- package/dist/{chunk-ZBCQNWVN.js → chunk-WVSDQNAN.js} +5 -5
- package/dist/{chunk-UFDQ3C7Q.js → chunk-X3UG6T3Q.js} +257 -257
- package/dist/chunk-X3UG6T3Q.js.map +1 -0
- package/dist/{connection-utils-FEUWER5I.js → connection-utils-HNX3473B.js} +5 -5
- package/dist/{describe-MEP72B56.js → describe-KDGXFPDQ.js} +7 -7
- package/dist/{dev-H6SJZ5UA.js → dev-KOWFGDOP.js} +933 -127
- package/dist/dev-KOWFGDOP.js.map +1 -0
- package/dist/dev-supervisor-JXLVGEHP.js +43 -0
- package/dist/dev-supervisor-JXLVGEHP.js.map +1 -0
- package/dist/{dist-5DQO6L2S.js → dist-LK3ZG74Q.js} +5 -5
- package/dist/{dist-PPAD6KOM.js → dist-WMP7BFKP.js} +24 -2
- package/dist/{dist-XNCED7JW.js → dist-YB5RBWCC.js} +4 -4
- package/dist/index.js +65 -42
- package/dist/index.js.map +1 -1
- package/dist/{init-SECXKD5G.js → init-TJJVKMEN.js} +24 -5
- package/dist/init-TJJVKMEN.js.map +1 -0
- package/dist/public/assets/DataView-BfwnWnLH.js +9 -0
- package/dist/public/assets/{EventManagement-BnmeJDQl.js → EventManagement-BIkVUSCe.js} +2 -2
- package/dist/public/assets/ExplorePage-CeaAulqT.js +1 -0
- package/dist/public/assets/{LoginPage-CzaFkkjg.js → LoginPage-4WeNcdRi.js} +1 -1
- package/dist/public/assets/{PublicViewer-irjxqH6a.js → PublicViewer-CkW-G56D.js} +1 -1
- package/dist/public/assets/{SetupWizard-ConWIcmy.js → SetupWizard-CwTr3PCy.js} +1 -1
- package/dist/public/assets/{ShareManagement-CP4wdwLR.js → ShareManagement-DSon6CoC.js} +1 -1
- package/dist/public/assets/{SourceDetailView-DZS5518E.js → SourceDetailView-BA4XVKqV.js} +1 -1
- package/dist/public/assets/UserManagement-BWD2Ugkv.js +1 -0
- package/dist/public/assets/{index-C1X8RW4Z.css → index-Cb4omrVn.css} +1 -1
- package/dist/public/assets/{index-jlfTO7f5.js → index-iR9gLdl9.js} +41 -41
- package/dist/public/assets/{index.es-CgnvEWi5.js → index.es-BuEtjxhO.js} +1 -1
- package/dist/public/assets/{jspdf.es.min-Cw5WefMt.js → jspdf.es.min-CScx2_oK.js} +3 -3
- package/dist/public/index.html +2 -2
- package/dist/{query-2H3YOPI2.js → query-7XHKSZ5H.js} +5 -5
- package/dist/sample-YNSJ3I3T.js +76 -0
- package/dist/sample-YNSJ3I3T.js.map +1 -0
- package/dist/{search-IPE4ISFB.js → search-NKRXXLRS.js} +7 -7
- package/dist/semantic-DD7P4634.js +30 -0
- package/dist/{semantic-K3MYXXJI.js → semantic-NBAX4WU4.js} +39 -4
- package/dist/semantic-NBAX4WU4.js.map +1 -0
- package/dist/{source-resolver-HZQLOODU.js → source-resolver-7NY3KEZ2.js} +7 -7
- package/dist/source-resolver-7NY3KEZ2.js.map +1 -0
- package/dist/{sync-warehouse-TUNULDUY.js → sync-warehouse-PK7HXW7U.js} +15 -11
- package/dist/sync-warehouse-PK7HXW7U.js.map +1 -0
- package/dist/{tables-K5NAN2WK.js → tables-WQTRZSXR.js} +7 -7
- package/dist/templates/default/docs/yamchart-reference.md +26 -0
- package/dist/{test-SRHVOXZB.js → test-MKNKUR3N.js} +19 -7
- package/dist/test-MKNKUR3N.js.map +1 -0
- package/package.json +5 -5
- package/dist/chunk-QUIDZO5G.js.map +0 -1
- package/dist/chunk-UFDQ3C7Q.js.map +0 -1
- package/dist/chunk-ZIY22VO7.js +0 -1190
- package/dist/chunk-ZIY22VO7.js.map +0 -1
- package/dist/dev-H6SJZ5UA.js.map +0 -1
- package/dist/init-SECXKD5G.js.map +0 -1
- package/dist/public/assets/DataView-DUCz_96y.js +0 -9
- package/dist/public/assets/ExplorePage-kk4z9ldZ.js +0 -1
- package/dist/public/assets/UserManagement-AubGd9hl.js +0 -1
- package/dist/sample-ODUGGSFA.js +0 -42
- package/dist/sample-ODUGGSFA.js.map +0 -1
- package/dist/semantic-K3MYXXJI.js.map +0 -1
- package/dist/sync-warehouse-TUNULDUY.js.map +0 -1
- package/dist/test-SRHVOXZB.js.map +0 -1
- /package/dist/{advisor-5TJDNAY7.js.map → advisor-5F73GF54.js.map} +0 -0
- /package/dist/{chunk-S2CH4HUZ.js.map → chunk-25ES7MGF.js.map} +0 -0
- /package/dist/{chunk-5FHV22X2.js.map → chunk-PYVROL7Z.js.map} +0 -0
- /package/dist/{chunk-ZBCQNWVN.js.map → chunk-WVSDQNAN.js.map} +0 -0
- /package/dist/{connection-utils-FEUWER5I.js.map → connection-utils-HNX3473B.js.map} +0 -0
- /package/dist/{describe-MEP72B56.js.map → describe-KDGXFPDQ.js.map} +0 -0
- /package/dist/{dist-5DQO6L2S.js.map → dist-LK3ZG74Q.js.map} +0 -0
- /package/dist/{dist-PPAD6KOM.js.map → dist-WMP7BFKP.js.map} +0 -0
- /package/dist/{dist-XNCED7JW.js.map → dist-YB5RBWCC.js.map} +0 -0
- /package/dist/{query-2H3YOPI2.js.map → query-7XHKSZ5H.js.map} +0 -0
- /package/dist/{search-IPE4ISFB.js.map → search-NKRXXLRS.js.map} +0 -0
- /package/dist/{source-resolver-HZQLOODU.js.map → semantic-DD7P4634.js.map} +0 -0
- /package/dist/{tables-K5NAN2WK.js.map → tables-WQTRZSXR.js.map} +0 -0
|
@@ -0,0 +1,1239 @@
|
|
|
1
|
+
import { createRequire as __yamchartCreateRequire } from 'module'; if (!globalThis.require) globalThis.require = __yamchartCreateRequire(import.meta.url);
|
|
2
|
+
// ../../packages/schema/dist/connection.js
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
var EnvAuthSchema = z.object({
|
|
5
|
+
type: z.literal("env"),
|
|
6
|
+
user_var: z.string(),
|
|
7
|
+
password_var: z.string()
|
|
8
|
+
});
|
|
9
|
+
var KeyPairAuthSchema = z.object({
|
|
10
|
+
type: z.literal("key_pair"),
|
|
11
|
+
user_var: z.string(),
|
|
12
|
+
private_key_path: z.string()
|
|
13
|
+
});
|
|
14
|
+
var SecretManagerAuthSchema = z.object({
|
|
15
|
+
type: z.literal("secret_manager"),
|
|
16
|
+
provider: z.enum(["aws_secrets_manager", "gcp_secret_manager", "vault"]),
|
|
17
|
+
secret_id: z.string()
|
|
18
|
+
});
|
|
19
|
+
var ExternalBrowserAuthSchema = z.object({
|
|
20
|
+
type: z.literal("externalbrowser"),
|
|
21
|
+
user_var: z.string(),
|
|
22
|
+
cache_token: z.boolean().optional()
|
|
23
|
+
});
|
|
24
|
+
var ServiceAccountAuthSchema = z.object({
|
|
25
|
+
type: z.literal("service_account"),
|
|
26
|
+
credentials_var: z.string().optional(),
|
|
27
|
+
// env var NAME holding the SA JSON contents
|
|
28
|
+
key_file: z.string().optional()
|
|
29
|
+
// path to a SA .json key file
|
|
30
|
+
});
|
|
31
|
+
var AuthSchema = z.discriminatedUnion("type", [
|
|
32
|
+
EnvAuthSchema,
|
|
33
|
+
KeyPairAuthSchema,
|
|
34
|
+
SecretManagerAuthSchema,
|
|
35
|
+
ExternalBrowserAuthSchema,
|
|
36
|
+
ServiceAccountAuthSchema
|
|
37
|
+
]);
|
|
38
|
+
var PoolConfigSchema = z.object({
|
|
39
|
+
min_connections: z.number().int().positive().optional(),
|
|
40
|
+
max_connections: z.number().int().positive().optional(),
|
|
41
|
+
idle_timeout: z.number().int().positive().optional()
|
|
42
|
+
});
|
|
43
|
+
var QueryConfigSchema = z.object({
|
|
44
|
+
timeout: z.number().int().positive().optional(),
|
|
45
|
+
max_rows: z.number().int().positive().optional()
|
|
46
|
+
});
|
|
47
|
+
var DuckDBConfigSchema = z.object({
|
|
48
|
+
path: z.string()
|
|
49
|
+
// file path or :memory:
|
|
50
|
+
});
|
|
51
|
+
var PostgresConfigSchema = z.object({
|
|
52
|
+
host: z.string(),
|
|
53
|
+
port: z.number().int().positive().default(5432),
|
|
54
|
+
database: z.string(),
|
|
55
|
+
schema: z.string().optional(),
|
|
56
|
+
ssl: z.boolean().optional()
|
|
57
|
+
});
|
|
58
|
+
var SnowflakeConfigSchema = z.object({
|
|
59
|
+
account: z.string(),
|
|
60
|
+
warehouse: z.string(),
|
|
61
|
+
database: z.string(),
|
|
62
|
+
schema: z.string().optional(),
|
|
63
|
+
role: z.string().optional()
|
|
64
|
+
});
|
|
65
|
+
var MySQLConfigSchema = z.object({
|
|
66
|
+
host: z.string(),
|
|
67
|
+
port: z.number().int().positive().default(3306),
|
|
68
|
+
database: z.string(),
|
|
69
|
+
ssl: z.boolean().optional()
|
|
70
|
+
});
|
|
71
|
+
var SQLiteConfigSchema = z.object({
|
|
72
|
+
path: z.string()
|
|
73
|
+
// file path or :memory:
|
|
74
|
+
});
|
|
75
|
+
var BigQueryConfigSchema = z.object({
|
|
76
|
+
project_id: z.string(),
|
|
77
|
+
dataset: z.string().optional(),
|
|
78
|
+
location: z.string().optional(),
|
|
79
|
+
max_bytes_billed: z.number().optional()
|
|
80
|
+
});
|
|
81
|
+
var BaseConnectionSchema = z.object({
|
|
82
|
+
name: z.string().min(1),
|
|
83
|
+
description: z.string().optional(),
|
|
84
|
+
pool: PoolConfigSchema.optional(),
|
|
85
|
+
query: QueryConfigSchema.optional(),
|
|
86
|
+
hunch_confidence_threshold: z.number().min(0).max(1).optional()
|
|
87
|
+
});
|
|
88
|
+
var DuckDBConnectionSchema = BaseConnectionSchema.extend({
|
|
89
|
+
type: z.literal("duckdb"),
|
|
90
|
+
config: DuckDBConfigSchema,
|
|
91
|
+
auth: z.undefined().optional()
|
|
92
|
+
});
|
|
93
|
+
var PostgresConnectionSchema = BaseConnectionSchema.extend({
|
|
94
|
+
type: z.literal("postgres"),
|
|
95
|
+
config: PostgresConfigSchema,
|
|
96
|
+
auth: AuthSchema.optional()
|
|
97
|
+
});
|
|
98
|
+
var SnowflakeConnectionSchema = BaseConnectionSchema.extend({
|
|
99
|
+
type: z.literal("snowflake"),
|
|
100
|
+
config: SnowflakeConfigSchema,
|
|
101
|
+
auth: AuthSchema
|
|
102
|
+
});
|
|
103
|
+
var MySQLConnectionSchema = BaseConnectionSchema.extend({
|
|
104
|
+
type: z.literal("mysql"),
|
|
105
|
+
config: MySQLConfigSchema,
|
|
106
|
+
auth: AuthSchema.optional()
|
|
107
|
+
});
|
|
108
|
+
var SQLiteConnectionSchema = BaseConnectionSchema.extend({
|
|
109
|
+
type: z.literal("sqlite"),
|
|
110
|
+
config: SQLiteConfigSchema,
|
|
111
|
+
auth: z.undefined().optional()
|
|
112
|
+
});
|
|
113
|
+
var BigQueryConnectionSchema = BaseConnectionSchema.extend({
|
|
114
|
+
type: z.literal("bigquery"),
|
|
115
|
+
config: BigQueryConfigSchema,
|
|
116
|
+
auth: AuthSchema
|
|
117
|
+
});
|
|
118
|
+
var ConnectionSchema = z.discriminatedUnion("type", [
|
|
119
|
+
DuckDBConnectionSchema,
|
|
120
|
+
PostgresConnectionSchema,
|
|
121
|
+
SnowflakeConnectionSchema,
|
|
122
|
+
MySQLConnectionSchema,
|
|
123
|
+
SQLiteConnectionSchema,
|
|
124
|
+
BigQueryConnectionSchema
|
|
125
|
+
]);
|
|
126
|
+
|
|
127
|
+
// ../../packages/schema/dist/runtime-config.js
|
|
128
|
+
import { z as z4 } from "zod";
|
|
129
|
+
|
|
130
|
+
// ../../packages/schema/dist/project.js
|
|
131
|
+
import { z as z3 } from "zod";
|
|
132
|
+
|
|
133
|
+
// ../../packages/schema/dist/semantic.js
|
|
134
|
+
import { z as z2 } from "zod";
|
|
135
|
+
var MeasureTypeSchema = z2.enum(["sum", "count", "avg", "min", "max", "count_distinct"]);
|
|
136
|
+
var DimensionTypeSchema = z2.enum(["string", "number", "time", "boolean"]);
|
|
137
|
+
var MeasureSchema = z2.object({
|
|
138
|
+
name: z2.string(),
|
|
139
|
+
type: MeasureTypeSchema,
|
|
140
|
+
description: z2.string().optional(),
|
|
141
|
+
format: z2.string().optional()
|
|
142
|
+
});
|
|
143
|
+
var DimensionSchema = z2.object({
|
|
144
|
+
name: z2.string(),
|
|
145
|
+
type: DimensionTypeSchema,
|
|
146
|
+
description: z2.string().optional()
|
|
147
|
+
});
|
|
148
|
+
var SemanticEntitySchema = z2.object({
|
|
149
|
+
name: z2.string(),
|
|
150
|
+
description: z2.string().optional(),
|
|
151
|
+
source: z2.enum(["catalog", "model"]),
|
|
152
|
+
source_table: z2.string(),
|
|
153
|
+
measures: z2.array(MeasureSchema),
|
|
154
|
+
dimensions: z2.array(DimensionSchema),
|
|
155
|
+
parameters: z2.array(z2.object({
|
|
156
|
+
name: z2.string(),
|
|
157
|
+
type: z2.string(),
|
|
158
|
+
default: z2.union([z2.string(), z2.number()]).optional(),
|
|
159
|
+
options: z2.array(z2.string()).optional()
|
|
160
|
+
})).optional()
|
|
161
|
+
});
|
|
162
|
+
var RelationshipSchema = z2.object({
|
|
163
|
+
from: z2.object({ entity: z2.string(), field: z2.string() }),
|
|
164
|
+
to: z2.object({ entity: z2.string(), field: z2.string() }),
|
|
165
|
+
type: z2.enum(["many_to_one", "one_to_many", "one_to_one"])
|
|
166
|
+
});
|
|
167
|
+
var SemanticModelSchema = z2.object({
|
|
168
|
+
entities: z2.array(SemanticEntitySchema),
|
|
169
|
+
relationships: z2.array(RelationshipSchema),
|
|
170
|
+
generated_at: z2.string()
|
|
171
|
+
});
|
|
172
|
+
var SemanticFilterOperatorSchema = z2.enum([
|
|
173
|
+
"equals",
|
|
174
|
+
"not_equals",
|
|
175
|
+
"contains",
|
|
176
|
+
"gt",
|
|
177
|
+
"gte",
|
|
178
|
+
"lt",
|
|
179
|
+
"lte",
|
|
180
|
+
"in",
|
|
181
|
+
"not_in"
|
|
182
|
+
]);
|
|
183
|
+
var SemanticFilterSchema = z2.object({
|
|
184
|
+
dimension: z2.string(),
|
|
185
|
+
operator: SemanticFilterOperatorSchema,
|
|
186
|
+
value: z2.union([z2.string(), z2.number(), z2.boolean(), z2.array(z2.union([z2.string(), z2.number()]))])
|
|
187
|
+
});
|
|
188
|
+
var SemanticQuerySchema = z2.object({
|
|
189
|
+
model: z2.string(),
|
|
190
|
+
measures: z2.array(z2.string()).min(1),
|
|
191
|
+
dimensions: z2.array(z2.string()).optional().default([]),
|
|
192
|
+
parameters: z2.record(z2.union([z2.string(), z2.number()])).optional(),
|
|
193
|
+
filters: z2.array(SemanticFilterSchema).optional().default([]),
|
|
194
|
+
order_by: z2.object({
|
|
195
|
+
field: z2.string(),
|
|
196
|
+
direction: z2.enum(["asc", "desc"]).default("asc")
|
|
197
|
+
}).optional(),
|
|
198
|
+
limit: z2.number().int().positive().max(1e4).optional().default(1e3)
|
|
199
|
+
});
|
|
200
|
+
var SemanticConfigSchema = z2.object({
|
|
201
|
+
include: z2.object({
|
|
202
|
+
paths: z2.array(z2.string()).default(["gold/", "marts/", "core/"]),
|
|
203
|
+
prefixes: z2.array(z2.string()).default(["dim_", "fct_", "fact_"])
|
|
204
|
+
}).optional().default({
|
|
205
|
+
paths: ["gold/", "marts/", "core/"],
|
|
206
|
+
prefixes: ["dim_", "fct_", "fact_"]
|
|
207
|
+
})
|
|
208
|
+
}).optional();
|
|
209
|
+
|
|
210
|
+
// ../../packages/schema/dist/project.js
|
|
211
|
+
var DefaultsSchema = z3.object({
|
|
212
|
+
connection: z3.string().optional(),
|
|
213
|
+
theme: z3.string().optional(),
|
|
214
|
+
timezone: z3.string().optional(),
|
|
215
|
+
cache_ttl: z3.string().optional(),
|
|
216
|
+
base_url: z3.string().url().optional(),
|
|
217
|
+
week_start: z3.enum(["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"]).optional(),
|
|
218
|
+
table: z3.object({
|
|
219
|
+
max_display_rows: z3.number().int().positive().optional(),
|
|
220
|
+
max_export_rows: z3.number().int().positive().optional()
|
|
221
|
+
}).optional()
|
|
222
|
+
});
|
|
223
|
+
var GitSchema = z3.object({
|
|
224
|
+
provider: z3.enum(["github", "gitlab", "bitbucket"]).optional(),
|
|
225
|
+
repo: z3.string().optional(),
|
|
226
|
+
branch: z3.string().optional(),
|
|
227
|
+
preview_branches: z3.boolean().optional()
|
|
228
|
+
});
|
|
229
|
+
var SSOProviderSchema = z3.object({
|
|
230
|
+
client_id: z3.string(),
|
|
231
|
+
// Provide the secret directly, or name an env var that holds it (client_secret_var)
|
|
232
|
+
// so the secret never lives in git.
|
|
233
|
+
client_secret: z3.string().optional(),
|
|
234
|
+
client_secret_var: z3.string().optional(),
|
|
235
|
+
tenant: z3.string().optional(),
|
|
236
|
+
issuer: z3.string().optional(),
|
|
237
|
+
display_name: z3.string().optional(),
|
|
238
|
+
// Invite list: if non-empty, only these emails may sign in via this provider.
|
|
239
|
+
// Anyone not listed is rejected instead of auto-provisioned.
|
|
240
|
+
allowed_emails: z3.array(z3.string()).optional(),
|
|
241
|
+
// Emails provisioned with the admin role (implicitly allowed even if not in allowed_emails).
|
|
242
|
+
admin_emails: z3.array(z3.string()).optional()
|
|
243
|
+
}).refine((c) => !!c.client_secret || !!c.client_secret_var, {
|
|
244
|
+
message: "SSO provider requires either client_secret or client_secret_var"
|
|
245
|
+
});
|
|
246
|
+
var AuthSchema2 = z3.object({
|
|
247
|
+
enabled: z3.boolean(),
|
|
248
|
+
db_path: z3.string().optional(),
|
|
249
|
+
session_ttl: z3.string().optional(),
|
|
250
|
+
providers: z3.object({
|
|
251
|
+
google: SSOProviderSchema.optional(),
|
|
252
|
+
microsoft: SSOProviderSchema.optional(),
|
|
253
|
+
oidc: SSOProviderSchema.optional()
|
|
254
|
+
}).optional()
|
|
255
|
+
});
|
|
256
|
+
var FeaturesSchema = z3.object({
|
|
257
|
+
enable_sql_editor: z3.boolean().optional(),
|
|
258
|
+
enable_csv_export: z3.boolean().optional(),
|
|
259
|
+
enable_scheduling: z3.boolean().optional(),
|
|
260
|
+
chat: z3.boolean().optional()
|
|
261
|
+
});
|
|
262
|
+
var SidebarLinkSchema = z3.object({
|
|
263
|
+
label: z3.string(),
|
|
264
|
+
url: z3.string(),
|
|
265
|
+
icon: z3.string().optional()
|
|
266
|
+
});
|
|
267
|
+
var SidebarConfigSchema = z3.object({
|
|
268
|
+
show: z3.boolean().optional(),
|
|
269
|
+
collapsed: z3.boolean().optional(),
|
|
270
|
+
links: z3.array(SidebarLinkSchema).optional(),
|
|
271
|
+
sections: z3.object({
|
|
272
|
+
dashboards: z3.boolean().optional(),
|
|
273
|
+
charts: z3.boolean().optional()
|
|
274
|
+
}).optional()
|
|
275
|
+
});
|
|
276
|
+
var ColorsSchema = z3.object({
|
|
277
|
+
primary: z3.string().optional(),
|
|
278
|
+
background: z3.string().optional(),
|
|
279
|
+
surface: z3.string().optional(),
|
|
280
|
+
sidebar: z3.string().optional(),
|
|
281
|
+
text: z3.string().optional()
|
|
282
|
+
});
|
|
283
|
+
var FontsSchema = z3.object({
|
|
284
|
+
heading: z3.string().optional(),
|
|
285
|
+
body: z3.string().optional(),
|
|
286
|
+
mono: z3.string().optional(),
|
|
287
|
+
size: z3.enum(["compact", "default", "comfortable"]).optional()
|
|
288
|
+
});
|
|
289
|
+
var LogoSchema = z3.union([
|
|
290
|
+
z3.string(),
|
|
291
|
+
z3.object({
|
|
292
|
+
light: z3.string(),
|
|
293
|
+
dark: z3.string()
|
|
294
|
+
})
|
|
295
|
+
]);
|
|
296
|
+
var ThemeSchema = z3.object({
|
|
297
|
+
mode: z3.enum(["light", "dark", "auto"]).optional(),
|
|
298
|
+
base: z3.enum(["modern", "executive", "minimal"]).optional(),
|
|
299
|
+
logo: LogoSchema.optional(),
|
|
300
|
+
favicon: z3.string().optional(),
|
|
301
|
+
title: z3.string().optional(),
|
|
302
|
+
colors: ColorsSchema.optional(),
|
|
303
|
+
palette: z3.array(z3.string()).optional(),
|
|
304
|
+
gradient: z3.boolean().default(false),
|
|
305
|
+
opacity: z3.number().min(0).max(1).default(1),
|
|
306
|
+
fonts: FontsSchema.optional(),
|
|
307
|
+
sidebar: SidebarConfigSchema.optional(),
|
|
308
|
+
customCss: z3.string().optional()
|
|
309
|
+
});
|
|
310
|
+
var EnvironmentOverrideSchema = z3.object({
|
|
311
|
+
defaults: DefaultsSchema.optional(),
|
|
312
|
+
git: GitSchema.optional(),
|
|
313
|
+
auth: AuthSchema2.optional(),
|
|
314
|
+
features: FeaturesSchema.optional(),
|
|
315
|
+
theme: ThemeSchema.optional(),
|
|
316
|
+
semantic: SemanticConfigSchema.optional()
|
|
317
|
+
}).passthrough();
|
|
318
|
+
function deepMerge(base, override) {
|
|
319
|
+
if (!override)
|
|
320
|
+
return { ...base };
|
|
321
|
+
const result = { ...base };
|
|
322
|
+
for (const [key, value] of Object.entries(override)) {
|
|
323
|
+
if (value !== null && typeof value === "object" && !Array.isArray(value) && typeof result[key] === "object" && result[key] !== null && !Array.isArray(result[key])) {
|
|
324
|
+
result[key] = deepMerge(result[key], value);
|
|
325
|
+
} else {
|
|
326
|
+
result[key] = value;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return result;
|
|
330
|
+
}
|
|
331
|
+
function resolveProjectConfig(raw, env) {
|
|
332
|
+
const { environments, ...base } = raw;
|
|
333
|
+
const envBlocks = environments;
|
|
334
|
+
const envOverride = env ? envBlocks?.[env] : void 0;
|
|
335
|
+
return deepMerge(base, envOverride);
|
|
336
|
+
}
|
|
337
|
+
var CatalogIncludeSchema = z3.object({
|
|
338
|
+
schemas: z3.array(z3.string()).optional(),
|
|
339
|
+
tags: z3.array(z3.string()).optional()
|
|
340
|
+
});
|
|
341
|
+
var CatalogConfigSchema = z3.object({
|
|
342
|
+
include: CatalogIncludeSchema.optional()
|
|
343
|
+
});
|
|
344
|
+
var KnowledgeConfigSchema = z3.object({
|
|
345
|
+
database_url_var: z3.string().default("KNOWLEDGE_DATABASE_URL")
|
|
346
|
+
});
|
|
347
|
+
var ProviderConfigSchema = z3.object({
|
|
348
|
+
provider: z3.enum(["anthropic", "openai", "gemini", "ollama", "ollama_cloud", "openai_compatible"]),
|
|
349
|
+
model: z3.string().optional(),
|
|
350
|
+
base_url: z3.string().optional(),
|
|
351
|
+
api_key_var: z3.string().optional(),
|
|
352
|
+
api_key: z3.string().optional()
|
|
353
|
+
});
|
|
354
|
+
var AiConfigSchema = z3.object({
|
|
355
|
+
default: z3.string().optional(),
|
|
356
|
+
providers: z3.record(ProviderConfigSchema).optional(),
|
|
357
|
+
tasks: z3.record(z3.string()).optional(),
|
|
358
|
+
embedding: ProviderConfigSchema.optional()
|
|
359
|
+
}).refine((c) => !c.default || !c.providers || c.default in c.providers, { message: "ai.default must name a provider in ai.providers" }).refine((c) => !c.tasks || !c.providers || Object.values(c.tasks).every((n) => c.providers[n] !== void 0), { message: "every ai.tasks value must name a provider in ai.providers" });
|
|
360
|
+
var ProjectSchema = z3.object({
|
|
361
|
+
version: z3.string().min(1),
|
|
362
|
+
name: z3.string().min(1),
|
|
363
|
+
description: z3.string().optional(),
|
|
364
|
+
defaults: DefaultsSchema.optional(),
|
|
365
|
+
environments: z3.record(z3.string(), EnvironmentOverrideSchema).optional(),
|
|
366
|
+
git: GitSchema.optional(),
|
|
367
|
+
auth: AuthSchema2.optional(),
|
|
368
|
+
features: FeaturesSchema.optional(),
|
|
369
|
+
theme: ThemeSchema.optional(),
|
|
370
|
+
semantic: SemanticConfigSchema,
|
|
371
|
+
catalog: CatalogConfigSchema.optional(),
|
|
372
|
+
knowledge: KnowledgeConfigSchema.optional(),
|
|
373
|
+
ai: AiConfigSchema.optional()
|
|
374
|
+
});
|
|
375
|
+
|
|
376
|
+
// ../../packages/schema/dist/runtime-config.js
|
|
377
|
+
var ConnectionSecretsSchema = z4.object({
|
|
378
|
+
user: z4.string().optional(),
|
|
379
|
+
password: z4.string().optional(),
|
|
380
|
+
private_key: z4.string().optional(),
|
|
381
|
+
// Snowflake key_pair PEM
|
|
382
|
+
credentials_json: z4.string().optional()
|
|
383
|
+
// BigQuery service-account JSON contents
|
|
384
|
+
});
|
|
385
|
+
var baseRuntime = {
|
|
386
|
+
name: z4.string().min(1),
|
|
387
|
+
description: z4.string().optional(),
|
|
388
|
+
pool: PoolConfigSchema.optional(),
|
|
389
|
+
query: QueryConfigSchema.optional(),
|
|
390
|
+
secrets: ConnectionSecretsSchema.optional()
|
|
391
|
+
};
|
|
392
|
+
var RuntimeConnectionSchema = z4.discriminatedUnion("type", [
|
|
393
|
+
z4.object({ ...baseRuntime, type: z4.literal("duckdb"), config: DuckDBConfigSchema }),
|
|
394
|
+
z4.object({ ...baseRuntime, type: z4.literal("postgres"), config: PostgresConfigSchema }),
|
|
395
|
+
z4.object({ ...baseRuntime, type: z4.literal("mysql"), config: MySQLConfigSchema }),
|
|
396
|
+
z4.object({ ...baseRuntime, type: z4.literal("sqlite"), config: SQLiteConfigSchema }),
|
|
397
|
+
z4.object({ ...baseRuntime, type: z4.literal("snowflake"), config: SnowflakeConfigSchema }),
|
|
398
|
+
z4.object({ ...baseRuntime, type: z4.literal("bigquery"), config: BigQueryConfigSchema })
|
|
399
|
+
]);
|
|
400
|
+
var RuntimeConfigSchema = z4.object({
|
|
401
|
+
version: z4.literal(1).default(1),
|
|
402
|
+
connections: z4.array(RuntimeConnectionSchema).optional(),
|
|
403
|
+
knowledge: z4.object({ database_url: z4.string().min(1).optional() }).optional(),
|
|
404
|
+
ai: AiConfigSchema.optional()
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
// ../../packages/schema/dist/chart.js
|
|
408
|
+
import { z as z5 } from "zod";
|
|
409
|
+
var AxisTypeSchema = z5.enum(["temporal", "quantitative", "ordinal", "nominal"]);
|
|
410
|
+
var AxisSchema = z5.object({
|
|
411
|
+
field: z5.string().min(1),
|
|
412
|
+
type: AxisTypeSchema,
|
|
413
|
+
format: z5.string().optional(),
|
|
414
|
+
label: z5.string().optional(),
|
|
415
|
+
scale: z5.enum(["linear", "log"]).optional()
|
|
416
|
+
});
|
|
417
|
+
var ChartTypeSchema = z5.enum([
|
|
418
|
+
"line",
|
|
419
|
+
"bar",
|
|
420
|
+
"area",
|
|
421
|
+
"pie",
|
|
422
|
+
"donut",
|
|
423
|
+
"table",
|
|
424
|
+
"metric",
|
|
425
|
+
"map",
|
|
426
|
+
"heatmap",
|
|
427
|
+
"funnel",
|
|
428
|
+
"sankey",
|
|
429
|
+
"treemap",
|
|
430
|
+
"waterfall",
|
|
431
|
+
"gauge"
|
|
432
|
+
]);
|
|
433
|
+
var GradientSchema = z5.union([
|
|
434
|
+
z5.boolean(),
|
|
435
|
+
z5.object({
|
|
436
|
+
from: z5.string(),
|
|
437
|
+
to: z5.string()
|
|
438
|
+
})
|
|
439
|
+
]);
|
|
440
|
+
var LongFormatSeriesSchema = z5.object({
|
|
441
|
+
field: z5.string().min(1),
|
|
442
|
+
colors: z5.record(z5.string(), z5.string()).optional()
|
|
443
|
+
});
|
|
444
|
+
var SeriesTransformSchema = z5.object({
|
|
445
|
+
type: z5.enum(["rolling_average"]),
|
|
446
|
+
window: z5.number().int().positive()
|
|
447
|
+
});
|
|
448
|
+
var WideFormatColumnSchema = z5.object({
|
|
449
|
+
field: z5.string().min(1),
|
|
450
|
+
name: z5.string().optional(),
|
|
451
|
+
type: z5.enum(["line", "bar", "area"]).optional(),
|
|
452
|
+
axis: z5.enum(["left", "right"]).optional(),
|
|
453
|
+
color: z5.string().optional(),
|
|
454
|
+
style: z5.enum(["solid", "dashed", "dotted"]).optional(),
|
|
455
|
+
opacity: z5.number().min(0).max(1).optional(),
|
|
456
|
+
gradient: GradientSchema.optional(),
|
|
457
|
+
transform: SeriesTransformSchema.optional(),
|
|
458
|
+
band: z5.string().optional()
|
|
459
|
+
// Pair with another column to render as shaded range band
|
|
460
|
+
});
|
|
461
|
+
var WideFormatSeriesSchema = z5.object({
|
|
462
|
+
columns: z5.array(WideFormatColumnSchema).min(1)
|
|
463
|
+
});
|
|
464
|
+
var SeriesConfigSchema = z5.union([
|
|
465
|
+
LongFormatSeriesSchema,
|
|
466
|
+
WideFormatSeriesSchema
|
|
467
|
+
]);
|
|
468
|
+
var ColorConditionSchema = z5.object({
|
|
469
|
+
when: z5.string(),
|
|
470
|
+
color: z5.string()
|
|
471
|
+
});
|
|
472
|
+
var ConditionalColorSchema = z5.object({
|
|
473
|
+
conditions: z5.array(ColorConditionSchema).min(1),
|
|
474
|
+
default: z5.string().optional()
|
|
475
|
+
});
|
|
476
|
+
var ColorSchema = z5.union([
|
|
477
|
+
z5.string(),
|
|
478
|
+
ConditionalColorSchema
|
|
479
|
+
]);
|
|
480
|
+
var LegendSchema = z5.object({
|
|
481
|
+
show: z5.boolean().optional(),
|
|
482
|
+
position: z5.enum(["top", "bottom", "left", "right"]).optional()
|
|
483
|
+
});
|
|
484
|
+
var LineAnnotationSchema = z5.object({
|
|
485
|
+
type: z5.literal("line"),
|
|
486
|
+
value: z5.number(),
|
|
487
|
+
label: z5.string().optional(),
|
|
488
|
+
color: z5.string().optional(),
|
|
489
|
+
style: z5.enum(["solid", "dashed", "dotted"]).optional()
|
|
490
|
+
});
|
|
491
|
+
var BandAnnotationSchema = z5.object({
|
|
492
|
+
type: z5.literal("band"),
|
|
493
|
+
from: z5.number(),
|
|
494
|
+
to: z5.number(),
|
|
495
|
+
label: z5.string().optional(),
|
|
496
|
+
color: z5.string().optional()
|
|
497
|
+
});
|
|
498
|
+
var XLineAnnotationSchema = z5.object({
|
|
499
|
+
type: z5.literal("x_line"),
|
|
500
|
+
x: z5.string(),
|
|
501
|
+
// x-axis value (date string or category)
|
|
502
|
+
label: z5.string().optional(),
|
|
503
|
+
color: z5.string().optional(),
|
|
504
|
+
style: z5.enum(["solid", "dashed", "dotted"]).optional()
|
|
505
|
+
});
|
|
506
|
+
var AnnotationSchema = z5.discriminatedUnion("type", [
|
|
507
|
+
LineAnnotationSchema,
|
|
508
|
+
BandAnnotationSchema,
|
|
509
|
+
XLineAnnotationSchema
|
|
510
|
+
]);
|
|
511
|
+
var GoalZoneSchema = z5.object({
|
|
512
|
+
tolerance: z5.number().min(0).max(1)
|
|
513
|
+
});
|
|
514
|
+
var GoalStyleSchema = z5.enum(["solid", "dashed", "dotted"]);
|
|
515
|
+
var FixedGoalSchema = z5.object({
|
|
516
|
+
type: z5.literal("fixed"),
|
|
517
|
+
value: z5.number(),
|
|
518
|
+
label: z5.string().optional(),
|
|
519
|
+
color: z5.string().optional(),
|
|
520
|
+
style: GoalStyleSchema.optional(),
|
|
521
|
+
zone: GoalZoneSchema.optional()
|
|
522
|
+
});
|
|
523
|
+
var CumulativeGoalSchema = z5.object({
|
|
524
|
+
type: z5.literal("cumulative"),
|
|
525
|
+
value: z5.number(),
|
|
526
|
+
by: z5.string().min(1),
|
|
527
|
+
from: z5.string().optional(),
|
|
528
|
+
label: z5.string().optional(),
|
|
529
|
+
color: z5.string().optional(),
|
|
530
|
+
style: GoalStyleSchema.optional(),
|
|
531
|
+
zone: GoalZoneSchema.optional()
|
|
532
|
+
});
|
|
533
|
+
var GoalSourceSchema = z5.object({
|
|
534
|
+
model: z5.string().min(1),
|
|
535
|
+
value_field: z5.string().min(1),
|
|
536
|
+
date_field: z5.string().optional()
|
|
537
|
+
});
|
|
538
|
+
var ModelGoalSchema = z5.object({
|
|
539
|
+
type: z5.literal("model"),
|
|
540
|
+
source: GoalSourceSchema,
|
|
541
|
+
label: z5.string().optional(),
|
|
542
|
+
color: z5.string().optional(),
|
|
543
|
+
style: GoalStyleSchema.optional(),
|
|
544
|
+
zone: GoalZoneSchema.optional()
|
|
545
|
+
});
|
|
546
|
+
var GoalSchema = z5.discriminatedUnion("type", [
|
|
547
|
+
FixedGoalSchema,
|
|
548
|
+
CumulativeGoalSchema,
|
|
549
|
+
ModelGoalSchema
|
|
550
|
+
]);
|
|
551
|
+
var KpiGoalSchema = z5.object({
|
|
552
|
+
value: z5.number(),
|
|
553
|
+
label: z5.string().optional(),
|
|
554
|
+
show_progress: z5.boolean().optional(),
|
|
555
|
+
color: z5.string().optional()
|
|
556
|
+
});
|
|
557
|
+
var InteractionsSchema = z5.object({
|
|
558
|
+
tooltip: z5.boolean().default(true),
|
|
559
|
+
zoom: z5.boolean().default(false),
|
|
560
|
+
brush: z5.boolean().default(false)
|
|
561
|
+
});
|
|
562
|
+
var KpiFormatSchema = z5.object({
|
|
563
|
+
type: z5.enum(["number", "currency", "percent"]),
|
|
564
|
+
currency: z5.string().optional(),
|
|
565
|
+
// e.g., 'USD', 'EUR'
|
|
566
|
+
decimals: z5.number().optional()
|
|
567
|
+
});
|
|
568
|
+
var KpiComparisonSchema = z5.object({
|
|
569
|
+
enabled: z5.boolean(),
|
|
570
|
+
field: z5.string().min(1).optional(),
|
|
571
|
+
period: z5.enum(["previous"]).optional(),
|
|
572
|
+
label: z5.string().optional(),
|
|
573
|
+
type: z5.enum(["percent_change", "absolute"])
|
|
574
|
+
}).refine((data) => !(data.field && data.period), { message: "Cannot set both field and period \u2014 use one or the other" }).refine((data) => data.field || data.period, { message: "Must set either field or period for comparison" });
|
|
575
|
+
var KpiValueSchema = z5.object({
|
|
576
|
+
field: z5.string().min(1)
|
|
577
|
+
});
|
|
578
|
+
var KpiConfigSchema = z5.object({
|
|
579
|
+
type: z5.literal("kpi"),
|
|
580
|
+
value: KpiValueSchema,
|
|
581
|
+
format: KpiFormatSchema,
|
|
582
|
+
comparison: KpiComparisonSchema.optional(),
|
|
583
|
+
unit: z5.string().optional(),
|
|
584
|
+
// e.g., 'min', 'sessions', 'users'
|
|
585
|
+
goal: KpiGoalSchema.optional()
|
|
586
|
+
});
|
|
587
|
+
var CenterValueSchema = z5.object({
|
|
588
|
+
field: z5.string().optional(),
|
|
589
|
+
// 'total' for sum, or specific field
|
|
590
|
+
label: z5.string().optional(),
|
|
591
|
+
format: z5.string().optional()
|
|
592
|
+
});
|
|
593
|
+
var CompareSchema = z5.object({
|
|
594
|
+
period: z5.string(),
|
|
595
|
+
// previous_week, previous_month, previous_year, or a preset name
|
|
596
|
+
label: z5.string().optional(),
|
|
597
|
+
style: z5.enum(["solid", "dashed", "dotted"]).optional(),
|
|
598
|
+
opacity: z5.number().min(0).max(1).optional(),
|
|
599
|
+
color: z5.string().optional()
|
|
600
|
+
});
|
|
601
|
+
var StandardChartConfigSchema = z5.object({
|
|
602
|
+
type: ChartTypeSchema,
|
|
603
|
+
x: AxisSchema,
|
|
604
|
+
y: AxisSchema.optional(),
|
|
605
|
+
series: SeriesConfigSchema.optional(),
|
|
606
|
+
stacking: z5.enum(["stacked", "percent"]).optional(),
|
|
607
|
+
orientation: z5.enum(["vertical", "horizontal"]).optional(),
|
|
608
|
+
color: ColorSchema.optional(),
|
|
609
|
+
gradient: GradientSchema.optional(),
|
|
610
|
+
legend: LegendSchema.optional(),
|
|
611
|
+
annotations: z5.array(AnnotationSchema).optional(),
|
|
612
|
+
compare: z5.array(CompareSchema).optional(),
|
|
613
|
+
interactions: InteractionsSchema.optional(),
|
|
614
|
+
centerValue: CenterValueSchema.optional(),
|
|
615
|
+
// For donut charts
|
|
616
|
+
goals: z5.array(GoalSchema).optional()
|
|
617
|
+
});
|
|
618
|
+
var DualAxisConfigSchema = z5.object({
|
|
619
|
+
label: z5.string().optional(),
|
|
620
|
+
format: z5.string().optional(),
|
|
621
|
+
scale: z5.enum(["linear", "log"]).optional()
|
|
622
|
+
});
|
|
623
|
+
var DualAxesSchema = z5.object({
|
|
624
|
+
left: DualAxisConfigSchema.optional(),
|
|
625
|
+
right: DualAxisConfigSchema.optional()
|
|
626
|
+
});
|
|
627
|
+
var ComboChartConfigSchema = z5.object({
|
|
628
|
+
type: z5.literal("combo"),
|
|
629
|
+
x: AxisSchema,
|
|
630
|
+
series: WideFormatSeriesSchema,
|
|
631
|
+
stacking: z5.enum(["stacked", "percent"]).optional(),
|
|
632
|
+
axes: DualAxesSchema,
|
|
633
|
+
legend: LegendSchema.optional(),
|
|
634
|
+
interactions: InteractionsSchema.optional(),
|
|
635
|
+
gradient: GradientSchema.optional(),
|
|
636
|
+
goals: z5.array(GoalSchema).optional()
|
|
637
|
+
});
|
|
638
|
+
var ScatterSizeSchema = z5.object({
|
|
639
|
+
field: z5.string().min(1),
|
|
640
|
+
min: z5.number().optional(),
|
|
641
|
+
max: z5.number().optional(),
|
|
642
|
+
label: z5.string().optional()
|
|
643
|
+
});
|
|
644
|
+
var ScatterGroupSchema = z5.object({
|
|
645
|
+
field: z5.string().min(1)
|
|
646
|
+
});
|
|
647
|
+
var RegressionSchema = z5.object({
|
|
648
|
+
type: z5.literal("linear"),
|
|
649
|
+
show_equation: z5.boolean().optional(),
|
|
650
|
+
show_r_squared: z5.boolean().optional()
|
|
651
|
+
});
|
|
652
|
+
var ScatterChartConfigSchema = z5.object({
|
|
653
|
+
type: z5.literal("scatter"),
|
|
654
|
+
x: AxisSchema,
|
|
655
|
+
y: AxisSchema,
|
|
656
|
+
size: ScatterSizeSchema.optional(),
|
|
657
|
+
group: ScatterGroupSchema.optional(),
|
|
658
|
+
regression: RegressionSchema.optional(),
|
|
659
|
+
color: ColorSchema.optional(),
|
|
660
|
+
legend: LegendSchema.optional(),
|
|
661
|
+
interactions: InteractionsSchema.optional()
|
|
662
|
+
});
|
|
663
|
+
var HeatmapChartConfigSchema = z5.object({
|
|
664
|
+
type: z5.literal("heatmap"),
|
|
665
|
+
x: AxisSchema,
|
|
666
|
+
y: AxisSchema,
|
|
667
|
+
value: z5.object({
|
|
668
|
+
field: z5.string().min(1),
|
|
669
|
+
label: z5.string().optional()
|
|
670
|
+
}),
|
|
671
|
+
color_range: z5.object({
|
|
672
|
+
min: z5.string().optional(),
|
|
673
|
+
max: z5.string().optional()
|
|
674
|
+
}).optional(),
|
|
675
|
+
show_values: z5.boolean().optional()
|
|
676
|
+
});
|
|
677
|
+
var FunnelChartConfigSchema = z5.object({
|
|
678
|
+
type: z5.literal("funnel"),
|
|
679
|
+
stage: z5.object({ field: z5.string().min(1) }),
|
|
680
|
+
value: z5.object({ field: z5.string().min(1) }),
|
|
681
|
+
show_conversion: z5.boolean().optional(),
|
|
682
|
+
color: ColorSchema.optional()
|
|
683
|
+
});
|
|
684
|
+
var WaterfallChartConfigSchema = z5.object({
|
|
685
|
+
type: z5.literal("waterfall"),
|
|
686
|
+
category: z5.object({ field: z5.string().min(1) }),
|
|
687
|
+
value: z5.object({ field: z5.string().min(1) }),
|
|
688
|
+
total_field: z5.string().optional(),
|
|
689
|
+
series: LongFormatSeriesSchema.optional(),
|
|
690
|
+
// Stacked breakdown within each waterfall step
|
|
691
|
+
colors: z5.object({
|
|
692
|
+
increase: z5.string().optional(),
|
|
693
|
+
decrease: z5.string().optional(),
|
|
694
|
+
total: z5.string().optional()
|
|
695
|
+
}).optional()
|
|
696
|
+
});
|
|
697
|
+
var SankeyChartConfigSchema = z5.object({
|
|
698
|
+
type: z5.literal("sankey"),
|
|
699
|
+
source: z5.object({ field: z5.string().min(1) }),
|
|
700
|
+
target: z5.object({ field: z5.string().min(1) }),
|
|
701
|
+
value: z5.object({ field: z5.string().min(1) }),
|
|
702
|
+
levels: z5.array(z5.array(z5.string())).optional(),
|
|
703
|
+
orient: z5.enum(["horizontal", "vertical"]).optional(),
|
|
704
|
+
node_width: z5.number().positive().optional(),
|
|
705
|
+
node_gap: z5.number().nonnegative().optional(),
|
|
706
|
+
label_position: z5.enum(["left", "right", "top", "bottom", "inside"]).optional()
|
|
707
|
+
});
|
|
708
|
+
var GaugeThresholdSchema = z5.object({
|
|
709
|
+
value: z5.number(),
|
|
710
|
+
color: z5.string()
|
|
711
|
+
});
|
|
712
|
+
var GaugeChartConfigSchema = z5.object({
|
|
713
|
+
type: z5.literal("gauge"),
|
|
714
|
+
value: z5.object({ field: z5.string().min(1) }),
|
|
715
|
+
min: z5.number().optional(),
|
|
716
|
+
max: z5.number().optional(),
|
|
717
|
+
unit: z5.string().optional(),
|
|
718
|
+
thresholds: z5.array(GaugeThresholdSchema).optional(),
|
|
719
|
+
format: z5.string().optional(),
|
|
720
|
+
goal: KpiGoalSchema.optional()
|
|
721
|
+
});
|
|
722
|
+
var TableColumnSummarySchema = z5.enum(["sum", "avg", "min", "max", "count"]);
|
|
723
|
+
var PivotAggregateSchema = z5.enum(["sum", "avg", "min", "max", "count"]);
|
|
724
|
+
var PivotValueSchema = z5.object({
|
|
725
|
+
field: z5.string().min(1),
|
|
726
|
+
aggregate: PivotAggregateSchema.default("sum"),
|
|
727
|
+
format: z5.string().optional(),
|
|
728
|
+
heatmap: z5.boolean().optional()
|
|
729
|
+
});
|
|
730
|
+
var PivotHeatmapSchema = z5.object({
|
|
731
|
+
color: z5.string().optional(),
|
|
732
|
+
scope: z5.enum(["column", "global"]).optional()
|
|
733
|
+
});
|
|
734
|
+
var PivotConfigSchema = z5.object({
|
|
735
|
+
rows: z5.array(z5.string().min(1)).min(1),
|
|
736
|
+
columns: z5.string().min(1),
|
|
737
|
+
values: z5.array(PivotValueSchema).min(1),
|
|
738
|
+
subtotals: z5.boolean().optional(),
|
|
739
|
+
grandTotals: z5.boolean().optional(),
|
|
740
|
+
heatmap: PivotHeatmapSchema.optional()
|
|
741
|
+
});
|
|
742
|
+
var TableChartConfigSchema = z5.object({
|
|
743
|
+
type: z5.literal("table"),
|
|
744
|
+
columns: z5.array(z5.object({
|
|
745
|
+
field: z5.string().min(1),
|
|
746
|
+
label: z5.string().optional(),
|
|
747
|
+
format: z5.string().optional(),
|
|
748
|
+
sticky: z5.boolean().optional(),
|
|
749
|
+
summary: TableColumnSummarySchema.optional(),
|
|
750
|
+
overflow: z5.enum(["ellipsis", "wrap", "hidden"]).optional(),
|
|
751
|
+
font: z5.enum(["mono"]).optional()
|
|
752
|
+
})).optional(),
|
|
753
|
+
summary: z5.object({
|
|
754
|
+
label: z5.string().optional()
|
|
755
|
+
}).optional(),
|
|
756
|
+
sort: z5.object({
|
|
757
|
+
field: z5.string().min(1),
|
|
758
|
+
direction: z5.enum(["asc", "desc"]).optional()
|
|
759
|
+
}).optional(),
|
|
760
|
+
pagination: z5.object({
|
|
761
|
+
enabled: z5.boolean().optional(),
|
|
762
|
+
page_size: z5.number().int().positive().optional(),
|
|
763
|
+
mode: z5.enum(["paginated", "infinite_scroll"]).optional(),
|
|
764
|
+
server_side: z5.boolean().optional()
|
|
765
|
+
}).optional(),
|
|
766
|
+
max_rows: z5.number().int().positive().optional(),
|
|
767
|
+
export: z5.object({
|
|
768
|
+
enabled: z5.boolean().optional(),
|
|
769
|
+
max_rows: z5.number().int().positive().optional()
|
|
770
|
+
}).optional(),
|
|
771
|
+
pivot: PivotConfigSchema.optional()
|
|
772
|
+
});
|
|
773
|
+
var ChartConfigSchema = z5.union([
|
|
774
|
+
ScatterChartConfigSchema,
|
|
775
|
+
ComboChartConfigSchema,
|
|
776
|
+
HeatmapChartConfigSchema,
|
|
777
|
+
FunnelChartConfigSchema,
|
|
778
|
+
WaterfallChartConfigSchema,
|
|
779
|
+
GaugeChartConfigSchema,
|
|
780
|
+
SankeyChartConfigSchema,
|
|
781
|
+
TableChartConfigSchema,
|
|
782
|
+
StandardChartConfigSchema,
|
|
783
|
+
KpiConfigSchema
|
|
784
|
+
]);
|
|
785
|
+
var ParameterTypeSchema = z5.enum([
|
|
786
|
+
"date_range",
|
|
787
|
+
"select",
|
|
788
|
+
"multi_select",
|
|
789
|
+
"dynamic_select",
|
|
790
|
+
"text",
|
|
791
|
+
"number",
|
|
792
|
+
"boolean"
|
|
793
|
+
]);
|
|
794
|
+
var ParameterOptionSchema = z5.union([
|
|
795
|
+
z5.string(),
|
|
796
|
+
z5.object({
|
|
797
|
+
value: z5.string(),
|
|
798
|
+
label: z5.string()
|
|
799
|
+
})
|
|
800
|
+
]);
|
|
801
|
+
var ParameterSourceSchema = z5.object({
|
|
802
|
+
model: z5.string(),
|
|
803
|
+
value_field: z5.string(),
|
|
804
|
+
label_field: z5.string()
|
|
805
|
+
});
|
|
806
|
+
var ParameterSchema = z5.object({
|
|
807
|
+
name: z5.string().min(1),
|
|
808
|
+
type: ParameterTypeSchema,
|
|
809
|
+
label: z5.string().optional(),
|
|
810
|
+
description: z5.string().optional(),
|
|
811
|
+
default: z5.union([z5.string(), z5.number(), z5.array(z5.string())]).optional(),
|
|
812
|
+
options: z5.array(ParameterOptionSchema).optional(),
|
|
813
|
+
source: ParameterSourceSchema.optional()
|
|
814
|
+
});
|
|
815
|
+
var SourceSchema = z5.object({
|
|
816
|
+
model: z5.string().optional(),
|
|
817
|
+
sql: z5.string().optional(),
|
|
818
|
+
connection: z5.string().optional()
|
|
819
|
+
// optional per-chart connection override (default: project default)
|
|
820
|
+
}).refine((data) => data.model !== void 0 || data.sql !== void 0, { message: "Source must specify either model or sql" }).refine((data) => !(data.model !== void 0 && data.sql !== void 0), { message: "Source cannot specify both model and sql" });
|
|
821
|
+
var RefreshSchema = z5.object({
|
|
822
|
+
schedule: z5.string().optional(),
|
|
823
|
+
// cron expression
|
|
824
|
+
timezone: z5.string().optional(),
|
|
825
|
+
cache_ttl: z5.string().optional()
|
|
826
|
+
// e.g., "1h", "30m"
|
|
827
|
+
});
|
|
828
|
+
var DrillDownColumnSchema = z5.object({
|
|
829
|
+
field: z5.string().min(1),
|
|
830
|
+
label: z5.string().optional(),
|
|
831
|
+
format: z5.string().optional()
|
|
832
|
+
});
|
|
833
|
+
var DrillDownConfigSchema = z5.object({
|
|
834
|
+
chart: z5.string().optional(),
|
|
835
|
+
// target chart name (source side)
|
|
836
|
+
model: z5.string().optional(),
|
|
837
|
+
// model name for row-level detail data
|
|
838
|
+
field: z5.string().optional(),
|
|
839
|
+
// field to pass as filter, defaults to x-axis field (backward compat)
|
|
840
|
+
fields: z5.union([z5.string(), z5.array(z5.string())]).optional(),
|
|
841
|
+
// dimension field(s) for filtering
|
|
842
|
+
columns: z5.array(DrillDownColumnSchema).optional()
|
|
843
|
+
// data table columns (target side)
|
|
844
|
+
}).refine((data) => data.chart || data.model || data.columns, {
|
|
845
|
+
message: "drillDown requires 'chart', 'model', or 'columns'"
|
|
846
|
+
});
|
|
847
|
+
var ChartSchema = z5.object({
|
|
848
|
+
// Identity
|
|
849
|
+
name: z5.string().min(1),
|
|
850
|
+
title: z5.string().min(1),
|
|
851
|
+
description: z5.string().optional(),
|
|
852
|
+
// Metadata
|
|
853
|
+
owner: z5.string().optional(),
|
|
854
|
+
tags: z5.array(z5.string()).optional(),
|
|
855
|
+
created: z5.string().optional(),
|
|
856
|
+
updated: z5.string().optional(),
|
|
857
|
+
// Data
|
|
858
|
+
source: SourceSchema,
|
|
859
|
+
parameters: z5.array(ParameterSchema).optional(),
|
|
860
|
+
// Visualization
|
|
861
|
+
chart: ChartConfigSchema,
|
|
862
|
+
// Caching
|
|
863
|
+
refresh: RefreshSchema.optional(),
|
|
864
|
+
// Drill-down navigation
|
|
865
|
+
drillDown: DrillDownConfigSchema.optional()
|
|
866
|
+
});
|
|
867
|
+
|
|
868
|
+
// ../../packages/schema/dist/model.js
|
|
869
|
+
import { z as z6 } from "zod";
|
|
870
|
+
var ParamTypeSchema = z6.enum(["string", "number", "date", "boolean", "string[]", "number[]"]);
|
|
871
|
+
var ModelParamSchema = z6.object({
|
|
872
|
+
name: z6.string().min(1),
|
|
873
|
+
type: ParamTypeSchema,
|
|
874
|
+
default: z6.string().optional(),
|
|
875
|
+
options: z6.array(z6.string()).optional(),
|
|
876
|
+
// For enum-like params
|
|
877
|
+
description: z6.string().optional()
|
|
878
|
+
});
|
|
879
|
+
var ReturnColumnSchema = z6.object({
|
|
880
|
+
name: z6.string().min(1),
|
|
881
|
+
type: z6.string(),
|
|
882
|
+
description: z6.string().optional()
|
|
883
|
+
});
|
|
884
|
+
var ModelMetadataSchema = z6.object({
|
|
885
|
+
name: z6.string().min(1),
|
|
886
|
+
description: z6.string().optional(),
|
|
887
|
+
owner: z6.string().optional(),
|
|
888
|
+
tags: z6.array(z6.string()).optional(),
|
|
889
|
+
params: z6.array(ModelParamSchema).optional(),
|
|
890
|
+
returns: z6.array(ReturnColumnSchema).optional(),
|
|
891
|
+
tests: z6.array(z6.string()).optional()
|
|
892
|
+
// SQL assertions
|
|
893
|
+
});
|
|
894
|
+
var ModelSchema = z6.object({
|
|
895
|
+
metadata: ModelMetadataSchema,
|
|
896
|
+
sql: z6.string().min(1),
|
|
897
|
+
filePath: z6.string().optional()
|
|
898
|
+
});
|
|
899
|
+
|
|
900
|
+
// ../../packages/schema/dist/dashboard.js
|
|
901
|
+
import { z as z7 } from "zod";
|
|
902
|
+
var ChartWidgetSchema = z7.object({
|
|
903
|
+
type: z7.literal("chart"),
|
|
904
|
+
ref: z7.string().min(1),
|
|
905
|
+
cols: z7.number().min(1).max(12),
|
|
906
|
+
height: z7.number().min(38).optional(),
|
|
907
|
+
x: z7.number().min(0).max(11).optional(),
|
|
908
|
+
y: z7.number().min(0).optional()
|
|
909
|
+
});
|
|
910
|
+
var TextWidgetSchema = z7.object({
|
|
911
|
+
type: z7.literal("text"),
|
|
912
|
+
content: z7.string(),
|
|
913
|
+
cols: z7.number().min(1).max(12),
|
|
914
|
+
height: z7.number().min(38).optional(),
|
|
915
|
+
x: z7.number().min(0).max(11).optional(),
|
|
916
|
+
y: z7.number().min(0).optional()
|
|
917
|
+
});
|
|
918
|
+
var WidgetSchema = z7.discriminatedUnion("type", [
|
|
919
|
+
ChartWidgetSchema,
|
|
920
|
+
TextWidgetSchema
|
|
921
|
+
]);
|
|
922
|
+
var RowSchema = z7.object({
|
|
923
|
+
height: z7.number().min(38),
|
|
924
|
+
widgets: z7.array(WidgetSchema).min(1)
|
|
925
|
+
});
|
|
926
|
+
var LayoutSchema = z7.object({
|
|
927
|
+
gap: z7.number().min(0).default(16),
|
|
928
|
+
rows: z7.array(RowSchema).min(1)
|
|
929
|
+
});
|
|
930
|
+
var TabSchema = z7.object({
|
|
931
|
+
name: z7.string().min(1),
|
|
932
|
+
label: z7.string().min(1),
|
|
933
|
+
filters: z7.array(ParameterSchema).optional(),
|
|
934
|
+
layout: LayoutSchema
|
|
935
|
+
});
|
|
936
|
+
var DashboardSchema = z7.object({
|
|
937
|
+
// Identity
|
|
938
|
+
name: z7.string().min(1),
|
|
939
|
+
title: z7.string().min(1),
|
|
940
|
+
description: z7.string().optional(),
|
|
941
|
+
// Filters inherited by all widgets (shared across tabs)
|
|
942
|
+
filters: z7.array(ParameterSchema).optional(),
|
|
943
|
+
// Layout definition (mutually exclusive with tabs)
|
|
944
|
+
layout: LayoutSchema.optional(),
|
|
945
|
+
// Tabbed layout
|
|
946
|
+
tabs: z7.array(TabSchema).min(1).optional()
|
|
947
|
+
}).superRefine((data, ctx) => {
|
|
948
|
+
if (data.layout && data.tabs) {
|
|
949
|
+
ctx.addIssue({
|
|
950
|
+
code: z7.ZodIssueCode.custom,
|
|
951
|
+
message: 'Dashboard must have either "layout" or "tabs", not both',
|
|
952
|
+
path: ["tabs"]
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
if (!data.layout && !data.tabs) {
|
|
956
|
+
ctx.addIssue({
|
|
957
|
+
code: z7.ZodIssueCode.custom,
|
|
958
|
+
message: 'Dashboard must have either "layout" or "tabs"',
|
|
959
|
+
path: []
|
|
960
|
+
});
|
|
961
|
+
}
|
|
962
|
+
});
|
|
963
|
+
|
|
964
|
+
// ../../packages/schema/dist/schedule.js
|
|
965
|
+
import { z as z8 } from "zod";
|
|
966
|
+
var SlackChannelSchema = z8.object({
|
|
967
|
+
webhook_url: z8.string().min(1),
|
|
968
|
+
channel: z8.string().optional()
|
|
969
|
+
});
|
|
970
|
+
var ChannelSchema = z8.object({
|
|
971
|
+
slack: SlackChannelSchema
|
|
972
|
+
});
|
|
973
|
+
var ConditionOperatorSchema = z8.enum(["lt", "gt", "lte", "gte", "eq"]);
|
|
974
|
+
var ConditionSchema = z8.object({
|
|
975
|
+
field: z8.string().min(1),
|
|
976
|
+
operator: ConditionOperatorSchema,
|
|
977
|
+
value: z8.number()
|
|
978
|
+
});
|
|
979
|
+
var ReportScheduleSchema = z8.object({
|
|
980
|
+
name: z8.string().min(1),
|
|
981
|
+
type: z8.literal("report"),
|
|
982
|
+
schedule: z8.string().min(1),
|
|
983
|
+
timezone: z8.string().optional(),
|
|
984
|
+
channel: ChannelSchema,
|
|
985
|
+
charts: z8.array(z8.string().min(1)).min(1),
|
|
986
|
+
params: z8.record(z8.unknown()).optional(),
|
|
987
|
+
message: z8.string().optional(),
|
|
988
|
+
notify_on_error: z8.boolean().optional()
|
|
989
|
+
});
|
|
990
|
+
var AlertScheduleSchema = z8.object({
|
|
991
|
+
name: z8.string().min(1),
|
|
992
|
+
type: z8.literal("alert"),
|
|
993
|
+
schedule: z8.string().min(1),
|
|
994
|
+
timezone: z8.string().optional(),
|
|
995
|
+
channel: ChannelSchema,
|
|
996
|
+
chart: z8.string().min(1),
|
|
997
|
+
params: z8.record(z8.unknown()).optional(),
|
|
998
|
+
condition: ConditionSchema,
|
|
999
|
+
cooldown: z8.string().optional(),
|
|
1000
|
+
message: z8.string().optional(),
|
|
1001
|
+
notify_on_error: z8.boolean().optional()
|
|
1002
|
+
});
|
|
1003
|
+
var ScheduleSchema = z8.discriminatedUnion("type", [
|
|
1004
|
+
ReportScheduleSchema,
|
|
1005
|
+
AlertScheduleSchema
|
|
1006
|
+
]);
|
|
1007
|
+
|
|
1008
|
+
// ../../packages/schema/dist/events.js
|
|
1009
|
+
import { z as z9 } from "zod";
|
|
1010
|
+
var EventSchema = z9.object({
|
|
1011
|
+
date: z9.string(),
|
|
1012
|
+
endDate: z9.string().optional(),
|
|
1013
|
+
label: z9.string(),
|
|
1014
|
+
description: z9.string().optional(),
|
|
1015
|
+
color: z9.string().optional(),
|
|
1016
|
+
charts: z9.array(z9.string()).optional()
|
|
1017
|
+
});
|
|
1018
|
+
var EventsFileSchema = z9.object({
|
|
1019
|
+
events: z9.array(EventSchema).default([])
|
|
1020
|
+
});
|
|
1021
|
+
|
|
1022
|
+
// ../../packages/schema/dist/semantic-curated.js
|
|
1023
|
+
import { z as z10 } from "zod";
|
|
1024
|
+
var CuratedMetricSchema = z10.object({
|
|
1025
|
+
name: z10.string().min(1),
|
|
1026
|
+
label: z10.string().optional(),
|
|
1027
|
+
description: z10.string().optional(),
|
|
1028
|
+
agg: MeasureTypeSchema,
|
|
1029
|
+
// sum|count|avg|min|max|count_distinct
|
|
1030
|
+
field: z10.string().optional(),
|
|
1031
|
+
// column to aggregate
|
|
1032
|
+
sql: z10.string().optional(),
|
|
1033
|
+
// raw aggregate expression (derived metric)
|
|
1034
|
+
filter: z10.string().optional(),
|
|
1035
|
+
// references a named filter on the entity
|
|
1036
|
+
synonyms: z10.array(z10.string()).optional(),
|
|
1037
|
+
format: z10.string().optional(),
|
|
1038
|
+
default_time_grain: z10.enum(["day", "week", "month", "quarter", "year"]).optional()
|
|
1039
|
+
}).refine((m) => Boolean(m.field) !== Boolean(m.sql), {
|
|
1040
|
+
message: "metric must specify exactly one of `field` or `sql`"
|
|
1041
|
+
}).refine((m) => !(m.sql && m.filter), {
|
|
1042
|
+
message: "a metric with raw `sql` cannot also set `filter` (embed the condition in the sql expression instead)"
|
|
1043
|
+
});
|
|
1044
|
+
var CuratedDimensionSchema = z10.object({
|
|
1045
|
+
name: z10.string().min(1),
|
|
1046
|
+
type: DimensionTypeSchema,
|
|
1047
|
+
// string|number|time|boolean
|
|
1048
|
+
description: z10.string().optional(),
|
|
1049
|
+
synonyms: z10.array(z10.string()).optional()
|
|
1050
|
+
});
|
|
1051
|
+
var NamedFilterSchema = z10.object({
|
|
1052
|
+
description: z10.string().optional(),
|
|
1053
|
+
sql: z10.string().min(1),
|
|
1054
|
+
synonyms: z10.array(z10.string()).optional()
|
|
1055
|
+
});
|
|
1056
|
+
var CuratedSourceSchema = z10.object({ table: z10.string().optional(), model: z10.string().optional() }).refine((s) => Boolean(s.table) !== Boolean(s.model), {
|
|
1057
|
+
message: "source must specify exactly one of `table` or `model`"
|
|
1058
|
+
});
|
|
1059
|
+
var SemanticDefinitionSchema = z10.object({
|
|
1060
|
+
entity: z10.string().min(1),
|
|
1061
|
+
description: z10.string().optional(),
|
|
1062
|
+
source: CuratedSourceSchema,
|
|
1063
|
+
primary_key: z10.string().optional(),
|
|
1064
|
+
time_dimension: z10.string().optional(),
|
|
1065
|
+
dimensions: z10.array(CuratedDimensionSchema).default([]),
|
|
1066
|
+
filters: z10.record(NamedFilterSchema).optional().default({}),
|
|
1067
|
+
metrics: z10.array(CuratedMetricSchema).min(1)
|
|
1068
|
+
});
|
|
1069
|
+
|
|
1070
|
+
// ../../packages/schema/dist/agent.js
|
|
1071
|
+
import { z as z11 } from "zod";
|
|
1072
|
+
var AgentDefinitionSchema = z11.object({
|
|
1073
|
+
name: z11.string(),
|
|
1074
|
+
title: z11.string().optional(),
|
|
1075
|
+
description: z11.string(),
|
|
1076
|
+
system_prompt: z11.string(),
|
|
1077
|
+
tools: z11.array(z11.string()).default([]),
|
|
1078
|
+
model: z11.string().optional(),
|
|
1079
|
+
models: z11.array(z11.string()).optional()
|
|
1080
|
+
});
|
|
1081
|
+
|
|
1082
|
+
// ../../packages/schema/dist/hunch.js
|
|
1083
|
+
import { z as z12 } from "zod";
|
|
1084
|
+
var HunchStatusSchema = z12.enum(["pending", "confirmed", "rejected"]);
|
|
1085
|
+
var HunchSampleSchema = z12.object({
|
|
1086
|
+
columns: z12.array(z12.object({ name: z12.string() })),
|
|
1087
|
+
rows: z12.array(z12.record(z12.unknown())),
|
|
1088
|
+
ranAt: z12.string()
|
|
1089
|
+
});
|
|
1090
|
+
var NewHunchSchema = z12.object({
|
|
1091
|
+
connection: z12.string(),
|
|
1092
|
+
question: z12.string().min(1),
|
|
1093
|
+
sql: z12.string().min(1),
|
|
1094
|
+
generatedSql: z12.string().min(1),
|
|
1095
|
+
tablesUsed: z12.array(z12.string()).default([]),
|
|
1096
|
+
rationale: z12.string().optional(),
|
|
1097
|
+
confidence: z12.number().min(0).max(1).optional()
|
|
1098
|
+
});
|
|
1099
|
+
var HunchSchema = NewHunchSchema.extend({
|
|
1100
|
+
id: z12.string(),
|
|
1101
|
+
status: HunchStatusSchema,
|
|
1102
|
+
lastRunSample: HunchSampleSchema.optional(),
|
|
1103
|
+
createdAt: z12.string(),
|
|
1104
|
+
updatedAt: z12.string()
|
|
1105
|
+
});
|
|
1106
|
+
var ColumnProfileSchema = z12.object({
|
|
1107
|
+
name: z12.string(),
|
|
1108
|
+
type: z12.string(),
|
|
1109
|
+
nullRate: z12.number().optional(),
|
|
1110
|
+
distinctCount: z12.number().optional(),
|
|
1111
|
+
min: z12.unknown().optional(),
|
|
1112
|
+
max: z12.unknown().optional(),
|
|
1113
|
+
topValues: z12.array(z12.object({ value: z12.unknown(), count: z12.number() })).optional()
|
|
1114
|
+
});
|
|
1115
|
+
var TableProfileSchema = z12.object({
|
|
1116
|
+
table: z12.string(),
|
|
1117
|
+
rowCount: z12.number().optional(),
|
|
1118
|
+
columns: z12.array(ColumnProfileSchema),
|
|
1119
|
+
sampleRows: z12.array(z12.record(z12.unknown()))
|
|
1120
|
+
});
|
|
1121
|
+
var SourceProfileSchema = z12.object({
|
|
1122
|
+
connection: z12.string(),
|
|
1123
|
+
profiledAt: z12.string(),
|
|
1124
|
+
tables: z12.array(TableProfileSchema)
|
|
1125
|
+
});
|
|
1126
|
+
|
|
1127
|
+
// ../../packages/schema/dist/blindspot.js
|
|
1128
|
+
import { z as z13 } from "zod";
|
|
1129
|
+
var BlindspotKindSchema = z13.enum(["context", "opportunity"]);
|
|
1130
|
+
var BlindspotStatusSchema = z13.enum(["open", "answered", "dismissed"]);
|
|
1131
|
+
var SuggestedModelSchema = z13.object({
|
|
1132
|
+
name: z13.string().min(1),
|
|
1133
|
+
description: z13.string(),
|
|
1134
|
+
rationale: z13.string(),
|
|
1135
|
+
columns: z13.array(z13.object({ name: z13.string(), description: z13.string().optional() }))
|
|
1136
|
+
});
|
|
1137
|
+
var NewBlindspotSchema = z13.object({
|
|
1138
|
+
connection: z13.string(),
|
|
1139
|
+
kind: BlindspotKindSchema,
|
|
1140
|
+
title: z13.string().min(1),
|
|
1141
|
+
detail: z13.string().min(1),
|
|
1142
|
+
subject: z13.string().optional(),
|
|
1143
|
+
suggestedModel: SuggestedModelSchema.optional(),
|
|
1144
|
+
confidence: z13.number().min(0).max(1).optional()
|
|
1145
|
+
}).refine((b) => b.kind !== "opportunity" || b.suggestedModel !== void 0, {
|
|
1146
|
+
message: "opportunity blindspots must include a suggestedModel"
|
|
1147
|
+
});
|
|
1148
|
+
var BlindspotSchema = z13.object({
|
|
1149
|
+
id: z13.string(),
|
|
1150
|
+
connection: z13.string(),
|
|
1151
|
+
kind: BlindspotKindSchema,
|
|
1152
|
+
title: z13.string(),
|
|
1153
|
+
detail: z13.string(),
|
|
1154
|
+
subject: z13.string().optional(),
|
|
1155
|
+
suggestedModel: SuggestedModelSchema.optional(),
|
|
1156
|
+
confidence: z13.number().optional(),
|
|
1157
|
+
status: BlindspotStatusSchema,
|
|
1158
|
+
answer: z13.string().optional(),
|
|
1159
|
+
createdAt: z13.string(),
|
|
1160
|
+
updatedAt: z13.string()
|
|
1161
|
+
});
|
|
1162
|
+
|
|
1163
|
+
// ../../packages/schema/dist/knowledge-doc.js
|
|
1164
|
+
import { z as z14 } from "zod";
|
|
1165
|
+
var NewKnowledgeDocSchema = z14.object({
|
|
1166
|
+
connection: z14.string(),
|
|
1167
|
+
title: z14.string().min(1),
|
|
1168
|
+
content: z14.string().min(1),
|
|
1169
|
+
source: z14.enum(["ui", "file"]).default("ui")
|
|
1170
|
+
});
|
|
1171
|
+
var KnowledgeDocSchema = NewKnowledgeDocSchema.extend({
|
|
1172
|
+
id: z14.string(),
|
|
1173
|
+
createdAt: z14.string(),
|
|
1174
|
+
updatedAt: z14.string()
|
|
1175
|
+
});
|
|
1176
|
+
|
|
1177
|
+
// ../../packages/schema/dist/index.js
|
|
1178
|
+
var VERSION = "0.1.0";
|
|
1179
|
+
|
|
1180
|
+
export {
|
|
1181
|
+
PoolConfigSchema,
|
|
1182
|
+
QueryConfigSchema,
|
|
1183
|
+
DuckDBConfigSchema,
|
|
1184
|
+
PostgresConfigSchema,
|
|
1185
|
+
SnowflakeConfigSchema,
|
|
1186
|
+
MySQLConfigSchema,
|
|
1187
|
+
SQLiteConfigSchema,
|
|
1188
|
+
BigQueryConfigSchema,
|
|
1189
|
+
ConnectionSchema,
|
|
1190
|
+
MeasureTypeSchema,
|
|
1191
|
+
DimensionTypeSchema,
|
|
1192
|
+
MeasureSchema,
|
|
1193
|
+
DimensionSchema,
|
|
1194
|
+
SemanticEntitySchema,
|
|
1195
|
+
RelationshipSchema,
|
|
1196
|
+
SemanticModelSchema,
|
|
1197
|
+
SemanticFilterOperatorSchema,
|
|
1198
|
+
SemanticFilterSchema,
|
|
1199
|
+
SemanticQuerySchema,
|
|
1200
|
+
SemanticConfigSchema,
|
|
1201
|
+
deepMerge,
|
|
1202
|
+
resolveProjectConfig,
|
|
1203
|
+
ProviderConfigSchema,
|
|
1204
|
+
AiConfigSchema,
|
|
1205
|
+
ProjectSchema,
|
|
1206
|
+
ConnectionSecretsSchema,
|
|
1207
|
+
RuntimeConnectionSchema,
|
|
1208
|
+
RuntimeConfigSchema,
|
|
1209
|
+
ParameterSchema,
|
|
1210
|
+
ChartSchema,
|
|
1211
|
+
ModelMetadataSchema,
|
|
1212
|
+
ModelSchema,
|
|
1213
|
+
DashboardSchema,
|
|
1214
|
+
ScheduleSchema,
|
|
1215
|
+
EventSchema,
|
|
1216
|
+
EventsFileSchema,
|
|
1217
|
+
CuratedMetricSchema,
|
|
1218
|
+
CuratedDimensionSchema,
|
|
1219
|
+
NamedFilterSchema,
|
|
1220
|
+
CuratedSourceSchema,
|
|
1221
|
+
SemanticDefinitionSchema,
|
|
1222
|
+
AgentDefinitionSchema,
|
|
1223
|
+
HunchStatusSchema,
|
|
1224
|
+
HunchSampleSchema,
|
|
1225
|
+
NewHunchSchema,
|
|
1226
|
+
HunchSchema,
|
|
1227
|
+
ColumnProfileSchema,
|
|
1228
|
+
TableProfileSchema,
|
|
1229
|
+
SourceProfileSchema,
|
|
1230
|
+
BlindspotKindSchema,
|
|
1231
|
+
BlindspotStatusSchema,
|
|
1232
|
+
SuggestedModelSchema,
|
|
1233
|
+
NewBlindspotSchema,
|
|
1234
|
+
BlindspotSchema,
|
|
1235
|
+
NewKnowledgeDocSchema,
|
|
1236
|
+
KnowledgeDocSchema,
|
|
1237
|
+
VERSION
|
|
1238
|
+
};
|
|
1239
|
+
//# sourceMappingURL=chunk-7HWFVUGP.js.map
|