@lightdash/common 2.34.0 → 2.35.0

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 (46) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/ee/AiAgent/schemas/tools/toolFindContentArgs.d.ts.map +1 -1
  3. package/dist/cjs/ee/AiAgent/schemas/tools/toolFindContentArgs.js +4 -1
  4. package/dist/cjs/ee/AiAgent/schemas/tools/toolFindContentArgs.js.map +1 -1
  5. package/dist/cjs/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts +7 -4
  6. package/dist/cjs/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts.map +1 -1
  7. package/dist/cjs/ee/AiAgent/schemas/tools/toolReadContentArgs.js +13 -4
  8. package/dist/cjs/ee/AiAgent/schemas/tools/toolReadContentArgs.js.map +1 -1
  9. package/dist/cjs/schemas/json/chart-as-code-1.0.json +361 -0
  10. package/dist/cjs/schemas/json/mcp-tools-1.0.json +4 -4
  11. package/dist/cjs/types/contentAsCode/charts.d.ts +1 -1
  12. package/dist/cjs/types/contentAsCode/charts.d.ts.map +1 -1
  13. package/dist/cjs/types/savedCharts.d.ts +11 -0
  14. package/dist/cjs/types/savedCharts.d.ts.map +1 -1
  15. package/dist/cjs/types/savedCharts.js.map +1 -1
  16. package/dist/esm/.tsbuildinfo +1 -1
  17. package/dist/esm/ee/AiAgent/schemas/tools/toolFindContentArgs.d.ts.map +1 -1
  18. package/dist/esm/ee/AiAgent/schemas/tools/toolFindContentArgs.js +4 -1
  19. package/dist/esm/ee/AiAgent/schemas/tools/toolFindContentArgs.js.map +1 -1
  20. package/dist/esm/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts +7 -4
  21. package/dist/esm/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts.map +1 -1
  22. package/dist/esm/ee/AiAgent/schemas/tools/toolReadContentArgs.js +12 -3
  23. package/dist/esm/ee/AiAgent/schemas/tools/toolReadContentArgs.js.map +1 -1
  24. package/dist/esm/schemas/json/chart-as-code-1.0.json +361 -0
  25. package/dist/esm/schemas/json/mcp-tools-1.0.json +4 -4
  26. package/dist/esm/types/contentAsCode/charts.d.ts +1 -1
  27. package/dist/esm/types/contentAsCode/charts.d.ts.map +1 -1
  28. package/dist/esm/types/savedCharts.d.ts +11 -0
  29. package/dist/esm/types/savedCharts.d.ts.map +1 -1
  30. package/dist/esm/types/savedCharts.js.map +1 -1
  31. package/dist/types/.tsbuildinfo +1 -1
  32. package/dist/types/ee/AiAgent/schemas/tools/toolFindContentArgs.d.ts.map +1 -1
  33. package/dist/types/ee/AiAgent/schemas/tools/toolFindContentArgs.js +4 -1
  34. package/dist/types/ee/AiAgent/schemas/tools/toolFindContentArgs.js.map +1 -1
  35. package/dist/types/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts +7 -4
  36. package/dist/types/ee/AiAgent/schemas/tools/toolReadContentArgs.d.ts.map +1 -1
  37. package/dist/types/ee/AiAgent/schemas/tools/toolReadContentArgs.js +12 -3
  38. package/dist/types/ee/AiAgent/schemas/tools/toolReadContentArgs.js.map +1 -1
  39. package/dist/types/schemas/json/chart-as-code-1.0.json +361 -0
  40. package/dist/types/schemas/json/mcp-tools-1.0.json +4 -4
  41. package/dist/types/types/contentAsCode/charts.d.ts +1 -1
  42. package/dist/types/types/contentAsCode/charts.d.ts.map +1 -1
  43. package/dist/types/types/savedCharts.d.ts +11 -0
  44. package/dist/types/types/savedCharts.d.ts.map +1 -1
  45. package/dist/types/types/savedCharts.js.map +1 -1
  46. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"toolFindContentArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolFindContentArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAI5D,KAAK,m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;;;EAA4B,CAAC;AAE9E,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;EAGtC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,8BAA8B,GAAG,mBAAmB,CAAC;AACjE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -18,7 +18,10 @@ Usage tips:
18
18
  - Dashboards with validation errors will be deprioritized.
19
19
  - Returns space breadcrumb/path metadata and canonical chart, dashboard, and Data App URLs when available.
20
20
  - Dashboards show a preview of the first 5 charts and the total chart count. Use "${dashboardDetailsToolName}" to see all charts for a specific dashboard.
