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. 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
| 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. Send "" to remove it. | |
| valueDomain | No | Which values this fact accepts. Three states: omit the field to leave the value domain alone, send {} to remove it, or send a populated object to replace it. Narrowing it never blocks the update and does not rewrite rules. When rules compare this fact with a value the new value domain excludes, the result ends with a warning that lists them by version: drafts and the versions currently deployed. |