Interface: AstmMessageClassification
The message-level classification from the host-query flow. isHostQueryRequest
is the single boolean a consumer should gate on before treating records as
results - it is true iff a Q record is present.
Example
import { parseAstmRecords } from "@cosyte/astm";
const req = parseAstmRecords("H|\\^&\rP|1\rQ|1|^SPEC-7||ALL\rL|1\r");
req.classification.kind; // "host-query"
req.classification.isHostQueryRequest; // true - never read its records as results
Properties
hasOrders
readonlyhasOrders:boolean
At least one O (order) record is present.
hasQuery
readonlyhasQuery:boolean
At least one Q (request-information) record is present.
hasResults
readonlyhasResults:boolean
At least one R (result) record is present.
isHostQueryRequest
readonlyisHostQueryRequest:boolean
true iff kind === "host-query" (a Q record is present) - the safety surface: gate on this
before treating records as results, so a query is never misread as a result upload.
kind
readonlykind:AstmMessageKind
The message kind.