@lightdash/common 3.117.0 → 3.118.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 (34) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/ee/AiAgent/composerSemanticArtifact.d.ts +4 -1
  3. package/dist/cjs/ee/AiAgent/composerSemanticArtifact.d.ts.map +1 -1
  4. package/dist/cjs/ee/AiAgent/composerSemanticArtifact.js +87 -5
  5. package/dist/cjs/ee/AiAgent/composerSemanticArtifact.js.map +1 -1
  6. package/dist/cjs/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts +105 -5
  7. package/dist/cjs/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts.map +1 -1
  8. package/dist/cjs/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js +63 -2
  9. package/dist/cjs/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js.map +1 -1
  10. package/dist/cjs/schemas/chartAsCodeSchema.d.ts +35 -35
  11. package/dist/cjs/schemas/json/mcp-tools-1.0.json +122 -1
  12. package/dist/esm/.tsbuildinfo +1 -1
  13. package/dist/esm/ee/AiAgent/composerSemanticArtifact.d.ts +4 -1
  14. package/dist/esm/ee/AiAgent/composerSemanticArtifact.d.ts.map +1 -1
  15. package/dist/esm/ee/AiAgent/composerSemanticArtifact.js +88 -6
  16. package/dist/esm/ee/AiAgent/composerSemanticArtifact.js.map +1 -1
  17. package/dist/esm/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts +105 -5
  18. package/dist/esm/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts.map +1 -1
  19. package/dist/esm/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js +65 -4
  20. package/dist/esm/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js.map +1 -1
  21. package/dist/esm/schemas/chartAsCodeSchema.d.ts +35 -35
  22. package/dist/esm/schemas/json/mcp-tools-1.0.json +122 -1
  23. package/dist/types/.tsbuildinfo +1 -1
  24. package/dist/types/ee/AiAgent/composerSemanticArtifact.d.ts +4 -1
  25. package/dist/types/ee/AiAgent/composerSemanticArtifact.d.ts.map +1 -1
  26. package/dist/types/ee/AiAgent/composerSemanticArtifact.js +88 -6
  27. package/dist/types/ee/AiAgent/composerSemanticArtifact.js.map +1 -1
  28. package/dist/types/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts +105 -5
  29. package/dist/types/ee/AiAgent/schemas/tools/toolComposerQueryArgs.d.ts.map +1 -1
  30. package/dist/types/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js +65 -4
  31. package/dist/types/ee/AiAgent/schemas/tools/toolComposerQueryArgs.js.map +1 -1
  32. package/dist/types/schemas/chartAsCodeSchema.d.ts +35 -35
  33. package/dist/types/schemas/json/mcp-tools-1.0.json +122 -1
  34. package/package.json +1 -1
@@ -78,8 +78,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
78
78
  };
