Skip to content

Interface: SortDeletePreviewResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / SortDeletePreviewResponse

Defined in: src/types/sorts.ts:1715

What DELETE /api/v1/sorts/{id} with the same options would do, decided without removing anything.

The preview runs the delete’s own evaluation, so refusal is exactly the refusal the delete answers with, and refusal: null means the delete would go through. It is a snapshot, not a reservation: a write between the preview and the delete can change the answer, and the delete checks everything again.

deletable: boolean

Defined in: src/types/sorts.ts:1719

true when the delete with the same options would remove the sort.


orphanedChildren: SortDeletePreviewSortDto[]

Defined in: src/types/sorts.ts:1738

Child sorts outside sorts that would be left with no parent. Non-empty means the delete is refused.


refusal: SortDeleteRefusalDto | null

Defined in: src/types/sorts.ts:1727

The refusal the delete would answer with, or null.

Always the FIRST refusal in the order of the delete. The lists below report every obstacle the evaluation saw, which can be more than one.


rules: SortReferencingRuleDto[]

Defined in: src/types/sorts.ts:1744

Every rule that names one of sorts: conclusion, antecedent and sort-constraint references. The delete refuses on these under rules: 'refuse', and reports them as orphaned under rules: 'orphan'.


sortId: string

Defined in: src/types/sorts.ts:1717

The sort the preview is about (UUID).


sorts: SortDeletePreviewSortDto[]

Defined in: src/types/sorts.ts:1733

Every sort the delete would remove, leaves first, the requested sort last. Under descendants: 'delete' this is the subtree; otherwise the sort alone. Empty only when the subtree is too large to enumerate.


termReferencingRules: SortReferencingRuleDto[]

Defined in: src/types/sorts.ts:1761

Under terms: 'delete': the rules whose patterns reference a term the cascade would remove. The delete refuses on these under every rules disposition. Empty under terms: 'refuse', where nothing is cascaded.


termReferrers: TermReferrerDto[]

Defined in: src/types/sorts.ts:1767

Under terms: 'delete': the data terms outside sorts that reference a term the cascade would remove. The delete refuses on these. Empty under terms: 'refuse'.


termsHeld: number

Defined in: src/types/sorts.ts:1749

The DATA terms that sorts hold. Rule scaffolding is not counted, the same as the delete.


termsHeldIsFloor: boolean

Defined in: src/types/sorts.ts:1755

true when termsHeld is a floor and not an exact count: the count alone is over what one request cascades, or rule scaffolding of these sorts shares the count.