@lightdash/common 0.2077.5 → 0.2078.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 (101) hide show
  1. package/dist/cjs/ee/AiAgent/schemas/index.d.ts +1200 -0
  2. package/dist/cjs/ee/AiAgent/schemas/index.d.ts.map +1 -1
  3. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcBaseSchemas.d.ts.map +1 -1
  4. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcBaseSchemas.js +8 -4
  5. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcBaseSchemas.js.map +1 -1
  6. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfColumnTotal.d.ts +3 -0
  7. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfColumnTotal.d.ts.map +1 -1
  8. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfColumnTotal.js +4 -0
  9. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfColumnTotal.js.map +1 -1
  10. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcWindowFunction.d.ts +109 -0
  11. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcWindowFunction.d.ts.map +1 -0
  12. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcWindowFunction.js +103 -0
  13. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcWindowFunction.js.map +1 -0
  14. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcs.d.ts +216 -0
  15. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcs.d.ts.map +1 -1
  16. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcs.js +87 -30
  17. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcs.js.map +1 -1
  18. package/dist/cjs/ee/AiAgent/schemas/tools/toolDashboardArgs.d.ts +2218 -4
  19. package/dist/cjs/ee/AiAgent/schemas/tools/toolDashboardArgs.d.ts.map +1 -1
  20. package/dist/cjs/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts +354 -0
  21. package/dist/cjs/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts.map +1 -1
  22. package/dist/cjs/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts +354 -0
  23. package/dist/cjs/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts.map +1 -1
  24. package/dist/cjs/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts +354 -0
  25. package/dist/cjs/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts.map +1 -1
  26. package/dist/cjs/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts +354 -0
  27. package/dist/cjs/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts.map +1 -1
  28. package/dist/cjs/ee/AiAgent/utils.d.ts +69 -0
  29. package/dist/cjs/ee/AiAgent/utils.d.ts.map +1 -1
  30. package/dist/cjs/types/field.d.ts +42 -1
  31. package/dist/cjs/types/field.d.ts.map +1 -1
  32. package/dist/cjs/types/field.js +25 -1
  33. package/dist/cjs/types/field.js.map +1 -1
  34. package/dist/esm/ee/AiAgent/schemas/index.d.ts +1200 -0
  35. package/dist/esm/ee/AiAgent/schemas/index.d.ts.map +1 -1
  36. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcBaseSchemas.d.ts.map +1 -1
  37. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcBaseSchemas.js +8 -4
  38. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcBaseSchemas.js.map +1 -1
  39. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfColumnTotal.d.ts +3 -0
  40. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfColumnTotal.d.ts.map +1 -1
  41. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfColumnTotal.js +5 -1
  42. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfColumnTotal.js.map +1 -1
  43. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcWindowFunction.d.ts +109 -0
  44. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcWindowFunction.d.ts.map +1 -0
  45. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcWindowFunction.js +100 -0
  46. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcWindowFunction.js.map +1 -0
  47. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcs.d.ts +216 -0
  48. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcs.d.ts.map +1 -1
  49. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcs.js +88 -31
  50. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcs.js.map +1 -1
  51. package/dist/esm/ee/AiAgent/schemas/tools/toolDashboardArgs.d.ts +2218 -4
  52. package/dist/esm/ee/AiAgent/schemas/tools/toolDashboardArgs.d.ts.map +1 -1
  53. package/dist/esm/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts +354 -0
  54. package/dist/esm/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts.map +1 -1
  55. package/dist/esm/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts +354 -0
  56. package/dist/esm/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts.map +1 -1
  57. package/dist/esm/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts +354 -0
  58. package/dist/esm/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts.map +1 -1
  59. package/dist/esm/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts +354 -0
  60. package/dist/esm/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts.map +1 -1
  61. package/dist/esm/ee/AiAgent/utils.d.ts +69 -0
  62. package/dist/esm/ee/AiAgent/utils.d.ts.map +1 -1
  63. package/dist/esm/types/field.d.ts +42 -1
  64. package/dist/esm/types/field.d.ts.map +1 -1
  65. package/dist/esm/types/field.js +24 -0
  66. package/dist/esm/types/field.js.map +1 -1
  67. package/dist/tsconfig.types.tsbuildinfo +1 -1
  68. package/dist/types/ee/AiAgent/schemas/index.d.ts +1200 -0
  69. package/dist/types/ee/AiAgent/schemas/index.d.ts.map +1 -1
  70. package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcBaseSchemas.d.ts.map +1 -1
  71. package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfColumnTotal.d.ts +3 -0
  72. package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcPercentOfColumnTotal.d.ts.map +1 -1
  73. package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcWindowFunction.d.ts +109 -0
  74. package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcWindowFunction.d.ts.map +1 -0
  75. package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcs.d.ts +216 -0
  76. package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcs.d.ts.map +1 -1
  77. package/dist/types/ee/AiAgent/schemas/tools/toolDashboardArgs.d.ts +2218 -4
  78. package/dist/types/ee/AiAgent/schemas/tools/toolDashboardArgs.d.ts.map +1 -1
  79. package/dist/types/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts +354 -0
  80. package/dist/types/ee/AiAgent/schemas/tools/toolRunMetricQueryArgs.d.ts.map +1 -1
  81. package/dist/types/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts +354 -0
  82. package/dist/types/ee/AiAgent/schemas/tools/toolTableVizArgs.d.ts.map +1 -1
  83. package/dist/types/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts +354 -0
  84. package/dist/types/ee/AiAgent/schemas/tools/toolTimeSeriesArgs.d.ts.map +1 -1
  85. package/dist/types/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts +354 -0
  86. package/dist/types/ee/AiAgent/schemas/tools/toolVerticalBarArgs.d.ts.map +1 -1
  87. package/dist/types/ee/AiAgent/utils.d.ts +69 -0
  88. package/dist/types/ee/AiAgent/utils.d.ts.map +1 -1
  89. package/dist/types/types/field.d.ts +42 -1
  90. package/dist/types/types/field.d.ts.map +1 -1
  91. package/package.json +1 -1
  92. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcs.test.d.ts +0 -2
  93. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcs.test.d.ts.map +0 -1
  94. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcs.test.js +0 -56
  95. package/dist/cjs/ee/AiAgent/schemas/tableCalcs/tableCalcs.test.js.map +0 -1
  96. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcs.test.d.ts +0 -2
  97. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcs.test.d.ts.map +0 -1
  98. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcs.test.js +0 -54
  99. package/dist/esm/ee/AiAgent/schemas/tableCalcs/tableCalcs.test.js.map +0 -1
  100. package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcs.test.d.ts +0 -2
  101. package/dist/types/ee/AiAgent/schemas/tableCalcs/tableCalcs.test.d.ts.map +0 -1
