@objectstack/spec 1.0.5 → 1.0.7

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 (64) hide show
  1. package/dist/ai/index.d.mts +1 -1
  2. package/dist/ai/index.d.ts +1 -1
  3. package/dist/api/index.d.mts +2 -2
  4. package/dist/api/index.d.ts +2 -2
  5. package/dist/api/index.js +1880 -1784
  6. package/dist/api/index.js.map +1 -1
  7. package/dist/api/index.mjs +1880 -1784
  8. package/dist/api/index.mjs.map +1 -1
  9. package/dist/automation/index.d.mts +1 -1
  10. package/dist/automation/index.d.ts +1 -1
  11. package/dist/contracts/index.d.mts +3 -3
  12. package/dist/contracts/index.d.ts +3 -3
  13. package/dist/data/index.d.mts +3 -3
  14. package/dist/data/index.d.ts +3 -3
  15. package/dist/data/index.js +5 -1
  16. package/dist/data/index.js.map +1 -1
  17. package/dist/data/index.mjs +5 -1
  18. package/dist/data/index.mjs.map +1 -1
  19. package/dist/{driver.zod-YoPJRbBk.d.mts → driver.zod-BOM_Etco.d.mts} +164 -3467
  20. package/dist/{driver.zod-B0DitHQ2.d.ts → driver.zod-lfi00zVT.d.ts} +164 -3467
  21. package/dist/{field.zod-Da5S-hAo.d.mts → field.zod-B_lzVsuC.d.ts} +871 -1
  22. package/dist/{field.zod-Da5S-hAo.d.ts → field.zod-dhbAw0SA.d.mts} +871 -1
  23. package/dist/hub/index.d.mts +1 -1
  24. package/dist/hub/index.d.ts +1 -1
  25. package/dist/hub/index.js +796 -707
  26. package/dist/hub/index.js.map +1 -1
  27. package/dist/hub/index.mjs +796 -707
  28. package/dist/hub/index.mjs.map +1 -1
  29. package/dist/{index-DSLwt2M_.d.ts → index-C67cfwmW.d.ts} +6 -355
  30. package/dist/{index-BMqjuD4e.d.ts → index-CH5zloR3.d.ts} +2 -2
  31. package/dist/{index-CIBOjiZG.d.mts → index-CU4m6noq.d.mts} +2 -2
  32. package/dist/{index-BeFe7iF_.d.mts → index-CyognKSZ.d.ts} +268 -1565
  33. package/dist/{index-CFaoWA3X.d.ts → index-DE_lJ11p.d.mts} +268 -1565
  34. package/dist/{index-C34qbBQr.d.mts → index-DLcySG7U.d.mts} +262 -241
  35. package/dist/{index-C34qbBQr.d.ts → index-DLcySG7U.d.ts} +262 -241
  36. package/dist/{index-BYtinxqf.d.mts → index-Dp7GFJ8V.d.mts} +6 -355
  37. package/dist/{index-D8XFyX0x.d.mts → index-Os7lItRe.d.mts} +108 -108
  38. package/dist/{index-D8XFyX0x.d.ts → index-Os7lItRe.d.ts} +108 -108
  39. package/dist/{index-CsF8m5Wj.d.mts → index-l6WIlmOD.d.mts} +39 -39
  40. package/dist/{index-CsF8m5Wj.d.ts → index-l6WIlmOD.d.ts} +39 -39
  41. package/dist/index.d.mts +162 -162
  42. package/dist/index.d.ts +162 -162
  43. package/dist/index.js +714 -672
  44. package/dist/index.js.map +1 -1
  45. package/dist/index.mjs +714 -672
  46. package/dist/index.mjs.map +1 -1
  47. package/dist/kernel/index.d.mts +1 -1
  48. package/dist/kernel/index.d.ts +1 -1
  49. package/dist/kernel/index.js +705 -669
  50. package/dist/kernel/index.js.map +1 -1
  51. package/dist/kernel/index.mjs +704 -669
  52. package/dist/kernel/index.mjs.map +1 -1
  53. package/json-schema/api/CompileManifestResponse.json +6 -2
  54. package/json-schema/api/ExportRequest.json +419 -758
  55. package/json-schema/api/FindDataRequest.json +9 -0
  56. package/json-schema/data/JoinNode.json +9 -0
  57. package/json-schema/data/Mapping.json +9 -0
  58. package/json-schema/data/Query.json +9 -0
  59. package/json-schema/hub/ComposerResponse.json +6 -2
  60. package/json-schema/kernel/Manifest.json +6 -2
  61. package/json-schema/kernel/Plugin.json +28 -0
  62. package/package.json +1 -1
  63. package/dist/{index-iGrpxfqq.d.mts → index-D12rNohm.d.mts} +1 -1
  64. package/dist/{index-iGrpxfqq.d.ts → index-D12rNohm.d.ts} +1 -1
