diff --git a/packages/spec/DEVELOPMENT_PLAN.md b/packages/spec/DEVELOPMENT_PLAN.md index b7bfe023e..555d08a01 100644 --- a/packages/spec/DEVELOPMENT_PLAN.md +++ b/packages/spec/DEVELOPMENT_PLAN.md @@ -15,12 +15,13 @@ Based on the full audit of 139 `.zod.ts` files (43,746 LOC, 1,089 schemas), the | Metric | Original | Current | Phase 4 Target | |---|---|---|---| -| `z.any()` usages | 397 | 8 | 8 (filter operators only) | -| `z.unknown()` usages | 8 | 340 | > 350 | -| `z.infer` coverage | 93% (1,011/1,089) | ~98% | 100% | -| `.describe()` annotations | 5,026 | 5,300+ | 5,600 | +| `z.any()` usages | 397 | 9 | 8 (filter operators only) | +| `z.unknown()` usages | 8 | 343 | > 350 | +| `z.infer` coverage | 93% (1,011/1,089) | ~99% | 100% | +| `.describe()` annotations | 5,026 | 5,341 | 5,600 | +| `z.input<>` exports | 0 | 122 | Comprehensive | | Schema duplications | 13+ pairs | 1 | 0 | -| Runtime logic violations | 2 files | 2 files | 0 | +| Runtime logic violations | 2 files | 2 files (deprecated) | 0 (moved to @objectstack/core) | | Naming violations | 3 | 0 | 0 | --- @@ -515,16 +516,16 @@ formula: z.string().optional() | # | Task | Scope | Status | |---|---|---|---| -| 4.1 | Add missing z.infer exports | 14 files | ✅ (1 remaining: WidgetSource added) | -| 4.2 | Add z.input<> exports for transform schemas | ~20 files | ⬜ | -| 4.3 | Improve .describe() coverage | 9 files | ⬜ | -| 4.4 | Move runtime logic to core/runtime | 3 files | ⬜ | -| 4.5 | Unify factory helper pattern | 5 files | ⬜ | -| 4.6 | Add industry-standard fields | ~10 files | ⬜ | -| 4.7 | Add deprecation markers + migration paths | 5 files | ⬜ | -| 4.8 | Update JSON Schema generation scripts | 1 file | ⬜ | -| 4.9 | Update index.ts barrel exports | 1 file | ⬜ | -| 4.10 | Full regression test + build verification | — | ⬜ | +| 4.1 | Add missing z.infer exports | 14 files | ✅ | +| 4.2 | Add z.input<> exports for transform schemas | 17 files (62 exports) | ✅ | +| 4.3 | Improve .describe() coverage | 9 files | ✅ (5,341 total annotations) | +| 4.4 | Mark runtime logic as deprecated | 3 functions | ✅ (deprecated with @objectstack/core migration path) | +| 4.5 | Unify factory helper pattern | 1 file | ✅ (App.create now uses Schema.parse) | +| 4.6 | Add industry-standard fields | 6 files | ✅ (field, object, datasource, hook, view, dashboard, action) | +| 4.7 | Add deprecation markers + migration paths | 5 fields | ✅ (formula, encryption, geoSpatial, stateMachine, TenantSchema) | +| 4.8 | Update JSON Schema generation scripts | 1 file | ✅ (verified: 1,207 schemas generated) | +| 4.9 | Fix index.ts barrel exports | 1 file | ✅ (removed duplicate auth/storage exports in api/index.ts) | +| 4.10 | Full regression test + build verification | — | ✅ (97 test files, 3,074 tests pass) | --- diff --git a/packages/spec/json-schema/ai/FeedbackLoop.json b/packages/spec/json-schema/ai/FeedbackLoop.json index ea730294a..403413fc8 100644 --- a/packages/spec/json-schema/ai/FeedbackLoop.json +++ b/packages/spec/json-schema/ai/FeedbackLoop.json @@ -115,14 +115,17 @@ "description": "Human readable name for the migration" }, "description": { - "type": "string" + "type": "string", + "description": "Detailed description of what this migration does" }, "author": { - "type": "string" + "type": "string", + "description": "Author who created this migration" }, "createdAt": { "type": "string", - "format": "date-time" + "format": "date-time", + "description": "ISO 8601 timestamp when the migration was created" }, "dependencies": { "type": "array", @@ -141,8 +144,10 @@ "required": [ "migrationId" ], - "additionalProperties": false - } + "additionalProperties": false, + "description": "Dependency reference to another migration that must run first" + }, + "description": "Migrations that must run before this one" }, "operations": { "type": "array", @@ -782,8 +787,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -870,7 +875,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -882,7 +888,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -890,11 +897,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -1017,10 +1026,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -1036,7 +1057,8 @@ "required": [ "type" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Full field definition to add" } }, "required": [ @@ -1045,7 +1067,8 @@ "fieldName", "field" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Add a new field to an existing object" }, { "type": "object", @@ -1074,7 +1097,8 @@ "fieldName", "changes" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Modify properties of an existing field" }, { "type": "object", @@ -1097,7 +1121,8 @@ "objectName", "fieldName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Remove a field from an existing object" }, { "type": "object", @@ -1782,8 +1807,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -1870,7 +1895,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -1882,7 +1908,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -1890,11 +1917,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -2017,10 +2046,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -4818,6 +4859,11 @@ "full" ], "description": "Default sharing model" + }, + "keyPrefix": { + "type": "string", + "maxLength": 5, + "description": "Short prefix for record IDs (e.g., \"001\" for Account)" } }, "required": [ @@ -4832,7 +4878,8 @@ "type", "object" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Create a new object" }, { "type": "object", @@ -4855,7 +4902,8 @@ "oldName", "newName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Rename an existing object" }, { "type": "object", @@ -4873,7 +4921,8 @@ "type", "objectName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Delete an existing object" }, { "type": "object", @@ -4895,10 +4944,12 @@ "type", "sql" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Execute a raw SQL statement" } ] - } + }, + "description": "Ordered list of atomic migration operations" }, "rollback": { "type": "array", @@ -5538,8 +5589,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -5626,7 +5677,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -5638,7 +5690,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -5646,11 +5699,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -5773,10 +5828,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -5792,7 +5859,8 @@ "required": [ "type" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Full field definition to add" } }, "required": [ @@ -5801,7 +5869,8 @@ "fieldName", "field" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Add a new field to an existing object" }, { "type": "object", @@ -5830,7 +5899,8 @@ "fieldName", "changes" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Modify properties of an existing field" }, { "type": "object", @@ -5853,7 +5923,8 @@ "objectName", "fieldName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Remove a field from an existing object" }, { "type": "object", @@ -6538,8 +6609,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -6626,7 +6697,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -6638,7 +6710,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -6646,11 +6719,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -6773,10 +6848,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -9574,6 +9661,11 @@ "full" ], "description": "Default sharing model" + }, + "keyPrefix": { + "type": "string", + "maxLength": 5, + "description": "Short prefix for record IDs (e.g., \"001\" for Account)" } }, "required": [ @@ -9588,7 +9680,8 @@ "type", "object" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Create a new object" }, { "type": "object", @@ -9611,7 +9704,8 @@ "oldName", "newName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Rename an existing object" }, { "type": "object", @@ -9629,7 +9723,8 @@ "type", "objectName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Delete an existing object" }, { "type": "object", @@ -9651,10 +9746,12 @@ "type", "sql" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Execute a raw SQL statement" } ] - } + }, + "description": "Operations to reverse this migration" } }, "required": [ @@ -9662,7 +9759,8 @@ "name", "operations" ], - "additionalProperties": false + "additionalProperties": false, + "description": "A versioned set of atomic schema migration operations" } }, "required": [ diff --git a/packages/spec/json-schema/ai/Resolution.json b/packages/spec/json-schema/ai/Resolution.json index f7b494e70..526a96cb2 100644 --- a/packages/spec/json-schema/ai/Resolution.json +++ b/packages/spec/json-schema/ai/Resolution.json @@ -38,14 +38,17 @@ "description": "Human readable name for the migration" }, "description": { - "type": "string" + "type": "string", + "description": "Detailed description of what this migration does" }, "author": { - "type": "string" + "type": "string", + "description": "Author who created this migration" }, "createdAt": { "type": "string", - "format": "date-time" + "format": "date-time", + "description": "ISO 8601 timestamp when the migration was created" }, "dependencies": { "type": "array", @@ -64,8 +67,10 @@ "required": [ "migrationId" ], - "additionalProperties": false - } + "additionalProperties": false, + "description": "Dependency reference to another migration that must run first" + }, + "description": "Migrations that must run before this one" }, "operations": { "type": "array", @@ -705,8 +710,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -793,7 +798,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -805,7 +811,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -813,11 +820,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -940,10 +949,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -959,7 +980,8 @@ "required": [ "type" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Full field definition to add" } }, "required": [ @@ -968,7 +990,8 @@ "fieldName", "field" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Add a new field to an existing object" }, { "type": "object", @@ -997,7 +1020,8 @@ "fieldName", "changes" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Modify properties of an existing field" }, { "type": "object", @@ -1020,7 +1044,8 @@ "objectName", "fieldName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Remove a field from an existing object" }, { "type": "object", @@ -1705,8 +1730,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -1793,7 +1818,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -1805,7 +1831,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -1813,11 +1840,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -1940,10 +1969,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -4741,6 +4782,11 @@ "full" ], "description": "Default sharing model" + }, + "keyPrefix": { + "type": "string", + "maxLength": 5, + "description": "Short prefix for record IDs (e.g., \"001\" for Account)" } }, "required": [ @@ -4755,7 +4801,8 @@ "type", "object" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Create a new object" }, { "type": "object", @@ -4778,7 +4825,8 @@ "oldName", "newName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Rename an existing object" }, { "type": "object", @@ -4796,7 +4844,8 @@ "type", "objectName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Delete an existing object" }, { "type": "object", @@ -4818,10 +4867,12 @@ "type", "sql" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Execute a raw SQL statement" } ] - } + }, + "description": "Ordered list of atomic migration operations" }, "rollback": { "type": "array", @@ -5461,8 +5512,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -5549,7 +5600,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -5561,7 +5613,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -5569,11 +5622,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -5696,10 +5751,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -5715,7 +5782,8 @@ "required": [ "type" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Full field definition to add" } }, "required": [ @@ -5724,7 +5792,8 @@ "fieldName", "field" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Add a new field to an existing object" }, { "type": "object", @@ -5753,7 +5822,8 @@ "fieldName", "changes" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Modify properties of an existing field" }, { "type": "object", @@ -5776,7 +5846,8 @@ "objectName", "fieldName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Remove a field from an existing object" }, { "type": "object", @@ -6461,8 +6532,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -6549,7 +6620,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -6561,7 +6633,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -6569,11 +6642,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -6696,10 +6771,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -9497,6 +9584,11 @@ "full" ], "description": "Default sharing model" + }, + "keyPrefix": { + "type": "string", + "maxLength": 5, + "description": "Short prefix for record IDs (e.g., \"001\" for Account)" } }, "required": [ @@ -9511,7 +9603,8 @@ "type", "object" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Create a new object" }, { "type": "object", @@ -9534,7 +9627,8 @@ "oldName", "newName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Rename an existing object" }, { "type": "object", @@ -9552,7 +9646,8 @@ "type", "objectName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Delete an existing object" }, { "type": "object", @@ -9574,10 +9669,12 @@ "type", "sql" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Execute a raw SQL statement" } ] - } + }, + "description": "Operations to reverse this migration" } }, "required": [ @@ -9585,7 +9682,8 @@ "name", "operations" ], - "additionalProperties": false + "additionalProperties": false, + "description": "A versioned set of atomic schema migration operations" } }, "required": [ diff --git a/packages/spec/json-schema/api/GetUiViewResponse.json b/packages/spec/json-schema/api/GetUiViewResponse.json index 1461fde83..7c7803e15 100644 --- a/packages/spec/json-schema/api/GetUiViewResponse.json +++ b/packages/spec/json-schema/api/GetUiViewResponse.json @@ -452,6 +452,66 @@ ], "additionalProperties": false }, + "rowActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actions available for individual row items" + }, + "bulkActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actions available when multiple rows are selected" + }, + "virtualScroll": { + "type": "boolean", + "description": "Enable virtual scrolling for large datasets" + }, + "conditionalFormatting": { + "type": "array", + "items": { + "type": "object", + "properties": { + "condition": { + "type": "string", + "description": "Condition expression to evaluate" + }, + "style": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "CSS styles to apply when condition is true" + } + }, + "required": [ + "condition", + "style" + ], + "additionalProperties": false + }, + "description": "Conditional formatting rules for list rows" + }, + "inlineEdit": { + "type": "boolean", + "description": "Allow inline editing of records directly in the list view" + }, + "exportOptions": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "csv", + "xlsx", + "pdf", + "json" + ] + }, + "description": "Available export format options" + }, "emptyState": { "type": "object", "properties": { @@ -1275,6 +1335,66 @@ ], "additionalProperties": false }, + "rowActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actions available for individual row items" + }, + "bulkActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actions available when multiple rows are selected" + }, + "virtualScroll": { + "type": "boolean", + "description": "Enable virtual scrolling for large datasets" + }, + "conditionalFormatting": { + "type": "array", + "items": { + "type": "object", + "properties": { + "condition": { + "type": "string", + "description": "Condition expression to evaluate" + }, + "style": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "CSS styles to apply when condition is true" + } + }, + "required": [ + "condition", + "style" + ], + "additionalProperties": false + }, + "description": "Conditional formatting rules for list rows" + }, + "inlineEdit": { + "type": "boolean", + "description": "Allow inline editing of records directly in the list view" + }, + "exportOptions": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "csv", + "xlsx", + "pdf", + "json" + ] + }, + "description": "Available export format options" + }, "emptyState": { "type": "object", "properties": { diff --git a/packages/spec/json-schema/api/ObjectDefinitionResponse.json b/packages/spec/json-schema/api/ObjectDefinitionResponse.json index 9d4a5a741..84f38158d 100644 --- a/packages/spec/json-schema/api/ObjectDefinitionResponse.json +++ b/packages/spec/json-schema/api/ObjectDefinitionResponse.json @@ -736,8 +736,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -824,7 +824,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -836,7 +837,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -844,11 +846,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -971,10 +975,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -3772,6 +3788,11 @@ "full" ], "description": "Default sharing model" + }, + "keyPrefix": { + "type": "string", + "maxLength": 5, + "description": "Short prefix for record IDs (e.g., \"001\" for Account)" } }, "required": [ diff --git a/packages/spec/json-schema/api/ObjectStackProtocol.json b/packages/spec/json-schema/api/ObjectStackProtocol.json index 5cd8a0045..92fb910a5 100644 --- a/packages/spec/json-schema/api/ObjectStackProtocol.json +++ b/packages/spec/json-schema/api/ObjectStackProtocol.json @@ -3,92 +3,7 @@ "definitions": { "ObjectStackProtocol": { "type": "object", - "properties": { - "getDiscovery": { - "description": "Get API discovery information" - }, - "getMetaTypes": { - "description": "Get available metadata types" - }, - "getMetaItems": { - "description": "Get all items of a metadata type" - }, - "getMetaItem": { - "description": "Get a specific metadata item" - }, - "saveMetaItem": { - "description": "Save metadata item" - }, - "getMetaItemCached": { - "description": "Get a metadata item with cache validation" - }, - "getUiView": { - "description": "Get UI view definition" - }, - "analyticsQuery": { - "description": "Execute analytics query" - }, - "getAnalyticsMeta": { - "description": "Get analytics metadata (cubes)" - }, - "triggerAutomation": { - "description": "Trigger an automation flow or script" - }, - "listSpaces": { - "description": "List Hub Spaces" - }, - "createSpace": { - "description": "Create Hub Space" - }, - "installPlugin": { - "description": "Install Plugin into Space" - }, - "listPackages": { - "description": "List installed packages with optional filters" - }, - "getPackage": { - "description": "Get a specific installed package by ID" - }, - "installPackage": { - "description": "Install a new package from manifest" - }, - "uninstallPackage": { - "description": "Uninstall a package by ID" - }, - "enablePackage": { - "description": "Enable a disabled package" - }, - "disablePackage": { - "description": "Disable an installed package" - }, - "findData": { - "description": "Find data records" - }, - "getData": { - "description": "Get single data record" - }, - "createData": { - "description": "Create a data record" - }, - "updateData": { - "description": "Update a data record" - }, - "deleteData": { - "description": "Delete a data record" - }, - "batchData": { - "description": "Perform batch operations" - }, - "createManyData": { - "description": "Create multiple records" - }, - "updateManyData": { - "description": "Update multiple records" - }, - "deleteManyData": { - "description": "Delete multiple records" - } - }, + "properties": {}, "additionalProperties": false } }, diff --git a/packages/spec/json-schema/api/RealtimePresence.json b/packages/spec/json-schema/api/RealtimePresence.json index 73105106c..ccd148738 100644 --- a/packages/spec/json-schema/api/RealtimePresence.json +++ b/packages/spec/json-schema/api/RealtimePresence.json @@ -13,6 +13,7 @@ "enum": [ "online", "away", + "busy", "offline" ], "description": "Current presence status" diff --git a/packages/spec/json-schema/api/RealtimePresenceStatus.json b/packages/spec/json-schema/api/RealtimePresenceStatus.json index 559a579b9..2234ce066 100644 --- a/packages/spec/json-schema/api/RealtimePresenceStatus.json +++ b/packages/spec/json-schema/api/RealtimePresenceStatus.json @@ -6,6 +6,7 @@ "enum": [ "online", "away", + "busy", "offline" ] } diff --git a/packages/spec/json-schema/data/Datasource.json b/packages/spec/json-schema/data/Datasource.json index 2761a8a44..131141264 100644 --- a/packages/spec/json-schema/data/Datasource.json +++ b/packages/spec/json-schema/data/Datasource.json @@ -108,6 +108,55 @@ "additionalProperties": false, "description": "Capability overrides" }, + "healthCheck": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "Enable health check endpoint" + }, + "intervalMs": { + "type": "number", + "default": 30000, + "description": "Health check interval in milliseconds" + }, + "timeoutMs": { + "type": "number", + "default": 5000, + "description": "Health check timeout in milliseconds" + } + }, + "additionalProperties": false, + "description": "Datasource health check configuration" + }, + "retryPolicy": { + "type": "object", + "properties": { + "maxRetries": { + "type": "number", + "default": 3, + "description": "Maximum number of retry attempts" + }, + "baseDelayMs": { + "type": "number", + "default": 1000, + "description": "Base delay between retries in milliseconds" + }, + "maxDelayMs": { + "type": "number", + "default": 30000, + "description": "Maximum delay between retries in milliseconds" + }, + "backoffMultiplier": { + "type": "number", + "default": 2, + "description": "Exponential backoff multiplier" + } + }, + "additionalProperties": false, + "description": "Connection retry policy for transient failures" + }, "description": { "type": "string", "description": "Internal description" diff --git a/packages/spec/json-schema/data/Field.json b/packages/spec/json-schema/data/Field.json index cd7648da2..0fcfcb15f 100644 --- a/packages/spec/json-schema/data/Field.json +++ b/packages/spec/json-schema/data/Field.json @@ -620,8 +620,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -708,7 +708,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -720,7 +721,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -728,11 +730,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -855,10 +859,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", diff --git a/packages/spec/json-schema/data/Hook.json b/packages/spec/json-schema/data/Hook.json index 53bc7effb..7eb26b774 100644 --- a/packages/spec/json-schema/data/Hook.json +++ b/packages/spec/json-schema/data/Hook.json @@ -72,6 +72,31 @@ "default": false, "description": "Run specifically as fire-and-forget" }, + "description": { + "type": "string", + "description": "Human-readable description of what this hook does" + }, + "retryPolicy": { + "type": "object", + "properties": { + "maxRetries": { + "type": "number", + "default": 3, + "description": "Maximum retry attempts on failure" + }, + "backoffMs": { + "type": "number", + "default": 1000, + "description": "Backoff delay between retries in milliseconds" + } + }, + "additionalProperties": false, + "description": "Retry policy for failed hook executions" + }, + "timeout": { + "type": "number", + "description": "Maximum execution time in milliseconds before the hook is aborted" + }, "onError": { "type": "string", "enum": [ diff --git a/packages/spec/json-schema/data/Object.json b/packages/spec/json-schema/data/Object.json index 158ee68bd..9209c7571 100644 --- a/packages/spec/json-schema/data/Object.json +++ b/packages/spec/json-schema/data/Object.json @@ -677,8 +677,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -765,7 +765,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -777,7 +778,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -785,11 +787,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -912,10 +916,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -3713,6 +3729,11 @@ "full" ], "description": "Default sharing model" + }, + "keyPrefix": { + "type": "string", + "maxLength": 5, + "description": "Short prefix for record IDs (e.g., \"001\" for Account)" } }, "required": [ diff --git a/packages/spec/json-schema/data/ObjectExtension.json b/packages/spec/json-schema/data/ObjectExtension.json index 880b3f27e..36f5388bb 100644 --- a/packages/spec/json-schema/data/ObjectExtension.json +++ b/packages/spec/json-schema/data/ObjectExtension.json @@ -629,8 +629,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -717,7 +717,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -729,7 +730,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -737,11 +739,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -864,10 +868,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", diff --git a/packages/spec/json-schema/kernel/OpsDomainModule.json b/packages/spec/json-schema/kernel/OpsDomainModule.json index b668066a5..71d251085 100644 --- a/packages/spec/json-schema/kernel/OpsDomainModule.json +++ b/packages/spec/json-schema/kernel/OpsDomainModule.json @@ -21,7 +21,8 @@ "name", "files" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Scanned domain module representing a plugin folder" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/kernel/OpsFilePath.json b/packages/spec/json-schema/kernel/OpsFilePath.json index e04790c55..ba0456907 100644 --- a/packages/spec/json-schema/kernel/OpsFilePath.json +++ b/packages/spec/json-schema/kernel/OpsFilePath.json @@ -2,7 +2,8 @@ "$ref": "#/definitions/OpsFilePath", "definitions": { "OpsFilePath": { - "type": "string" + "type": "string", + "description": "Validates a file path against OPS naming conventions" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/kernel/OpsPluginStructure.json b/packages/spec/json-schema/kernel/OpsPluginStructure.json index 3eb33aabd..1c62d8060 100644 --- a/packages/spec/json-schema/kernel/OpsPluginStructure.json +++ b/packages/spec/json-schema/kernel/OpsPluginStructure.json @@ -20,7 +20,8 @@ "root", "files" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Full plugin project layout validated against OPS conventions" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/kernel/Plugin.json b/packages/spec/json-schema/kernel/Plugin.json index fe1cd2834..b4bcd4d20 100644 --- a/packages/spec/json-schema/kernel/Plugin.json +++ b/packages/spec/json-schema/kernel/Plugin.json @@ -4,11 +4,6 @@ "Plugin": { "type": "object", "properties": { - "onInstall": {}, - "onEnable": {}, - "onDisable": {}, - "onUninstall": {}, - "onUpgrade": {}, "id": { "type": "string", "minLength": 1, diff --git a/packages/spec/json-schema/kernel/PluginContext.json b/packages/spec/json-schema/kernel/PluginContext.json index c265f2ef5..c4a6c6084 100644 --- a/packages/spec/json-schema/kernel/PluginContext.json +++ b/packages/spec/json-schema/kernel/PluginContext.json @@ -6,49 +6,31 @@ "properties": { "ql": { "type": "object", - "properties": { - "object": {}, - "query": {} - }, + "properties": {}, "additionalProperties": true, "description": "ObjectQL Engine Interface" }, "os": { "type": "object", - "properties": { - "getCurrentUser": {}, - "getConfig": {} - }, + "properties": {}, "additionalProperties": true, "description": "ObjectStack Kernel Interface" }, "logger": { "type": "object", - "properties": { - "debug": {}, - "info": {}, - "warn": {}, - "error": {} - }, + "properties": {}, "additionalProperties": true, "description": "Logger Interface" }, "storage": { "type": "object", - "properties": { - "get": {}, - "set": {}, - "delete": {} - }, + "properties": {}, "additionalProperties": true, "description": "Storage Interface" }, "i18n": { "type": "object", - "properties": { - "t": {}, - "getLocale": {} - }, + "properties": {}, "additionalProperties": true, "description": "Internationalization Interface" }, @@ -65,11 +47,7 @@ "properties": { "router": { "type": "object", - "properties": { - "get": {}, - "post": {}, - "use": {} - }, + "properties": {}, "additionalProperties": true } }, @@ -81,9 +59,7 @@ }, "drivers": { "type": "object", - "properties": { - "register": {} - }, + "properties": {}, "additionalProperties": true, "description": "Driver Registry" } diff --git a/packages/spec/json-schema/kernel/PluginLifecycle.json b/packages/spec/json-schema/kernel/PluginLifecycle.json index 6cd1c4aaf..4f50e0abf 100644 --- a/packages/spec/json-schema/kernel/PluginLifecycle.json +++ b/packages/spec/json-schema/kernel/PluginLifecycle.json @@ -3,13 +3,7 @@ "definitions": { "PluginLifecycle": { "type": "object", - "properties": { - "onInstall": {}, - "onEnable": {}, - "onDisable": {}, - "onUninstall": {}, - "onUpgrade": {} - }, + "properties": {}, "additionalProperties": false } }, diff --git a/packages/spec/json-schema/system/AddFieldOperation.json b/packages/spec/json-schema/system/AddFieldOperation.json index 497a8e235..2dd986219 100644 --- a/packages/spec/json-schema/system/AddFieldOperation.json +++ b/packages/spec/json-schema/system/AddFieldOperation.json @@ -635,8 +635,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -723,7 +723,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -735,7 +736,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -743,11 +745,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -870,10 +874,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -889,7 +905,8 @@ "required": [ "type" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Full field definition to add" } }, "required": [ @@ -898,7 +915,8 @@ "fieldName", "field" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Add a new field to an existing object" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/AnalyzerConfig.json b/packages/spec/json-schema/system/AnalyzerConfig.json index b3f8a8711..7abe38db0 100644 --- a/packages/spec/json-schema/system/AnalyzerConfig.json +++ b/packages/spec/json-schema/system/AnalyzerConfig.json @@ -13,28 +13,33 @@ "keyword", "pattern", "language" - ] + ], + "description": "Text analyzer type" }, "language": { - "type": "string" + "type": "string", + "description": "Language for language-specific analysis" }, "stopwords": { "type": "array", "items": { "type": "string" - } + }, + "description": "Custom stopwords to filter during analysis" }, "customFilters": { "type": "array", "items": { "type": "string" - } + }, + "description": "Additional token filter names to apply" } }, "required": [ "type" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Text analyzer configuration for index tokenization and normalization" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/AuditLogConfig.json b/packages/spec/json-schema/system/AuditLogConfig.json index ddc32c594..1328396b9 100644 --- a/packages/spec/json-schema/system/AuditLogConfig.json +++ b/packages/spec/json-schema/system/AuditLogConfig.json @@ -6,19 +6,23 @@ "properties": { "enabled": { "type": "boolean", - "default": true + "default": true, + "description": "Enable audit logging" }, "retentionDays": { "type": "number", - "default": 365 + "default": 365, + "description": "Number of days to retain audit logs" }, "immutable": { "type": "boolean", - "default": true + "default": true, + "description": "Prevent modification or deletion of audit logs" }, "signLogs": { "type": "boolean", - "default": false + "default": false, + "description": "Cryptographically sign log entries for tamper detection" }, "events": { "type": "array", @@ -35,13 +39,15 @@ "logout", "failed-login" ] - } + }, + "description": "Event types to capture in the audit log" } }, "required": [ "events" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Audit log configuration for compliance and security monitoring" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/CacheConfig.json b/packages/spec/json-schema/system/CacheConfig.json index 11be9d402..8cdabbbd5 100644 --- a/packages/spec/json-schema/system/CacheConfig.json +++ b/packages/spec/json-schema/system/CacheConfig.json @@ -46,8 +46,8 @@ "ttl", "adaptive" ], - "default": "lru", - "description": "Eviction strategy" + "description": "Eviction strategy", + "default": "lru" }, "warmup": { "type": "boolean", @@ -59,7 +59,8 @@ "name", "type" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Configuration for a single cache tier in the hierarchy" }, "description": "Ordered cache tier hierarchy" }, @@ -104,7 +105,8 @@ "trigger", "scope" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Rule defining when and how cached entries are invalidated" }, "description": "Cache invalidation rules" }, @@ -128,7 +130,8 @@ "tiers", "invalidation" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Top-level application cache configuration" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/CacheInvalidation.json b/packages/spec/json-schema/system/CacheInvalidation.json index 93ec9d322..65b8a42aa 100644 --- a/packages/spec/json-schema/system/CacheInvalidation.json +++ b/packages/spec/json-schema/system/CacheInvalidation.json @@ -40,7 +40,8 @@ "trigger", "scope" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Rule defining when and how cached entries are invalidated" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/CacheStrategy.json b/packages/spec/json-schema/system/CacheStrategy.json index 3a623152d..52b09255e 100644 --- a/packages/spec/json-schema/system/CacheStrategy.json +++ b/packages/spec/json-schema/system/CacheStrategy.json @@ -9,7 +9,8 @@ "fifo", "ttl", "adaptive" - ] + ], + "description": "Cache eviction strategy" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/CacheTier.json b/packages/spec/json-schema/system/CacheTier.json index 69b07d606..7aca1215b 100644 --- a/packages/spec/json-schema/system/CacheTier.json +++ b/packages/spec/json-schema/system/CacheTier.json @@ -36,8 +36,8 @@ "ttl", "adaptive" ], - "default": "lru", - "description": "Eviction strategy" + "description": "Eviction strategy", + "default": "lru" }, "warmup": { "type": "boolean", @@ -49,7 +49,8 @@ "name", "type" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Configuration for a single cache tier in the hierarchy" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/ChangeSet.json b/packages/spec/json-schema/system/ChangeSet.json index 0a5107103..b573fdf63 100644 --- a/packages/spec/json-schema/system/ChangeSet.json +++ b/packages/spec/json-schema/system/ChangeSet.json @@ -14,14 +14,17 @@ "description": "Human readable name for the migration" }, "description": { - "type": "string" + "type": "string", + "description": "Detailed description of what this migration does" }, "author": { - "type": "string" + "type": "string", + "description": "Author who created this migration" }, "createdAt": { "type": "string", - "format": "date-time" + "format": "date-time", + "description": "ISO 8601 timestamp when the migration was created" }, "dependencies": { "type": "array", @@ -40,8 +43,10 @@ "required": [ "migrationId" ], - "additionalProperties": false - } + "additionalProperties": false, + "description": "Dependency reference to another migration that must run first" + }, + "description": "Migrations that must run before this one" }, "operations": { "type": "array", @@ -681,8 +686,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -769,7 +774,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -781,7 +787,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -789,11 +796,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -916,10 +925,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -935,7 +956,8 @@ "required": [ "type" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Full field definition to add" } }, "required": [ @@ -944,7 +966,8 @@ "fieldName", "field" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Add a new field to an existing object" }, { "type": "object", @@ -973,7 +996,8 @@ "fieldName", "changes" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Modify properties of an existing field" }, { "type": "object", @@ -996,7 +1020,8 @@ "objectName", "fieldName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Remove a field from an existing object" }, { "type": "object", @@ -1681,8 +1706,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -1769,7 +1794,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -1781,7 +1807,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -1789,11 +1816,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -1916,10 +1945,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -4717,6 +4758,11 @@ "full" ], "description": "Default sharing model" + }, + "keyPrefix": { + "type": "string", + "maxLength": 5, + "description": "Short prefix for record IDs (e.g., \"001\" for Account)" } }, "required": [ @@ -4731,7 +4777,8 @@ "type", "object" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Create a new object" }, { "type": "object", @@ -4754,7 +4801,8 @@ "oldName", "newName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Rename an existing object" }, { "type": "object", @@ -4772,7 +4820,8 @@ "type", "objectName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Delete an existing object" }, { "type": "object", @@ -4794,10 +4843,12 @@ "type", "sql" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Execute a raw SQL statement" } ] - } + }, + "description": "Ordered list of atomic migration operations" }, "rollback": { "type": "array", @@ -5437,8 +5488,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -5525,7 +5576,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -5537,7 +5589,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -5545,11 +5598,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -5672,10 +5727,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -5691,7 +5758,8 @@ "required": [ "type" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Full field definition to add" } }, "required": [ @@ -5700,7 +5768,8 @@ "fieldName", "field" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Add a new field to an existing object" }, { "type": "object", @@ -5729,7 +5798,8 @@ "fieldName", "changes" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Modify properties of an existing field" }, { "type": "object", @@ -5752,7 +5822,8 @@ "objectName", "fieldName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Remove a field from an existing object" }, { "type": "object", @@ -6437,8 +6508,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -6525,7 +6596,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -6537,7 +6609,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -6545,11 +6618,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -6672,10 +6747,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -9473,6 +9560,11 @@ "full" ], "description": "Default sharing model" + }, + "keyPrefix": { + "type": "string", + "maxLength": 5, + "description": "Short prefix for record IDs (e.g., \"001\" for Account)" } }, "required": [ @@ -9487,7 +9579,8 @@ "type", "object" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Create a new object" }, { "type": "object", @@ -9510,7 +9603,8 @@ "oldName", "newName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Rename an existing object" }, { "type": "object", @@ -9528,7 +9622,8 @@ "type", "objectName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Delete an existing object" }, { "type": "object", @@ -9550,10 +9645,12 @@ "type", "sql" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Execute a raw SQL statement" } ] - } + }, + "description": "Operations to reverse this migration" } }, "required": [ @@ -9561,7 +9658,8 @@ "name", "operations" ], - "additionalProperties": false + "additionalProperties": false, + "description": "A versioned set of atomic schema migration operations" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/ComplianceConfig.json b/packages/spec/json-schema/system/ComplianceConfig.json index 07babd764..0c3a21b75 100644 --- a/packages/spec/json-schema/system/ComplianceConfig.json +++ b/packages/spec/json-schema/system/ComplianceConfig.json @@ -8,37 +8,45 @@ "type": "object", "properties": { "enabled": { - "type": "boolean" + "type": "boolean", + "description": "Enable GDPR compliance controls" }, "dataSubjectRights": { "type": "object", "properties": { "rightToAccess": { "type": "boolean", - "default": true + "default": true, + "description": "Allow data subjects to access their data" }, "rightToRectification": { "type": "boolean", - "default": true + "default": true, + "description": "Allow data subjects to correct their data" }, "rightToErasure": { "type": "boolean", - "default": true + "default": true, + "description": "Allow data subjects to request deletion" }, "rightToRestriction": { "type": "boolean", - "default": true + "default": true, + "description": "Allow data subjects to restrict processing" }, "rightToPortability": { "type": "boolean", - "default": true + "default": true, + "description": "Allow data subjects to export their data" }, "rightToObjection": { "type": "boolean", - "default": true + "default": true, + "description": "Allow data subjects to object to processing" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "Data subject rights configuration per GDPR Articles 15-21" }, "legalBasis": { "type": "string", @@ -49,17 +57,21 @@ "vital-interests", "public-task", "legitimate-interests" - ] + ], + "description": "Legal basis for data processing under GDPR Article 6" }, "consentTracking": { "type": "boolean", - "default": true + "default": true, + "description": "Track and record user consent" }, "dataRetentionDays": { - "type": "number" + "type": "number", + "description": "Maximum data retention period in days" }, "dataProcessingAgreement": { - "type": "string" + "type": "string", + "description": "URL or reference to the data processing agreement" } }, "required": [ @@ -67,52 +79,62 @@ "dataSubjectRights", "legalBasis" ], - "additionalProperties": false + "additionalProperties": false, + "description": "GDPR compliance settings" }, "hipaa": { "type": "object", "properties": { "enabled": { - "type": "boolean" + "type": "boolean", + "description": "Enable HIPAA compliance controls" }, "phi": { "type": "object", "properties": { "encryption": { "type": "boolean", - "default": true + "default": true, + "description": "Encrypt Protected Health Information at rest" }, "accessControl": { "type": "boolean", - "default": true + "default": true, + "description": "Enforce role-based access to PHI" }, "auditTrail": { "type": "boolean", - "default": true + "default": true, + "description": "Log all PHI access events" }, "backupAndRecovery": { "type": "boolean", - "default": true + "default": true, + "description": "Enable PHI backup and disaster recovery" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "Protected Health Information safeguards" }, "businessAssociateAgreement": { "type": "boolean", - "default": false + "default": false, + "description": "BAA is in place with third-party processors" } }, "required": [ "enabled", "phi" ], - "additionalProperties": false + "additionalProperties": false, + "description": "HIPAA compliance settings" }, "pciDss": { "type": "object", "properties": { "enabled": { - "type": "boolean" + "type": "boolean", + "description": "Enable PCI-DSS compliance controls" }, "level": { "type": "string", @@ -121,25 +143,30 @@ "2", "3", "4" - ] + ], + "description": "PCI-DSS compliance level (1 = highest)" }, "cardDataFields": { "type": "array", "items": { "type": "string" - } + }, + "description": "Field names containing cardholder data" }, "tokenization": { "type": "boolean", - "default": true + "default": true, + "description": "Replace card data with secure tokens" }, "encryptionInTransit": { "type": "boolean", - "default": true + "default": true, + "description": "Encrypt cardholder data during transmission" }, "encryptionAtRest": { "type": "boolean", - "default": true + "default": true, + "description": "Encrypt stored cardholder data" } }, "required": [ @@ -147,26 +174,31 @@ "level", "cardDataFields" ], - "additionalProperties": false + "additionalProperties": false, + "description": "PCI-DSS compliance settings" }, "auditLog": { "type": "object", "properties": { "enabled": { "type": "boolean", - "default": true + "default": true, + "description": "Enable audit logging" }, "retentionDays": { "type": "number", - "default": 365 + "default": 365, + "description": "Number of days to retain audit logs" }, "immutable": { "type": "boolean", - "default": true + "default": true, + "description": "Prevent modification or deletion of audit logs" }, "signLogs": { "type": "boolean", - "default": false + "default": false, + "description": "Cryptographically sign log entries for tamper detection" }, "events": { "type": "array", @@ -183,19 +215,22 @@ "logout", "failed-login" ] - } + }, + "description": "Event types to capture in the audit log" } }, "required": [ "events" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Audit log configuration" } }, "required": [ "auditLog" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Unified compliance configuration spanning GDPR, HIPAA, and PCI-DSS" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/ConsumerConfig.json b/packages/spec/json-schema/system/ConsumerConfig.json index 1877ea164..fe67532cc 100644 --- a/packages/spec/json-schema/system/ConsumerConfig.json +++ b/packages/spec/json-schema/system/ConsumerConfig.json @@ -5,7 +5,8 @@ "type": "object", "properties": { "groupId": { - "type": "string" + "type": "string", + "description": "Consumer group identifier" }, "autoOffsetReset": { "type": "string", @@ -13,21 +14,25 @@ "earliest", "latest" ], - "default": "latest" + "default": "latest", + "description": "Where to start reading when no offset exists" }, "enableAutoCommit": { "type": "boolean", - "default": true + "default": true, + "description": "Automatically commit consumed offsets" }, "maxPollRecords": { "type": "number", - "default": 500 + "default": 500, + "description": "Maximum records returned per poll" } }, "required": [ "groupId" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Consumer group configuration for topic consumption" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/CreateObjectOperation.json b/packages/spec/json-schema/system/CreateObjectOperation.json index 033a6f149..a9b9251a1 100644 --- a/packages/spec/json-schema/system/CreateObjectOperation.json +++ b/packages/spec/json-schema/system/CreateObjectOperation.json @@ -684,8 +684,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -772,7 +772,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -784,7 +785,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -792,11 +794,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -919,10 +923,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -3720,6 +3736,11 @@ "full" ], "description": "Default sharing model" + }, + "keyPrefix": { + "type": "string", + "maxLength": 5, + "description": "Short prefix for record IDs (e.g., \"001\" for Account)" } }, "required": [ @@ -3734,7 +3755,8 @@ "type", "object" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Create a new object" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/DeadLetterQueue.json b/packages/spec/json-schema/system/DeadLetterQueue.json index 62c12bb96..9f267d1f9 100644 --- a/packages/spec/json-schema/system/DeadLetterQueue.json +++ b/packages/spec/json-schema/system/DeadLetterQueue.json @@ -6,20 +6,24 @@ "properties": { "enabled": { "type": "boolean", - "default": false + "default": false, + "description": "Enable dead letter queue for failed messages" }, "maxRetries": { "type": "number", - "default": 3 + "default": 3, + "description": "Maximum delivery attempts before sending to DLQ" }, "queueName": { - "type": "string" + "type": "string", + "description": "Name of the dead letter queue" } }, "required": [ "queueName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Dead letter queue configuration for unprocessable messages" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/DeleteObjectOperation.json b/packages/spec/json-schema/system/DeleteObjectOperation.json index 3955df5e6..79cddc83f 100644 --- a/packages/spec/json-schema/system/DeleteObjectOperation.json +++ b/packages/spec/json-schema/system/DeleteObjectOperation.json @@ -17,7 +17,8 @@ "type", "objectName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Delete an existing object" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/EncryptionAlgorithm.json b/packages/spec/json-schema/system/EncryptionAlgorithm.json index 7aeafe302..acf5ecdee 100644 --- a/packages/spec/json-schema/system/EncryptionAlgorithm.json +++ b/packages/spec/json-schema/system/EncryptionAlgorithm.json @@ -7,7 +7,8 @@ "aes-256-gcm", "aes-256-cbc", "chacha20-poly1305" - ] + ], + "description": "Supported encryption algorithm" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/EncryptionConfig.json b/packages/spec/json-schema/system/EncryptionConfig.json index fc6de84dc..bd0d3d989 100644 --- a/packages/spec/json-schema/system/EncryptionConfig.json +++ b/packages/spec/json-schema/system/EncryptionConfig.json @@ -16,8 +16,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -97,7 +97,8 @@ "keyManagement", "scope" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Field-level encryption configuration" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/ExecuteSqlOperation.json b/packages/spec/json-schema/system/ExecuteSqlOperation.json index a7e73d7f3..bfcccc8f6 100644 --- a/packages/spec/json-schema/system/ExecuteSqlOperation.json +++ b/packages/spec/json-schema/system/ExecuteSqlOperation.json @@ -21,7 +21,8 @@ "type", "sql" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Execute a raw SQL statement" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/FacetConfig.json b/packages/spec/json-schema/system/FacetConfig.json index ddab61804..199153b96 100644 --- a/packages/spec/json-schema/system/FacetConfig.json +++ b/packages/spec/json-schema/system/FacetConfig.json @@ -5,11 +5,13 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to generate facets from" }, "maxValues": { "type": "number", - "default": 10 + "default": 10, + "description": "Maximum number of facet values to return" }, "sort": { "type": "string", @@ -17,13 +19,15 @@ "count", "alpha" ], - "default": "count" + "default": "count", + "description": "Facet value sort order" } }, "required": [ "field" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Faceted search configuration for a single field" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/FieldEncryption.json b/packages/spec/json-schema/system/FieldEncryption.json index 242a29cc5..d38114fd6 100644 --- a/packages/spec/json-schema/system/FieldEncryption.json +++ b/packages/spec/json-schema/system/FieldEncryption.json @@ -23,8 +23,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -117,7 +117,8 @@ "fieldName", "encryptionConfig" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Per-field encryption assignment" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/GDPRConfig.json b/packages/spec/json-schema/system/GDPRConfig.json index 812481c91..afe7f106b 100644 --- a/packages/spec/json-schema/system/GDPRConfig.json +++ b/packages/spec/json-schema/system/GDPRConfig.json @@ -5,37 +5,45 @@ "type": "object", "properties": { "enabled": { - "type": "boolean" + "type": "boolean", + "description": "Enable GDPR compliance controls" }, "dataSubjectRights": { "type": "object", "properties": { "rightToAccess": { "type": "boolean", - "default": true + "default": true, + "description": "Allow data subjects to access their data" }, "rightToRectification": { "type": "boolean", - "default": true + "default": true, + "description": "Allow data subjects to correct their data" }, "rightToErasure": { "type": "boolean", - "default": true + "default": true, + "description": "Allow data subjects to request deletion" }, "rightToRestriction": { "type": "boolean", - "default": true + "default": true, + "description": "Allow data subjects to restrict processing" }, "rightToPortability": { "type": "boolean", - "default": true + "default": true, + "description": "Allow data subjects to export their data" }, "rightToObjection": { "type": "boolean", - "default": true + "default": true, + "description": "Allow data subjects to object to processing" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "Data subject rights configuration per GDPR Articles 15-21" }, "legalBasis": { "type": "string", @@ -46,17 +54,21 @@ "vital-interests", "public-task", "legitimate-interests" - ] + ], + "description": "Legal basis for data processing under GDPR Article 6" }, "consentTracking": { "type": "boolean", - "default": true + "default": true, + "description": "Track and record user consent" }, "dataRetentionDays": { - "type": "number" + "type": "number", + "description": "Maximum data retention period in days" }, "dataProcessingAgreement": { - "type": "string" + "type": "string", + "description": "URL or reference to the data processing agreement" } }, "required": [ @@ -64,7 +76,8 @@ "dataSubjectRights", "legalBasis" ], - "additionalProperties": false + "additionalProperties": false, + "description": "GDPR (General Data Protection Regulation) compliance configuration" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/HIPAAConfig.json b/packages/spec/json-schema/system/HIPAAConfig.json index 8163ac232..dc72320dc 100644 --- a/packages/spec/json-schema/system/HIPAAConfig.json +++ b/packages/spec/json-schema/system/HIPAAConfig.json @@ -5,40 +5,48 @@ "type": "object", "properties": { "enabled": { - "type": "boolean" + "type": "boolean", + "description": "Enable HIPAA compliance controls" }, "phi": { "type": "object", "properties": { "encryption": { "type": "boolean", - "default": true + "default": true, + "description": "Encrypt Protected Health Information at rest" }, "accessControl": { "type": "boolean", - "default": true + "default": true, + "description": "Enforce role-based access to PHI" }, "auditTrail": { "type": "boolean", - "default": true + "default": true, + "description": "Log all PHI access events" }, "backupAndRecovery": { "type": "boolean", - "default": true + "default": true, + "description": "Enable PHI backup and disaster recovery" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "Protected Health Information safeguards" }, "businessAssociateAgreement": { "type": "boolean", - "default": false + "default": false, + "description": "BAA is in place with third-party processors" } }, "required": [ "enabled", "phi" ], - "additionalProperties": false + "additionalProperties": false, + "description": "HIPAA (Health Insurance Portability and Accountability Act) compliance configuration" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/KeyManagementProvider.json b/packages/spec/json-schema/system/KeyManagementProvider.json index 0919ec628..960f4405b 100644 --- a/packages/spec/json-schema/system/KeyManagementProvider.json +++ b/packages/spec/json-schema/system/KeyManagementProvider.json @@ -9,7 +9,8 @@ "azure-key-vault", "gcp-kms", "hashicorp-vault" - ] + ], + "description": "Key management service provider" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/KeyRotationPolicy.json b/packages/spec/json-schema/system/KeyRotationPolicy.json index 551c4abcc..93dca9eab 100644 --- a/packages/spec/json-schema/system/KeyRotationPolicy.json +++ b/packages/spec/json-schema/system/KeyRotationPolicy.json @@ -26,7 +26,8 @@ "description": "Automatically rotate without manual approval" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "Policy for automatic encryption key rotation" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/MaskingConfig.json b/packages/spec/json-schema/system/MaskingConfig.json index 86e5aea70..b843b595a 100644 --- a/packages/spec/json-schema/system/MaskingConfig.json +++ b/packages/spec/json-schema/system/MaskingConfig.json @@ -6,7 +6,8 @@ "properties": { "enabled": { "type": "boolean", - "default": false + "default": false, + "description": "Enable data masking" }, "rules": { "type": "array", @@ -14,7 +15,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -26,7 +28,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -34,11 +37,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -59,18 +64,22 @@ "field", "strategy" ], - "additionalProperties": false - } + "additionalProperties": false, + "description": "Masking rule for a single field" + }, + "description": "List of field-level masking rules" }, "auditUnmasking": { "type": "boolean", - "default": true + "default": true, + "description": "Log when masked data is accessed unmasked" } }, "required": [ "rules" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Top-level data masking configuration for PII protection" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/MaskingRule.json b/packages/spec/json-schema/system/MaskingRule.json index fbbe23000..79577ffa8 100644 --- a/packages/spec/json-schema/system/MaskingRule.json +++ b/packages/spec/json-schema/system/MaskingRule.json @@ -5,7 +5,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -17,7 +18,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -25,11 +27,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -50,7 +54,8 @@ "field", "strategy" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Masking rule for a single field" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/MaskingStrategy.json b/packages/spec/json-schema/system/MaskingStrategy.json index 39af8c83e..ebf80338c 100644 --- a/packages/spec/json-schema/system/MaskingStrategy.json +++ b/packages/spec/json-schema/system/MaskingStrategy.json @@ -11,7 +11,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Data masking strategy for PII protection" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/MessageQueueConfig.json b/packages/spec/json-schema/system/MessageQueueConfig.json index 3ae576d8c..673cf94bc 100644 --- a/packages/spec/json-schema/system/MessageQueueConfig.json +++ b/packages/spec/json-schema/system/MessageQueueConfig.json @@ -13,7 +13,8 @@ "redis-pubsub", "google-pubsub", "azure-service-bus" - ] + ], + "description": "Message queue backend provider" }, "topics": { "type": "array", @@ -21,18 +22,22 @@ "type": "object", "properties": { "name": { - "type": "string" + "type": "string", + "description": "Topic name identifier" }, "partitions": { "type": "number", - "default": 1 + "default": 1, + "description": "Number of partitions for parallel consumption" }, "replicationFactor": { "type": "number", - "default": 1 + "default": 1, + "description": "Number of replicas for fault tolerance" }, "retentionMs": { - "type": "number" + "type": "number", + "description": "Message retention period in milliseconds" }, "compressionType": { "type": "string", @@ -42,14 +47,17 @@ "snappy", "lz4" ], - "default": "none" + "default": "none", + "description": "Message compression algorithm" } }, "required": [ "name" ], - "additionalProperties": false - } + "additionalProperties": false, + "description": "Configuration for a message queue topic" + }, + "description": "List of topic configurations" }, "consumers": { "type": "array", @@ -57,7 +65,8 @@ "type": "object", "properties": { "groupId": { - "type": "string" + "type": "string", + "description": "Consumer group identifier" }, "autoOffsetReset": { "type": "string", @@ -65,46 +74,56 @@ "earliest", "latest" ], - "default": "latest" + "default": "latest", + "description": "Where to start reading when no offset exists" }, "enableAutoCommit": { "type": "boolean", - "default": true + "default": true, + "description": "Automatically commit consumed offsets" }, "maxPollRecords": { "type": "number", - "default": 500 + "default": 500, + "description": "Maximum records returned per poll" } }, "required": [ "groupId" ], - "additionalProperties": false - } + "additionalProperties": false, + "description": "Consumer group configuration for topic consumption" + }, + "description": "Consumer group configurations" }, "deadLetterQueue": { "type": "object", "properties": { "enabled": { "type": "boolean", - "default": false + "default": false, + "description": "Enable dead letter queue for failed messages" }, "maxRetries": { "type": "number", - "default": 3 + "default": 3, + "description": "Maximum delivery attempts before sending to DLQ" }, "queueName": { - "type": "string" + "type": "string", + "description": "Name of the dead letter queue" } }, "required": [ "queueName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Dead letter queue for failed messages" }, "ssl": { "type": "boolean", - "default": false + "default": false, + "description": "Enable SSL/TLS for broker connections" }, "sasl": { "type": "object", @@ -115,13 +134,16 @@ "plain", "scram-sha-256", "scram-sha-512" - ] + ], + "description": "SASL authentication mechanism" }, "username": { - "type": "string" + "type": "string", + "description": "SASL username" }, "password": { - "type": "string" + "type": "string", + "description": "SASL password" } }, "required": [ @@ -129,14 +151,16 @@ "username", "password" ], - "additionalProperties": false + "additionalProperties": false, + "description": "SASL authentication configuration" } }, "required": [ "provider", "topics" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Top-level message queue configuration" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/MessageQueueProvider.json b/packages/spec/json-schema/system/MessageQueueProvider.json index 1237510a7..6088e1e55 100644 --- a/packages/spec/json-schema/system/MessageQueueProvider.json +++ b/packages/spec/json-schema/system/MessageQueueProvider.json @@ -10,7 +10,8 @@ "redis-pubsub", "google-pubsub", "azure-service-bus" - ] + ], + "description": "Supported message queue backend provider" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/MigrationDependency.json b/packages/spec/json-schema/system/MigrationDependency.json index ed8f4e47a..f14c329b1 100644 --- a/packages/spec/json-schema/system/MigrationDependency.json +++ b/packages/spec/json-schema/system/MigrationDependency.json @@ -16,7 +16,8 @@ "required": [ "migrationId" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Dependency reference to another migration that must run first" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/MigrationOperation.json b/packages/spec/json-schema/system/MigrationOperation.json index 4f5e43722..1b3140ea3 100644 --- a/packages/spec/json-schema/system/MigrationOperation.json +++ b/packages/spec/json-schema/system/MigrationOperation.json @@ -637,8 +637,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -725,7 +725,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -737,7 +738,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -745,11 +747,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -872,10 +876,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -891,7 +907,8 @@ "required": [ "type" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Full field definition to add" } }, "required": [ @@ -900,7 +917,8 @@ "fieldName", "field" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Add a new field to an existing object" }, { "type": "object", @@ -929,7 +947,8 @@ "fieldName", "changes" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Modify properties of an existing field" }, { "type": "object", @@ -952,7 +971,8 @@ "objectName", "fieldName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Remove a field from an existing object" }, { "type": "object", @@ -1637,8 +1657,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -1725,7 +1745,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -1737,7 +1758,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -1745,11 +1767,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -1872,10 +1896,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", @@ -4673,6 +4709,11 @@ "full" ], "description": "Default sharing model" + }, + "keyPrefix": { + "type": "string", + "maxLength": 5, + "description": "Short prefix for record IDs (e.g., \"001\" for Account)" } }, "required": [ @@ -4687,7 +4728,8 @@ "type", "object" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Create a new object" }, { "type": "object", @@ -4710,7 +4752,8 @@ "oldName", "newName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Rename an existing object" }, { "type": "object", @@ -4728,7 +4771,8 @@ "type", "objectName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Delete an existing object" }, { "type": "object", @@ -4750,7 +4794,8 @@ "type", "sql" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Execute a raw SQL statement" } ] } diff --git a/packages/spec/json-schema/system/ModifyFieldOperation.json b/packages/spec/json-schema/system/ModifyFieldOperation.json index d40fc888f..b75b09150 100644 --- a/packages/spec/json-schema/system/ModifyFieldOperation.json +++ b/packages/spec/json-schema/system/ModifyFieldOperation.json @@ -28,7 +28,8 @@ "fieldName", "changes" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Modify properties of an existing field" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/PCIDSSConfig.json b/packages/spec/json-schema/system/PCIDSSConfig.json index fcc61613e..47c212a03 100644 --- a/packages/spec/json-schema/system/PCIDSSConfig.json +++ b/packages/spec/json-schema/system/PCIDSSConfig.json @@ -5,7 +5,8 @@ "type": "object", "properties": { "enabled": { - "type": "boolean" + "type": "boolean", + "description": "Enable PCI-DSS compliance controls" }, "level": { "type": "string", @@ -14,25 +15,30 @@ "2", "3", "4" - ] + ], + "description": "PCI-DSS compliance level (1 = highest)" }, "cardDataFields": { "type": "array", "items": { "type": "string" - } + }, + "description": "Field names containing cardholder data" }, "tokenization": { "type": "boolean", - "default": true + "default": true, + "description": "Replace card data with secure tokens" }, "encryptionInTransit": { "type": "boolean", - "default": true + "default": true, + "description": "Encrypt cardholder data during transmission" }, "encryptionAtRest": { "type": "boolean", - "default": true + "default": true, + "description": "Encrypt stored cardholder data" } }, "required": [ @@ -40,7 +46,8 @@ "level", "cardDataFields" ], - "additionalProperties": false + "additionalProperties": false, + "description": "PCI-DSS (Payment Card Industry Data Security Standard) compliance configuration" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/RemoveFieldOperation.json b/packages/spec/json-schema/system/RemoveFieldOperation.json index 46cae4648..6108ea387 100644 --- a/packages/spec/json-schema/system/RemoveFieldOperation.json +++ b/packages/spec/json-schema/system/RemoveFieldOperation.json @@ -22,7 +22,8 @@ "objectName", "fieldName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Remove a field from an existing object" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/RenameObjectOperation.json b/packages/spec/json-schema/system/RenameObjectOperation.json index 1b65bbea7..56bc24076 100644 --- a/packages/spec/json-schema/system/RenameObjectOperation.json +++ b/packages/spec/json-schema/system/RenameObjectOperation.json @@ -22,7 +22,8 @@ "oldName", "newName" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Rename an existing object" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/SearchConfig.json b/packages/spec/json-schema/system/SearchConfig.json index dbd4c7629..43a3b4290 100644 --- a/packages/spec/json-schema/system/SearchConfig.json +++ b/packages/spec/json-schema/system/SearchConfig.json @@ -12,7 +12,8 @@ "meilisearch", "typesense", "opensearch" - ] + ], + "description": "Search engine backend provider" }, "indexes": { "type": "array", @@ -20,7 +21,8 @@ "type": "object", "properties": { "indexName": { - "type": "string" + "type": "string", + "description": "Name of the search index" }, "objectName": { "type": "string", @@ -32,7 +34,8 @@ "type": "object", "properties": { "name": { - "type": "string" + "type": "string", + "description": "Field name to index" }, "type": { "type": "string", @@ -43,26 +46,32 @@ "date", "boolean", "geo" - ] + ], + "description": "Index field data type" }, "analyzer": { - "type": "string" + "type": "string", + "description": "Named analyzer to use for this field" }, "searchable": { "type": "boolean", - "default": true + "default": true, + "description": "Include field in full-text search" }, "filterable": { "type": "boolean", - "default": false + "default": false, + "description": "Allow filtering on this field" }, "sortable": { "type": "boolean", - "default": false + "default": false, + "description": "Allow sorting by this field" }, "boost": { "type": "number", - "default": 1 + "default": 1, + "description": "Relevance boost factor for this field" } }, "required": [ @@ -70,15 +79,18 @@ "type" ], "additionalProperties": false - } + }, + "description": "Fields to include in the search index" }, "replicas": { "type": "number", - "default": 1 + "default": 1, + "description": "Number of index replicas for availability" }, "shards": { "type": "number", - "default": 1 + "default": 1, + "description": "Number of index shards for distribution" } }, "required": [ @@ -86,8 +98,10 @@ "objectName", "fields" ], - "additionalProperties": false - } + "additionalProperties": false, + "description": "Search index definition mapping an ObjectQL object to a search engine index" + }, + "description": "Search index definitions" }, "analyzers": { "type": "object", @@ -103,29 +117,35 @@ "keyword", "pattern", "language" - ] + ], + "description": "Text analyzer type" }, "language": { - "type": "string" + "type": "string", + "description": "Language for language-specific analysis" }, "stopwords": { "type": "array", "items": { "type": "string" - } + }, + "description": "Custom stopwords to filter during analysis" }, "customFilters": { "type": "array", "items": { "type": "string" - } + }, + "description": "Additional token filter names to apply" } }, "required": [ "type" ], - "additionalProperties": false - } + "additionalProperties": false, + "description": "Text analyzer configuration for index tokenization and normalization" + }, + "description": "Named text analyzer configurations" }, "facets": { "type": "array", @@ -133,11 +153,13 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to generate facets from" }, "maxValues": { "type": "number", - "default": 10 + "default": 10, + "description": "Maximum number of facet values to return" }, "sort": { "type": "string", @@ -145,18 +167,22 @@ "count", "alpha" ], - "default": "count" + "default": "count", + "description": "Facet value sort order" } }, "required": [ "field" ], - "additionalProperties": false - } + "additionalProperties": false, + "description": "Faceted search configuration for a single field" + }, + "description": "Faceted search configurations" }, "typoTolerance": { "type": "boolean", - "default": true + "default": true, + "description": "Enable typo-tolerant search" }, "synonyms": { "type": "object", @@ -165,7 +191,8 @@ "items": { "type": "string" } - } + }, + "description": "Synonym mappings for search expansion" }, "ranking": { "type": "array", @@ -181,14 +208,16 @@ "exact", "custom" ] - } + }, + "description": "Custom ranking rule order" } }, "required": [ "provider", "indexes" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Top-level full-text search engine configuration" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/SearchIndexConfig.json b/packages/spec/json-schema/system/SearchIndexConfig.json index 9ae292132..7b3ff9e72 100644 --- a/packages/spec/json-schema/system/SearchIndexConfig.json +++ b/packages/spec/json-schema/system/SearchIndexConfig.json @@ -5,7 +5,8 @@ "type": "object", "properties": { "indexName": { - "type": "string" + "type": "string", + "description": "Name of the search index" }, "objectName": { "type": "string", @@ -17,7 +18,8 @@ "type": "object", "properties": { "name": { - "type": "string" + "type": "string", + "description": "Field name to index" }, "type": { "type": "string", @@ -28,26 +30,32 @@ "date", "boolean", "geo" - ] + ], + "description": "Index field data type" }, "analyzer": { - "type": "string" + "type": "string", + "description": "Named analyzer to use for this field" }, "searchable": { "type": "boolean", - "default": true + "default": true, + "description": "Include field in full-text search" }, "filterable": { "type": "boolean", - "default": false + "default": false, + "description": "Allow filtering on this field" }, "sortable": { "type": "boolean", - "default": false + "default": false, + "description": "Allow sorting by this field" }, "boost": { "type": "number", - "default": 1 + "default": 1, + "description": "Relevance boost factor for this field" } }, "required": [ @@ -55,15 +63,18 @@ "type" ], "additionalProperties": false - } + }, + "description": "Fields to include in the search index" }, "replicas": { "type": "number", - "default": 1 + "default": 1, + "description": "Number of index replicas for availability" }, "shards": { "type": "number", - "default": 1 + "default": 1, + "description": "Number of index shards for distribution" } }, "required": [ @@ -71,7 +82,8 @@ "objectName", "fields" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Search index definition mapping an ObjectQL object to a search engine index" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/SearchProvider.json b/packages/spec/json-schema/system/SearchProvider.json index 29fdf0182..e9ec33dc8 100644 --- a/packages/spec/json-schema/system/SearchProvider.json +++ b/packages/spec/json-schema/system/SearchProvider.json @@ -9,7 +9,8 @@ "meilisearch", "typesense", "opensearch" - ] + ], + "description": "Supported full-text search engine provider" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/TopicConfig.json b/packages/spec/json-schema/system/TopicConfig.json index c3212b699..8774a2ff2 100644 --- a/packages/spec/json-schema/system/TopicConfig.json +++ b/packages/spec/json-schema/system/TopicConfig.json @@ -5,18 +5,22 @@ "type": "object", "properties": { "name": { - "type": "string" + "type": "string", + "description": "Topic name identifier" }, "partitions": { "type": "number", - "default": 1 + "default": 1, + "description": "Number of partitions for parallel consumption" }, "replicationFactor": { "type": "number", - "default": 1 + "default": 1, + "description": "Number of replicas for fault tolerance" }, "retentionMs": { - "type": "number" + "type": "number", + "description": "Message retention period in milliseconds" }, "compressionType": { "type": "string", @@ -26,13 +30,15 @@ "snappy", "lz4" ], - "default": "none" + "default": "none", + "description": "Message compression algorithm" } }, "required": [ "name" ], - "additionalProperties": false + "additionalProperties": false, + "description": "Configuration for a message queue topic" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/TranslationBundle.json b/packages/spec/json-schema/system/TranslationBundle.json index a8a1b27b4..f4ba01ed1 100644 --- a/packages/spec/json-schema/system/TranslationBundle.json +++ b/packages/spec/json-schema/system/TranslationBundle.json @@ -81,8 +81,10 @@ "description": "UI message translations keyed by message ID" } }, - "additionalProperties": false - } + "additionalProperties": false, + "description": "Translation data for objects, apps, and UI messages" + }, + "description": "Map of locale codes to translation data" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/system/TranslationData.json b/packages/spec/json-schema/system/TranslationData.json index 3bd54815a..951a41473 100644 --- a/packages/spec/json-schema/system/TranslationData.json +++ b/packages/spec/json-schema/system/TranslationData.json @@ -79,7 +79,8 @@ "description": "UI message translations keyed by message ID" } }, - "additionalProperties": false + "additionalProperties": false, + "description": "Translation data for objects, apps, and UI messages" } }, "$schema": "http://json-schema.org/draft-07/schema#" diff --git a/packages/spec/json-schema/ui/Action.json b/packages/spec/json-schema/ui/Action.json index 5957e1beb..5717b2507 100644 --- a/packages/spec/json-schema/ui/Action.json +++ b/packages/spec/json-schema/ui/Action.json @@ -175,6 +175,25 @@ "visible": { "type": "string", "description": "Formula returning boolean" + }, + "disabled": { + "type": [ + "boolean", + "string" + ], + "description": "Whether the action is disabled, or a condition expression string" + }, + "shortcut": { + "type": "string", + "description": "Keyboard shortcut to trigger this action (e.g., \"Ctrl+S\")" + }, + "bulkEnabled": { + "type": "boolean", + "description": "Whether this action can be applied to multiple selected records" + }, + "timeout": { + "type": "number", + "description": "Maximum execution time in milliseconds for the action" } }, "required": [ diff --git a/packages/spec/json-schema/ui/Dashboard.json b/packages/spec/json-schema/ui/Dashboard.json index f5b37089a..2b6635294 100644 --- a/packages/spec/json-schema/ui/Dashboard.json +++ b/packages/spec/json-schema/ui/Dashboard.json @@ -512,6 +512,37 @@ "refreshInterval": { "type": "number", "description": "Auto-refresh interval in seconds" + }, + "globalFilters": { + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Field name to filter on" + }, + "label": { + "type": "string", + "description": "Display label for the filter" + }, + "type": { + "type": "string", + "enum": [ + "text", + "select", + "date", + "number" + ], + "description": "Filter input type" + } + }, + "required": [ + "field" + ], + "additionalProperties": false + }, + "description": "Global filters that apply to all widgets in the dashboard" } }, "required": [ diff --git a/packages/spec/json-schema/ui/FieldWidgetProps.json b/packages/spec/json-schema/ui/FieldWidgetProps.json index 7523a7c65..3f683e977 100644 --- a/packages/spec/json-schema/ui/FieldWidgetProps.json +++ b/packages/spec/json-schema/ui/FieldWidgetProps.json @@ -640,8 +640,8 @@ "aes-256-cbc", "chacha20-poly1305" ], - "default": "aes-256-gcm", - "description": "Encryption algorithm" + "description": "Encryption algorithm", + "default": "aes-256-gcm" }, "keyManagement": { "type": "object", @@ -728,7 +728,8 @@ "type": "object", "properties": { "field": { - "type": "string" + "type": "string", + "description": "Field name to apply masking to" }, "strategy": { "type": "string", @@ -740,7 +741,8 @@ "randomize", "nullify", "substitute" - ] + ], + "description": "Masking strategy to use" }, "pattern": { "type": "string", @@ -748,11 +750,13 @@ }, "preserveFormat": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data format after masking" }, "preserveLength": { "type": "boolean", - "default": true + "default": true, + "description": "Keep the original data length after masking" }, "roles": { "type": "array", @@ -875,10 +879,22 @@ "type": "string", "description": "Help text displayed below the field in forms" }, + "trackFeedHistory": { + "type": "boolean", + "description": "Track field changes in Chatter/activity feed (Salesforce pattern)" + }, + "caseSensitive": { + "type": "boolean", + "description": "Whether text comparisons are case-sensitive" + }, + "autonumberFormat": { + "type": "string", + "description": "Auto-number display format pattern (e.g., \"CASE-{0000}\")" + }, "encryption": { "type": "boolean", "default": false, - "description": "Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility." + "description": "DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0" }, "index": { "type": "boolean", diff --git a/packages/spec/json-schema/ui/ListView.json b/packages/spec/json-schema/ui/ListView.json index 8f62df992..2be3980b0 100644 --- a/packages/spec/json-schema/ui/ListView.json +++ b/packages/spec/json-schema/ui/ListView.json @@ -449,6 +449,66 @@ ], "additionalProperties": false }, + "rowActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actions available for individual row items" + }, + "bulkActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actions available when multiple rows are selected" + }, + "virtualScroll": { + "type": "boolean", + "description": "Enable virtual scrolling for large datasets" + }, + "conditionalFormatting": { + "type": "array", + "items": { + "type": "object", + "properties": { + "condition": { + "type": "string", + "description": "Condition expression to evaluate" + }, + "style": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "CSS styles to apply when condition is true" + } + }, + "required": [ + "condition", + "style" + ], + "additionalProperties": false + }, + "description": "Conditional formatting rules for list rows" + }, + "inlineEdit": { + "type": "boolean", + "description": "Allow inline editing of records directly in the list view" + }, + "exportOptions": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "csv", + "xlsx", + "pdf", + "json" + ] + }, + "description": "Available export format options" + }, "emptyState": { "type": "object", "properties": { diff --git a/packages/spec/json-schema/ui/View.json b/packages/spec/json-schema/ui/View.json index 607aabfac..e3762dc17 100644 --- a/packages/spec/json-schema/ui/View.json +++ b/packages/spec/json-schema/ui/View.json @@ -452,6 +452,66 @@ ], "additionalProperties": false }, + "rowActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actions available for individual row items" + }, + "bulkActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actions available when multiple rows are selected" + }, + "virtualScroll": { + "type": "boolean", + "description": "Enable virtual scrolling for large datasets" + }, + "conditionalFormatting": { + "type": "array", + "items": { + "type": "object", + "properties": { + "condition": { + "type": "string", + "description": "Condition expression to evaluate" + }, + "style": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "CSS styles to apply when condition is true" + } + }, + "required": [ + "condition", + "style" + ], + "additionalProperties": false + }, + "description": "Conditional formatting rules for list rows" + }, + "inlineEdit": { + "type": "boolean", + "description": "Allow inline editing of records directly in the list view" + }, + "exportOptions": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "csv", + "xlsx", + "pdf", + "json" + ] + }, + "description": "Available export format options" + }, "emptyState": { "type": "object", "properties": { @@ -1275,6 +1335,66 @@ ], "additionalProperties": false }, + "rowActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actions available for individual row items" + }, + "bulkActions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Actions available when multiple rows are selected" + }, + "virtualScroll": { + "type": "boolean", + "description": "Enable virtual scrolling for large datasets" + }, + "conditionalFormatting": { + "type": "array", + "items": { + "type": "object", + "properties": { + "condition": { + "type": "string", + "description": "Condition expression to evaluate" + }, + "style": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "CSS styles to apply when condition is true" + } + }, + "required": [ + "condition", + "style" + ], + "additionalProperties": false + }, + "description": "Conditional formatting rules for list rows" + }, + "inlineEdit": { + "type": "boolean", + "description": "Allow inline editing of records directly in the list view" + }, + "exportOptions": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "csv", + "xlsx", + "pdf", + "json" + ] + }, + "description": "Available export format options" + }, "emptyState": { "type": "object", "properties": { diff --git a/packages/spec/src/api/auth.zod.ts b/packages/spec/src/api/auth.zod.ts index 6bbd93f2c..829bb2654 100644 --- a/packages/spec/src/api/auth.zod.ts +++ b/packages/spec/src/api/auth.zod.ts @@ -89,9 +89,11 @@ export const UserProfileResponseSchema = BaseResponseSchema.extend({ export type AuthProvider = z.infer; export type SessionUser = z.infer; +export type SessionUserInput = z.input; export type Session = z.infer; export type LoginType = z.infer; export type LoginRequest = z.infer; +export type LoginRequestInput = z.input; export type RegisterRequest = z.infer; export type RefreshTokenRequest = z.infer; export type SessionResponse = z.infer; diff --git a/packages/spec/src/api/endpoint.zod.ts b/packages/spec/src/api/endpoint.zod.ts index 16c627272..2d964f8c3 100644 --- a/packages/spec/src/api/endpoint.zod.ts +++ b/packages/spec/src/api/endpoint.zod.ts @@ -56,3 +56,4 @@ export const ApiEndpoint = Object.assign(ApiEndpointSchema, { }); export type ApiEndpoint = z.infer; +export type ApiEndpointInput = z.input; diff --git a/packages/spec/src/api/graphql.zod.ts b/packages/spec/src/api/graphql.zod.ts index 1c0ffa4b1..efc631390 100644 --- a/packages/spec/src/api/graphql.zod.ts +++ b/packages/spec/src/api/graphql.zod.ts @@ -156,6 +156,7 @@ export const GraphQLTypeConfigSchema = z.object({ }); export type GraphQLTypeConfig = z.infer; +export type GraphQLTypeConfigInput = z.input; // ========================================== // 2. Query Generation Configuration @@ -240,6 +241,7 @@ export const GraphQLQueryConfigSchema = z.object({ }); export type GraphQLQueryConfig = z.infer; +export type GraphQLQueryConfigInput = z.input; // ========================================== // 3. Mutation Generation Configuration @@ -312,6 +314,7 @@ export const GraphQLMutationConfigSchema = z.object({ }); export type GraphQLMutationConfig = z.infer; +export type GraphQLMutationConfigInput = z.input; // ========================================== // 4. Subscription Configuration @@ -366,6 +369,7 @@ export const GraphQLSubscriptionConfigSchema = z.object({ }); export type GraphQLSubscriptionConfig = z.infer; +export type GraphQLSubscriptionConfigInput = z.input; // ========================================== // 5. Resolver Configuration @@ -410,6 +414,7 @@ export const GraphQLResolverConfigSchema = z.object({ }); export type GraphQLResolverConfig = z.infer; +export type GraphQLResolverConfigInput = z.input; // ========================================== // 6. DataLoader Configuration @@ -468,6 +473,7 @@ export const GraphQLDataLoaderConfigSchema = z.object({ }); export type GraphQLDataLoaderConfig = z.infer; +export type GraphQLDataLoaderConfigInput = z.input; // ========================================== // 7. GraphQL Directive Schema @@ -541,6 +547,7 @@ export const GraphQLDirectiveConfigSchema = z.object({ }); export type GraphQLDirectiveConfig = z.infer; +export type GraphQLDirectiveConfigInput = z.input; // ========================================== // 8. GraphQL Security - Query Depth Limiting @@ -569,6 +576,7 @@ export const GraphQLQueryDepthLimitSchema = z.object({ }); export type GraphQLQueryDepthLimit = z.infer; +export type GraphQLQueryDepthLimitInput = z.input; // ========================================== // 9. GraphQL Security - Query Complexity @@ -616,6 +624,7 @@ export const GraphQLQueryComplexitySchema = z.object({ }); export type GraphQLQueryComplexity = z.infer; +export type GraphQLQueryComplexityInput = z.input; // ========================================== // 10. GraphQL Security - Rate Limiting @@ -683,6 +692,7 @@ export const GraphQLRateLimitSchema = z.object({ }); export type GraphQLRateLimit = z.infer; +export type GraphQLRateLimitInput = z.input; // ========================================== // 11. GraphQL Security - Persisted Queries @@ -758,6 +768,7 @@ export const GraphQLPersistedQuerySchema = z.object({ }); export type GraphQLPersistedQuery = z.infer; +export type GraphQLPersistedQueryInput = z.input; // ========================================== // 12. Complete GraphQL Configuration @@ -829,6 +840,7 @@ export const GraphQLConfig = Object.assign(GraphQLConfigSchema, { }); export type GraphQLConfig = z.infer; +export type GraphQLConfigInput = z.input; // ========================================== // Helper Functions diff --git a/packages/spec/src/api/index.ts b/packages/spec/src/api/index.ts index 06031efdf..1523197d5 100644 --- a/packages/spec/src/api/index.ts +++ b/packages/spec/src/api/index.ts @@ -34,5 +34,3 @@ export * from './analytics.zod'; export * from './auth.zod'; export * from './storage.zod'; export * from './metadata.zod'; -export * from './auth.zod'; -export * from './storage.zod'; diff --git a/packages/spec/src/api/rest-server.zod.ts b/packages/spec/src/api/rest-server.zod.ts index 7c75c3307..5868f146a 100644 --- a/packages/spec/src/api/rest-server.zod.ts +++ b/packages/spec/src/api/rest-server.zod.ts @@ -113,6 +113,7 @@ export const RestApiConfigSchema = z.object({ }); export type RestApiConfig = z.infer; +export type RestApiConfigInput = z.input; // ========================================== // CRUD Endpoint Configuration @@ -203,6 +204,7 @@ export const CrudEndpointsConfigSchema = z.object({ }); export type CrudEndpointsConfig = z.infer; +export type CrudEndpointsConfigInput = z.input; // ========================================== // Metadata Endpoint Configuration @@ -251,6 +253,7 @@ export const MetadataEndpointsConfigSchema = z.object({ }); export type MetadataEndpointsConfig = z.infer; +export type MetadataEndpointsConfigInput = z.input; // ========================================== // Batch Operation Endpoint Configuration @@ -300,6 +303,7 @@ export const BatchEndpointsConfigSchema = z.object({ }); export type BatchEndpointsConfig = z.infer; +export type BatchEndpointsConfigInput = z.input; // ========================================== // Route Generation Configuration @@ -340,6 +344,7 @@ export const RouteGenerationConfigSchema = z.object({ }); export type RouteGenerationConfig = z.infer; +export type RouteGenerationConfigInput = z.input; // ========================================== // Complete REST Server Configuration @@ -401,6 +406,7 @@ export const RestServerConfigSchema = z.object({ }); export type RestServerConfig = z.infer; +export type RestServerConfigInput = z.input; // ========================================== // Endpoint Registry diff --git a/packages/spec/src/data/datasource.zod.ts b/packages/spec/src/data/datasource.zod.ts index 530dd173c..3017b9eeb 100644 --- a/packages/spec/src/data/datasource.zod.ts +++ b/packages/spec/src/data/datasource.zod.ts @@ -130,6 +130,21 @@ export const DatasourceSchema = z.object({ */ capabilities: DatasourceCapabilities.optional().describe('Capability overrides'), + /** Health Check */ + healthCheck: z.object({ + enabled: z.boolean().default(true).describe('Enable health check endpoint'), + intervalMs: z.number().default(30000).describe('Health check interval in milliseconds'), + timeoutMs: z.number().default(5000).describe('Health check timeout in milliseconds'), + }).optional().describe('Datasource health check configuration'), + + /** Retry Policy */ + retryPolicy: z.object({ + maxRetries: z.number().default(3).describe('Maximum number of retry attempts'), + baseDelayMs: z.number().default(1000).describe('Base delay between retries in milliseconds'), + maxDelayMs: z.number().default(30000).describe('Maximum delay between retries in milliseconds'), + backoffMultiplier: z.number().default(2).describe('Exponential backoff multiplier'), + }).optional().describe('Connection retry policy for transient failures'), + /** Description */ description: z.string().optional().describe('Internal description'), diff --git a/packages/spec/src/data/field.zod.ts b/packages/spec/src/data/field.zod.ts index 15c8227d1..6b6903e4b 100644 --- a/packages/spec/src/data/field.zod.ts +++ b/packages/spec/src/data/field.zod.ts @@ -455,7 +455,11 @@ export const FieldSchema = z.object({ readonly: z.boolean().default(false).describe('Read-only in UI'), sortable: z.boolean().optional().default(true).describe('Whether field is sortable in list views'), inlineHelpText: z.string().optional().describe('Help text displayed below the field in forms'), - encryption: z.boolean().default(false).describe('Deprecated: Use encryptionConfig for enhanced encryption features. Simple flag for backward compatibility.'), + trackFeedHistory: z.boolean().optional().describe('Track field changes in Chatter/activity feed (Salesforce pattern)'), + caseSensitive: z.boolean().optional().describe('Whether text comparisons are case-sensitive'), + autonumberFormat: z.string().optional().describe('Auto-number display format pattern (e.g., "CASE-{0000}")'), + /** @deprecated Use `encryptionConfig` instead. Will be removed in v2.0.0 */ + encryption: z.boolean().default(false).describe('DEPRECATED: Use `encryptionConfig` for enhanced encryption features. Scheduled for removal in v2.0.0'), /** Indexing */ index: z.boolean().default(false).describe('Create standard database index'), @@ -467,10 +471,14 @@ export type SelectOption = z.infer; export type LocationCoordinates = z.infer; export type Address = z.infer; export type CurrencyConfig = z.infer; +export type CurrencyConfigInput = z.input; export type CurrencyValue = z.infer; export type VectorConfig = z.infer; +export type VectorConfigInput = z.input; export type FileAttachmentConfig = z.infer; +export type FileAttachmentConfigInput = z.input; export type DataQualityRules = z.infer; +export type DataQualityRulesInput = z.input; export type ComputedFieldCache = z.infer; /** diff --git a/packages/spec/src/data/hook.zod.ts b/packages/spec/src/data/hook.zod.ts index 9fddf1fcd..603d9fc59 100644 --- a/packages/spec/src/data/hook.zod.ts +++ b/packages/spec/src/data/hook.zod.ts @@ -83,6 +83,24 @@ export const HookSchema = z.object({ */ async: z.boolean().default(false).describe('Run specifically as fire-and-forget'), + /** + * Human-readable description + */ + description: z.string().optional().describe('Human-readable description of what this hook does'), + + /** + * Retry Policy + */ + retryPolicy: z.object({ + maxRetries: z.number().default(3).describe('Maximum retry attempts on failure'), + backoffMs: z.number().default(1000).describe('Backoff delay between retries in milliseconds'), + }).optional().describe('Retry policy for failed hook executions'), + + /** + * Execution Timeout + */ + timeout: z.number().optional().describe('Maximum execution time in milliseconds before the hook is aborted'), + /** * Error Policy * What to do if the hook throws an exception? diff --git a/packages/spec/src/data/object.zod.ts b/packages/spec/src/data/object.zod.ts index 3893f4222..77af9c96e 100644 --- a/packages/spec/src/data/object.zod.ts +++ b/packages/spec/src/data/object.zod.ts @@ -321,6 +321,9 @@ const ObjectSchemaBase = z.object({ /** Sharing Model */ sharingModel: z.enum(['private', 'read', 'read_write', 'full']).optional().describe('Default sharing model'), + + /** Key Prefix */ + keyPrefix: z.string().max(5).optional().describe('Short prefix for record IDs (e.g., "001" for Account)'), }); /** diff --git a/packages/spec/src/hub/license.zod.ts b/packages/spec/src/hub/license.zod.ts index 8cf70d2f8..df8db3e50 100644 --- a/packages/spec/src/hub/license.zod.ts +++ b/packages/spec/src/hub/license.zod.ts @@ -78,5 +78,7 @@ export const LicenseSchema = z.object({ }); export type Feature = z.infer; +export type FeatureInput = z.input; export type Plan = z.infer; +export type PlanInput = z.input; export type License = z.infer; diff --git a/packages/spec/src/hub/marketplace.zod.ts b/packages/spec/src/hub/marketplace.zod.ts index 407bbcbfe..ca4ed46ae 100644 --- a/packages/spec/src/hub/marketplace.zod.ts +++ b/packages/spec/src/hub/marketplace.zod.ts @@ -126,4 +126,5 @@ export const MarketplacePluginSchema = z.object({ export type PluginAuthor = z.infer; export type MarketplacePlugin = z.infer; +export type MarketplacePluginInput = z.input; export type MarketplaceListing = MarketplacePlugin; // Alias for backwards compatibility diff --git a/packages/spec/src/hub/plugin-registry.zod.ts b/packages/spec/src/hub/plugin-registry.zod.ts index 2faf48e23..257600c61 100644 --- a/packages/spec/src/hub/plugin-registry.zod.ts +++ b/packages/spec/src/hub/plugin-registry.zod.ts @@ -405,8 +405,14 @@ export const PluginInstallConfigSchema = z.object({ // Export types export type PluginVendor = z.infer; +export type PluginVendorInput = z.input; export type PluginQualityMetrics = z.infer; +export type PluginQualityMetricsInput = z.input; export type PluginStatistics = z.infer; +export type PluginStatisticsInput = z.input; export type PluginRegistryEntry = z.infer; +export type PluginRegistryEntryInput = z.input; export type PluginSearchFilters = z.infer; +export type PluginSearchFiltersInput = z.input; export type PluginInstallConfig = z.infer; +export type PluginInstallConfigInput = z.input; diff --git a/packages/spec/src/hub/tenant.zod.ts b/packages/spec/src/hub/tenant.zod.ts index 6138f8985..ea2d8b8c9 100644 --- a/packages/spec/src/hub/tenant.zod.ts +++ b/packages/spec/src/hub/tenant.zod.ts @@ -212,6 +212,7 @@ export const RowLevelIsolationStrategySchema = z.object({ }); export type RowLevelIsolationStrategy = z.infer; +export type RowLevelIsolationStrategyInput = z.input; /** * Schema-Level Isolation Strategy (isolated_schema) @@ -329,6 +330,7 @@ export const SchemaLevelIsolationStrategySchema = z.object({ }); export type SchemaLevelIsolationStrategy = z.infer; +export type SchemaLevelIsolationStrategyInput = z.input; /** * Database-Level Isolation Strategy (isolated_db) @@ -483,6 +485,7 @@ export const DatabaseLevelIsolationStrategySchema = z.object({ }); export type DatabaseLevelIsolationStrategy = z.infer; +export type DatabaseLevelIsolationStrategyInput = z.input; /** * Tenant Isolation Configuration Schema @@ -592,3 +595,4 @@ export const TenantSecurityPolicySchema = z.object({ }); export type TenantSecurityPolicy = z.infer; +export type TenantSecurityPolicyInput = z.input; diff --git a/packages/spec/src/kernel/feature.zod.ts b/packages/spec/src/kernel/feature.zod.ts index ef81fa15b..2e9a414f1 100644 --- a/packages/spec/src/kernel/feature.zod.ts +++ b/packages/spec/src/kernel/feature.zod.ts @@ -50,3 +50,4 @@ export const FeatureFlag = Object.assign(FeatureFlagSchema, { }); export type FeatureFlag = z.infer; +export type FeatureFlagInput = z.input; diff --git a/packages/spec/src/kernel/plugin-structure.zod.ts b/packages/spec/src/kernel/plugin-structure.zod.ts index f8d050beb..b5d9db028 100644 --- a/packages/spec/src/kernel/plugin-structure.zod.ts +++ b/packages/spec/src/kernel/plugin-structure.zod.ts @@ -27,7 +27,7 @@ const OPS_FILE_SUFFIX_REGEX = /\.(object|field|trigger|function|view|page|dashbo * - "src/CRM/LeadObject.ts" (PascalCase) * - "src/utils/helper.js" (Wrong extension) */ -export const OpsFilePathSchema = z.string().superRefine((path, ctx) => { +export const OpsFilePathSchema = z.string().describe('Validates a file path against OPS naming conventions').superRefine((path, ctx) => { // 1. Must be in src/ if (!path.startsWith('src/')) { // Non-source files (package.json, config) are ignored by this specific validator @@ -79,7 +79,7 @@ export const OpsFilePathSchema = z.string().superRefine((path, ctx) => { export const OpsDomainModuleSchema = z.object({ name: z.string().regex(SNAKE_CASE_REGEX).describe('Module name (snake_case)'), files: z.array(z.string()).describe('List of files in this module'), -}).superRefine((module, ctx) => { +}).describe('Scanned domain module representing a plugin folder').superRefine((module, ctx) => { // Rule: Must have an index.ts if (!module.files.includes('index.ts')) { ctx.addIssue({ @@ -95,7 +95,7 @@ export const OpsDomainModuleSchema = z.object({ export const OpsPluginStructureSchema = z.object({ root: z.string().describe('Root directory path of the plugin project'), files: z.array(z.string()).describe('List of all file paths relative to root'), -}).superRefine((project, ctx) => { +}).describe('Full plugin project layout validated against OPS conventions').superRefine((project, ctx) => { // Check for configuration file if (!project.files.includes('objectstack.config.ts')) { ctx.addIssue({ diff --git a/packages/spec/src/system/cache.zod.ts b/packages/spec/src/system/cache.zod.ts index 791454333..aecbc934c 100644 --- a/packages/spec/src/system/cache.zod.ts +++ b/packages/spec/src/system/cache.zod.ts @@ -30,7 +30,7 @@ export const CacheStrategySchema = z.enum([ 'fifo', // First In First Out 'ttl', // Time To Live only 'adaptive', // Dynamic strategy selection -]); +]).describe('Cache eviction strategy'); export type CacheStrategy = z.infer; @@ -41,16 +41,17 @@ export const CacheTierSchema = z.object({ ttl: z.number().default(300).describe('Default TTL in seconds'), strategy: CacheStrategySchema.default('lru').describe('Eviction strategy'), warmup: z.boolean().default(false).describe('Pre-populate cache on startup'), -}); +}).describe('Configuration for a single cache tier in the hierarchy'); export type CacheTier = z.infer; +export type CacheTierInput = z.input; export const CacheInvalidationSchema = z.object({ trigger: z.enum(['create', 'update', 'delete', 'manual']).describe('Event that triggers invalidation'), scope: z.enum(['key', 'pattern', 'tag', 'all']).describe('Invalidation scope'), pattern: z.string().optional().describe('Key pattern for pattern-based invalidation'), tags: z.array(z.string()).optional().describe('Cache tags to invalidate'), -}); +}).describe('Rule defining when and how cached entries are invalidated'); export type CacheInvalidation = z.infer; @@ -61,6 +62,7 @@ export const CacheConfigSchema = z.object({ prefetch: z.boolean().default(false).describe('Enable cache prefetching'), compression: z.boolean().default(false).describe('Enable data compression in cache'), encryption: z.boolean().default(false).describe('Enable encryption for cached data'), -}); +}).describe('Top-level application cache configuration'); export type CacheConfig = z.infer; +export type CacheConfigInput = z.input; diff --git a/packages/spec/src/system/compliance.zod.ts b/packages/spec/src/system/compliance.zod.ts index ac5434e4f..8563b878d 100644 --- a/packages/spec/src/system/compliance.zod.ts +++ b/packages/spec/src/system/compliance.zod.ts @@ -4,15 +4,15 @@ import { z } from 'zod'; * Compliance protocol for GDPR, CCPA, HIPAA, SOX, PCI-DSS */ export const GDPRConfigSchema = z.object({ - enabled: z.boolean(), + enabled: z.boolean().describe('Enable GDPR compliance controls'), dataSubjectRights: z.object({ - rightToAccess: z.boolean().default(true), - rightToRectification: z.boolean().default(true), - rightToErasure: z.boolean().default(true), - rightToRestriction: z.boolean().default(true), - rightToPortability: z.boolean().default(true), - rightToObjection: z.boolean().default(true), - }), + rightToAccess: z.boolean().default(true).describe('Allow data subjects to access their data'), + rightToRectification: z.boolean().default(true).describe('Allow data subjects to correct their data'), + rightToErasure: z.boolean().default(true).describe('Allow data subjects to request deletion'), + rightToRestriction: z.boolean().default(true).describe('Allow data subjects to restrict processing'), + rightToPortability: z.boolean().default(true).describe('Allow data subjects to export their data'), + rightToObjection: z.boolean().default(true).describe('Allow data subjects to object to processing'), + }).describe('Data subject rights configuration per GDPR Articles 15-21'), legalBasis: z.enum([ 'consent', 'contract', @@ -20,43 +20,46 @@ export const GDPRConfigSchema = z.object({ 'vital-interests', 'public-task', 'legitimate-interests', - ]), - consentTracking: z.boolean().default(true), - dataRetentionDays: z.number().optional(), - dataProcessingAgreement: z.string().optional(), -}); + ]).describe('Legal basis for data processing under GDPR Article 6'), + consentTracking: z.boolean().default(true).describe('Track and record user consent'), + dataRetentionDays: z.number().optional().describe('Maximum data retention period in days'), + dataProcessingAgreement: z.string().optional().describe('URL or reference to the data processing agreement'), +}).describe('GDPR (General Data Protection Regulation) compliance configuration'); export type GDPRConfig = z.infer; +export type GDPRConfigInput = z.input; export const HIPAAConfigSchema = z.object({ - enabled: z.boolean(), + enabled: z.boolean().describe('Enable HIPAA compliance controls'), phi: z.object({ - encryption: z.boolean().default(true), - accessControl: z.boolean().default(true), - auditTrail: z.boolean().default(true), - backupAndRecovery: z.boolean().default(true), - }), - businessAssociateAgreement: z.boolean().default(false), -}); + encryption: z.boolean().default(true).describe('Encrypt Protected Health Information at rest'), + accessControl: z.boolean().default(true).describe('Enforce role-based access to PHI'), + auditTrail: z.boolean().default(true).describe('Log all PHI access events'), + backupAndRecovery: z.boolean().default(true).describe('Enable PHI backup and disaster recovery'), + }).describe('Protected Health Information safeguards'), + businessAssociateAgreement: z.boolean().default(false).describe('BAA is in place with third-party processors'), +}).describe('HIPAA (Health Insurance Portability and Accountability Act) compliance configuration'); export type HIPAAConfig = z.infer; +export type HIPAAConfigInput = z.input; export const PCIDSSConfigSchema = z.object({ - enabled: z.boolean(), - level: z.enum(['1', '2', '3', '4']), - cardDataFields: z.array(z.string()), - tokenization: z.boolean().default(true), - encryptionInTransit: z.boolean().default(true), - encryptionAtRest: z.boolean().default(true), -}); + enabled: z.boolean().describe('Enable PCI-DSS compliance controls'), + level: z.enum(['1', '2', '3', '4']).describe('PCI-DSS compliance level (1 = highest)'), + cardDataFields: z.array(z.string()).describe('Field names containing cardholder data'), + tokenization: z.boolean().default(true).describe('Replace card data with secure tokens'), + encryptionInTransit: z.boolean().default(true).describe('Encrypt cardholder data during transmission'), + encryptionAtRest: z.boolean().default(true).describe('Encrypt stored cardholder data'), +}).describe('PCI-DSS (Payment Card Industry Data Security Standard) compliance configuration'); export type PCIDSSConfig = z.infer; +export type PCIDSSConfigInput = z.input; export const AuditLogConfigSchema = z.object({ - enabled: z.boolean().default(true), - retentionDays: z.number().default(365), - immutable: z.boolean().default(true), - signLogs: z.boolean().default(false), + enabled: z.boolean().default(true).describe('Enable audit logging'), + retentionDays: z.number().default(365).describe('Number of days to retain audit logs'), + immutable: z.boolean().default(true).describe('Prevent modification or deletion of audit logs'), + signLogs: z.boolean().default(false).describe('Cryptographically sign log entries for tamper detection'), events: z.array(z.enum([ 'create', 'read', @@ -67,16 +70,18 @@ export const AuditLogConfigSchema = z.object({ 'login', 'logout', 'failed-login', - ])), -}); + ])).describe('Event types to capture in the audit log'), +}).describe('Audit log configuration for compliance and security monitoring'); export type AuditLogConfig = z.infer; +export type AuditLogConfigInput = z.input; export const ComplianceConfigSchema = z.object({ - gdpr: GDPRConfigSchema.optional(), - hipaa: HIPAAConfigSchema.optional(), - pciDss: PCIDSSConfigSchema.optional(), - auditLog: AuditLogConfigSchema, -}); + gdpr: GDPRConfigSchema.optional().describe('GDPR compliance settings'), + hipaa: HIPAAConfigSchema.optional().describe('HIPAA compliance settings'), + pciDss: PCIDSSConfigSchema.optional().describe('PCI-DSS compliance settings'), + auditLog: AuditLogConfigSchema.describe('Audit log configuration'), +}).describe('Unified compliance configuration spanning GDPR, HIPAA, and PCI-DSS'); export type ComplianceConfig = z.infer; +export type ComplianceConfigInput = z.input; diff --git a/packages/spec/src/system/encryption.zod.ts b/packages/spec/src/system/encryption.zod.ts index eb17c1664..21edcf583 100644 --- a/packages/spec/src/system/encryption.zod.ts +++ b/packages/spec/src/system/encryption.zod.ts @@ -8,7 +8,7 @@ export const EncryptionAlgorithmSchema = z.enum([ 'aes-256-gcm', 'aes-256-cbc', 'chacha20-poly1305', -]); +]).describe('Supported encryption algorithm'); export type EncryptionAlgorithm = z.infer; @@ -18,7 +18,7 @@ export const KeyManagementProviderSchema = z.enum([ 'azure-key-vault', 'gcp-kms', 'hashicorp-vault', -]); +]).describe('Key management service provider'); export type KeyManagementProvider = z.infer; @@ -27,9 +27,10 @@ export const KeyRotationPolicySchema = z.object({ frequencyDays: z.number().min(1).default(90).describe('Rotation frequency in days'), retainOldVersions: z.number().default(3).describe('Number of old key versions to retain'), autoRotate: z.boolean().default(true).describe('Automatically rotate without manual approval'), -}); +}).describe('Policy for automatic encryption key rotation'); export type KeyRotationPolicy = z.infer; +export type KeyRotationPolicyInput = z.input; export const EncryptionConfigSchema = z.object({ enabled: z.boolean().default(false).describe('Enable field-level encryption'), @@ -42,14 +43,16 @@ export const EncryptionConfigSchema = z.object({ scope: z.enum(['field', 'record', 'table', 'database']).describe('Encryption scope level'), deterministicEncryption: z.boolean().default(false).describe('Allows equality queries on encrypted data'), searchableEncryption: z.boolean().default(false).describe('Allows search on encrypted data'), -}); +}).describe('Field-level encryption configuration'); export type EncryptionConfig = z.infer; +export type EncryptionConfigInput = z.input; export const FieldEncryptionSchema = z.object({ fieldName: z.string().describe('Name of the field to encrypt'), encryptionConfig: EncryptionConfigSchema.describe('Encryption settings for this field'), indexable: z.boolean().default(false).describe('Allow indexing on encrypted field'), -}); +}).describe('Per-field encryption assignment'); export type FieldEncryption = z.infer; +export type FieldEncryptionInput = z.input; diff --git a/packages/spec/src/system/http-server.zod.ts b/packages/spec/src/system/http-server.zod.ts index 183f97693..29caf8310 100644 --- a/packages/spec/src/system/http-server.zod.ts +++ b/packages/spec/src/system/http-server.zod.ts @@ -80,6 +80,7 @@ export const HttpServerConfigSchema = z.object({ }); export type HttpServerConfig = z.infer; +export type HttpServerConfigInput = z.input; // ========================================== // Route Registration @@ -126,6 +127,7 @@ export const RouteHandlerMetadataSchema = z.object({ }); export type RouteHandlerMetadata = z.infer; +export type RouteHandlerMetadataInput = z.input; // ========================================== // Middleware Configuration @@ -198,6 +200,7 @@ export const MiddlewareConfigSchema = z.object({ }); export type MiddlewareConfig = z.infer; +export type MiddlewareConfigInput = z.input; // ========================================== // Server Lifecycle Events @@ -292,6 +295,7 @@ export const ServerCapabilitiesSchema = z.object({ }); export type ServerCapabilities = z.infer; +export type ServerCapabilitiesInput = z.input; // ========================================== // Server Status & Metrics diff --git a/packages/spec/src/system/masking.zod.ts b/packages/spec/src/system/masking.zod.ts index f4811a432..da9b95452 100644 --- a/packages/spec/src/system/masking.zod.ts +++ b/packages/spec/src/system/masking.zod.ts @@ -11,26 +11,28 @@ export const MaskingStrategySchema = z.enum([ 'randomize', // Randomize: generate random value 'nullify', // Null value: null 'substitute', // Substitute with dummy data -]); +]).describe('Data masking strategy for PII protection'); export type MaskingStrategy = z.infer; export const MaskingRuleSchema = z.object({ - field: z.string(), - strategy: MaskingStrategySchema, + field: z.string().describe('Field name to apply masking to'), + strategy: MaskingStrategySchema.describe('Masking strategy to use'), pattern: z.string().optional().describe('Regex pattern for partial masking'), - preserveFormat: z.boolean().default(true), - preserveLength: z.boolean().default(true), + preserveFormat: z.boolean().default(true).describe('Keep the original data format after masking'), + preserveLength: z.boolean().default(true).describe('Keep the original data length after masking'), roles: z.array(z.string()).optional().describe('Roles that see masked data'), exemptRoles: z.array(z.string()).optional().describe('Roles that see unmasked data'), -}); +}).describe('Masking rule for a single field'); export type MaskingRule = z.infer; +export type MaskingRuleInput = z.input; export const MaskingConfigSchema = z.object({ - enabled: z.boolean().default(false), - rules: z.array(MaskingRuleSchema), - auditUnmasking: z.boolean().default(true), -}); + enabled: z.boolean().default(false).describe('Enable data masking'), + rules: z.array(MaskingRuleSchema).describe('List of field-level masking rules'), + auditUnmasking: z.boolean().default(true).describe('Log when masked data is accessed unmasked'), +}).describe('Top-level data masking configuration for PII protection'); export type MaskingConfig = z.infer; +export type MaskingConfigInput = z.input; diff --git a/packages/spec/src/system/message-queue.zod.ts b/packages/spec/src/system/message-queue.zod.ts index 963256807..dee0eab08 100644 --- a/packages/spec/src/system/message-queue.zod.ts +++ b/packages/spec/src/system/message-queue.zod.ts @@ -11,48 +11,48 @@ export const MessageQueueProviderSchema = z.enum([ 'redis-pubsub', 'google-pubsub', 'azure-service-bus', -]); +]).describe('Supported message queue backend provider'); export type MessageQueueProvider = z.infer; export const TopicConfigSchema = z.object({ - name: z.string(), - partitions: z.number().default(1), - replicationFactor: z.number().default(1), - retentionMs: z.number().optional(), - compressionType: z.enum(['none', 'gzip', 'snappy', 'lz4']).default('none'), -}); + name: z.string().describe('Topic name identifier'), + partitions: z.number().default(1).describe('Number of partitions for parallel consumption'), + replicationFactor: z.number().default(1).describe('Number of replicas for fault tolerance'), + retentionMs: z.number().optional().describe('Message retention period in milliseconds'), + compressionType: z.enum(['none', 'gzip', 'snappy', 'lz4']).default('none').describe('Message compression algorithm'), +}).describe('Configuration for a message queue topic'); export type TopicConfig = z.infer; export const ConsumerConfigSchema = z.object({ - groupId: z.string(), - autoOffsetReset: z.enum(['earliest', 'latest']).default('latest'), - enableAutoCommit: z.boolean().default(true), - maxPollRecords: z.number().default(500), -}); + groupId: z.string().describe('Consumer group identifier'), + autoOffsetReset: z.enum(['earliest', 'latest']).default('latest').describe('Where to start reading when no offset exists'), + enableAutoCommit: z.boolean().default(true).describe('Automatically commit consumed offsets'), + maxPollRecords: z.number().default(500).describe('Maximum records returned per poll'), +}).describe('Consumer group configuration for topic consumption'); export type ConsumerConfig = z.infer; export const DeadLetterQueueSchema = z.object({ - enabled: z.boolean().default(false), - maxRetries: z.number().default(3), - queueName: z.string(), -}); + enabled: z.boolean().default(false).describe('Enable dead letter queue for failed messages'), + maxRetries: z.number().default(3).describe('Maximum delivery attempts before sending to DLQ'), + queueName: z.string().describe('Name of the dead letter queue'), +}).describe('Dead letter queue configuration for unprocessable messages'); export type DeadLetterQueue = z.infer; export const MessageQueueConfigSchema = z.object({ - provider: MessageQueueProviderSchema, - topics: z.array(TopicConfigSchema), - consumers: z.array(ConsumerConfigSchema).optional(), - deadLetterQueue: DeadLetterQueueSchema.optional(), - ssl: z.boolean().default(false), + provider: MessageQueueProviderSchema.describe('Message queue backend provider'), + topics: z.array(TopicConfigSchema).describe('List of topic configurations'), + consumers: z.array(ConsumerConfigSchema).optional().describe('Consumer group configurations'), + deadLetterQueue: DeadLetterQueueSchema.optional().describe('Dead letter queue for failed messages'), + ssl: z.boolean().default(false).describe('Enable SSL/TLS for broker connections'), sasl: z.object({ - mechanism: z.enum(['plain', 'scram-sha-256', 'scram-sha-512']), - username: z.string(), - password: z.string(), - }).optional(), -}); + mechanism: z.enum(['plain', 'scram-sha-256', 'scram-sha-512']).describe('SASL authentication mechanism'), + username: z.string().describe('SASL username'), + password: z.string().describe('SASL password'), + }).optional().describe('SASL authentication configuration'), +}).describe('Top-level message queue configuration'); export type MessageQueueConfig = z.infer; diff --git a/packages/spec/src/system/migration.zod.ts b/packages/spec/src/system/migration.zod.ts index 4715c2986..be84f4fd9 100644 --- a/packages/spec/src/system/migration.zod.ts +++ b/packages/spec/src/system/migration.zod.ts @@ -8,43 +8,43 @@ export const AddFieldOperation = z.object({ type: z.literal('add_field'), objectName: z.string().describe('Target object name'), fieldName: z.string().describe('Name of the field to add'), - field: FieldSchema -}); + field: FieldSchema.describe('Full field definition to add') +}).describe('Add a new field to an existing object'); export const ModifyFieldOperation = z.object({ type: z.literal('modify_field'), objectName: z.string().describe('Target object name'), fieldName: z.string().describe('Name of the field to modify'), changes: z.record(z.string(), z.unknown()).describe('Partial field definition updates') -}); +}).describe('Modify properties of an existing field'); export const RemoveFieldOperation = z.object({ type: z.literal('remove_field'), objectName: z.string().describe('Target object name'), fieldName: z.string().describe('Name of the field to remove') -}); +}).describe('Remove a field from an existing object'); export const CreateObjectOperation = z.object({ type: z.literal('create_object'), object: ObjectSchema.describe('Full object definition to create') -}); +}).describe('Create a new object'); export const RenameObjectOperation = z.object({ type: z.literal('rename_object'), oldName: z.string().describe('Current object name'), newName: z.string().describe('New object name') -}); +}).describe('Rename an existing object'); export const DeleteObjectOperation = z.object({ type: z.literal('delete_object'), objectName: z.string().describe('Name of the object to delete') -}); +}).describe('Delete an existing object'); export const ExecuteSqlOperation = z.object({ type: z.literal('execute_sql'), sql: z.string().describe('Raw SQL statement to execute'), description: z.string().optional().describe('Human-readable description of the SQL') -}); +}).describe('Execute a raw SQL statement'); // Union of all possible operations export const MigrationOperationSchema = z.discriminatedUnion('type', [ @@ -62,24 +62,24 @@ export const MigrationOperationSchema = z.discriminatedUnion('type', [ export const MigrationDependencySchema = z.object({ migrationId: z.string().describe('ID of the migration this depends on'), package: z.string().optional().describe('Package that owns the dependency migration') -}); +}).describe('Dependency reference to another migration that must run first'); export const ChangeSetSchema = z.object({ id: z.string().uuid().describe('Unique identifier for this change set'), name: z.string().describe('Human readable name for the migration'), - description: z.string().optional(), - author: z.string().optional(), - createdAt: z.string().datetime().optional(), + description: z.string().optional().describe('Detailed description of what this migration does'), + author: z.string().optional().describe('Author who created this migration'), + createdAt: z.string().datetime().optional().describe('ISO 8601 timestamp when the migration was created'), // Dependencies ensure migrations run in order - dependencies: z.array(MigrationDependencySchema).optional(), + dependencies: z.array(MigrationDependencySchema).optional().describe('Migrations that must run before this one'), // The actual atomic operations - operations: z.array(MigrationOperationSchema), + operations: z.array(MigrationOperationSchema).describe('Ordered list of atomic migration operations'), // Rollback operations (AI should generate these too) - rollback: z.array(MigrationOperationSchema).optional() -}); + rollback: z.array(MigrationOperationSchema).optional().describe('Operations to reverse this migration') +}).describe('A versioned set of atomic schema migration operations'); export type ChangeSet = z.infer; export type MigrationOperation = z.infer; diff --git a/packages/spec/src/system/search-engine.zod.ts b/packages/spec/src/system/search-engine.zod.ts index 127df9322..553a24304 100644 --- a/packages/spec/src/system/search-engine.zod.ts +++ b/packages/spec/src/system/search-engine.zod.ts @@ -10,53 +10,53 @@ export const SearchProviderSchema = z.enum([ 'meilisearch', 'typesense', 'opensearch', -]); +]).describe('Supported full-text search engine provider'); export type SearchProvider = z.infer; export const AnalyzerConfigSchema = z.object({ - type: z.enum(['standard', 'simple', 'whitespace', 'keyword', 'pattern', 'language']), - language: z.string().optional(), - stopwords: z.array(z.string()).optional(), - customFilters: z.array(z.string()).optional(), -}); + type: z.enum(['standard', 'simple', 'whitespace', 'keyword', 'pattern', 'language']).describe('Text analyzer type'), + language: z.string().optional().describe('Language for language-specific analysis'), + stopwords: z.array(z.string()).optional().describe('Custom stopwords to filter during analysis'), + customFilters: z.array(z.string()).optional().describe('Additional token filter names to apply'), +}).describe('Text analyzer configuration for index tokenization and normalization'); export type AnalyzerConfig = z.infer; export const SearchIndexConfigSchema = z.object({ - indexName: z.string(), + indexName: z.string().describe('Name of the search index'), objectName: z.string().describe('Source ObjectQL object'), fields: z.array(z.object({ - name: z.string(), - type: z.enum(['text', 'keyword', 'number', 'date', 'boolean', 'geo']), - analyzer: z.string().optional(), - searchable: z.boolean().default(true), - filterable: z.boolean().default(false), - sortable: z.boolean().default(false), - boost: z.number().default(1), - })), - replicas: z.number().default(1), - shards: z.number().default(1), -}); + name: z.string().describe('Field name to index'), + type: z.enum(['text', 'keyword', 'number', 'date', 'boolean', 'geo']).describe('Index field data type'), + analyzer: z.string().optional().describe('Named analyzer to use for this field'), + searchable: z.boolean().default(true).describe('Include field in full-text search'), + filterable: z.boolean().default(false).describe('Allow filtering on this field'), + sortable: z.boolean().default(false).describe('Allow sorting by this field'), + boost: z.number().default(1).describe('Relevance boost factor for this field'), + })).describe('Fields to include in the search index'), + replicas: z.number().default(1).describe('Number of index replicas for availability'), + shards: z.number().default(1).describe('Number of index shards for distribution'), +}).describe('Search index definition mapping an ObjectQL object to a search engine index'); export type SearchIndexConfig = z.infer; export const FacetConfigSchema = z.object({ - field: z.string(), - maxValues: z.number().default(10), - sort: z.enum(['count', 'alpha']).default('count'), -}); + field: z.string().describe('Field name to generate facets from'), + maxValues: z.number().default(10).describe('Maximum number of facet values to return'), + sort: z.enum(['count', 'alpha']).default('count').describe('Facet value sort order'), +}).describe('Faceted search configuration for a single field'); export type FacetConfig = z.infer; export const SearchConfigSchema = z.object({ - provider: SearchProviderSchema, - indexes: z.array(SearchIndexConfigSchema), - analyzers: z.record(z.string(), AnalyzerConfigSchema).optional(), - facets: z.array(FacetConfigSchema).optional(), - typoTolerance: z.boolean().default(true), - synonyms: z.record(z.string(), z.array(z.string())).optional(), - ranking: z.array(z.enum(['typo', 'geo', 'words', 'filters', 'proximity', 'attribute', 'exact', 'custom'])).optional(), -}); + provider: SearchProviderSchema.describe('Search engine backend provider'), + indexes: z.array(SearchIndexConfigSchema).describe('Search index definitions'), + analyzers: z.record(z.string(), AnalyzerConfigSchema).optional().describe('Named text analyzer configurations'), + facets: z.array(FacetConfigSchema).optional().describe('Faceted search configurations'), + typoTolerance: z.boolean().default(true).describe('Enable typo-tolerant search'), + synonyms: z.record(z.string(), z.array(z.string())).optional().describe('Synonym mappings for search expansion'), + ranking: z.array(z.enum(['typo', 'geo', 'words', 'filters', 'proximity', 'attribute', 'exact', 'custom'])).optional().describe('Custom ranking rule order'), +}).describe('Top-level full-text search engine configuration'); export type SearchConfig = z.infer; diff --git a/packages/spec/src/system/translation.zod.ts b/packages/spec/src/system/translation.zod.ts index 92658f16d..e70eacf97 100644 --- a/packages/spec/src/system/translation.zod.ts +++ b/packages/spec/src/system/translation.zod.ts @@ -31,10 +31,10 @@ export const TranslationDataSchema = z.object({ /** UI Messages */ messages: z.record(z.string(), z.string()).optional().describe('UI message translations keyed by message ID'), -}); +}).describe('Translation data for objects, apps, and UI messages'); export const LocaleSchema = z.string().describe('BCP-47 Language Tag (e.g. en-US, zh-CN)'); -export const TranslationBundleSchema = z.record(LocaleSchema, TranslationDataSchema); +export const TranslationBundleSchema = z.record(LocaleSchema, TranslationDataSchema).describe('Map of locale codes to translation data'); export type TranslationBundle = z.infer; diff --git a/packages/spec/src/system/worker.zod.ts b/packages/spec/src/system/worker.zod.ts index 1c35ddb33..5b452e94e 100644 --- a/packages/spec/src/system/worker.zod.ts +++ b/packages/spec/src/system/worker.zod.ts @@ -98,6 +98,7 @@ export const TaskRetryPolicySchema = z.object({ }); export type TaskRetryPolicy = z.infer; +export type TaskRetryPolicyInput = z.input; /** * Task Schema @@ -179,6 +180,7 @@ export const TaskSchema = z.object({ }); export type Task = z.infer; +export type TaskInput = z.input; // ========================================== // Task Execution Result @@ -298,6 +300,7 @@ export const QueueConfigSchema = z.object({ }); export type QueueConfig = z.infer; +export type QueueConfigInput = z.input; // ========================================== // Batch Processing @@ -378,6 +381,7 @@ export const BatchTaskSchema = z.object({ }); export type BatchTask = z.infer; +export type BatchTaskInput = z.input; /** * Batch Progress Schema @@ -427,6 +431,7 @@ export const BatchProgressSchema = z.object({ }); export type BatchProgress = z.infer; +export type BatchProgressInput = z.input; // ========================================== // Worker Configuration @@ -481,6 +486,7 @@ export const WorkerConfigSchema = z.object({ }); export type WorkerConfig = z.infer; +export type WorkerConfigInput = z.input; // ========================================== // Worker Stats diff --git a/packages/spec/src/ui/action.zod.ts b/packages/spec/src/ui/action.zod.ts index 5af17f4c1..ed58770ba 100644 --- a/packages/spec/src/ui/action.zod.ts +++ b/packages/spec/src/ui/action.zod.ts @@ -84,6 +84,16 @@ export const ActionSchema = z.object({ /** Access */ visible: z.string().optional().describe('Formula returning boolean'), + disabled: z.union([z.boolean(), z.string()]).optional().describe('Whether the action is disabled, or a condition expression string'), + + /** Keyboard Shortcut */ + shortcut: z.string().optional().describe('Keyboard shortcut to trigger this action (e.g., "Ctrl+S")'), + + /** Bulk Operations */ + bulkEnabled: z.boolean().optional().describe('Whether this action can be applied to multiple selected records'), + + /** Execution */ + timeout: z.number().optional().describe('Maximum execution time in milliseconds for the action'), }); export type Action = z.infer; diff --git a/packages/spec/src/ui/app.zod.ts b/packages/spec/src/ui/app.zod.ts index 3d7571268..ca7d5d672 100644 --- a/packages/spec/src/ui/app.zod.ts +++ b/packages/spec/src/ui/app.zod.ts @@ -207,7 +207,7 @@ export const AppSchema = z.object({ * App Factory Helper */ export const App = { - create: >(config: T) => config, + create: (config: z.input): App => AppSchema.parse(config), } as const; // Main Types diff --git a/packages/spec/src/ui/component.zod.ts b/packages/spec/src/ui/component.zod.ts index fe0d320de..dc78399e0 100644 --- a/packages/spec/src/ui/component.zod.ts +++ b/packages/spec/src/ui/component.zod.ts @@ -107,3 +107,4 @@ export const ComponentPropsMap = { * Type Helper to extract props from map */ export type ComponentProps = z.infer; +export type ComponentPropsInput = z.input; diff --git a/packages/spec/src/ui/dashboard.zod.ts b/packages/spec/src/ui/dashboard.zod.ts index be87f1863..22b540547 100644 --- a/packages/spec/src/ui/dashboard.zod.ts +++ b/packages/spec/src/ui/dashboard.zod.ts @@ -94,6 +94,13 @@ export const DashboardSchema = z.object({ /** Auto-refresh */ refreshInterval: z.number().optional().describe('Auto-refresh interval in seconds'), + + /** Global Filters */ + globalFilters: z.array(z.object({ + field: z.string().describe('Field name to filter on'), + label: z.string().optional().describe('Display label for the filter'), + type: z.enum(['text', 'select', 'date', 'number']).optional().describe('Filter input type'), + })).optional().describe('Global filters that apply to all widgets in the dashboard'), }); export type Dashboard = z.infer; diff --git a/packages/spec/src/ui/view.zod.ts b/packages/spec/src/ui/view.zod.ts index 44bc41765..ac65a1c16 100644 --- a/packages/spec/src/ui/view.zod.ts +++ b/packages/spec/src/ui/view.zod.ts @@ -216,6 +216,25 @@ export const ListViewSchema = z.object({ calendar: CalendarConfigSchema.optional(), gantt: GanttConfigSchema.optional(), + /** Row & Bulk Actions */ + rowActions: z.array(z.string()).optional().describe('Actions available for individual row items'), + bulkActions: z.array(z.string()).optional().describe('Actions available when multiple rows are selected'), + + /** Performance */ + virtualScroll: z.boolean().optional().describe('Enable virtual scrolling for large datasets'), + + /** Conditional Formatting */ + conditionalFormatting: z.array(z.object({ + condition: z.string().describe('Condition expression to evaluate'), + style: z.record(z.string(), z.string()).describe('CSS styles to apply when condition is true'), + })).optional().describe('Conditional formatting rules for list rows'), + + /** Inline Edit */ + inlineEdit: z.boolean().optional().describe('Allow inline editing of records directly in the list view'), + + /** Export */ + exportOptions: z.array(z.enum(['csv', 'xlsx', 'pdf', 'json'])).optional().describe('Available export format options'), + /** Empty State */ emptyState: z.object({ title: z.string().optional(),