21
- - It doesn't provide summaries for dashboards yet, so don't suggest this capability.`;
21
+ ${dashboardDetailsToolName === 'getDashboardCharts'
22
+ ? ''
23
+ : `- Data Apps are readable: call "${dashboardDetailsToolName}" with type "data_app" and the app slug to see what the app shows, the charts and dashboard it was generated from, and the explores, fields, filters, parameters and external connections it queries.
24
+ `}- It doesn't provide summaries for dashboards yet, so don't suggest this capability.`;
22
25
  exports.getFindContentToolDescription = getFindContentToolDescription;
23
26
  const TOOL_FIND_CONTENT_DESCRIPTION = ({ runtime, toolName, }) => (0, exports.getFindContentToolDescription)({
24
27
  toolName,
@@ -1 +1 @@
1
- {"version":3,"file":"toolFindContentArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolFindContentArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAA6D;AAC7D,4DAAwD;AAOjD,MAAM,6BAA6B,GAAG,CAAC,EAC1C,QAAQ,EACR,wBAAwB,GAI3B,EAAU,EAAE,CAAC,UAAU,QAAQ;;;;;;;;;;;;;oFAaoD,wBAAwB;qFACvB,CAAC;AApBzE,QAAA,6BAA6B,GAA7B,6BAA6B,CAoB4C;AAE/E,MAAM,6BAA6B,GAAG,CAAC,EAC1C,OAAO,EACP,QAAQ,GACa,EAAU,EAAE,CACjC,IAAA,QAAA,6BAA6B,EAAC;IAC1B,QAAQ;IACR,wBAAwB,EACpB,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa;CACzD,CAAC,CAAC;AARM,QAAA,6BAA6B,GAA7B,6BAA6B,CAQnC;AAEM,QAAA,yBAAyB,GAAG,IAAA,oCAAgB,GAAE;KACtD,MAAM,CAAC;IACJ,aAAa,EAAE,OAAC,CAAC,KAAK,CAClB,OAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,OAAC;aACH,MAAM,EAAE;aACR,QAAQ,CACL,qIAAqI,CACxI;KACR,CAAC,CACL;IACD,SAAS,EAAE,OAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACL,mIAAmI,CACtI;IACL,YAAY,EAAE,OAAC;SACV,OAAO,EAAE;SACT,OAAO,EAAE;SACT,QAAQ,CACL,kLAAkL,CACrL;CACR,CAAC;KACD,KAAK,EAAE,CAAC;AAEA,QAAA,oCAAoC,GAAG,QAAA,yBAAyB,CAAC;AAEjE,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,yCAAwB;CACrC,CAAC,CAAC"}
1
+ {"version":3,"file":"toolFindContentArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolFindContentArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB,sDAA6D;AAC7D,4DAAwD;AAOjD,MAAM,6BAA6B,GAAG,CAAC,EAC1C,QAAQ,EACR,wBAAwB,GAI3B,EAAU,EAAE,CAAC,UAAU,QAAQ;;;;;;;;;;;;;oFAaoD,wBAAwB;EAExG,wBAAwB,KAAK,oBAAoB;IAC7C,CAAC,CAAC,EAAE;IACJ,CAAC,CAAC,mCAAmC,wBAAwB;CAErE,sFAAsF,CAAC;AAzB1E,QAAA,6BAA6B,GAA7B,6BAA6B,CAyB6C;AAEhF,MAAM,6BAA6B,GAAG,CAAC,EAC1C,OAAO,EACP,QAAQ,GACa,EAAU,EAAE,CACjC,IAAA,QAAA,6BAA6B,EAAC;IAC1B,QAAQ;IACR,wBAAwB,EACpB,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa;CACzD,CAAC,CAAC;AARM,QAAA,6BAA6B,GAA7B,6BAA6B,CAQnC;AAEM,QAAA,yBAAyB,GAAG,IAAA,oCAAgB,GAAE;KACtD,MAAM,CAAC;IACJ,aAAa,EAAE,OAAC,CAAC,KAAK,CAClB,OAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,OAAC;aACH,MAAM,EAAE;aACR,QAAQ,CACL,qIAAqI,CACxI;KACR,CAAC,CACL;IACD,SAAS,EAAE,OAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACL,mIAAmI,CACtI;IACL,YAAY,EAAE,OAAC;SACV,OAAO,EAAE;SACT,OAAO,EAAE;SACT,QAAQ,CACL,kLAAkL,CACrL;CACR,CAAC;KACD,KAAK,EAAE,CAAC;AAEA,QAAA,oCAAoC,GAAG,QAAA,yBAAyB,CAAC;AAEjE,QAAA,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,yCAAwB;CACrC,CAAC,CAAC"}
@@ -1,14 +1,14 @@
1
1
  import { z } from 'zod';
2
- export declare const TOOL_READ_CONTENT_DESCRIPTION = "Read a dashboard or chart as JSON using its slug. Call this before editing.";
2
+ export declare const TOOL_READ_CONTENT_DESCRIPTION = "Read a dashboard, chart, or data app as JSON using its slug. Call this before editing a dashboard or chart. Data apps are read-only and returned without code.";
3
3
  export declare const toolReadContentArgsSchema: z.ZodObject<{
4
4
  slug: z.ZodString;
5
- type: z.ZodEnum<["dashboard", "chart"]>;
5
+ type: z.ZodEnum<["dashboard", "chart", "data_app"]>;
6
6
  }, "strip", z.ZodTypeAny, {
7
7
  slug: string;
8
- type: "chart" | "dashboard";
8
+ type: "chart" | "dashboard" | "data_app";
9
9
  }, {
10
10
  slug: string;
11
- type: "chart" | "dashboard";
11
+ type: "chart" | "dashboard" | "data_app";
12
12
  }>;
13
13
  export declare const toolReadContentOutputSchema: z.ZodObject<{
14
14
  result: z.ZodString;
@@ -56,5 +56,8 @@ export declare const toolReadContentOutputSchema: z.ZodObject<{
56
56
  };
57
57
  }>;
58
58
  export type ToolReadContentArgs = z.infer<typeof toolReadContentArgsSchema>;
59
+ export type ReadContentType = ToolReadContentArgs['type'];
60
+ /** Human labels for tool-call UI copy. */
61
+ export declare const READ_CONTENT_TYPE_LABELS: Record<ReadContentType, string>;
59
62
  export type ToolReadContentOutput = z.infer<typeof toolReadContentOutputSchema>;
60
63
  //# sourceMappingURL=toolReadContentArgs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolReadContentArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolReadContentArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,6BAA6B,gFACuC,CAAC;AAElF,eAAO,MAAM,yBAAyB;;;;;;;;;EAKpC,CAAC;AAYH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
1
+ {"version":3,"file":"toolReadContentArgs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolReadContentArgs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,6BAA6B,mKAC0H,CAAC;AAErK,eAAO,MAAM,yBAAyB;;;;;;;;;EAQpC,CAAC;AAYH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGtC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAE1D,0CAA0C;AAC1C,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAIpE,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toolReadContentOutputSchema = exports.toolReadContentArgsSchema = exports.TOOL_READ_CONTENT_DESCRIPTION = void 0;
3
+ exports.READ_CONTENT_TYPE_LABELS = exports.toolReadContentOutputSchema = exports.toolReadContentArgsSchema = exports.TOOL_READ_CONTENT_DESCRIPTION = void 0;
4
4
  const zod_1 = require("zod");
5
- exports.TOOL_READ_CONTENT_DESCRIPTION = 'Read a dashboard or chart as JSON using its slug. Call this before editing.';
5
+ exports.TOOL_READ_CONTENT_DESCRIPTION = 'Read a dashboard, chart, or data app as JSON using its slug. Call this before editing a dashboard or chart. Data apps are read-only and returned without code.';
6
6
  exports.toolReadContentArgsSchema = zod_1.z.object({
7
- slug: zod_1.z.string().min(1).describe('Slug of the dashboard or chart to read.'),
7
+ slug: zod_1.z
8
+ .string()
9
+ .min(1)
10
+ .describe('Slug of the dashboard, chart, or data app to read.'),
8
11
  type: zod_1.z
9
- .enum(['dashboard', 'chart'])
12
+ .enum(['dashboard', 'chart', 'data_app'])
10
13
  .describe('Type of Lightdash content to read.'),
11
14
  });
12
15
  const toolReadContentMetadataSchema = zod_1.z.discriminatedUnion('status', [
@@ -22,4 +25,10 @@ exports.toolReadContentOutputSchema = zod_1.z.object({
22
25
  result: zod_1.z.string(),
23
26
  metadata: toolReadContentMetadataSchema,
24
27
  });
28
+ /** Human labels for tool-call UI copy. */
29
+ exports.READ_CONTENT_TYPE_LABELS = {
30
+ dashboard: 'dashboard',
31
+ chart: 'chart',
32
+ data_app: 'data app',
33
+ };
25
34
  //# sourceMappingURL=toolReadContentArgs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"toolReadContentArgs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tools/toolReadContentArgs.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,6BAA6B,GACtC,6EAA6E,CAAC;AAErE,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IAC3E,IAAI,EAAE,OAAC;SACF,IAAI,CAAC,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;SAC5B,QAAQ,CAAC,oCAAoC,CAAC;CACtD,CAAC,CAAC;AAEH,MAAM,6BAA6B,GAAG,OAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IACjE,OAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;IACxC,OAAC,CAAC,MAAM,CAAC;QACL,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,SAAS,CAAC;QAC5B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;KACnB,CAAC;CACL,CAAC,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E,OAAO;IACd,QAAQ,EAAE,UAAU;CACvB,CAAC"}
@@ -120,6 +120,23 @@
120
120
  "required": ["type", "sql", "table", "name"],
121
121
  "type": "object"
122
122
  },
123
+ "AndFilterGroup": {
124
+ "properties": {
125
+ "and": {
126
+ "description": "Array of filters or nested groups combined with AND logic",
127
+ "items": {
128
+ "$ref": "#/$defs/FilterGroupItem"
129
+ },
130
+ "type": "array"
131
+ },
132
+ "id": {
133
+ "description": "Unique identifier for the filter group",
134
+ "type": "string"
135
+ }
136
+ },
137
+ "required": ["and", "id"],
138
+ "type": "object"
139
+ },
123
140
  "AndFilterGroupInput": {
124
141
  "properties": {
125
142
  "and": {
@@ -1361,6 +1378,16 @@
1361
1378
  "required": ["fieldId"],
1362
1379
  "type": "object"
1363
1380
  },
1381
+ "FilterGroup": {
1382
+ "anyOf": [
1383
+ {
1384
+ "$ref": "#/$defs/OrFilterGroup"
1385
+ },
1386
+ {
1387
+ "$ref": "#/$defs/AndFilterGroup"
1388
+ }
1389
+ ]
1390
+ },
1364
1391
  "FilterGroupInput": {
1365
1392
  "anyOf": [
1366
1393
  {
@@ -1371,6 +1398,16 @@
1371
1398
  }
1372
1399
  ]
1373
1400
  },
1401
+ "FilterGroupItem": {
1402
+ "anyOf": [
1403
+ {
1404
+ "$ref": "#/$defs/FilterGroup"
1405
+ },
1406
+ {
1407
+ "$ref": "#/$defs/FilterRule"
1408
+ }
1409
+ ]
1410
+ },
1374
1411
  "FilterGroupItemInput": {
1375
1412
  "anyOf": [
1376
1413
  {
@@ -1406,6 +1443,52 @@
1406
1443
  ],
1407
1444
  "type": "string"
1408
1445
  },
1446
+ "FilterRule": {
1447
+ "additionalProperties": true,
1448
+ "properties": {
1449
+ "caseSensitive": {
1450
+ "description": "Overrides the field/explore case-sensitivity for this rule only.\nUsed by internal features like autocomplete search that must always\nmatch case-insensitively regardless of the field's configured setting.",
1451
+ "type": "boolean"
1452
+ },
1453
+ "disabled": {
1454
+ "description": "Whether this filter is disabled",
1455
+ "type": "boolean"
1456
+ },
1457
+ "id": {
1458
+ "description": "Unique identifier for the filter",
1459
+ "type": "string"
1460
+ },
1461
+ "includeNull": {
1462
+ "description": "For the `equals` operator on string fields, also match rows where the\nfield is null (compiles to `field IN (...) OR field IS NULL`). Lets users\ncombine null with selected values in a single \"is\" rule.",
1463
+ "type": "boolean"
1464
+ },
1465
+ "operator": {
1466
+ "$ref": "#/$defs/FilterOperator",
1467
+ "description": "Filter operator"
1468
+ },
1469
+ "required": {
1470
+ "description": "Whether this filter is required",
1471
+ "type": "boolean"
1472
+ },
1473
+ "settings": {
1474
+ "$ref": "#/$defs/AnyType",
1475
+ "description": "Additional settings for date/time filters"
1476
+ },
1477
+ "target": {
1478
+ "$ref": "#/$defs/FieldTarget",
1479
+ "description": "Target field for the filter"
1480
+ },
1481
+ "values": {
1482
+ "description": "Values to filter by",
1483
+ "items": {
1484
+ "$ref": "#/$defs/AnyType"
1485
+ },
1486
+ "type": "array"
1487
+ }
1488
+ },
1489
+ "required": ["operator", "id", "target"],
1490
+ "type": "object"
1491
+ },
1409
1492
  "FilterRuleInput": {
1410
1493
  "allOf": [
1411
1494
  {
@@ -1422,6 +1505,23 @@
1422
1505
  ],
1423
1506
  "description": "Permissive filter types for chart-as-code uploads where `id` may be omitted.\nFilter IDs are auto-generated during upsert if absent.\nAfter normalization these become the strict runtime types (FilterGroup, Filters)."
1424
1507
  },
1508
+ "Filters": {
1509
+ "properties": {
1510
+ "dimensions": {
1511
+ "$ref": "#/$defs/FilterGroup",
1512
+ "description": "Dimension filter group"
1513
+ },
1514
+ "metrics": {
1515
+ "$ref": "#/$defs/FilterGroup",
1516
+ "description": "Metric filter group"
1517
+ },
1518
+ "tableCalculations": {
1519
+ "$ref": "#/$defs/FilterGroup",
1520
+ "description": "Table calculation filter group"
1521
+ }
1522
+ },
1523
+ "type": "object"
1524
+ },
1425
1525
  "FiltersInput": {
1426
1526
  "properties": {
1427
1527
  "dimensions": {
@@ -2118,6 +2218,42 @@
2118
2218
  "required": ["uuid"],
2119
2219
  "type": "object"
2120
2220
  },
2221
+ "MergeJoinKeyPart": {
2222
+ "description": "One column of the join key. Sources name the same real-world key differently\n(`orders.order_date` vs `users.created_date`), so the mapping is explicit per\nsource rather than positional.",
2223
+ "properties": {
2224
+ "fieldIdBySourceId": {
2225
+ "$ref": "#/$defs/Record_string.FieldId_",
2226
+ "description": "The field each source joins on. Every source must have an entry."
2227
+ },
2228
+ "name": {
2229
+ "description": "Column name this key part takes in the merged result.",
2230
+ "type": "string"
2231
+ }
2232
+ },
2233
+ "required": ["fieldIdBySourceId", "name"],
2234
+ "type": "object"
2235
+ },
2236
+ "MergeJoinType": {
2237
+ "description": "How unmatched keys survive the merge. Mirrors the SQL join it compiles to.",
2238
+ "enum": ["full", "left", "inner"],
2239
+ "type": "string"
2240
+ },
2241
+ "MergeTableCalculation": {
2242
+ "description": "A calculation over the *merged* result, which is the only place a row-wise\ncalculation across two queries can correctly live. References name a source\nand one of its fields, `${sourceId.fieldId}`, because the merged statement\nrenames columns to keep two sources from colliding.",
2243
+ "properties": {
2244
+ "displayName": {
2245
+ "type": "string"
2246
+ },
2247
+ "name": {
2248
+ "type": "string"
2249
+ },
2250
+ "sql": {
2251
+ "type": "string"
2252
+ }
2253
+ },
2254
+ "required": ["sql", "displayName", "name"],
2255
+ "type": "object"
2256
+ },
2121
2257
  "MetricFilterRule": {
2122
2258
  "additionalProperties": true,
2123
2259
  "description": "Filter rule for metrics, targeting fields by reference",
@@ -2179,6 +2315,103 @@
2179
2315
  "properties": {},
2180
2316
  "type": "object"
2181
2317
  },
2318
+ "MetricQuery": {
2319
+ "properties": {
2320
+ "additionalMetrics": {
2321
+ "description": "Custom metrics defined inline (ad-hoc metrics not in the dbt model)",
2322
+ "items": {
2323
+ "$ref": "#/$defs/AdditionalMetric"
2324
+ },
2325
+ "type": "array"
2326
+ },
2327
+ "customDimensions": {
2328
+ "description": "Custom dimensions defined inline",
2329
+ "items": {
2330
+ "$ref": "#/$defs/CustomDimension"
2331
+ },
2332
+ "type": "array"
2333
+ },
2334
+ "dimensionOverrides": {
2335
+ "$ref": "#/$defs/DimensionOverrides",
2336
+ "description": "Override formatting options for existing dimensions"
2337
+ },
2338
+ "dimensions": {
2339
+ "description": "List of dimension field IDs to include",
2340
+ "items": {
2341
+ "$ref": "#/$defs/FieldId"
2342
+ },
2343
+ "type": "array"
2344
+ },
2345
+ "exploreName": {
2346
+ "description": "The name of the explore to query",
2347
+ "type": "string"
2348
+ },
2349
+ "filters": {
2350
+ "$ref": "#/$defs/Filters",
2351
+ "description": "Filter rules to apply to the query"
2352
+ },
2353
+ "limit": {
2354
+ "description": "Maximum number of rows to return",
2355
+ "format": "double",
2356
+ "type": "number"
2357
+ },
2358
+ "metadata": {
2359
+ "properties": {
2360
+ "hasADateDimension": {
2361
+ "$ref": "#/$defs/Pick_CompiledDimension.label-or-name-or-table_"
2362
+ }
2363
+ },
2364
+ "required": ["hasADateDimension"],
2365
+ "type": "object"
2366
+ },
2367
+ "metricOverrides": {
2368
+ "$ref": "#/$defs/MetricOverrides",
2369
+ "description": "Override formatting options for existing metrics"
2370
+ },
2371
+ "metrics": {
2372
+ "description": "List of metric field IDs to include",
2373
+ "items": {
2374
+ "$ref": "#/$defs/FieldId"
2375
+ },
2376
+ "type": "array"
2377
+ },
2378
+ "pivotDimensions": {
2379
+ "description": "Dimension field IDs used as pivot columns (from chart's pivotConfig.columns).\nUsed by row_total() to determine non-pivot dimensions for GROUP BY.",
2380
+ "items": {
2381
+ "$ref": "#/$defs/FieldId"
2382
+ },
2383
+ "type": "array"
2384
+ },
2385
+ "sorts": {
2386
+ "description": "Sort configuration for query results",
2387
+ "items": {
2388
+ "$ref": "#/$defs/SortField"
2389
+ },
2390
+ "type": "array"
2391
+ },
2392
+ "tableCalculations": {
2393
+ "description": "Custom calculations to perform on query results",
2394
+ "items": {
2395
+ "$ref": "#/$defs/TableCalculation"
2396
+ },
2397
+ "type": "array"
2398
+ },
2399
+ "timezone": {
2400
+ "description": "Timezone for date/time values (e.g., 'America/Los_Angeles', 'UTC')",
2401
+ "type": "string"
2402
+ }
2403
+ },
2404
+ "required": [
2405
+ "tableCalculations",
2406
+ "limit",
2407
+ "sorts",
2408
+ "filters",
2409
+ "metrics",
2410
+ "dimensions",
2411
+ "exploreName"
2412
+ ],
2413
+ "type": "object"
2414
+ },
2182
2415
  "MetricType": {
2183
2416
  "enum": [
2184
2417
  "percentile",
@@ -2225,6 +2458,23 @@
2225
2458
  "$ref": "#/$defs/Pick_MetricQuery.Exclude_keyofMetricQuery.filters__",
2226
2459
  "description": "Construct a type with the properties of T except for those in type K."
2227
2460
  },
2461
+ "OrFilterGroup": {
2462
+ "properties": {
2463
+ "id": {
2464
+ "description": "Unique identifier for the filter group",
2465
+ "type": "string"
2466
+ },
2467
+ "or": {
2468
+ "description": "Array of filters or nested groups combined with OR logic",
2469
+ "items": {
2470
+ "$ref": "#/$defs/FilterGroupItem"
2471
+ },
2472
+ "type": "array"
2473
+ }
2474
+ },
2475
+ "required": ["or", "id"],
2476
+ "type": "object"
2477
+ },
2228
2478
  "OrFilterGroupInput": {
2229
2479
  "properties": {
2230
2480
  "id": {
@@ -2408,6 +2658,22 @@
2408
2658
  },
2409
2659
  "type": "object"
2410
2660
  },
2661
+ "Pick_CompiledDimension.label-or-name-or-table_": {
2662
+ "description": "From T, pick a set of properties whose keys are in the union K",
2663
+ "properties": {
2664
+ "label": {
2665
+ "type": "string"
2666
+ },
2667
+ "name": {
2668
+ "type": "string"
2669
+ },
2670
+ "table": {
2671
+ "type": "string"
2672
+ }
2673
+ },
2674
+ "required": ["name", "label", "table"],
2675
+ "type": "object"
2676
+ },
2411
2677
  "Pick_CompiledDimension.name-or-label-or-table_": {
2412
2678
  "description": "From T, pick a set of properties whose keys are in the union K",
2413
2679
  "properties": {},
@@ -2752,6 +3018,14 @@
2752
3018
  "properties": {},
2753
3019
  "type": "object"
2754
3020
  },
3021
+ "Record_string.FieldId_": {
3022
+ "additionalProperties": {
3023
+ "type": "string"
3024
+ },
3025
+ "description": "Construct a type with a set of properties K of type T",
3026
+ "properties": {},
3027
+ "type": "object"
3028
+ },
2755
3029
  "Record_string.MapFieldConfig_": {
2756
3030
  "additionalProperties": {
2757
3031
  "$ref": "#/$defs/MapFieldConfig"
@@ -2866,6 +3140,78 @@
2866
3140
  "enum": ["multi-step", "merged", "direct"],
2867
3141
  "type": "string"
2868
3142
  },
3143
+ "SavedMergeQuery": {
3144
+ "description": "Canonical, scalable representation of a merge stored on a chart version.",
3145
+ "properties": {
3146
+ "joinKey": {
3147
+ "items": {
3148
+ "$ref": "#/$defs/MergeJoinKeyPart"
3149
+ },
3150
+ "type": "array"
3151
+ },
3152
+ "joinType": {
3153
+ "$ref": "#/$defs/MergeJoinType"
3154
+ },
3155
+ "primarySourceId": {
3156
+ "description": "Source whose rows a LEFT merge preserves.",
3157
+ "type": "string"
3158
+ },
3159
+ "sources": {
3160
+ "items": {
3161
+ "$ref": "#/$defs/SavedMergeQuerySource"
3162
+ },
3163
+ "type": "array"
3164
+ },
3165
+ "tableCalculations": {
3166
+ "items": {
3167
+ "$ref": "#/$defs/MergeTableCalculation"
3168
+ },
3169
+ "type": "array"
3170
+ }
3171
+ },
3172
+ "required": [
3173
+ "tableCalculations",
3174
+ "joinType",
3175
+ "joinKey",
3176
+ "sources",
3177
+ "primarySourceId"
3178
+ ],
3179
+ "type": "object"
3180
+ },
3181
+ "SavedMergeQuerySource": {
3182
+ "anyOf": [
3183
+ {
3184
+ "properties": {
3185
+ "id": {
3186
+ "type": "string"
3187
+ },
3188
+ "kind": {
3189
+ "enum": ["chart"],
3190
+ "type": "string"
3191
+ }
3192
+ },
3193
+ "required": ["kind", "id"],
3194
+ "type": "object"
3195
+ },
3196
+ {
3197
+ "properties": {
3198
+ "id": {
3199
+ "type": "string"
3200
+ },
3201
+ "kind": {
3202
+ "enum": ["query"],
3203
+ "type": "string"
3204
+ },
3205
+ "metricQuery": {
3206
+ "$ref": "#/$defs/MetricQuery"
3207
+ }
3208
+ },
3209
+ "required": ["metricQuery", "kind", "id"],
3210
+ "type": "object"
3211
+ }
3212
+ ],
3213
+ "description": "A persisted merge source.\n\nThe chart source is a reference: its metric query already lives on the chart\nversion. Every additional source owns its query. This keeps one source of\ntruth while allowing more sources without adding `thirdQuery`, `fourthQuery`,\nand so on."
3214
+ },
2869
3215
  "Series": {
2870
3216
  "properties": {
2871
3217
  "areaStyle": {
@@ -3743,6 +4089,21 @@
3743
4089
  "format": "date-time",
3744
4090
  "type": "string"
3745
4091
  },
4092
+ "merge": {
4093
+ "anyOf": [
4094
+ {
4095
+ "allOf": [
4096
+ {
4097
+ "$ref": "#/$defs/SavedMergeQuery"
4098
+ }
4099
+ ],
4100
+ "description": "Second query this chart's query is merged with, when it has one. Absent\non the overwhelming majority of charts."
4101
+ },
4102
+ {
4103
+ "type": "null"
4104
+ }
4105
+ ]
4106
+ },
3746
4107
  "metricQuery": {
3747
4108
  "allOf": [
3748
4109
  {
@@ -374,7 +374,7 @@
374
374
  "openWorldHint": false,
375
375
  "readOnlyHint": true
376
376
  },
377
- "description": "Tool: \"find_content\"\nPurpose:\nFinds spaces, charts, dashboards, or Data Apps by name or description within a project, returning detailed information about each.\n\nUsage tips:\n- IMPORTANT: Pass the user's full query or relevant portion directly (e.g., \"revenue based on campaigns\" instead of just \"campaigns\").\n- The search engine understands natural language and context — more descriptive queries yield better results.\n- You can provide multiple search queries to look for different topics simultaneously (e.g., [\"monthly revenue\", \"user acquisition trends\"]).\n- Pass spaceSlug to search only inside that space and its descendants.\n- verifiedOnly=true searches only admin-verified charts/dashboards (spaces omitted). Data Apps have no verification state and remain included. Verification is a status, not text — search topic keywords, never the word \"verified\". If nothing matches, verified content may still exist under other terms, so never claim the project has none from one query. Re-run with verifiedOnly=false only if unverified charts or dashboards are acceptable.\n- If results aren't relevant, retry with the full user query or more specific terms.\n- Dashboards with validation errors will be deprioritized.\n- Returns space breadcrumb/path metadata and canonical chart, dashboard, and Data App URLs when available.\n- Dashboards show a preview of the first 5 charts and the total chart count. Use \"read_content\" to see all charts for a specific dashboard.\n- It doesn't provide summaries for dashboards yet, so don't suggest this capability.",
377
+ "description": "Tool: \"find_content\"\nPurpose:\nFinds spaces, charts, dashboards, or Data Apps by name or description within a project, returning detailed information about each.\n\nUsage tips:\n- IMPORTANT: Pass the user's full query or relevant portion directly (e.g., \"revenue based on campaigns\" instead of just \"campaigns\").\n- The search engine understands natural language and context — more descriptive queries yield better results.\n- You can provide multiple search queries to look for different topics simultaneously (e.g., [\"monthly revenue\", \"user acquisition trends\"]).\n- Pass spaceSlug to search only inside that space and its descendants.\n- verifiedOnly=true searches only admin-verified charts/dashboards (spaces omitted). Data Apps have no verification state and remain included. Verification is a status, not text — search topic keywords, never the word \"verified\". If nothing matches, verified content may still exist under other terms, so never claim the project has none from one query. Re-run with verifiedOnly=false only if unverified charts or dashboards are acceptable.\n- If results aren't relevant, retry with the full user query or more specific terms.\n- Dashboards with validation errors will be deprioritized.\n- Returns space breadcrumb/path metadata and canonical chart, dashboard, and Data App URLs when available.\n- Dashboards show a preview of the first 5 charts and the total chart count. Use \"read_content\" to see all charts for a specific dashboard.\n- Data Apps are readable: call \"read_content\" with type \"data_app\" and the app slug to see what the app shows, the charts and dashboard it was generated from, and the explores, fields, filters, parameters and external connections it queries.\n- It doesn't provide summaries for dashboards yet, so don't suggest this capability.",
378
378
  "inputSchema": {
379
379
  "$schema": "http://json-schema.org/draft-07/schema#",
380
380
  "additionalProperties": false,
@@ -1899,19 +1899,19 @@
1899
1899
  "openWorldHint": false,
1900
1900
  "readOnlyHint": true
1901
1901
  },
1902
- "description": "Read a dashboard or chart as JSON using its slug. Call this before editing.",
1902
+ "description": "Read a dashboard, chart, or data app as JSON using its slug. Call this before editing a dashboard or chart. Data apps are read-only and returned without code.",
1903
1903
  "inputSchema": {
1904
1904
  "$schema": "http://json-schema.org/draft-07/schema#",
1905
1905
  "additionalProperties": false,
1906
1906
  "properties": {
1907
1907
  "slug": {
1908
- "description": "Slug of the dashboard or chart to read.",
1908
+ "description": "Slug of the dashboard, chart, or data app to read.",
1909
1909
  "minLength": 1,
1910
1910
  "type": "string"
1911
1911
  },
1912
1912
  "type": {
1913
1913
  "description": "Type of Lightdash content to read.",
1914
- "enum": ["dashboard", "chart"],
1914
+ "enum": ["dashboard", "chart", "data_app"],
1915
1915
  "type": "string"
1916
1916
  }
1917
1917
  },
@@ -30,7 +30,7 @@ export type DataAppVizChartConfigAsCode = {
30
30
  * generated chart-as-code JSON schema. Keep in sync with ChartConfig.
31
31
  */
32
32
  export type ChartAsCodeConfig = BigNumberConfig | CartesianChartConfig | CustomVisConfig | PieChartConfig | FunnelChartConfig | TableChartConfig | TreemapChartConfig | GaugeChartConfig | MapChartConfig | SankeyChartConfig | DataAppVizChartConfigAsCode;
33
- export type ChartAsCode = Omit<Pick<SavedChart, 'name' | 'description' | 'tableName' | 'metricQuery' | 'chartConfig' | 'pivotConfig' | 'slug' | 'parameters'>, 'metricQuery' | 'chartConfig'> & {
33
+ export type ChartAsCode = Omit<Pick<SavedChart, 'name' | 'description' | 'tableName' | 'metricQuery' | 'chartConfig' | 'pivotConfig' | 'merge' | 'slug' | 'parameters'>, 'metricQuery' | 'chartConfig'> & {
34
34
  metricQuery: Omit<MetricQuery, 'filters'> & {
35
35
  filters: FiltersInput;
36
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"charts.d.ts","sourceRoot":"","sources":["../../../../src/types/contentAsCode/charts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EACR,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,EAAE,MAAM,EAAE,CAAC;QACrB,MAAM,EAAE,WAAW,EAAE,CAAC;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAClB,CAAC;CACL,CAAC"}
@@ -869,6 +869,17 @@ export type SavedChart = {
869
869
  /** Unique identifier slug for this chart */
870
870
  slug: string;
871
871
  verification: ContentVerificationInfo | null;
872
+ /** The caller's unpublished content-as-code draft is applied. */
873
+ hasUnpublishedChanges?: boolean;
874
+ /** Open drafts from other authors visible to content-as-code reviewers. */
875
+ draftsAwaitingReview?: number;
876
+ /** The caller's latest dismissed draft, available to reopen. */
877
+ dismissedDraftUuid?: string;
878
+ /** The caller's draft could not be safely applied. */
879
+ draftOverlayError?: {
880
+ code: 'invalid_chart_draft';
881
+ draftUuid: string;
882
+ };
872
883
  deletedAt?: Date;
873
884
  deletedBy?: {
874
885
  userUuid: string;