@@ -74,16 +74,19 @@ declare const tableCalcSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
74
74
  } & {
75
75
  type: z.ZodLiteral<"percent_of_column_total">;
76
76
  fieldId: z.ZodString;
77
+ partitionBy: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
77
78
  }, "strip", z.ZodTypeAny, {
78
79
  name: string;
79
80
  fieldId: string;
80
81
  type: "percent_of_column_total";
81
82
  displayName: string;
83
+ partitionBy: string[] | null;
82
84
  }, {
83
85
  name: string;
84
86
  fieldId: string;
85
87
  type: "percent_of_column_total";
86
88
  displayName: string;
89
+ partitionBy: string[] | null;
87
90
  }>, z.ZodObject<{
88
91
  name: z.ZodString;
89
92
  displayName: z.ZodString;
@@ -116,6 +119,111 @@ declare const tableCalcSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
116
119
  fieldId: string;
117
120
  type: "running_total";
118
121
  displayName: string;
122
+ }>, z.ZodObject<{
123
+ name: z.ZodString;
124
+ displayName: z.ZodString;
125
+ } & {
126
+ type: z.ZodLiteral<"window_function">;
127
+ windowFunction: z.ZodEnum<["row_number", "percent_rank", "sum", "avg", "count", "min", "max"]>;
128
+ fieldId: z.ZodNullable<z.ZodString>;
129
+ orderBy: z.ZodNullable<z.ZodArray<z.ZodObject<{
130
+ fieldId: z.ZodString;
131
+ order: z.ZodNullable<z.ZodEnum<["asc", "desc"]>>;
132
+ }, "strip", z.ZodTypeAny, {
133
+ fieldId: string;
134
+ order: "asc" | "desc" | null;
135
+ }, {
136
+ fieldId: string;
137
+ order: "asc" | "desc" | null;
138
+ }>, "many">>;
139
+ partitionBy: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
140
+ frame: z.ZodNullable<z.ZodObject<{
141
+ frameType: z.ZodEnum<["rows", "range"]>;
142
+ start: z.ZodNullable<z.ZodObject<{
143
+ type: z.ZodEnum<["unbounded_preceding", "preceding", "current_row", "following", "unbounded_following"]>;
144
+ offset: z.ZodNullable<z.ZodNumber>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
147
+ offset: number | null;
148
+ }, {
149
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
150
+ offset: number | null;
151
+ }>>;
152
+ end: z.ZodObject<{
153
+ type: z.ZodEnum<["unbounded_preceding", "preceding", "current_row", "following", "unbounded_following"]>;
154
+ offset: z.ZodNullable<z.ZodNumber>;
155
+ }, "strip", z.ZodTypeAny, {
156
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
157
+ offset: number | null;
158
+ }, {
159
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
160
+ offset: number | null;
161
+ }>;
162
+ }, "strip", z.ZodTypeAny, {
163
+ start: {
164
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
165
+ offset: number | null;
166
+ } | null;
167
+ end: {
168
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
169
+ offset: number | null;
170
+ };
171
+ frameType: "rows" | "range";
172
+ }, {
173
+ start: {
174
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
175
+ offset: number | null;
176
+ } | null;
177
+ end: {
178
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
179
+ offset: number | null;
180
+ };
181
+ frameType: "rows" | "range";
182
+ }>>;
183
+ }, "strip", z.ZodTypeAny, {
184
+ name: string;
185
+ fieldId: string | null;
186
+ type: "window_function";
187
+ displayName: string;
188
+ orderBy: {
189
+ fieldId: string;
190
+ order: "asc" | "desc" | null;
191
+ }[] | null;
192
+ partitionBy: string[] | null;
193
+ windowFunction: "row_number" | "percent_rank" | "sum" | "avg" | "count" | "min" | "max";
194
+ frame: {
195
+ start: {
196
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
197
+ offset: number | null;
198
+ } | null;
199
+ end: {
200
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
201
+ offset: number | null;
202
+ };
203
+ frameType: "rows" | "range";
204
+ } | null;
205
+ }, {
206
+ name: string;
207
+ fieldId: string | null;
208
+ type: "window_function";
209
+ displayName: string;
210
+ orderBy: {
211
+ fieldId: string;
212
+ order: "asc" | "desc" | null;
213
+ }[] | null;
214
+ partitionBy: string[] | null;
215
+ windowFunction: "row_number" | "percent_rank" | "sum" | "avg" | "count" | "min" | "max";
216
+ frame: {
217
+ start: {
218
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
219
+ offset: number | null;
220
+ } | null;
221
+ end: {
222
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
223
+ offset: number | null;
224
+ };
225
+ frameType: "rows" | "range";
226
+ } | null;
119
227
  }>]>;