79
79
  metricQuery: {
80
80
  allOf: ({
81
- type?: undefined;
82
81
  properties?: undefined;
82
+ type?: undefined;
83
83
  $ref: string;
84
84
  required?: undefined;
85
85
  } | {
@@ -799,8 +799,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
799
799
  };
800
800
  metricQuery: {
801
801
  allOf: ({
802
- type?: undefined;
803
802
  properties?: undefined;
803
+ type?: undefined;
804
804
  $ref: string;
805
805
  required?: undefined;
806
806
  } | {
@@ -1015,8 +1015,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
1015
1015
  };
1016
1016
  CompactOrAlias: {
1017
1017
  anyOf: ({
1018
- type?: undefined;
1019
1018
  enum?: undefined;
1019
+ type?: undefined;
1020
1020
  $ref: string;
1021
1021
  } | {
1022
1022
  $ref?: undefined;
@@ -1179,8 +1179,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
1179
1179
  };
1180
1180
  ConditionalFormattingWithCompareTarget: {
1181
1181
  allOf: ({
1182
- type?: undefined;
1183
1182
  properties?: undefined;
1183
+ type?: undefined;
1184
1184
  required?: undefined;
1185
1185
  $ref: string;
1186
1186
  } | {
@@ -1219,8 +1219,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
1219
1219
  };
1220
1220
  "ConditionalFormattingWithCompareTarget_number-or-string_": {
1221
1221
  allOf: ({
1222
- type?: undefined;
1223
1222
  properties?: undefined;
1223
+ type?: undefined;
1224
1224
  required?: undefined;
1225
1225
  $ref: string;
1226
1226
  } | {
@@ -1259,8 +1259,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
1259
1259
  };
1260
1260
  ConditionalFormattingWithValues: {
1261
1261
  allOf: ({
1262
- type?: undefined;
1263
1262
  properties?: undefined;
1263
+ type?: undefined;
1264
1264
  required?: undefined;
1265
1265
  $ref: string;
1266
1266
  } | {
@@ -1286,8 +1286,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
1286
1286
  };
1287
1287
  "ConditionalFormattingWithValues_number-or-string_": {
1288
1288
  allOf: ({
1289
- type?: undefined;
1290
1289
  properties?: undefined;
1290
+ type?: undefined;
1291
1291
  required?: undefined;
1292
1292
  $ref: string;
1293
1293
  } | {
@@ -1583,8 +1583,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
1583
1583
  };
1584
1584
  DataAppVizChartAsCode: {
1585
1585
  allOf: ({
1586
- type?: undefined;
1587
1586
  properties?: undefined;
1587
+ type?: undefined;
1588
1588
  $ref: string;
1589
1589
  } | {
1590
1590
  $ref?: undefined;
@@ -1893,8 +1893,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
1893
1893
  };
1894
1894
  FilterRuleInput: {
1895
1895
  allOf: ({
1896
- type?: undefined;
1897
1896
  properties?: undefined;
1897
+ type?: undefined;
1898
1898
  $ref: string;
1899
1899
  } | {
1900
1900
  $ref?: undefined;
@@ -2012,8 +2012,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
2012
2012
  };
2013
2013
  FormulaTableCalculation: {
2014
2014
  allOf: ({
2015
- type?: undefined;
2016
2015
  properties?: undefined;
2016
+ type?: undefined;
2017
2017
  required?: undefined;
2018
2018
  $ref: string;
2019
2019
  } | {
@@ -3972,8 +3972,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
3972
3972
  };
3973
3973
  SqlTableCalculation: {
3974
3974
  allOf: ({
3975
- type?: undefined;
3976
3975
  properties?: undefined;
3976
+ type?: undefined;
3977
3977
  required?: undefined;
3978
3978
  $ref: string;
3979
3979
  } | {
@@ -4296,8 +4296,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
4296
4296
  };
4297
4297
  TemplateTableCalculation: {
4298
4298
  allOf: ({
4299
- type?: undefined;
4300
4299
  properties?: undefined;
4300
+ type?: undefined;
4301
4301
  required?: undefined;
4302
4302
  $ref: string;
4303
4303
  } | {
@@ -4396,8 +4396,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
4396
4396
  };
4397
4397
  VizBarChartConfig: {
4398
4398
  allOf: ({
4399
- type?: undefined;
4400
4399
  properties?: undefined;
4400
+ type?: undefined;
4401
4401
  required?: undefined;
4402
4402
  $ref: string;
4403
4403
  } | {
@@ -4464,8 +4464,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
4464
4464
  };
4465
4465
  VizBigNumberConfig: {
4466
4466
  allOf: ({
4467
- type?: undefined;
4468
4467
  properties?: undefined;
4468
+ type?: undefined;
4469
4469
  required?: undefined;
4470
4470
  $ref: string;
4471
4471
  } | {
@@ -4581,8 +4581,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
4581
4581
  };
4582
4582
  VizLineChartConfig: {
4583
4583
  allOf: ({
4584
- type?: undefined;
4585
4584
  properties?: undefined;
4585
+ type?: undefined;
4586
4586
  required?: undefined;
4587
4587
  $ref: string;
4588
4588
  } | {
@@ -4604,8 +4604,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
4604
4604
  };
4605
4605
  VizPieChartConfig: {
4606
4606
  allOf: ({
4607
- type?: undefined;
4608
4607
  properties?: undefined;
4608
+ type?: undefined;
4609
4609
  required?: undefined;
4610
4610
  $ref: string;
4611
4611
  } | {
@@ -4657,8 +4657,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
4657
4657
  };
4658
4658
  VizTableConfig: {
4659
4659
  allOf: ({
4660
- type?: undefined;
4661
4660
  properties?: undefined;
4661
+ type?: undefined;
4662
4662
  required?: undefined;
4663
4663
  $ref: string;
4664
4664
  } | {
@@ -4688,8 +4688,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
4688
4688
  };
4689
4689
  XAxis: {
4690
4690
  allOf: ({
4691
- type?: undefined;
4692
4691
  properties?: undefined;
4692
+ type?: undefined;
4693
4693
  $ref: string;
4694
4694
  } | {
4695
4695
  $ref?: undefined;
@@ -5400,8 +5400,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
5400
5400
  };
5401
5401
  metricQuery: {
5402
5402
  allOf: ({
5403
- type?: undefined;
5404
5403
  properties?: undefined;
5404
+ type?: undefined;
5405
5405
  $ref: string;
5406
5406
  required?: undefined;
5407
5407
  } | {
@@ -5616,8 +5616,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
5616
5616
  };
5617
5617
  CompactOrAlias: {
5618
5618
  anyOf: ({
5619
- type?: undefined;
5620
5619
  enum?: undefined;
5620
+ type?: undefined;
5621
5621
  $ref: string;
5622
5622
  } | {
5623
5623
  $ref?: undefined;
@@ -5780,8 +5780,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
5780
5780
  };
5781
5781
  ConditionalFormattingWithCompareTarget: {
5782
5782
  allOf: ({
5783
- type?: undefined;
5784
5783
  properties?: undefined;
5784
+ type?: undefined;
5785
5785
  required?: undefined;
5786
5786
  $ref: string;
5787
5787
  } | {
@@ -5820,8 +5820,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
5820
5820
  };
5821
5821
  "ConditionalFormattingWithCompareTarget_number-or-string_": {
5822
5822
  allOf: ({
5823
- type?: undefined;
5824
5823
  properties?: undefined;
5824
+ type?: undefined;
5825
5825
  required?: undefined;
5826
5826
  $ref: string;
5827
5827
  } | {
@@ -5860,8 +5860,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
5860
5860
  };
5861
5861
  ConditionalFormattingWithValues: {
5862
5862
  allOf: ({
5863
- type?: undefined;
5864
5863
  properties?: undefined;
5864
+ type?: undefined;
5865
5865
  required?: undefined;
5866
5866
  $ref: string;
5867
5867
  } | {
@@ -5887,8 +5887,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
5887
5887
  };
5888
5888
  "ConditionalFormattingWithValues_number-or-string_": {
5889
5889
  allOf: ({
5890
- type?: undefined;
5891
5890
  properties?: undefined;
5891
+ type?: undefined;
5892
5892
  required?: undefined;
5893
5893
  $ref: string;
5894
5894
  } | {
@@ -6184,8 +6184,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
6184
6184
  };
6185
6185
  DataAppVizChartAsCode: {
6186
6186
  allOf: ({
6187
- type?: undefined;
6188
6187
  properties?: undefined;
6188
+ type?: undefined;
6189
6189
  $ref: string;
6190
6190
  } | {
6191
6191
  $ref?: undefined;
@@ -6494,8 +6494,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
6494
6494
  };
6495
6495
  FilterRuleInput: {
6496
6496
  allOf: ({
6497
- type?: undefined;
6498
6497
  properties?: undefined;
6498
+ type?: undefined;
6499
6499
  $ref: string;
6500
6500
  } | {
6501
6501
  $ref?: undefined;
@@ -6613,8 +6613,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
6613
6613
  };
6614
6614
  FormulaTableCalculation: {
6615
6615
  allOf: ({
6616
- type?: undefined;
6617
6616
  properties?: undefined;
6617
+ type?: undefined;
6618
6618
  required?: undefined;
6619
6619
  $ref: string;
6620
6620
  } | {
@@ -8573,8 +8573,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
8573
8573
  };
8574
8574
  SqlTableCalculation: {
8575
8575
  allOf: ({
8576
- type?: undefined;
8577
8576
  properties?: undefined;
8577
+ type?: undefined;
8578
8578
  required?: undefined;
8579
8579
  $ref: string;
8580
8580
  } | {
@@ -8897,8 +8897,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
8897
8897
  };
8898
8898
  TemplateTableCalculation: {
8899
8899
  allOf: ({
8900
- type?: undefined;
8901
8900
  properties?: undefined;
8901
+ type?: undefined;
8902
8902
  required?: undefined;
8903
8903
  $ref: string;
8904
8904
  } | {
@@ -8997,8 +8997,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
8997
8997
  };
8998
8998
  VizBarChartConfig: {
8999
8999
  allOf: ({
9000
- type?: undefined;
9001
9000
  properties?: undefined;
9001
+ type?: undefined;
9002
9002
  required?: undefined;
9003
9003
  $ref: string;
9004
9004
  } | {
@@ -9065,8 +9065,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
9065
9065
  };
9066
9066
  VizBigNumberConfig: {
9067
9067
  allOf: ({
9068
- type?: undefined;
9069
9068
  properties?: undefined;
9069
+ type?: undefined;
9070
9070
  required?: undefined;
9071
9071
  $ref: string;
9072
9072
  } | {
@@ -9182,8 +9182,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
9182
9182
  };
9183
9183
  VizLineChartConfig: {
9184
9184
  allOf: ({
9185
- type?: undefined;
9186
9185
  properties?: undefined;
9186
+ type?: undefined;
9187
9187
  required?: undefined;
9188
9188
  $ref: string;
9189
9189
  } | {
@@ -9205,8 +9205,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
9205
9205
  };
9206
9206
  VizPieChartConfig: {
9207
9207
  allOf: ({
9208
- type?: undefined;
9209
9208
  properties?: undefined;
9209
+ type?: undefined;
9210
9210
  required?: undefined;
9211
9211
  $ref: string;
9212
9212
  } | {
@@ -9258,8 +9258,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
9258
9258
  };
9259
9259
  VizTableConfig: {
9260
9260
  allOf: ({
9261
- type?: undefined;
9262
9261
  properties?: undefined;
9262
+ type?: undefined;
9263
9263
  required?: undefined;
9264
9264
  $ref: string;
9265
9265
  } | {
@@ -9289,8 +9289,8 @@ export declare const getChartAsCodeBranchSchema: (contentType: ChartAsCodeConten
9289
9289
  };
9290
9290
  XAxis: {
9291
9291
  allOf: ({
9292
- type?: undefined;
9293
9292
  properties?: undefined;
9293
+ type?: undefined;
9294
9294
  $ref: string;
9295
9295
  } | {
9296
9296
  $ref?: undefined;
@@ -3174,6 +3174,93 @@
3174
3174
  "anyOf": [
3175
3175
  {
3176
3176
  "properties": {
3177
+ "customMetrics": {
3178
+ "anyOf": [
3179
+ {
3180
+ "items": {
3181
+ "properties": {
3182
+ "aggregation": {
3183
+ "description": "Aggregation over the base dimension. Number dimensions take any; string, date and timestamp dimensions take count, count_distinct, min or max; boolean dimensions take count or count_distinct.",
3184
+ "enum": [
3185
+ "sum",
3186
+ "average",
3187
+ "count",
3188
+ "count_distinct",
3189
+ "min",
3190
+ "max",
3191
+ "median",
3192
+ "percentile"
3193
+ ],
3194
+ "type": "string"
3195
+ },
3196
+ "description": {
3197
+ "description": "Shown to users as the metric's description. Null when the label is enough.",
3198
+ "type": [
3199
+ "string",
3200
+ "null"
3201
+ ]
3202
+ },
3203
+ "dimensionFieldId": {
3204
+ "description": "Field id of the dimension to aggregate, a dimension of \"table\".",
3205
+ "type": "string"
3206
+ },
3207
+ "filter": {
3208
+ "anyOf": [
3209
+ {
3210
+ "maxLength": 16384,
3211
+ "minLength": 1,
3212
+ "type": "string"
3213
+ },
3214
+ {
3215
+ "type": "null"
3216
+ }
3217
+ ],
3218
+ "description": "Aggregates only the rows this flat AND expression over dimensions matches, in the node filter grammar, e.g. \"orders_status equals=completed\". Null aggregates every row."
3219
+ },
3220
+ "label": {
3221
+ "description": "Column label shown to users.",
3222
+ "type": "string"
3223
+ },
3224
+ "name": {
3225
+ "description": "snake_case name. The metric's field id is \"<table>_<name>\": list it in \"metrics\" to select it, and use it in sorts, metric filters and periodComparisons.",
3226
+ "pattern": "^[a-z][a-z0-9_]*$",
3227
+ "type": "string"
3228
+ },
3229
+ "percentile": {
3230
+ "anyOf": [
3231
+ {
3232
+ "maximum": 100,
3233
+ "minimum": 0,
3234
+ "type": "number"
3235
+ },
3236
+ {
3237
+ "type": "null"
3238
+ }
3239
+ ],
3240
+ "description": "0–100, set only for the percentile aggregation."
3241
+ },
3242
+ "table": {
3243
+ "description": "Table of the base dimension; the metric belongs to it.",
3244
+ "type": "string"
3245
+ }
3246
+ },
3247
+ "required": [
3248
+ "table",
3249
+ "name",
3250
+ "label",
3251
+ "aggregation",
3252
+ "dimensionFieldId"
3253
+ ],
3254
+ "type": "object"
3255
+ },
3256
+ "type": "array"
3257
+ },
3258
+ {
3259
+ "type": "null"
3260
+ }
3261
+ ],
3262
+ "description": "Metrics the explore lacks, each an aggregation over one of its dimensions, computed in this query."
3263
+ },
3177
3264
  "description": {
3178
3265
  "description": "One sentence for a business user on what this node does to the data, adding to the title rather than repeating it, e.g. \"Sums completed order revenue per month over the last year.\" Shown as the node's heading in the pipeline list.",
3179
3266
  "type": "string"
@@ -3261,9 +3348,43 @@
3261
3348
  "type": "null"
3262
3349
  }
3263
3350
  ],
3264
- "default": null,
3265
3351
  "description": "Parameter values for this node, keyed by parameter name exactly as shown in the explore metadata (e.g. {\"orders.metric\": \"active_users\"}). Set them whenever a selected field is marked \"requires parameters\" and the default does not match what the user asked for: an unset parameter silently resolves to its default, which can return the wrong data. null when the explore has no parameters or the defaults are correct."
3266
3352
  },
3353
+ "periodComparisons": {
3354
+ "anyOf": [
3355
+ {
3356
+ "items": {
3357
+ "properties": {
3358
+ "metricFieldId": {
3359
+ "description": "Metric to compare: a field id in \"metrics\", explore or custom.",
3360
+ "type": "string"
3361
+ },
3362
+ "periodOffset": {
3363
+ "description": "Periods to look back: 1 for the previous period, 12 on a month grain for the same month last year.",
3364
+ "maximum": 9007199254740991,
3365
+ "minimum": 1,
3366
+ "type": "integer"
3367
+ },
3368
+ "timeDimensionFieldId": {
3369
+ "description": "Time dimension in \"dimensions\" with a day, week, month, quarter or year grain; the offset counts in that grain.",
3370
+ "type": "string"
3371
+ }
3372
+ },
3373
+ "required": [
3374
+ "metricFieldId",
3375
+ "timeDimensionFieldId",
3376
+ "periodOffset"
3377
+ ],
3378
+ "type": "object"
3379
+ },
3380
+ "type": "array"
3381
+ },
3382
+ {
3383
+ "type": "null"
3384
+ }
3385
+ ],
3386
+ "description": "Each adds a column holding a metric shifted back in time, next to that metric, e.g. revenue the same month last year. The warehouse reads the earlier period even when the filters exclude it. The column id is generated; read it from the result columns."
3387
+ },
3267
3388
  "sorts": {
3268
3389
  "description": "Sorts by fields this node also selects in dimensions or metrics, e.g. [{\"fieldId\": \"orders_order_date\", \"descending\": true}].",
3269
3390
  "items": {