Skip to content

Commit eef7d27

Browse files
committed
feat: 更新文档以反映钩子和验证上下文的变化,优化描述
1 parent a3eb43d commit eef7d27

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/objectql/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- **Cross-Datasource**: Routes queries to the correct driver (Postgres, MongoDB, Redis, etc.) based on Object definition.
99
- **Unified API**: Single `find`, `insert`, `update`, `delete` API regardless of the underlying storage.
1010
- **Plugin System**: Load objects and logic via standard Manifests.
11-
- **Middleware**: (Planned) Support for Triggers, Hooks, and Validators.
11+
- **Middleware**: (Planned) Support for Hooks and Validators.
1212

1313
## Usage
1414

packages/spec/scripts/build-docs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const ZOD_FILE_TITLES: Record<string, string> = {
2828
'filter': 'Filters',
2929
'query': 'Queries',
3030
'dataset': 'Datasets',
31-
'trigger': 'Triggers',
31+
'hook': 'Hooks',
3232
// AI
3333
'agent': 'Agents',
3434
'conversation': 'Conversations',

packages/spec/src/data/validation.zod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import { z } from 'zod';
5252
*
5353
* ## Industry Standard Enhancements
5454
* - **Label/Description**: Essential for governance in large systems with thousands of rules.
55-
* - **Events**: granular control over triggering (Context-aware validation).
55+
* - **Events**: granular control over validation timing (Context-aware validation).
5656
* - **Tags**: categorization for reporting and management.
5757
*/
5858
const BaseValidationSchema = z.object({
@@ -63,7 +63,7 @@ const BaseValidationSchema = z.object({
6363

6464
// Execution Control
6565
active: z.boolean().default(true),
66-
events: z.array(z.enum(['insert', 'update', 'delete'])).default(['insert', 'update']).describe('Trigger contexts'),
66+
events: z.array(z.enum(['insert', 'update', 'delete'])).default(['insert', 'update']).describe('Validation contexts'),
6767

6868
// Classification
6969
tags: z.array(z.string()).optional().describe('Categorization tags (e.g., "compliance", "billing")'),

0 commit comments

Comments
 (0)