Skip to content

Commit 9939947

Browse files
authored
Merge pull request #35 from objectstack-ai/copilot/add-query-advanced-validation
2 parents 29ed0c7 + 6864421 commit 9939947

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+7107
-20
lines changed

content/docs/references/api/requests/ExportRequest.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ description: ExportRequest Schema Reference
99
| :--- | :--- | :--- | :--- |
1010
| **object** | `string` || Object name (e.g. account) |
1111
| **fields** | `string \| object[]` | optional | Fields to retrieve |
12+
| **aggregations** | `object[]` | optional | Aggregation functions (GROUP BY) |
13+
| **windowFunctions** | `object[]` | optional | Window functions with OVER clause |
1214
| **filters** | `any[] \| string \| any[]` | optional | Filtering criteria |
15+
| **joins** | `object[]` | optional | Table joins |
16+
| **groupBy** | `string[]` | optional | GROUP BY fields |
17+
| **having** | `any[] \| string \| any[]` | optional | HAVING clause for aggregation filtering |
1318
| **sort** | `object[]` | optional | Sorting instructions |
1419
| **top** | `number` | optional | Limit results |
1520
| **skip** | `number` | optional | Offset results |
21+
| **distinct** | `boolean` | optional | SELECT DISTINCT flag |
1622
| **format** | `Enum<'csv' \| 'json' \| 'xlsx'>` | optional | |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Address
3+
description: Address Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **street** | `string` | optional | Street address |
11+
| **city** | `string` | optional | City name |
12+
| **state** | `string` | optional | State/Province |
13+
| **postalCode** | `string` | optional | Postal/ZIP code |
14+
| **country** | `string` | optional | Country name or code |
15+
| **countryCode** | `string` | optional | ISO country code (e.g., US, GB) |
16+
| **formatted** | `string` | optional | Formatted address string |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: AggregationFunction
3+
description: AggregationFunction Schema Reference
4+
---
5+
6+
## Allowed Values
7+
8+
* `count`
9+
* `sum`
10+
* `avg`
11+
* `min`
12+
* `max`
13+
* `count_distinct`
14+
* `array_agg`
15+
* `string_agg`
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: AggregationNode
3+
description: AggregationNode Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **function** | `Enum<'count' \| 'sum' \| 'avg' \| 'min' \| 'max' \| 'count_distinct' \| 'array_agg' \| 'string_agg'>` || Aggregation function |
11+
| **field** | `string` | optional | Field to aggregate (optional for COUNT(*)) |
12+
| **alias** | `string` || Result column alias |
13+
| **distinct** | `boolean` | optional | Apply DISTINCT before aggregation |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: AsyncValidation
3+
description: AsyncValidation Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Unique rule name |
11+
| **active** | `boolean` | optional | |
12+
| **severity** | `Enum<'error' \| 'warning' \| 'info'>` | optional | |
13+
| **message** | `string` || Error message to display |
14+
| **type** | `string` || |
15+
| **field** | `string` || Field to validate |
16+
| **validatorUrl** | `string` | optional | External API endpoint for validation |
17+
| **validatorFunction** | `string` | optional | Reference to custom validator function |
18+
| **timeout** | `number` | optional | Timeout in milliseconds |
19+
| **debounce** | `number` | optional | Debounce delay in milliseconds |
20+
| **params** | `Record<string, any>` | optional | Additional parameters to pass to validator |
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: ConditionalValidation
3+
description: ConditionalValidation Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Unique rule name |
11+
| **active** | `boolean` | optional | |
12+
| **severity** | `Enum<'error' \| 'warning' \| 'info'>` | optional | |
13+
| **message** | `string` || Error message to display |
14+
| **type** | `string` || |
15+
| **when** | `string` || Condition formula (e.g. "type = 'enterprise'") |
16+
| **then** | `object \| object \| object \| object \| object \| object \| object \| any` || Validation rule to apply when condition is true |
17+
| **otherwise** | `object \| object \| object \| object \| object \| object \| object \| any` | optional | Validation rule to apply when condition is false |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: CrossFieldValidation
3+
description: CrossFieldValidation Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Unique rule name |
11+
| **active** | `boolean` | optional | |
12+
| **severity** | `Enum<'error' \| 'warning' \| 'info'>` | optional | |
13+
| **message** | `string` || Error message to display |
14+
| **type** | `string` || |
15+
| **condition** | `string` || Formula expression comparing fields (e.g. "end_date > start_date") |
16+
| **fields** | `string[]` || Fields involved in the validation |
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: CustomValidator
3+
description: CustomValidator Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Unique rule name |
11+
| **active** | `boolean` | optional | |
12+
| **severity** | `Enum<'error' \| 'warning' \| 'info'>` | optional | |
13+
| **message** | `string` || Error message to display |
14+
| **type** | `string` || |
15+
| **field** | `string` | optional | Field to validate (optional for record-level validation) |
16+
| **validatorFunction** | `string` || Function name or reference to custom validator |
17+
| **params** | `Record<string, any>` | optional | Additional parameters for the validator |
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: JoinNode
3+
description: JoinNode Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **type** | `Enum<'inner' \| 'left' \| 'right' \| 'full'>` || Join type |
11+
| **object** | `string` || Object/table to join |
12+
| **alias** | `string` | optional | Table alias |
13+
| **on** | `any[] \| string \| any[] \| string \| any[][]` || Join condition |
14+
| **subquery** | `object` | optional | Subquery instead of object |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: JoinType
3+
description: JoinType Schema Reference
4+
---
5+
6+
## Allowed Values
7+
8+
* `inner`
9+
* `left`
10+
* `right`
11+
* `full`

0 commit comments

Comments
 (0)