Prometheus Entity Management API
    Preparing search index...
    MergeStrategy: (
        prev: Record<string, unknown> | undefined,
        next: Record<string, unknown>,
        ctx: MergeContext,
    ) => Record<string, unknown>

    Resolves the next canonical entity value from the previous value and an incoming partial/full write.

    Contract:

    • MUST be pure (no side effects, no graph access) — the graph applies the returned value inside its Immer producer.
    • MUST return a NEW object; never mutate prev or next (immutability rule).
    • prev is undefined on first write for an id.

    Type Declaration

      • (
            prev: Record<string, unknown> | undefined,
            next: Record<string, unknown>,
            ctx: MergeContext,
        ): Record<string, unknown>
      • Parameters

        • prev: Record<string, unknown> | undefined

          Current canonical value, or undefined if none exists yet.

        • next: Record<string, unknown>

          Incoming write (partial for upsert, full for replace).

        • ctx: MergeContext

          Type/id/origin/timestamp metadata for this write.

        Returns Record<string, unknown>

        The merged canonical value to store.