Skip to content

Interface: FindBySortRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / FindBySortRequest

Defined in: src/types/query.ts:319

Request to find terms by sort ID or sort name, with optional filter.

Used by POST /api/v1/terms/find-by-sort. Accepts either sort_id (UUID) or sort_name (human-readable name), plus an optional filter object for feature-based filtering.

optional filter?: Record<string, string> | null

Defined in: src/types/query.ts:325

Optional filter for feature-based filtering.


optional includeDerived?: boolean

Defined in: src/types/query.ts:368

Answer with the rule-DERIVED shadows too.

A rule’s conclusion is a fresh Ψ-term of the conclusion’s sort. When that sort is a proper SUBSORT of the browsed one — the confirmed_order < sales_order shape — the conclusion is a lattice member of the browsed sort, and the default browse HIDES it, so two orders read as two rows rather than four. A conclusion of the browsed sort ITSELF is always answered.

This is the request-level twin of OSFQL MATCH … INCLUDING DERIVED. Every returned term reports TermDto.origin either way, so a caller that sets this can still tell the two apart.

false


optional limit?: number | null

Defined in: src/types/query.ts:330

Cap on the number of terms returned, applied after the filter. Omit (or pass 0) for no cap.


optional offset?: number | null

Defined in: src/types/query.ts:350

Zero-based index of the first term to return.

Pages the same ordering limit cuts: the answer is ordered by term id BEFORE the window is applied, so page 2 neither repeats nor skips a row of page 1. Honoured with or without limit.

Measured 2026-09-18 against a 2-member sort: {"sort_name":"widget","include_derived":true} answered ids 829ef5dc-…, d4f7a4f8-… with total: 2; the same request plus {"limit":1,"offset":1} answered d4f7a4f8-… alone, still total: 2.

Reachable only through QueryClient.findBySortPage — QueryClient.findBySort discards the envelope, so paging through it gives you a window you cannot tell the end of.

0


optional sortId?: string | null

Defined in: src/types/query.ts:321

Sort UUID to search for.


optional sortName?: string | null

Defined in: src/types/query.ts:323

Sort name to search for (alternative to sort_id).