ores.history.api
Table of Contents
Summary
ores.history.api is the genuinely client-visible half of
ores.history: the one shared NATS request/response pair every
entity's history uses (get_entity_history_request=/
=get_entity_history_response, keyed by an entity_type string rather
than a typed per-entity subject), and build_entity_history_versions(),
the shared rendering/diffing glue every server-side history_provider
needs. A dependency-free leaf — matching ores.diff's dependency
discipline — so any frontend (Qt, shell, Wt, HTTP) can decode the
response without pulling in server-only machinery.
Inputs
- A domain type's newest-first version list and its codegen'd
render_{entity}_fields()mapper, fed intobuild_entity_history_versions().
Outputs
get_entity_history_response: an ordered list ofentity_history_version(version,modified_by,recorded_at, renderedfields, andchangesvs the previous version), or a failure message when no provider is registered for the requestedentity_type.
Entry points
include/ores.history.api/messaging/history_protocol.hpp— the shared request/response types and thehistory.v1.getsubject constant.include/ores.history.api/service/version_builder.hpp—build_entity_history_versions(versions, render): renders each newest-first version's fields, diffs each against the next-older one viaores.diff::engine::compute(empty diff for the oldest), and numbers versions descending from the count — matching every*_repository::read_all(id)'sversion DESCordering.
Dependencies
- ores.diff —
field_value=/=diff_resultembedded inentity_history_version. - std and
rflonly beyond that — deliberately a leaf so every frontend and domain service depends on it without cycles.
See also
- ores.history — the group overview.
- ores.history.core — the server-side dispatch registry consuming these types.
- History Diff Architecture — the design this component implements.