@@ -2,314 +2,197 @@
2
2
  "$ref": "#/definitions/ExportRequest",
3
3
  "definitions": {
4
4
  "ExportRequest": {
5
- "type": "object",
6
- "properties": {
7
- "object": {
8
- "type": "string",
9
- "description": "Object name (e.g. account)"
10
- },
11
- "fields": {
12
- "type": "array",
13
- "items": {
14
- "anyOf": [
15
- {
16
- "type": "string"
17
- },
18
- {
19
- "type": "object",
20
- "properties": {
21
- "field": {
5
+ "allOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "object": {
10
+ "type": "string",
11
+ "description": "Object name (e.g. account)"
12
+ },
13
+ "fields": {
14
+ "type": "array",
15
+ "items": {
16
+ "anyOf": [
17
+ {
22
18
  "type": "string"
23
19
  },
24
- "fields": {
25
- "type": "array",
26
- "items": {}
27
- },
28
- "alias": {
29
- "type": "string"
20
+ {
21
+ "type": "object",
22
+ "properties": {
23
+ "field": {
24
+ "type": "string"
25
+ },
26
+ "fields": {
27
+ "type": "array",
28
+ "items": {}
29
+ },
30
+ "alias": {
31
+ "type": "string"
32
+ }
33
+ },
34
+ "required": [
35
+ "field"
36
+ ],
37
+ "additionalProperties": false
30
38
  }
39
+ ]
40
+ },
41
+ "description": "Fields to retrieve"
42
+ },
43
+ "where": {
44
+ "allOf": [
45
+ {
46
+ "type": "object",
47
+ "additionalProperties": {}
31
48
  },
32
- "required": [
33
- "field"
34
- ],
35
- "additionalProperties": false
36
- }
37
- ]
38
- },
39
- "description": "Fields to retrieve"
40
- },
41
- "where": {
42
- "allOf": [
43
- {
44
- "type": "object",
45
- "additionalProperties": {}
49
+ {
50
+ "type": "object",
51
+ "properties": {
52
+ "$and": {
53
+ "type": "array",
54
+ "items": {}
55
+ },
56
+ "$or": {
57
+ "type": "array",
58
+ "items": {}
59
+ },
60
+ "$not": {}
61
+ }
62
+ }
63
+ ],
64
+ "description": "Filtering criteria (WHERE)"
46
65
  },
47
- {
66
+ "search": {
48
67
  "type": "object",
49
68
  "properties": {
50
- "$and": {
51
- "type": "array",
52
- "items": {}
69
+ "query": {
70
+ "type": "string",
71
+ "description": "Search query text"
53
72
  },
54
- "$or": {
73
+ "fields": {
55
74
  "type": "array",
56
- "items": {}
75
+ "items": {
76
+ "type": "string"
77
+ },
78
+ "description": "Fields to search in (if not specified, searches all text fields)"
57
79
  },
58
- "$not": {}
59
- }
60
- }
61
- ],
62
- "description": "Filtering criteria (WHERE)"
63
- },
64
- "search": {
65
- "type": "object",
66
- "properties": {
67
- "query": {
68
- "type": "string",
69
- "description": "Search query text"
80
+ "fuzzy": {
81
+ "type": "boolean",
82
+ "default": false,
83
+ "description": "Enable fuzzy matching (tolerates typos)"
84
+ },
85
+ "operator": {
86
+ "type": "string",
87
+ "enum": [
88
+ "and",
89
+ "or"
90
+ ],
91
+ "default": "or",
92
+ "description": "Logical operator between terms"
93
+ },
94
+ "boost": {
95
+ "type": "object",
96
+ "additionalProperties": {
97
+ "type": "number"
98
+ },
99
+ "description": "Field-specific relevance boosting (field name -> boost factor)"
100
+ },
101
+ "minScore": {
102
+ "type": "number",
103
+ "description": "Minimum relevance score threshold"
104
+ },
105
+ "language": {
106
+ "type": "string",
107
+ "description": "Language for text analysis (e.g., \"en\", \"zh\", \"es\")"
108
+ },
109
+ "highlight": {
110
+ "type": "boolean",
111
+ "default": false,
112
+ "description": "Enable search result highlighting"
113
+ }
114
+ },
115
+ "required": [
116
+ "query"
117
+ ],
118
+ "additionalProperties": false,
119
+ "description": "Full-text search configuration ($search parameter)"
70
120
  },
71
- "fields": {
121
+ "orderBy": {
72
122
  "type": "array",
73
123
  "items": {
74
- "type": "string"
124
+ "type": "object",
125
+ "properties": {
126
+ "field": {
127
+ "type": "string"
128
+ },
129
+ "order": {
130
+ "type": "string",
131
+ "enum": [
132
+ "asc",
133
+ "desc"
134
+ ],
135
+ "default": "asc"
136
+ }
137
+ },
138
+ "required": [
139
+ "field"
140
+ ],
141
+ "additionalProperties": false
75
142
  },
76
- "description": "Fields to search in (if not specified, searches all text fields)"
77
- },
78
- "fuzzy": {
79
- "type": "boolean",
80
- "default": false,
81
- "description": "Enable fuzzy matching (tolerates typos)"
82
- },
83
- "operator": {
84
- "type": "string",
85
- "enum": [
86
- "and",
87
- "or"
88
- ],
89
- "default": "or",
90
- "description": "Logical operator between terms"
143
+ "description": "Sorting instructions (ORDER BY)"
91
144
  },
92
- "boost": {
93
- "type": "object",
94
- "additionalProperties": {
95
- "type": "number"
96
- },
97
- "description": "Field-specific relevance boosting (field name -> boost factor)"
145
+ "limit": {
146
+ "type": "number",
147
+ "description": "Max records to return (LIMIT)"
98
148
  },
99
- "minScore": {
149
+ "offset": {
100
150
  "type": "number",
101
- "description": "Minimum relevance score threshold"
151
+ "description": "Records to skip (OFFSET)"
102
152
  },
103
- "language": {
104
- "type": "string",
105
- "description": "Language for text analysis (e.g., \"en\", \"zh\", \"es\")"
153
+ "top": {
154
+ "type": "number",
155
+ "description": "Alias for limit (OData compatibility)"
106
156
  },
107
- "highlight": {
108
- "type": "boolean",
109
- "default": false,
110
- "description": "Enable search result highlighting"
111
- }
112
- },
113
- "required": [
114
- "query"
115
- ],
116
- "additionalProperties": false,
117
- "description": "Full-text search configuration ($search parameter)"
118
- },
119
- "orderBy": {
120
- "type": "array",
121
- "items": {
122
- "type": "object",
123
- "properties": {
124
- "field": {
125
- "type": "string"
126
- },
127
- "order": {
128
- "type": "string",
129
- "enum": [
130
- "asc",
131
- "desc"
132
- ],
133
- "default": "asc"
134
- }
157
+ "cursor": {
158
+ "type": "object",
159
+ "additionalProperties": {},
160
+ "description": "Cursor for keyset pagination"
135
161
  },
136
- "required": [
137
- "field"
138
- ],
139
- "additionalProperties": false
140
- },
141
- "description": "Sorting instructions (ORDER BY)"
142
- },
143
- "limit": {
144
- "type": "number",
145
- "description": "Max records to return (LIMIT)"
146
- },
147
- "offset": {
148
- "type": "number",
149
- "description": "Records to skip (OFFSET)"
150
- },
151
- "cursor": {
152
- "type": "object",
153
- "additionalProperties": {},
154
- "description": "Cursor for keyset pagination"
155
- },
156
- "joins": {
157
- "type": "array",
158
- "items": {
159
- "type": "object",
160
- "properties": {
161
- "type": {
162
- "type": "string",
163
- "enum": [
164
- "inner",
165
- "left",
166
- "right",
167
- "full"
168
- ],
169
- "description": "Join type"
170
- },
171
- "strategy": {
172
- "type": "string",
173
- "enum": [
174
- "auto",
175
- "database",
176
- "hash",
177
- "loop"
178
- ],
179
- "description": "Execution strategy hint"
180
- },
181
- "object": {
182
- "type": "string",
183
- "description": "Object/table to join"
184
- },
185
- "alias": {
186
- "type": "string",
187
- "description": "Table alias"
188
- },
189
- "on": {
190
- "allOf": [
191
- {
192
- "type": "object",
193
- "additionalProperties": {}
194
- },
195
- {
196
- "type": "object",
197
- "properties": {
198
- "$and": {
199
- "type": "array",
200
- "items": {
201
- "allOf": [
202
- {
203
- "type": "object",
204
- "additionalProperties": {}
205
- },
206
- {
207
- "type": "object",
208
- "properties": {
209
- "$and": {
210
- "type": "array",
211
- "items": {}
212
- },
213
- "$or": {
214
- "type": "array",
215
- "items": {}
216
- },
217
- "$not": {}
218
- }
219
- }
220
- ]
221
- }
222
- },
223
- "$or": {
224
- "type": "array",
225
- "items": {
226
- "allOf": [
227
- {
228
- "type": "object",
229
- "additionalProperties": {}
230
- },
231
- {
232
- "type": "object",
233
- "properties": {
234
- "$and": {
235
- "type": "array",
236
- "items": {}
237
- },
238
- "$or": {
239
- "type": "array",
240
- "items": {}
241
- },
242
- "$not": {}
243
- }
244
- }
245
- ]
246
- }
247
- },
248
- "$not": {
249
- "allOf": [
250
- {
251
- "type": "object",
252
- "additionalProperties": {}
253
- },
254
- {
255
- "type": "object",
256
- "properties": {
257
- "$and": {
258
- "type": "array",
259
- "items": {}
260
- },
261
- "$or": {
262
- "type": "array",
263
- "items": {}
264
- },
265
- "$not": {}
266
- }
267
- }
268
- ]
269
- }
270
- }
271
- }
272
- ],
273
- "description": "Join condition"
274
- },
275
- "subquery": {
162
+ "joins": {
163
+ "type": "array",
164
+ "items": {
276
165
  "type": "object",
277
166
  "properties": {
167
+ "type": {
168
+ "type": "string",
169
+ "enum": [
170
+ "inner",
171
+ "left",
172
+ "right",
173
+ "full"
174
+ ],
175
+ "description": "Join type"
176
+ },
177
+ "strategy": {
178
+ "type": "string",
179
+ "enum": [
180
+ "auto",
181
+ "database",
182
+ "hash",
183
+ "loop"
184
+ ],
185
+ "description": "Execution strategy hint"
186
+ },
278
187
  "object": {
279
188
  "type": "string",
280
- "description": "Object name (e.g. account)"
189
+ "description": "Object/table to join"
281
190
  },
282
- "fields": {
283
- "type": "array",
284
- "items": {
285
- "anyOf": [
286
- {
287
- "type": "string"
288
- },
289
- {
290
- "type": "object",
291
- "properties": {
292
- "field": {
293
- "type": "string"
294
- },
295
- "fields": {
296
- "type": "array",
297
- "items": {}
298
- },
299
- "alias": {
300
- "type": "string"
301
- }
302
- },
303
- "required": [
304
- "field"
305
- ],
306
- "additionalProperties": false
307
- }
308
- ]
309
- },
310
- "description": "Fields to retrieve"
191
+ "alias": {
192
+ "type": "string",
193
+ "description": "Table alias"
311
194
  },
312
- "where": {
195
+ "on": {
313
196
  "allOf": [
314
197
  {
315
198
  "type": "object",
@@ -320,182 +203,126 @@
320
203
  "properties": {
321
204
  "$and": {
322
205
  "type": "array",
323
- "items": {}
206
+ "items": {
207
+ "allOf": [
208
+ {
209
+ "type": "object",
210
+ "additionalProperties": {}
211
+ },
212
+ {
213
+ "type": "object",
214
+ "properties": {
215
+ "$and": {
216
+ "type": "array",
217
+ "items": {}
218
+ },
219
+ "$or": {
220
+ "type": "array",
221
+ "items": {}
222
+ },
223
+ "$not": {}
224
+ }
225
+ }
226
+ ]
227
+ }
324
228
  },
325
229
  "$or": {
326
230
  "type": "array",
327
- "items": {}
231
+ "items": {
232
+ "allOf": [
233
+ {
234
+ "type": "object",
235
+ "additionalProperties": {}
236
+ },
237
+ {
238
+ "type": "object",
239
+ "properties": {
240
+ "$and": {
241
+ "type": "array",
242
+ "items": {}
243
+ },
244
+ "$or": {
245
+ "type": "array",
246
+ "items": {}
247
+ },
248
+ "$not": {}
249
+ }
250
+ }
251
+ ]
252
+ }
328
253
  },
329
- "$not": {}
254
+ "$not": {
255
+ "allOf": [
256
+ {
257
+ "type": "object",
258
+ "additionalProperties": {}
259
+ },
260
+ {
261
+ "type": "object",
262
+ "properties": {
263
+ "$and": {
264
+ "type": "array",
265
+ "items": {}
266
+ },
267
+ "$or": {
268
+ "type": "array",
269
+ "items": {}
270
+ },
271
+ "$not": {}
272
+ }
273
+ }
274
+ ]
275
+ }
330
276
  }
331
277
  }
332
278
  ],
333
- "description": "Filtering criteria (WHERE)"
279
+ "description": "Join condition"
334
280
  },
335
- "search": {
336
- "type": "object",
337
- "properties": {
338
- "query": {
339
- "type": "string",
340
- "description": "Search query text"
341
- },
342
- "fields": {
343
- "type": "array",
344
- "items": {
345
- "type": "string"
346
- },
347
- "description": "Fields to search in (if not specified, searches all text fields)"
348
- },
349
- "fuzzy": {
350
- "type": "boolean",
351
- "default": false,
352
- "description": "Enable fuzzy matching (tolerates typos)"
353
- },
354
- "operator": {
355
- "type": "string",
356
- "enum": [
357
- "and",
358
- "or"
359
- ],
360
- "default": "or",
361
- "description": "Logical operator between terms"
362
- },
363
- "boost": {
364
- "type": "object",
365
- "additionalProperties": {
366
- "type": "number"
367
- },
368
- "description": "Field-specific relevance boosting (field name -> boost factor)"
369
- },
370
- "minScore": {
371
- "type": "number",
372
- "description": "Minimum relevance score threshold"
373
- },
374
- "language": {
375
- "type": "string",
376
- "description": "Language for text analysis (e.g., \"en\", \"zh\", \"es\")"
377
- },
378
- "highlight": {
379
- "type": "boolean",
380
- "default": false,
381
- "description": "Enable search result highlighting"
382
- }
383
- },
384
- "required": [
385
- "query"
281
+ "subquery": {
282
+ "description": "Subquery instead of object"
283
+ }
284
+ },
285
+ "required": [
286
+ "type",
287
+ "object",
288
+ "on"
289
+ ],
290
+ "additionalProperties": false
291
+ },
292
+ "description": "Explicit Table Joins"
293
+ },
294
+ "aggregations": {
295
+ "type": "array",
296
+ "items": {
297
+ "type": "object",
298
+ "properties": {
299
+ "function": {
300
+ "type": "string",
301
+ "enum": [
302
+ "count",
303
+ "sum",
304
+ "avg",
305
+ "min",
306
+ "max",
307
+ "count_distinct",
308
+ "array_agg",
309
+ "string_agg"
386
310
  ],
387
- "additionalProperties": false,
388
- "description": "Full-text search configuration ($search parameter)"
389
- },
390
- "orderBy": {
391
- "type": "array",
392
- "items": {
393
- "type": "object",
394
- "properties": {
395
- "field": {
396
- "type": "string"
397
- },
398
- "order": {
399
- "type": "string",
400
- "enum": [
401
- "asc",
402
- "desc"
403
- ],
404
- "default": "asc"
405
- }
406
- },
407
- "required": [
408
- "field"
409
- ],
410
- "additionalProperties": false
411
- },
412
- "description": "Sorting instructions (ORDER BY)"
413
- },
414
- "limit": {
415
- "type": "number",
416
- "description": "Max records to return (LIMIT)"
417
- },
418
- "offset": {
419
- "type": "number",
420
- "description": "Records to skip (OFFSET)"
311
+ "description": "Aggregation function"
421
312
  },
422
- "cursor": {
423
- "type": "object",
424
- "additionalProperties": {},
425
- "description": "Cursor for keyset pagination"
313
+ "field": {
314
+ "type": "string",
315
+ "description": "Field to aggregate (optional for COUNT(*))"
426
316
  },
427
- "joins": {},
428
- "aggregations": {
429
- "type": "array",
430
- "items": {
431
- "type": "object",
432
- "properties": {
433
- "function": {
434
- "type": "string",
435
- "enum": [
436
- "count",
437
- "sum",
438
- "avg",
439
- "min",
440
- "max",
441
- "count_distinct",
442
- "array_agg",
443
- "string_agg"
444
- ],
445
- "description": "Aggregation function"
446
- },
447
- "field": {
448
- "type": "string",
449
- "description": "Field to aggregate (optional for COUNT(*))"
450
- },
451
- "alias": {
452
- "type": "string",
453
- "description": "Result column alias"
454
- },
455
- "distinct": {
456
- "type": "boolean",
457
- "description": "Apply DISTINCT before aggregation"
458
- },
459
- "filter": {
460
- "allOf": [
461
- {
462
- "type": "object",
463
- "additionalProperties": {}
464
- },
465
- {
466
- "type": "object",
467
- "properties": {
468
- "$and": {
469
- "type": "array",
470
- "items": {}
471
- },
472
- "$or": {
473
- "type": "array",
474
- "items": {}
475
- },
476
- "$not": {}
477
- }
478
- }
479
- ],
480
- "description": "Filter/Condition to apply to the aggregation (FILTER WHERE clause)"
481
- }
482
- },
483
- "required": [
484
- "function",
485
- "alias"
486
- ],
487
- "additionalProperties": false
488
- },
489
- "description": "Aggregation functions"
317
+ "alias": {
318
+ "type": "string",
319
+ "description": "Result column alias"
490
320
  },
491
- "groupBy": {
492
- "type": "array",
493
- "items": {
494
- "type": "string"
495
- },
496
- "description": "GROUP BY fields"
321
+ "distinct": {
322
+ "type": "boolean",
323
+ "description": "Apply DISTINCT before aggregation"
497
324
  },
498
- "having": {
325
+ "filter": {
499
326
  "allOf": [
500
327
  {
501
328
  "type": "object",
@@ -516,344 +343,178 @@
516
343
  }
517
344
  }
518
345
  ],
519
- "description": "HAVING clause for aggregation filtering"
520
- },
521
- "windowFunctions": {
522
- "type": "array",
523
- "items": {
524
- "type": "object",
525
- "properties": {
526
- "function": {
527
- "type": "string",
528
- "enum": [
529
- "row_number",
530
- "rank",
531
- "dense_rank",
532
- "percent_rank",
533
- "lag",
534
- "lead",
535
- "first_value",
536
- "last_value",
537
- "sum",
538
- "avg",
539
- "count",
540
- "min",
541
- "max"
542
- ],
543
- "description": "Window function name"
544
- },
545
- "field": {
546
- "type": "string",
547
- "description": "Field to operate on (for aggregate window functions)"
548
- },
549
- "alias": {
550
- "type": "string",
551
- "description": "Result column alias"
552
- },
553
- "over": {
554
- "type": "object",
555
- "properties": {
556
- "partitionBy": {
557
- "type": "array",
558
- "items": {
559
- "type": "string"
560
- },
561
- "description": "PARTITION BY fields"
562
- },
563
- "orderBy": {
564
- "type": "array",
565
- "items": {
566
- "type": "object",
567
- "properties": {
568
- "field": {
569
- "type": "string"
570
- },
571
- "order": {
572
- "type": "string",
573
- "enum": [
574
- "asc",
575
- "desc"
576
- ],
577
- "default": "asc"
578
- }
579
- },
580
- "required": [
581
- "field"
582
- ],
583
- "additionalProperties": false
584
- },
585
- "description": "ORDER BY specification"
586
- },
587
- "frame": {
588
- "type": "object",
589
- "properties": {
590
- "type": {
591
- "type": "string",
592
- "enum": [
593
- "rows",
594
- "range"
595
- ]
596
- },
597
- "start": {
598
- "type": "string",
599
- "description": "Frame start (e.g., \"UNBOUNDED PRECEDING\", \"1 PRECEDING\")"
600
- },
601
- "end": {
602
- "type": "string",
603
- "description": "Frame end (e.g., \"CURRENT ROW\", \"1 FOLLOWING\")"
604
- }
605
- },
606
- "additionalProperties": false,
607
- "description": "Window frame specification"
608
- }
609
- },
610
- "additionalProperties": false,
611
- "description": "Window specification (OVER clause)"
612
- }
613
- },
614
- "required": [
615
- "function",
616
- "alias",
617
- "over"
618
- ],
619
- "additionalProperties": false
620
- },
621
- "description": "Window functions with OVER clause"
622
- },
623
- "distinct": {
624
- "type": "boolean",
625
- "description": "SELECT DISTINCT flag"
346
+ "description": "Filter/Condition to apply to the aggregation (FILTER WHERE clause)"
626
347
  }
627
348
  },
628
349
  "required": [
629
- "object"
630
- ],
631
- "additionalProperties": false,
632
- "description": "Subquery instead of object"
633
- }
634
- },
635
- "required": [
636
- "type",
637
- "object",
638
- "on"
639
- ],
640
- "additionalProperties": false
641
- },
642
- "description": "Explicit Table Joins"
643
- },
644
- "aggregations": {
645
- "type": "array",
646
- "items": {
647
- "type": "object",
648
- "properties": {
649
- "function": {
650
- "type": "string",
651
- "enum": [
652
- "count",
653
- "sum",
654
- "avg",
655
- "min",
656
- "max",
657
- "count_distinct",
658
- "array_agg",
659
- "string_agg"
350
+ "function",
351
+ "alias"
660
352
  ],
661
- "description": "Aggregation function"
662
- },
663
- "field": {
664
- "type": "string",
665
- "description": "Field to aggregate (optional for COUNT(*))"
666
- },
667
- "alias": {
668
- "type": "string",
669
- "description": "Result column alias"
670
- },
671
- "distinct": {
672
- "type": "boolean",
673
- "description": "Apply DISTINCT before aggregation"
353
+ "additionalProperties": false
674
354
  },
675
- "filter": {
676
- "allOf": [
677
- {
678
- "type": "object",
679
- "additionalProperties": {}
680
- },
681
- {
682
- "type": "object",
683
- "properties": {
684
- "$and": {
685
- "type": "array",
686
- "items": {}
687
- },
688
- "$or": {
689
- "type": "array",
690
- "items": {}
691
- },
692
- "$not": {}
693
- }
694
- }
695
- ],
696
- "description": "Filter/Condition to apply to the aggregation (FILTER WHERE clause)"
697
- }
355
+ "description": "Aggregation functions"
698
356
  },
699
- "required": [
700
- "function",
701
- "alias"
702
- ],
703
- "additionalProperties": false
704
- },
705
- "description": "Aggregation functions"
706
- },
707
- "groupBy": {
708
- "type": "array",
709
- "items": {
710
- "type": "string"
711
- },
712
- "description": "GROUP BY fields"
713
- },
714
- "having": {
715
- "allOf": [
716
- {
717
- "type": "object",
718
- "additionalProperties": {}
357
+ "groupBy": {
358
+ "type": "array",
359
+ "items": {
360
+ "type": "string"
361
+ },
362
+ "description": "GROUP BY fields"
719
363
  },
720
- {
721
- "type": "object",
722
- "properties": {
723
- "$and": {
724
- "type": "array",
725
- "items": {}
726
- },
727
- "$or": {
728
- "type": "array",
729
- "items": {}
364
+ "having": {
365
+ "allOf": [
366
+ {
367
+ "type": "object",
368
+ "additionalProperties": {}
730
369
  },
731
- "$not": {}
732
- }
733
- }
734
- ],
735
- "description": "HAVING clause for aggregation filtering"
736
- },
737
- "windowFunctions": {
738
- "type": "array",
739
- "items": {
740
- "type": "object",
741
- "properties": {
742
- "function": {
743
- "type": "string",
744
- "enum": [
745
- "row_number",
746
- "rank",
747
- "dense_rank",
748
- "percent_rank",
749
- "lag",
750
- "lead",
751
- "first_value",
752
- "last_value",
753
- "sum",
754
- "avg",
755
- "count",
756
- "min",
757
- "max"
758
- ],
759
- "description": "Window function name"
760
- },
761
- "field": {
762
- "type": "string",
763
- "description": "Field to operate on (for aggregate window functions)"
764
- },
765
- "alias": {
766
- "type": "string",
767
- "description": "Result column alias"
768
- },
769
- "over": {
370
+ {
371
+ "type": "object",
372
+ "properties": {
373
+ "$and": {
374
+ "type": "array",
375
+ "items": {}
376
+ },
377
+ "$or": {
378
+ "type": "array",
379
+ "items": {}
380
+ },
381
+ "$not": {}
382
+ }
383
+ }
384
+ ],
385
+ "description": "HAVING clause for aggregation filtering"
386
+ },
387
+ "windowFunctions": {
388
+ "type": "array",
389
+ "items": {
770
390
  "type": "object",
771
391
  "properties": {
772
- "partitionBy": {
773
- "type": "array",
774
- "items": {
775
- "type": "string"
776
- },
777
- "description": "PARTITION BY fields"
392
+ "function": {
393
+ "type": "string",
394
+ "enum": [
395
+ "row_number",
396
+ "rank",
397
+ "dense_rank",
398
+ "percent_rank",
399
+ "lag",
400
+ "lead",
401
+ "first_value",
402
+ "last_value",
403
+ "sum",
404
+ "avg",
405
+ "count",
406
+ "min",
407
+ "max"
408
+ ],
409
+ "description": "Window function name"
778
410
  },
779
- "orderBy": {
780
- "type": "array",
781
- "items": {
782
- "type": "object",
783
- "properties": {
784
- "field": {
785
- "type": "string"
786
- },
787
- "order": {
788
- "type": "string",
789
- "enum": [
790
- "asc",
791
- "desc"
792
- ],
793
- "default": "asc"
794
- }
795
- },
796
- "required": [
797
- "field"
798
- ],
799
- "additionalProperties": false
800
- },
801
- "description": "ORDER BY specification"
411
+ "field": {
412
+ "type": "string",
413
+ "description": "Field to operate on (for aggregate window functions)"
414
+ },
415
+ "alias": {
416
+ "type": "string",
417
+ "description": "Result column alias"
802
418
  },
803
- "frame": {
419
+ "over": {
804
420
  "type": "object",
805
421
  "properties": {
806
- "type": {
807
- "type": "string",
808
- "enum": [
809
- "rows",
810
- "range"
811
- ]
422
+ "partitionBy": {
423
+ "type": "array",
424
+ "items": {
425
+ "type": "string"
426
+ },
427
+ "description": "PARTITION BY fields"
812
428
  },
813
- "start": {
814
- "type": "string",
815
- "description": "Frame start (e.g., \"UNBOUNDED PRECEDING\", \"1 PRECEDING\")"
429
+ "orderBy": {
430
+ "type": "array",
431
+ "items": {
432
+ "type": "object",
433
+ "properties": {
434
+ "field": {
435
+ "type": "string"
436
+ },
437
+ "order": {
438
+ "type": "string",
439
+ "enum": [
440
+ "asc",
441
+ "desc"
442
+ ],
443
+ "default": "asc"
444
+ }
445
+ },
446
+ "required": [
447
+ "field"
448
+ ],
449
+ "additionalProperties": false
450
+ },
451
+ "description": "ORDER BY specification"
816
452
  },
817
- "end": {
818
- "type": "string",
819
- "description": "Frame end (e.g., \"CURRENT ROW\", \"1 FOLLOWING\")"
453
+ "frame": {
454
+ "type": "object",
455
+ "properties": {
456
+ "type": {
457
+ "type": "string",
458
+ "enum": [
459
+ "rows",
460
+ "range"
461
+ ]
462
+ },
463
+ "start": {
464
+ "type": "string",
465
+ "description": "Frame start (e.g., \"UNBOUNDED PRECEDING\", \"1 PRECEDING\")"
466
+ },
467
+ "end": {
468
+ "type": "string",
469
+ "description": "Frame end (e.g., \"CURRENT ROW\", \"1 FOLLOWING\")"
470
+ }
471
+ },
472
+ "additionalProperties": false,
473
+ "description": "Window frame specification"
820
474
  }
821
475
  },
822
476
  "additionalProperties": false,
823
- "description": "Window frame specification"
477
+ "description": "Window specification (OVER clause)"
824
478
  }
825
479
  },
826
- "additionalProperties": false,
827
- "description": "Window specification (OVER clause)"
828
- }
480
+ "required": [
481
+ "function",
482
+ "alias",
483
+ "over"
484
+ ],
485
+ "additionalProperties": false
486
+ },
487
+ "description": "Window functions with OVER clause"
829
488
  },
830
- "required": [
831
- "function",
832
- "alias",
833
- "over"
834
- ],
835
- "additionalProperties": false
489
+ "distinct": {
490
+ "type": "boolean",
491
+ "description": "SELECT DISTINCT flag"
492
+ },
493
+ "expand": {
494
+ "type": "object",
495
+ "additionalProperties": {},
496
+ "description": "Recursive relation loading (nested queries)"
497
+ }
836
498
  },
837
- "description": "Window functions with OVER clause"
838
- },
839
- "distinct": {
840
- "type": "boolean",
841
- "description": "SELECT DISTINCT flag"
499
+ "required": [
500
+ "object"
501
+ ]
842
502
  },
843
- "format": {
844
- "type": "string",
845
- "enum": [
846
- "csv",
847
- "json",
848
- "xlsx"
849
- ],
850
- "default": "csv"
503
+ {
504
+ "type": "object",
505
+ "properties": {
506
+ "format": {
507
+ "type": "string",
508
+ "enum": [
509
+ "csv",
510
+ "json",
511
+ "xlsx"
512
+ ],
513
+ "default": "csv"
514
+ }
515
+ }
851
516
  }
852
- },
853
- "required": [
854
- "object"
855
- ],
856
- "additionalProperties": false
517
+ ]
857
518
  }
858
519
  },
859
520
  "$schema": "http://json-schema.org/draft-07/schema#"