120
228
  export type TableCalcSchema = z.infer<typeof tableCalcSchema>;
121
229
  export declare const tableCalcsSchema: z.ZodNullable<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -192,16 +300,19 @@ export declare const tableCalcsSchema: z.ZodNullable<z.ZodArray<z.ZodDiscriminat
192
300
  } & {
193
301
  type: z.ZodLiteral<"percent_of_column_total">;
194
302
  fieldId: z.ZodString;
303
+ partitionBy: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
195
304
  }, "strip", z.ZodTypeAny, {
196
305
  name: string;
197
306
  fieldId: string;
198
307
  type: "percent_of_column_total";
199
308
  displayName: string;
309
+ partitionBy: string[] | null;
200
310
  }, {
201
311
  name: string;
202
312
  fieldId: string;
203
313
  type: "percent_of_column_total";
204
314
  displayName: string;
315
+ partitionBy: string[] | null;
205
316
  }>, z.ZodObject<{
206
317
  name: z.ZodString;
207
318
  displayName: z.ZodString;
@@ -234,6 +345,111 @@ export declare const tableCalcsSchema: z.ZodNullable<z.ZodArray<z.ZodDiscriminat
234
345
  fieldId: string;
235
346
  type: "running_total";
236
347
  displayName: string;
348
+ }>, z.ZodObject<{
349
+ name: z.ZodString;
350
+ displayName: z.ZodString;
351
+ } & {
352
+ type: z.ZodLiteral<"window_function">;
353
+ windowFunction: z.ZodEnum<["row_number", "percent_rank", "sum", "avg", "count", "min", "max"]>;
354
+ fieldId: z.ZodNullable<z.ZodString>;
355
+ orderBy: z.ZodNullable<z.ZodArray<z.ZodObject<{
356
+ fieldId: z.ZodString;
357
+ order: z.ZodNullable<z.ZodEnum<["asc", "desc"]>>;
358
+ }, "strip", z.ZodTypeAny, {
359
+ fieldId: string;
360
+ order: "asc" | "desc" | null;
361
+ }, {
362
+ fieldId: string;
363
+ order: "asc" | "desc" | null;
364
+ }>, "many">>;
365
+ partitionBy: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
366
+ frame: z.ZodNullable<z.ZodObject<{
367
+ frameType: z.ZodEnum<["rows", "range"]>;
368
+ start: z.ZodNullable<z.ZodObject<{
369
+ type: z.ZodEnum<["unbounded_preceding", "preceding", "current_row", "following", "unbounded_following"]>;
370
+ offset: z.ZodNullable<z.ZodNumber>;
371
+ }, "strip", z.ZodTypeAny, {
372
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
373
+ offset: number | null;
374
+ }, {
375
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
376
+ offset: number | null;
377
+ }>>;
378
+ end: z.ZodObject<{
379
+ type: z.ZodEnum<["unbounded_preceding", "preceding", "current_row", "following", "unbounded_following"]>;
380
+ offset: z.ZodNullable<z.ZodNumber>;
381
+ }, "strip", z.ZodTypeAny, {
382
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
383
+ offset: number | null;
384
+ }, {
385
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
386
+ offset: number | null;
387
+ }>;
388
+ }, "strip", z.ZodTypeAny, {
389
+ start: {
390
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
391
+ offset: number | null;
392
+ } | null;
393
+ end: {
394
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
395
+ offset: number | null;
396
+ };
397
+ frameType: "rows" | "range";
398
+ }, {
399
+ start: {
400
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
401
+ offset: number | null;
402
+ } | null;
403
+ end: {
404
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
405
+ offset: number | null;
406
+ };
407
+ frameType: "rows" | "range";
408
+ }>>;
409
+ }, "strip", z.ZodTypeAny, {
410
+ name: string;
411
+ fieldId: string | null;
412
+ type: "window_function";
413
+ displayName: string;
414
+ orderBy: {
415
+ fieldId: string;
416
+ order: "asc" | "desc" | null;
417
+ }[] | null;
418
+ partitionBy: string[] | null;
419
+ windowFunction: "row_number" | "percent_rank" | "sum" | "avg" | "count" | "min" | "max";
420
+ frame: {
421
+ start: {
422
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
423
+ offset: number | null;
424
+ } | null;
425
+ end: {
426
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
427
+ offset: number | null;
428
+ };
429
+ frameType: "rows" | "range";
430
+ } | null;
431
+ }, {
432
+ name: string;
433
+ fieldId: string | null;
434
+ type: "window_function";
435
+ displayName: string;
436
+ orderBy: {
437
+ fieldId: string;
438
+ order: "asc" | "desc" | null;
439
+ }[] | null;
440
+ partitionBy: string[] | null;
441
+ windowFunction: "row_number" | "percent_rank" | "sum" | "avg" | "count" | "min" | "max";
442
+ frame: {
443
+ start: {
444
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
445
+ offset: number | null;
446
+ } | null;
447
+ end: {
448
+ type: "unbounded_preceding" | "preceding" | "current_row" | "following" | "unbounded_following";
449
+ offset: number | null;
450
+ };
451
+ frameType: "rows" | "range";
452
+ } | null;
237
453
  }>]>, "many">>;
