Skip to content

Commit 9dc055e

Browse files
Copilothotlong
andcommitted
Fix build error: use 'filters' instead of 'where' in QueryOptions
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 503ec7a commit 9dc055e

File tree

3 files changed

+22
-29
lines changed

3 files changed

+22
-29
lines changed

content/docs/references/ui/analytics/Report.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ description: Report Schema Reference
1515
| **columns** | `object[]` || Columns to display |
1616
| **groupingsDown** | `object[]` | optional | Row groupings |
1717
| **groupingsAcross** | `object[]` | optional | Column groupings (Matrix only) |
18-
| **filter** | `string` | optional | Filter logic (e.g. "1 AND (2 OR 3)") |
19-
| **filterItems** | `object[]` | optional | Filter criteria lines |
18+
| **filter** | `any` | optional | Filter criteria |
2019
| **chart** | `object` | optional | Embedded chart configuration |

examples/todo/src/client-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async function main() {
5959
console.log('\n🧠 Testing Advanced Query (Select & Modern Filter)...');
6060
const advancedResult = await client.data.find('todo_task', {
6161
select: ['subject', 'priority'],
62-
where: {
62+
filters: {
6363
priority: { $gte: 2 } // Modern MongoDB-style filter syntax
6464
},
6565
sort: ['-priority']

packages/spec/json-schema/Report.json

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -137,33 +137,27 @@
137137
"description": "Column groupings (Matrix only)"
138138
},
139139
"filter": {
140-
"type": "string",
141-
"description": "Filter logic (e.g. \"1 AND (2 OR 3)\")"
142-
},
143-
"filterItems": {
144-
"type": "array",
145-
"items": {
146-
"type": "object",
147-
"properties": {
148-
"id": {
149-
"type": "number"
150-
},
151-
"field": {
152-
"type": "string"
153-
},
154-
"operator": {
155-
"type": "string"
156-
},
157-
"value": {}
140+
"allOf": [
141+
{
142+
"type": "object",
143+
"additionalProperties": {}
158144
},
159-
"required": [
160-
"id",
161-
"field",
162-
"operator"
163-
],
164-
"additionalProperties": false
165-
},
166-
"description": "Filter criteria lines"
145+
{
146+
"type": "object",
147+
"properties": {
148+
"$and": {
149+
"type": "array",
150+
"items": {}
151+
},
152+
"$or": {
153+
"type": "array",
154+
"items": {}
155+
},
156+
"$not": {}
157+
}
158+
}
159+
],
160+
"description": "Filter criteria"
167161
},
168162
"chart": {
169163
"type": "object",

0 commit comments

Comments
 (0)