data.identity.notification-pref.prune ​
Hard-delete stale soft-deleted UserNotificationPreference rows
Hard-delete expired soft-deleted UserNotificationPreference rows.
Input: optional organization_uuid, retention_days (default 90), dry_run, actor. Output in state_data: preferences_pruned, dry_run, pruned_at.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-identity |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | — |
retention_days | integer | No | — | — |
dry_run | boolean | No | — | — |
actor | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
preferences_pruned | integer | Yes | — | — |
dry_run | boolean | Yes | — | — |
pruned_at | string | Yes | — | — |
organization_uuid | uuid | No | — | — |
retention_days | integer | No | — | — |
actor | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | complete | Prune expired notification preferences |
completed | No | Yes | Yes | — | Prune complete |
failed | No | Yes | No | — | Prune failed |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | complete | completed | — |
pending | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "data.identity.notification-pref.prune",
"initial_data": {
"organization_uuid": "value",
"retention_days": 123,
"dry_run": true,
"actor": "value"
}
}