Stone.js API
    Preparing search index...
    • Read a whole source off an event.

      body, query and params are read as wholes, because a schema validates the payload, not one field of it. event.get('body') would look for a field named body inside the body, which is a different question. Any other key falls back to event.get, so a context that exposes something else (a CLI argument set, a message attribute) validates just as well.

      query is normalised from URLSearchParams to a plain object, since that is what a schema can parse.

      Parameters

      • event: SourceEvent

        The incoming event.

      • source: string

        The source name.

      Returns unknown

      The value to validate.