238
454
  export type TableCalcsSchema = z.infer<typeof tableCalcsSchema>;
239
455
  export declare function convertAiTableCalcsSchemaToTableCalcs(tableCalcs: TableCalcsSchema): TableCalculation[];
@@ -1 +1 @@
1
- {"version":3,"file":"tableCalcs.d.ts","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tableCalcs/tableCalcs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAKH,KAAK,gBAAgB,EACxB,MAAM,yBAAyB,CAAC;AAQjC,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAY3B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAiLhE,wBAAgB,qCAAqC,CACjD,UAAU,EAAE,gBAAgB,GAC7B,gBAAgB,EAAE,CAEpB"}
@@ -11,41 +11,46 @@ const tableCalcPercentOfColumnTotal_1 = require("./tableCalcPercentOfColumnTotal
11
11
  const tableCalcPercentOfPreviousValue_1 = require("./tableCalcPercentOfPreviousValue");
12
12
  const tableCalcRankInColumn_1 = require("./tableCalcRankInColumn");
13
13
  const tableCalcRunningTotal_1 = require("./tableCalcRunningTotal");
14
+ const tableCalcWindowFunction_1 = require("./tableCalcWindowFunction");
14
15
  const tableCalcSchema = zod_1.z.discriminatedUnion('type', [
15
16
  tableCalcPercentChangeFromPrevious_1.tableCalcPercentChangeFromPreviousSchema,
16
17
  tableCalcPercentOfPreviousValue_1.tableCalcPercentOfPreviousValueSchema,
17
18
  tableCalcPercentOfColumnTotal_1.tableCalcPercentOfColumnTotalSchema,
18
19
  tableCalcRankInColumn_1.tableCalcRankInColumnSchema,
19
20
  tableCalcRunningTotal_1.tableCalcRunningTotalSchema,
21
+ tableCalcWindowFunction_1.tableCalcWindowFunctionSchema,
20
22
  ]);
21
- // TODO improve description
22
23
  exports.tableCalcsSchema = zod_1.z.array(tableCalcSchema).nullable().describe(`
23
- Table calculations are a way to perform calculations across row sets without collapsing rows. You can think of them like SQL Window Functions.
24
+ Table calculations perform row-by-row calculations on query results without collapsing rows. Similar to SQL window functions.
24
25
 
25
- Create table calculations when:
26
+ **Available Types:**
27
+ - Simple calculations: percent_change_from_previous, percent_of_previous_value, percent_of_column_total, rank_in_column, running_total
28
+ - Advanced window_function: Supports row_number, percent_rank, sum, avg, count, min, max with optional partitioning, ordering, and frame clauses
26
29
 
27
- - User requests percentage change between columns
28
- Examples: "Show revenue growth from last month", "Calculate MoY/Month-over-month, YoY/Year-over-year sales change"
29
- Recommended visualization type: Table, bar chart
30
-
31
- - User requests percentage of column compared to previous row
32
- Examples: "Show revenue as % of previous month", "What percent is each quarter vs the prior quarter"
33
- Recommended visualization type: Table, bar chart
34
-
35
- - User requests percentage of column total
36
- Examples: "Show each product as % of total sales", "What percentage does each region contribute to overall revenue"
37
- Recommended visualization type: Table, Bar chart
38
-
39
- - User requests rank within a column
40
- Examples: "Rank customers by revenue", "Show top performing sales reps by deal count"
41
- Recommended visualization type: Table, Bar chart
42
-
43
- - User requests running total
44
- Examples: "Show cumulative revenue over time", "Running sum of orders by month"
45
- Recommended visualization type: Line chart for the table calculation as Y axis and time as X axis
30
+ **Technical Requirements:**
31
+ - Appear as additional columns in query results
32
+ - Can be used in sorts and filters alongside dimensions/metrics
33
+ - Multiple calculations can be combined in a single query
34
+ - All fields referenced must exist in the query (dimensions, metrics, or other table calculations)
46
35
  `);
36
+ function frameBoundaryStringToEnum(boundaryType) {
37
+ switch (boundaryType) {
38
+ case 'unbounded_preceding':
39
+ return field_1.FrameBoundaryType.UNBOUNDED_PRECEDING;
40
+ case 'preceding':
41
+ return field_1.FrameBoundaryType.PRECEDING;
42
+ case 'current_row':
43
+ return field_1.FrameBoundaryType.CURRENT_ROW;
44
+ case 'following':
45
+ return field_1.FrameBoundaryType.FOLLOWING;
46
+ case 'unbounded_following':
47
+ return field_1.FrameBoundaryType.UNBOUNDED_FOLLOWING;
48
+ default:
49
+ return (0, assertUnreachable_1.default)(boundaryType, 'Unknown boundary type');
50
+ }
51
+ }
47
52
  function convertTableCalcSchemaToTableCalc(tableCalc) {
48
- const { type, name, displayName, fieldId } = tableCalc;
53
+ const { type, name, displayName } = tableCalc;
49
54
  // Build the template
50
55
  const baseCalc = {
51
56
  name,
@@ -58,8 +63,8 @@ function convertTableCalcSchemaToTableCalc(tableCalc) {
58
63
  ...baseCalc,
59
64
  template: {
60
65
  type: field_1.TableCalculationTemplateType.PERCENT_CHANGE_FROM_PREVIOUS,
61
- fieldId,
62
- orderBy: tableCalc.orderBy,
66
+ fieldId: tableCalc.fieldId,
67
+ orderBy: tableCalc.orderBy ?? [],
63
68
  },
64
69
  format: {
65
70
  type: field_1.CustomFormatType.PERCENT,
@@ -71,8 +76,8 @@ function convertTableCalcSchemaToTableCalc(tableCalc) {
71
76
  ...baseCalc,
72
77
  template: {
73
78
  type: field_1.TableCalculationTemplateType.PERCENT_OF_PREVIOUS_VALUE,
74
- fieldId,
75
- orderBy: tableCalc.orderBy,
79
+ fieldId: tableCalc.fieldId,
80
+ orderBy: tableCalc.orderBy ?? [],
76
81
  },
77
82
  format: {
78
83
  type: field_1.CustomFormatType.PERCENT,
@@ -84,7 +89,8 @@ function convertTableCalcSchemaToTableCalc(tableCalc) {
84
89
  ...baseCalc,
85
90
  template: {
86
91
  type: field_1.TableCalculationTemplateType.PERCENT_OF_COLUMN_TOTAL,
87
- fieldId,
92
+ fieldId: tableCalc.fieldId,
93
+ partitionBy: tableCalc.partitionBy ?? [],
88
94
  },
89
95
  format: {
90
96
  type: field_1.CustomFormatType.PERCENT,
@@ -96,7 +102,7 @@ function convertTableCalcSchemaToTableCalc(tableCalc) {
96
102
  ...baseCalc,
97
103
  template: {
98
104
  type: field_1.TableCalculationTemplateType.RANK_IN_COLUMN,
99
- fieldId,
105
+ fieldId: tableCalc.fieldId,
100
106
  },
101
107
  format: {
102
108
  type: field_1.CustomFormatType.NUMBER,
@@ -108,13 +114,64 @@ function convertTableCalcSchemaToTableCalc(tableCalc) {
108
114
  ...baseCalc,
109
115
  template: {
110
116
  type: field_1.TableCalculationTemplateType.RUNNING_TOTAL,
111
- fieldId,
117
+ fieldId: tableCalc.fieldId,
112
118
  },
113
119
  format: {
114
120
  type: field_1.CustomFormatType.NUMBER,
115
121
  separator: field_1.NumberSeparator.DEFAULT,
116
122
  },
117
123
  };
124
+ case 'window_function': {
125
+ // Map string window function to enum
126
+ const windowFunctionMap = {
127
+ row_number: field_1.WindowFunctionType.ROW_NUMBER,
128
+ percent_rank: field_1.WindowFunctionType.PERCENT_RANK,
129
+ sum: field_1.WindowFunctionType.SUM,
130
+ avg: field_1.WindowFunctionType.AVG,
131
+ count: field_1.WindowFunctionType.COUNT,
132
+ min: field_1.WindowFunctionType.MIN,
133
+ max: field_1.WindowFunctionType.MAX,
134
+ };
135
+ const format = tableCalc.windowFunction === 'percent_rank'
136
+ ? {
137
+ type: field_1.CustomFormatType.PERCENT,
138
+ separator: field_1.NumberSeparator.DEFAULT,
139
+ }
140
+ : {
141
+ type: field_1.CustomFormatType.NUMBER,
142
+ separator: field_1.NumberSeparator.DEFAULT,
143
+ };
144
+ // Convert frame clause string literals to enum types
145
+ const frame = tableCalc.frame
146
+ ? {
147
+ frameType: tableCalc.frame.frameType === 'rows'
148
+ ? field_1.FrameType.ROWS
149
+ : field_1.FrameType.RANGE,
150
+ start: tableCalc.frame.start
151
+ ? {
152
+ type: frameBoundaryStringToEnum(tableCalc.frame.start.type),
153
+ offset: tableCalc.frame.start.offset ?? undefined,
154
+ }
155
+ : undefined,
156
+ end: {
157
+ type: frameBoundaryStringToEnum(tableCalc.frame.end.type),
158
+ offset: tableCalc.frame.end.offset ?? undefined,
159
+ },
160
+ }
161
+ : undefined;
162
+ return {
163
+ ...baseCalc,
164
+ template: {
165
+ type: field_1.TableCalculationTemplateType.WINDOW_FUNCTION,
166
+ windowFunction: windowFunctionMap[tableCalc.windowFunction],
167
+ fieldId: tableCalc.fieldId,
168
+ orderBy: tableCalc.orderBy ?? [],
169
+ partitionBy: tableCalc.partitionBy ?? [],
170
+ frame,
171
+ },
172
+ format,
173
+ };
174
+ }
118
175
  default:
119
176
  return (0, assertUnreachable_1.default)(type, 'Unknown table calc type');
120
177
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tableCalcs.js","sourceRoot":"","sources":["../../../../../../src/ee/AiAgent/schemas/tableC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