@lightdash/common 0.2067.2 → 0.2068.1
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/cjs/ee/AiAgent/schemas/customMetrics.d.ts +6 -0
- package/dist/cjs/ee/AiAgent/schemas/customMetrics.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/customMetrics.js +3 -0
- package/dist/cjs/ee/AiAgent/schemas/customMetrics.js.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/index.d.ts +53 -0
- package/dist/cjs/ee/AiAgent/schemas/index.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolDashboardArgs.d.ts +81 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/toolDashboardArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolProposeChange.d.ts +11 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/toolProposeChange.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts +12 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts +12 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts +12 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts +12 -0
- package/dist/cjs/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts.map +1 -1
- package/dist/cjs/ee/AiAgent/utils.d.ts +3 -0
- package/dist/cjs/ee/AiAgent/utils.d.ts.map +1 -1
- package/dist/cjs/pivot/derivePivotConfigFromChart.d.ts.map +1 -1
- package/dist/cjs/pivot/derivePivotConfigFromChart.js +18 -30
- package/dist/cjs/pivot/derivePivotConfigFromChart.js.map +1 -1
- package/dist/cjs/pivot/derivePivotConfigFromChart.mock.d.ts +1 -0
- package/dist/cjs/pivot/derivePivotConfigFromChart.mock.d.ts.map +1 -1
- package/dist/cjs/pivot/derivePivotConfigFromChart.mock.js +34 -1
- package/dist/cjs/pivot/derivePivotConfigFromChart.mock.js.map +1 -1
- package/dist/cjs/pivot/derivePivotConfigFromChart.test.js +46 -7
- package/dist/cjs/pivot/derivePivotConfigFromChart.test.js.map +1 -1
- package/dist/cjs/types/changeset.d.ts +272 -79
- package/dist/cjs/types/changeset.d.ts.map +1 -1
- package/dist/cjs/types/changeset.js +11 -9
- package/dist/cjs/types/changeset.js.map +1 -1
- package/dist/cjs/utils/changeset.d.ts +4 -2
- package/dist/cjs/utils/changeset.d.ts.map +1 -1
- package/dist/cjs/utils/changeset.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/customMetrics.d.ts +6 -0
- package/dist/esm/ee/AiAgent/schemas/customMetrics.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/customMetrics.js +3 -0
- package/dist/esm/ee/AiAgent/schemas/customMetrics.js.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/index.d.ts +53 -0
- package/dist/esm/ee/AiAgent/schemas/index.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolDashboardArgs.d.ts +81 -0
- package/dist/esm/ee/AiAgent/schemas/tools/toolDashboardArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolProposeChange.d.ts +11 -0
- package/dist/esm/ee/AiAgent/schemas/tools/toolProposeChange.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts +12 -0
- package/dist/esm/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts +12 -0
- package/dist/esm/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts +12 -0
- package/dist/esm/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts +12 -0
- package/dist/esm/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts.map +1 -1
- package/dist/esm/ee/AiAgent/utils.d.ts +3 -0
- package/dist/esm/ee/AiAgent/utils.d.ts.map +1 -1
- package/dist/esm/pivot/derivePivotConfigFromChart.d.ts.map +1 -1
- package/dist/esm/pivot/derivePivotConfigFromChart.js +18 -30
- package/dist/esm/pivot/derivePivotConfigFromChart.js.map +1 -1
- package/dist/esm/pivot/derivePivotConfigFromChart.mock.d.ts +1 -0
- package/dist/esm/pivot/derivePivotConfigFromChart.mock.d.ts.map +1 -1
- package/dist/esm/pivot/derivePivotConfigFromChart.mock.js +33 -0
- package/dist/esm/pivot/derivePivotConfigFromChart.mock.js.map +1 -1
- package/dist/esm/pivot/derivePivotConfigFromChart.test.js +47 -8
- package/dist/esm/pivot/derivePivotConfigFromChart.test.js.map +1 -1
- package/dist/esm/types/changeset.d.ts +272 -79
- package/dist/esm/types/changeset.d.ts.map +1 -1
- package/dist/esm/types/changeset.js +10 -8
- package/dist/esm/types/changeset.js.map +1 -1
- package/dist/esm/utils/changeset.d.ts +4 -2
- package/dist/esm/utils/changeset.d.ts.map +1 -1
- package/dist/esm/utils/changeset.js.map +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/ee/AiAgent/schemas/customMetrics.d.ts +6 -0
- package/dist/types/ee/AiAgent/schemas/customMetrics.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/index.d.ts +53 -0
- package/dist/types/ee/AiAgent/schemas/index.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolDashboardArgs.d.ts +81 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolDashboardArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolProposeChange.d.ts +11 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolProposeChange.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts +12 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts +12 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts +12 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts +12 -0
- package/dist/types/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts.map +1 -1
- package/dist/types/ee/AiAgent/utils.d.ts +3 -0
- package/dist/types/ee/AiAgent/utils.d.ts.map +1 -1
- package/dist/types/pivot/derivePivotConfigFromChart.d.ts.map +1 -1
- package/dist/types/pivot/derivePivotConfigFromChart.mock.d.ts +1 -0
- package/dist/types/pivot/derivePivotConfigFromChart.mock.d.ts.map +1 -1
- package/dist/types/types/changeset.d.ts +272 -79
- package/dist/types/types/changeset.d.ts.map +1 -1
- package/dist/types/utils/changeset.d.ts +4 -2
- package/dist/types/utils/changeset.d.ts.map +1 -1
- package/package.json +1 -1
@@ -28,30 +28,15 @@ export declare const ChangesetSchema: z.ZodObject<{
|
|
28
28
|
changesetUuid: string;
|
29
29
|
status: "draft" | "applied";
|
30
30
|
}>;
|
31
|
-
export declare const
|
32
|
-
changeUuid: z.ZodString;
|
33
|
-
changesetUuid: z.ZodString;
|
34
|
-
createdAt: z.ZodDate;
|
35
|
-
createdByUserUuid: z.ZodString;
|
36
|
-
sourcePromptUuid: z.ZodNullable<z.ZodString>;
|
31
|
+
export declare const ChangeBaseSchema: z.ZodIntersection<z.ZodObject<{
|
37
32
|
entityType: z.ZodEnum<["table", "dimension", "metric"]>;
|
38
33
|
entityTableName: z.ZodString;
|
39
34
|
entityName: z.ZodString;
|
40
35
|
}, "strip", z.ZodTypeAny, {
|
41
|
-
createdAt: Date;
|
42
|
-
createdByUserUuid: string;
|
43
|
-
changesetUuid: string;
|
44
|
-
changeUuid: string;
|
45
|
-
sourcePromptUuid: string | null;
|
46
36
|
entityType: "metric" | "dimension" | "table";
|
47
37
|
entityTableName: string;
|
48
38
|
entityName: string;
|
49
39
|
}, {
|
50
|
-
createdAt: Date;
|
51
|
-
createdByUserUuid: string;
|
52
|
-
changesetUuid: string;
|
53
|
-
changeUuid: string;
|
54
|
-
sourcePromptUuid: string | null;
|
55
40
|
entityType: "metric" | "dimension" | "table";
|
56
41
|
entityTableName: string;
|
57
42
|
entityName: string;
|
@@ -70,8 +55,8 @@ export declare const ChangeSchema: z.ZodIntersection<z.ZodObject<{
|
|
70
55
|
description: z.ZodOptional<z.ZodString>;
|
71
56
|
hidden: z.ZodBoolean;
|
72
57
|
compiledSql: z.ZodString;
|
73
|
-
tablesReferences: z.ZodArray<z.ZodString, "many"
|
74
|
-
tablesRequiredAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString
|
58
|
+
tablesReferences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
59
|
+
tablesRequiredAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>>;
|
75
60
|
}, "strip", z.ZodTypeAny, {
|
76
61
|
name: string;
|
77
62
|
label: string;
|
@@ -82,9 +67,9 @@ export declare const ChangeSchema: z.ZodIntersection<z.ZodObject<{
|
|
82
67
|
tableLabel: string;
|
83
68
|
hidden: boolean;
|
84
69
|
compiledSql: string;
|
85
|
-
tablesReferences: string[];
|
86
70
|
description?: string | undefined;
|
87
|
-
|
71
|
+
tablesReferences?: string[] | undefined;
|
72
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
88
73
|
}, {
|
89
74
|
name: string;
|
90
75
|
label: string;
|
@@ -95,9 +80,9 @@ export declare const ChangeSchema: z.ZodIntersection<z.ZodObject<{
|
|
95
80
|
tableLabel: string;
|
96
81
|
hidden: boolean;
|
97
82
|
compiledSql: string;
|
98
|
-
tablesReferences: string[];
|
99
83
|
description?: string | undefined;
|
100
|
-
|
84
|
+
tablesReferences?: string[] | undefined;
|
85
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
101
86
|
}>;
|
102
87
|
}, "strip", z.ZodTypeAny, {
|
103
88
|
value: {
|
@@ -110,9 +95,9 @@ export declare const ChangeSchema: z.ZodIntersection<z.ZodObject<{
|
|
110
95
|
tableLabel: string;
|
111
96
|
hidden: boolean;
|
112
97
|
compiledSql: string;
|
113
|
-
tablesReferences: string[];
|
114
98
|
description?: string | undefined;
|
115
|
-
|
99
|
+
tablesReferences?: string[] | undefined;
|
100
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
116
101
|
};
|
117
102
|
type: "metric";
|
118
103
|
}, {
|
@@ -126,9 +111,9 @@ export declare const ChangeSchema: z.ZodIntersection<z.ZodObject<{
|
|
126
111
|
tableLabel: string;
|
127
112
|
hidden: boolean;
|
128
113
|
compiledSql: string;
|
129
|
-
tablesReferences: string[];
|
130
114
|
description?: string | undefined;
|
131
|
-
|
115
|
+
tablesReferences?: string[] | undefined;
|
116
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
132
117
|
};
|
133
118
|
type: "metric";
|
134
119
|
}>]>;
|
@@ -145,9 +130,9 @@ export declare const ChangeSchema: z.ZodIntersection<z.ZodObject<{
|
|
145
130
|
tableLabel: string;
|
146
131
|
hidden: boolean;
|
147
132
|
compiledSql: string;
|
148
|
-
tablesReferences: string[];
|
149
133
|
description?: string | undefined;
|
150
|
-
|
134
|
+
tablesReferences?: string[] | undefined;
|
135
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
151
136
|
};
|
152
137
|
type: "metric";
|
153
138
|
};
|
@@ -164,9 +149,9 @@ export declare const ChangeSchema: z.ZodIntersection<z.ZodObject<{
|
|
164
149
|
tableLabel: string;
|
165
150
|
hidden: boolean;
|
166
151
|
compiledSql: string;
|
167
|
-
tablesReferences: string[];
|
168
152
|
description?: string | undefined;
|
169
|
-
|
153
|
+
tablesReferences?: string[] | undefined;
|
154
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
170
155
|
};
|
171
156
|
type: "metric";
|
172
157
|
};
|
@@ -227,6 +212,209 @@ export declare const ChangeSchema: z.ZodIntersection<z.ZodObject<{
|
|
227
212
|
type: "delete";
|
228
213
|
payload: {};
|
229
214
|
}>]>>;
|
215
|
+
export type ChangeBase = z.infer<typeof ChangeBaseSchema>;
|
216
|
+
export declare const ChangeSchema: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
217
|
+
entityType: z.ZodEnum<["table", "dimension", "metric"]>;
|
218
|
+
entityTableName: z.ZodString;
|
219
|
+
entityName: z.ZodString;
|
220
|
+
}, "strip", z.ZodTypeAny, {
|
221
|
+
entityType: "metric" | "dimension" | "table";
|
222
|
+
entityTableName: string;
|
223
|
+
entityName: string;
|
224
|
+
}, {
|
225
|
+
entityType: "metric" | "dimension" | "table";
|
226
|
+
entityTableName: string;
|
227
|
+
entityName: string;
|
228
|
+
}>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
229
|
+
type: z.ZodLiteral<"create">;
|
230
|
+
payload: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
231
|
+
type: z.ZodLiteral<"metric">;
|
232
|
+
value: z.ZodObject<{
|
233
|
+
fieldType: z.ZodLiteral<FieldType.METRIC>;
|
234
|
+
type: z.ZodNativeEnum<typeof MetricType>;
|
235
|
+
name: z.ZodString;
|
236
|
+
label: z.ZodString;
|
237
|
+
table: z.ZodString;
|
238
|
+
tableLabel: z.ZodString;
|
239
|
+
sql: z.ZodString;
|
240
|
+
description: z.ZodOptional<z.ZodString>;
|
241
|
+
hidden: z.ZodBoolean;
|
242
|
+
compiledSql: z.ZodString;
|
243
|
+
tablesReferences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
244
|
+
tablesRequiredAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>>;
|
245
|
+
}, "strip", z.ZodTypeAny, {
|
246
|
+
name: string;
|
247
|
+
label: string;
|
248
|
+
sql: string;
|
249
|
+
table: string;
|
250
|
+
fieldType: FieldType.METRIC;
|
251
|
+
type: MetricType;
|
252
|
+
tableLabel: string;
|
253
|
+
hidden: boolean;
|
254
|
+
compiledSql: string;
|
255
|
+
description?: string | undefined;
|
256
|
+
tablesReferences?: string[] | undefined;
|
257
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
258
|
+
}, {
|
259
|
+
name: string;
|
260
|
+
label: string;
|
261
|
+
sql: string;
|
262
|
+
table: string;
|
263
|
+
fieldType: FieldType.METRIC;
|
264
|
+
type: MetricType;
|
265
|
+
tableLabel: string;
|
266
|
+
hidden: boolean;
|
267
|
+
compiledSql: string;
|
268
|
+
description?: string | undefined;
|
269
|
+
tablesReferences?: string[] | undefined;
|
270
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
271
|
+
}>;
|
272
|
+
}, "strip", z.ZodTypeAny, {
|
273
|
+
value: {
|
274
|
+
name: string;
|
275
|
+
label: string;
|
276
|
+
sql: string;
|
277
|
+
table: string;
|
278
|
+
fieldType: FieldType.METRIC;
|
279
|
+
type: MetricType;
|
280
|
+
tableLabel: string;
|
281
|
+
hidden: boolean;
|
282
|
+
compiledSql: string;
|
283
|
+
description?: string | undefined;
|
284
|
+
tablesReferences?: string[] | undefined;
|
285
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
286
|
+
};
|
287
|
+
type: "metric";
|
288
|
+
}, {
|
289
|
+
value: {
|
290
|
+
name: string;
|
291
|
+
label: string;
|
292
|
+
sql: string;
|
293
|
+
table: string;
|
294
|
+
fieldType: FieldType.METRIC;
|
295
|
+
type: MetricType;
|
296
|
+
tableLabel: string;
|
297
|
+
hidden: boolean;
|
298
|
+
compiledSql: string;
|
299
|
+
description?: string | undefined;
|
300
|
+
tablesReferences?: string[] | undefined;
|
301
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
302
|
+
};
|
303
|
+
type: "metric";
|
304
|
+
}>]>;
|
305
|
+
}, "strip", z.ZodTypeAny, {
|
306
|
+
type: "create";
|
307
|
+
payload: {
|
308
|
+
value: {
|
309
|
+
name: string;
|
310
|
+
label: string;
|
311
|
+
sql: string;
|
312
|
+
table: string;
|
313
|
+
fieldType: FieldType.METRIC;
|
314
|
+
type: MetricType;
|
315
|
+
tableLabel: string;
|
316
|
+
hidden: boolean;
|
317
|
+
compiledSql: string;
|
318
|
+
description?: string | undefined;
|
319
|
+
tablesReferences?: string[] | undefined;
|
320
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
321
|
+
};
|
322
|
+
type: "metric";
|
323
|
+
};
|
324
|
+
}, {
|
325
|
+
type: "create";
|
326
|
+
payload: {
|
327
|
+
value: {
|
328
|
+
name: string;
|
329
|
+
label: string;
|
330
|
+
sql: string;
|
331
|
+
table: string;
|
332
|
+
fieldType: FieldType.METRIC;
|
333
|
+
type: MetricType;
|
334
|
+
tableLabel: string;
|
335
|
+
hidden: boolean;
|
336
|
+
compiledSql: string;
|
337
|
+
description?: string | undefined;
|
338
|
+
tablesReferences?: string[] | undefined;
|
339
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
340
|
+
};
|
341
|
+
type: "metric";
|
342
|
+
};
|
343
|
+
}>, z.ZodObject<{
|
344
|
+
type: z.ZodLiteral<"update">;
|
345
|
+
payload: z.ZodObject<{
|
346
|
+
patches: z.ZodArray<z.ZodObject<{
|
347
|
+
op: z.ZodEnum<["replace", "add"]>;
|
348
|
+
path: z.ZodString;
|
349
|
+
value: z.ZodEffects<z.ZodUnknown, {} | null, unknown>;
|
350
|
+
}, "strip", z.ZodTypeAny, {
|
351
|
+
value: {} | null;
|
352
|
+
path: string;
|
353
|
+
op: "replace" | "add";
|
354
|
+
}, {
|
355
|
+
path: string;
|
356
|
+
op: "replace" | "add";
|
357
|
+
value?: unknown;
|
358
|
+
}>, "many">;
|
359
|
+
}, "strip", z.ZodTypeAny, {
|
360
|
+
patches: {
|
361
|
+
value: {} | null;
|
362
|
+
path: string;
|
363
|
+
op: "replace" | "add";
|
364
|
+
}[];
|
365
|
+
}, {
|
366
|
+
patches: {
|
367
|
+
path: string;
|
368
|
+
op: "replace" | "add";
|
369
|
+
value?: unknown;
|
370
|
+
}[];
|
371
|
+
}>;
|
372
|
+
}, "strip", z.ZodTypeAny, {
|
373
|
+
type: "update";
|
374
|
+
payload: {
|
375
|
+
patches: {
|
376
|
+
value: {} | null;
|
377
|
+
path: string;
|
378
|
+
op: "replace" | "add";
|
379
|
+
}[];
|
380
|
+
};
|
381
|
+
}, {
|
382
|
+
type: "update";
|
383
|
+
payload: {
|
384
|
+
patches: {
|
385
|
+
path: string;
|
386
|
+
op: "replace" | "add";
|
387
|
+
value?: unknown;
|
388
|
+
}[];
|
389
|
+
};
|
390
|
+
}>, z.ZodObject<{
|
391
|
+
type: z.ZodLiteral<"delete">;
|
392
|
+
payload: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
393
|
+
}, "strip", z.ZodTypeAny, {
|
394
|
+
type: "delete";
|
395
|
+
payload: {};
|
396
|
+
}, {
|
397
|
+
type: "delete";
|
398
|
+
payload: {};
|
399
|
+
}>]>>, z.ZodObject<{
|
400
|
+
changeUuid: z.ZodString;
|
401
|
+
changesetUuid: z.ZodString;
|
402
|
+
createdAt: z.ZodDate;
|
403
|
+
createdByUserUuid: z.ZodString;
|
404
|
+
sourcePromptUuid: z.ZodNullable<z.ZodString>;
|
405
|
+
}, "strip", z.ZodTypeAny, {
|
406
|
+
createdAt: Date;
|
407
|
+
createdByUserUuid: string;
|
408
|
+
changesetUuid: string;
|
409
|
+
changeUuid: string;
|
410
|
+
sourcePromptUuid: string | null;
|
411
|
+
}, {
|
412
|
+
createdAt: Date;
|
413
|
+
createdByUserUuid: string;
|
414
|
+
changesetUuid: string;
|
415
|
+
changeUuid: string;
|
416
|
+
sourcePromptUuid: string | null;
|
417
|
+
}>>;
|
230
418
|
export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
231
419
|
changesetUuid: z.ZodString;
|
232
420
|
createdAt: z.ZodDate;
|
@@ -237,30 +425,15 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
237
425
|
status: z.ZodEnum<["draft", "applied"]>;
|
238
426
|
name: z.ZodString;
|
239
427
|
} & {
|
240
|
-
changes: z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
241
|
-
changeUuid: z.ZodString;
|
242
|
-
changesetUuid: z.ZodString;
|
243
|
-
createdAt: z.ZodDate;
|
244
|
-
createdByUserUuid: z.ZodString;
|
245
|
-
sourcePromptUuid: z.ZodNullable<z.ZodString>;
|
428
|
+
changes: z.ZodArray<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
|
246
429
|
entityType: z.ZodEnum<["table", "dimension", "metric"]>;
|
247
430
|
entityTableName: z.ZodString;
|
248
431
|
entityName: z.ZodString;
|
249
432
|
}, "strip", z.ZodTypeAny, {
|
250
|
-
createdAt: Date;
|
251
|
-
createdByUserUuid: string;
|
252
|
-
changesetUuid: string;
|
253
|
-
changeUuid: string;
|
254
|
-
sourcePromptUuid: string | null;
|
255
433
|
entityType: "metric" | "dimension" | "table";
|
256
434
|
entityTableName: string;
|
257
435
|
entityName: string;
|
258
436
|
}, {
|
259
|
-
createdAt: Date;
|
260
|
-
createdByUserUuid: string;
|
261
|
-
changesetUuid: string;
|
262
|
-
changeUuid: string;
|
263
|
-
sourcePromptUuid: string | null;
|
264
437
|
entityType: "metric" | "dimension" | "table";
|
265
438
|
entityTableName: string;
|
266
439
|
entityName: string;
|
@@ -279,8 +452,8 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
279
452
|
description: z.ZodOptional<z.ZodString>;
|
280
453
|
hidden: z.ZodBoolean;
|
281
454
|
compiledSql: z.ZodString;
|
282
|
-
tablesReferences: z.ZodArray<z.ZodString, "many"
|
283
|
-
tablesRequiredAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString
|
455
|
+
tablesReferences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
456
|
+
tablesRequiredAttributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>>;
|
284
457
|
}, "strip", z.ZodTypeAny, {
|
285
458
|
name: string;
|
286
459
|
label: string;
|
@@ -291,9 +464,9 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
291
464
|
tableLabel: string;
|
292
465
|
hidden: boolean;
|
293
466
|
compiledSql: string;
|
294
|
-
tablesReferences: string[];
|
295
467
|
description?: string | undefined;
|
296
|
-
|
468
|
+
tablesReferences?: string[] | undefined;
|
469
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
297
470
|
}, {
|
298
471
|
name: string;
|
299
472
|
label: string;
|
@@ -304,9 +477,9 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
304
477
|
tableLabel: string;
|
305
478
|
hidden: boolean;
|
306
479
|
compiledSql: string;
|
307
|
-
tablesReferences: string[];
|
308
480
|
description?: string | undefined;
|
309
|
-
|
481
|
+
tablesReferences?: string[] | undefined;
|
482
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
310
483
|
}>;
|
311
484
|
}, "strip", z.ZodTypeAny, {
|
312
485
|
value: {
|
@@ -319,9 +492,9 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
319
492
|
tableLabel: string;
|
320
493
|
hidden: boolean;
|
321
494
|
compiledSql: string;
|
322
|
-
tablesReferences: string[];
|
323
495
|
description?: string | undefined;
|
324
|
-
|
496
|
+
tablesReferences?: string[] | undefined;
|
497
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
325
498
|
};
|
326
499
|
type: "metric";
|
327
500
|
}, {
|
@@ -335,9 +508,9 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
335
508
|
tableLabel: string;
|
336
509
|
hidden: boolean;
|
337
510
|
compiledSql: string;
|
338
|
-
tablesReferences: string[];
|
339
511
|
description?: string | undefined;
|
340
|
-
|
512
|
+
tablesReferences?: string[] | undefined;
|
513
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
341
514
|
};
|
342
515
|
type: "metric";
|
343
516
|
}>]>;
|
@@ -354,9 +527,9 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
354
527
|
tableLabel: string;
|
355
528
|
hidden: boolean;
|
356
529
|
compiledSql: string;
|
357
|
-
tablesReferences: string[];
|
358
530
|
description?: string | undefined;
|
359
|
-
|
531
|
+
tablesReferences?: string[] | undefined;
|
532
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
360
533
|
};
|
361
534
|
type: "metric";
|
362
535
|
};
|
@@ -373,9 +546,9 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
373
546
|
tableLabel: string;
|
374
547
|
hidden: boolean;
|
375
548
|
compiledSql: string;
|
376
|
-
tablesReferences: string[];
|
377
549
|
description?: string | undefined;
|
378
|
-
|
550
|
+
tablesReferences?: string[] | undefined;
|
551
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
379
552
|
};
|
380
553
|
type: "metric";
|
381
554
|
};
|
@@ -435,7 +608,25 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
435
608
|
}, {
|
436
609
|
type: "delete";
|
437
610
|
payload: {};
|
438
|
-
}>]>>,
|
611
|
+
}>]>>, z.ZodObject<{
|
612
|
+
changeUuid: z.ZodString;
|
613
|
+
changesetUuid: z.ZodString;
|
614
|
+
createdAt: z.ZodDate;
|
615
|
+
createdByUserUuid: z.ZodString;
|
616
|
+
sourcePromptUuid: z.ZodNullable<z.ZodString>;
|
617
|
+
}, "strip", z.ZodTypeAny, {
|
618
|
+
createdAt: Date;
|
619
|
+
createdByUserUuid: string;
|
620
|
+
changesetUuid: string;
|
621
|
+
changeUuid: string;
|
622
|
+
sourcePromptUuid: string | null;
|
623
|
+
}, {
|
624
|
+
createdAt: Date;
|
625
|
+
createdByUserUuid: string;
|
626
|
+
changesetUuid: string;
|
627
|
+
changeUuid: string;
|
628
|
+
sourcePromptUuid: string | null;
|
629
|
+
}>>, "many">;
|
439
630
|
}, "strip", z.ZodTypeAny, {
|
440
631
|
projectUuid: string;
|
441
632
|
createdAt: Date;
|
@@ -445,12 +636,7 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
445
636
|
updatedByUserUuid: string;
|
446
637
|
changesetUuid: string;
|
447
638
|
status: "draft" | "applied";
|
448
|
-
changes: ({
|
449
|
-
createdAt: Date;
|
450
|
-
createdByUserUuid: string;
|
451
|
-
changesetUuid: string;
|
452
|
-
changeUuid: string;
|
453
|
-
sourcePromptUuid: string | null;
|
639
|
+
changes: (({
|
454
640
|
entityType: "metric" | "dimension" | "table";
|
455
641
|
entityTableName: string;
|
456
642
|
entityName: string;
|
@@ -467,9 +653,9 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
467
653
|
tableLabel: string;
|
468
654
|
hidden: boolean;
|
469
655
|
compiledSql: string;
|
470
|
-
tablesReferences: string[];
|
471
656
|
description?: string | undefined;
|
472
|
-
|
657
|
+
tablesReferences?: string[] | undefined;
|
658
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
473
659
|
};
|
474
660
|
type: "metric";
|
475
661
|
};
|
@@ -485,7 +671,13 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
485
671
|
} | {
|
486
672
|
type: "delete";
|
487
673
|
payload: {};
|
488
|
-
}))
|
674
|
+
})) & {
|
675
|
+
createdAt: Date;
|
676
|
+
createdByUserUuid: string;
|
677
|
+
changesetUuid: string;
|
678
|
+
changeUuid: string;
|
679
|
+
sourcePromptUuid: string | null;
|
680
|
+
})[];
|
489
681
|
}, {
|
490
682
|
projectUuid: string;
|
491
683
|
createdAt: Date;
|
@@ -495,12 +687,7 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
495
687
|
updatedByUserUuid: string;
|
496
688
|
changesetUuid: string;
|
497
689
|
status: "draft" | "applied";
|
498
|
-
changes: ({
|
499
|
-
createdAt: Date;
|
500
|
-
createdByUserUuid: string;
|
501
|
-
changesetUuid: string;
|
502
|
-
changeUuid: string;
|
503
|
-
sourcePromptUuid: string | null;
|
690
|
+
changes: (({
|
504
691
|
entityType: "metric" | "dimension" | "table";
|
505
692
|
entityTableName: string;
|
506
693
|
entityName: string;
|
@@ -517,9 +704,9 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
517
704
|
tableLabel: string;
|
518
705
|
hidden: boolean;
|
519
706
|
compiledSql: string;
|
520
|
-
tablesReferences: string[];
|
521
707
|
description?: string | undefined;
|
522
|
-
|
708
|
+
tablesReferences?: string[] | undefined;
|
709
|
+
tablesRequiredAttributes?: Record<string, Record<string, string | string[]>> | undefined;
|
523
710
|
};
|
524
711
|
type: "metric";
|
525
712
|
};
|
@@ -535,7 +722,13 @@ export declare const ChangesetWithChangesSchema: z.ZodObject<{
|
|
535
722
|
} | {
|
536
723
|
type: "delete";
|
537
724
|
payload: {};
|
538
|
-
}))
|
725
|
+
})) & {
|
726
|
+
createdAt: Date;
|
727
|
+
createdByUserUuid: string;
|
728
|
+
changesetUuid: string;
|
729
|
+
changeUuid: string;
|
730
|
+
sourcePromptUuid: string | null;
|
731
|
+
})[];
|
539
732
|
}>;
|
540
733
|
export type Changeset = z.infer<typeof ChangesetSchema>;
|
541
734
|
export type ChangesetWithChanges = z.infer<typeof ChangesetWithChangesSchema>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"changeset.d.ts","sourceRoot":"","sources":["../../../src/types/changeset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIhD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS1B,CAAC;AAEH,eAAO,MAAM,
|
1
|
+
{"version":3,"file":"changeset.d.ts","sourceRoot":"","sources":["../../../src/types/changeset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAIhD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS1B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAyDxB,CAAC;AAEN,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQxB,CAAC;AAEF,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAErC,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,MAAM,MAAM,qBAAqB,GAAG;IAChC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,oBAAoB,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IAC/B,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACjC,MAAM,EACJ,mBAAmB,GACnB,kBAAkB,GAClB,MAAM,GACN,YAAY,GACZ,YAAY,GACZ,iBAAiB,GACjB,SAAS,CACd,CAAC;AAGF,KAAK,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACnD,KAAK,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhD,MAAM,MAAM,+BAA+B,GAAG;IAC1C,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,mBAAmB,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IACzC,MAAM,EAAE,IAAI,CAAC;IACb,OAAO,EAAE,gBAAgB,CAAC;CAC7B,CAAC"}
|
@@ -1,7 +1,9 @@
|
|
1
|
-
import { type
|
1
|
+
import { type ChangeBase } from '../types/changeset';
|
2
2
|
import { type Explore, type ExploreError } from '../types/explore';
|
3
3
|
export declare class ChangesetUtils {
|
4
4
|
private static applyChange;
|
5
|
-
static applyChangeset
|
5
|
+
static applyChangeset<C extends ChangeBase>(changeset: {
|
6
|
+
changes: C[];
|
7
|
+
}, explores: Record<string, Explore | ExploreError>): Record<string, Explore | ExploreError>;
|
6
8
|
}
|
7
9
|
//# sourceMappingURL=changeset.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"changeset.d.ts","sourceRoot":"","sources":["../../../src/utils/changeset.ts"],"names":[],"mappings":"AACA,OAAO,
|
1
|
+
{"version":3,"file":"changeset.d.ts","sourceRoot":"","sources":["../../../src/utils/changeset.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAMrD,OAAO,EAGH,KAAK,OAAO,EACZ,KAAK,YAAY,EACpB,MAAM,kBAAkB,CAAC;AAI1B,qBAAa,cAAc;IACvB,OAAO,CAAC,MAAM,CAAC,WAAW;IAgC1B,MAAM,CAAC,cAAc,CAAC,CAAC,SAAS,UAAU,EACtC,SAAS,EAAE;QAAE,OAAO,EAAE,CAAC,EAAE,CAAA;KAAE,EAC3B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,YAAY,CAAC;CA+KvD"}
|