Update Fact Definition
lexq_facts_updateUpdate 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. Only the fields you send are changed. System facts accept name, description, and PII only.
Input 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 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. |