using ZB.MOM.WW.ScadaBridge.Commons.Entities.Audit; using ZB.MOM.WW.ScadaBridge.Commons.Types; namespace ZB.MOM.WW.ScadaBridge.Commons.Messages.Integration; /// /// Combined audit + operational telemetry packet for cached outbound calls /// (Audit Log #23 / M3). The site emits one packet per lifecycle event /// — Submit (Audit kind CachedSubmit), per-attempt /// ApiCallCached/DbWriteCached, terminal CachedResolve — /// and central writes the row plus the /// upsert in one MS SQL transaction. Two /// payload shapes ride on a single wire message so the same on-the-wire batch /// can carry mixed lifecycle events without the central dual-write needing a /// second RPC for the operational state. /// /// /// /// Both inner records carry the same TrackedOperationId — the /// idempotency key end-to-end. The /// pattern (used by Audit Log #23 to thread cached-call rows together) is /// honoured by the site emitter; the packet itself is shape-only and makes no /// independent correlation guarantees. /// /// /// Additive-only per Commons REQ-COM-5a (M2 reviewer note) — this is a new /// message, not a rename of any existing M2 envelope. /// /// /// The Audit Log #23 row to insert at central. /// The SiteCalls upsert mirroring this lifecycle event. public sealed record CachedCallTelemetry( AuditEvent Audit, SiteCallOperational Operational);