Skip to content

Commit 29ed0c7

Browse files
authored
Merge pull request #34 from objectstack-ai/copilot/add-field-widget-contract
2 parents 4829adf + ba9dd35 commit 29ed0c7

29 files changed

+3069
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Trigger
3+
description: Trigger Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Trigger name (snake_case) |
11+
| **object** | `string` || Target object name |
12+
| **timing** | `Enum<'before' \| 'after'>` || Execution timing |
13+
| **action** | `Enum<'insert' \| 'update' \| 'delete'> \| Enum<'insert' \| 'update' \| 'delete'>[]` || Database operation(s) to trigger on |
14+
| **description** | `string` | optional | Trigger description |
15+
| **active** | `boolean` | optional | Is trigger active |
16+
| **order** | `number` | optional | Execution order |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: TriggerAction
3+
description: TriggerAction Schema Reference
4+
---
5+
6+
## Allowed Values
7+
8+
* `insert`
9+
* `update`
10+
* `delete`
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: TriggerContext
3+
description: TriggerContext Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **action** | `Enum<'insert' \| 'update' \| 'delete'>` || Database operation type |
11+
| **timing** | `Enum<'before' \| 'after'>` || Trigger execution timing |
12+
| **doc** | `Record<string, any>` || Current document/record |
13+
| **previousDoc** | `Record<string, any>` | optional | Previous document state |
14+
| **userId** | `string` || Current user ID |
15+
| **user** | `Record<string, any>` || Current user record |
16+
| **ql** | `any` | optional | ObjectQL data access API |
17+
| **logger** | `any` | optional | Logging interface |
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: TriggerTiming
3+
description: TriggerTiming Schema Reference
4+
---
5+
6+
## Allowed Values
7+
8+
* `before`
9+
* `after`
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: DriverCapabilities
3+
description: DriverCapabilities Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **transactions** | `boolean` || Supports transactions |
11+
| **joins** | `boolean` || Supports SQL joins |
12+
| **fullTextSearch** | `boolean` || Supports full-text search |
13+
| **jsonFields** | `boolean` || Supports JSON field types |
14+
| **arrayFields** | `boolean` || Supports array field types |
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: DriverInterface
3+
description: DriverInterface Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **name** | `string` || Driver name |
11+
| **version** | `string` || Driver version |
12+
| **supports** | `object` || Driver capabilities |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Plugin
3+
description: Plugin Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **id** | `string` | optional | Plugin identifier |
11+
| **version** | `string` | optional | Plugin version |
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: PluginContext
3+
description: PluginContext Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **ql** | `any` | optional | ObjectQL data access API |
11+
| **os** | `any` | optional | ObjectOS system API |
12+
| **logger** | `any` | optional | Logging interface |
13+
| **metadata** | `any` | optional | Metadata registry |
14+
| **events** | `any` | optional | Event bus |
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: PluginLifecycle
3+
description: PluginLifecycle Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: FieldWidgetProps
3+
description: FieldWidgetProps Schema Reference
4+
---
5+
6+
## Properties
7+
8+
| Property | Type | Required | Description |
9+
| :--- | :--- | :--- | :--- |
10+
| **value** | `any` | optional | Current field value |
11+
| **readonly** | `boolean` | optional | Read-only mode flag |
12+
| **required** | `boolean` | optional | Required field flag |
13+
| **error** | `string` | optional | Validation error message |
14+
| **field** | `object` || Field schema definition |
15+
| **record** | `Record<string, any>` | optional | Complete record data |
16+
| **options** | `Record<string, any>` | optional | Custom widget options |

0 commit comments

Comments
 (0)