@maschinenlesbar.org/marktstammdatenregister-cli
    Preparing search index...

    Class MastrClient

    Index
    • The number of units in a category that match filter (all units without one). Fetches a single row (page=1, pageSize=1) and returns the envelope's Total, which counts every match regardless of the page. sort is forwarded: the register refuses a sort key it doesn't know ({"Error":true}, a MastrApiError; live 2026-10-09). Paging options are refused (countQueryProblem), as are the inputs units() refuses, all with a MastrValidationError before any request.

      Parameters

      Returns Promise<number>

    • Fetch one page of units for a category. Sends the full Kendo param set — sort, page, pageSize, group, filter — always, because the server rejects a request with group/filter missing ("Die Anfrage ist Null."). An unknown category or query key, a page outside 1..MAX_PAGE, a pageSize outside 1..MAX_PAGE_SIZE, a blank sort (sortProblem) or a filter the register would misread (e.g. ~or~, see validateFilter) is rejected with a MastrValidationError before any request. A filter's FilterNames and eq/neq dropdown codes are then checked against the category's columns (one cached filterColumns() request, skipped with allowUnknownFilters) before the unit request; the filter is sent normalised (see normalizeFilter, resolveFilter).

      Parameters

      Returns Promise<UnitPage>