Update Fact Definition
lexq_facts_updateDestructive
Update a fact definition. The key is immutable. The type can change only while no rule references the fact; if any does, the call fails with FD-007 and reports the count. Rules in deleted groups do not count. Only the fields you send are changed. System facts (isBlocked, blockReason) accept changes to name, description, PII, and the value domain; isRequired is ignored, and their type cannot change (FD-003).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Display name | |
| type | No | Value type. Omit to leave it unchanged. Changing it fails with FD-007 while any rule outside a deleted group references the fact. | |
| isPii | No | PII flag — enables/disables masking (changeable even on system facts) | |
| factId | Yes | Fact definition ID | |
| isRequired | No | Required flag | |
| description | No | Description | |
| valueDomain | No | Which values this fact accepts. Three states: omit the field to leave the constraint alone, send {} to remove it, or send a populated object to replace it. Narrowing it does not rewrite rules that already reference this fact — they keep working, and the next save is judged against the new constraint. |