Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/vanhecke/celmex is gone (deleted or private); Software Heritage not asked yet (this run's --swh-calls were used up); no fork with the same repo name found; no cached copy. Use another version.
Shared request-body building blocks used by Cortex list/search endpoints.
Most Advanced API endpoints accept a common set of fields inside
request_data — filters, sort, search_from/search_to, and a
timeframe. This module defines the opaque value types for those fields and
the constructors / encoders that build them. Endpoint modules combine these
into a Cortex.RequestData.Standard envelope
and hand it to Cortex.Request.post.
Values are opaque so the wire format (operator keywords, keyword: asc|desc,
epoch-ms time windows) stays an implementation detail that can shift without
breaking callers.
A small number of endpoints — most notably the asset-inventory POST
/public_api/v1/assets and the cloud-API list endpoints — use a different
wire shape ({SEARCH_FIELD, SEARCH_TYPE, SEARCH_VALUE} with uppercase
operators, sort wrapped in an array, etc.). Dialect selects
which shape the encoders emit; endpoint modules pick the right value at the
call site.
Membership filter — field is one of the given values. Named with a
trailing underscore because in is a reserved word in Elm.
Escape hatch for operators the SDK has not catalogued yet. The operator
string is passed through to the wire as-is, and value can be any JSON.
Sort directive — a field name and direction keyword.
Pagination window over the result set. The server reads this as
search_from / search_to row indices (0-based, exclusive on the upper
bound).
Selects which request_data wire shape the encoders emit. Pick one with
standard (the default for almost every Cortex endpoint) or
assetInventory (the POST /public_api/v1/assets
inventory endpoint and the cloud-API list endpoints, which use uppercase
SEARCH_FIELD/SEARCH_TYPE/SEARCH_VALUE filters and a sort array).
The default dialect used by most Cortex Advanced API list/search
endpoints — {field, operator, value} filters and {field, keyword} sort.
The asset-inventory dialect — {SEARCH_FIELD, SEARCH_TYPE, SEARCH_VALUE}
filters wrapped in {AND: [...]} and sort wrapped in a one-element array.
Timeframes are not supported by this dialect and are dropped silently.
Encode a Sort in the given Dialect's wire
representation. The Standard dialect emits {field, keyword: "asc"|"desc"};
the AssetInventory dialect emits {FIELD, ORDER: "ASC"|"DESC"} (the
enclosing array wrapping is applied by Cortex.RequestData.encode).
Encode a Range as the two-field {search_from, search_to}
pair expected inside request_data. Returned as a list so callers can splice
it into the enclosing object.
Encode a Timeframe to its wire representation.
A single
{field, operator, value}filter entry. Multiple filters sent on one request are AND-ed together by the server.